Changeset View
Changeset View
Standalone View
Standalone View
tests/SitesRepository/SiteTest.php
- This file was added.
<?php | |||||
declare(strict_types=1); | |||||
namespace Nasqueron\SAAS\PhpBB\Tests\SitesRepository; | |||||
use Nasqueron\SAAS\PhpBB\SitesRepository\Site; | |||||
use PHPUnit\Framework\TestCase; | |||||
use InvalidArgumentException; | |||||
class SiteTest extends TestCase { | |||||
public function testSetId () { | |||||
$site = new Site; | |||||
$site->setId('acme'); | |||||
$this->assertEquals('acme', $site->getId()); | |||||
} | |||||
public function testSetIdWithInvalidIdentifiant () { | |||||
$this->expectException(InvalidArgumentException::class); | |||||
$site = new Site; | |||||
$site->setId('invalid acme'); | |||||
} | |||||
} |
Nasqueron DevCentral · If it had been much bigger the moon would have had a core of ice. · Powered by Phabricator