diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Acl/Domain/ObjectIdentityTest.php | 20 | ||||
-rw-r--r-- | Tests/Core/Util/ClassUtilsTest.php | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/Tests/Acl/Domain/ObjectIdentityTest.php b/Tests/Acl/Domain/ObjectIdentityTest.php index 20c74d5..7aa3cf2 100644 --- a/Tests/Acl/Domain/ObjectIdentityTest.php +++ b/Tests/Acl/Domain/ObjectIdentityTest.php @@ -12,13 +12,13 @@ namespace Symfony\Component\Security\Tests\Acl\Domain { use Symfony\Component\Security\Acl\Domain\ObjectIdentity; - + class ObjectIdentityTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $id = new ObjectIdentity('fooid', 'footype'); - + $this->assertEquals('fooid', $id->getIdentifier()); $this->assertEquals('footype', $id->getType()); } @@ -31,7 +31,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain $this->assertEquals('fooid', $id->getIdentifier()); $this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject', $id->getType()); } - + public function testFromDomainObjectPrefersInterfaceOverGetId() { $domainObject = $this->getMock('Symfony\Component\Security\Acl\Model\DomainObjectInterface'); @@ -45,11 +45,11 @@ namespace Symfony\Component\Security\Tests\Acl\Domain ->method('getId') ->will($this->returnValue('getId()')) ; - + $id = ObjectIdentity::fromDomainObject($domainObject); $this->assertEquals('getObjectIdentifier()', $id->getIdentifier()); } - + public function testFromDomainObjectWithoutInterface() { $id = ObjectIdentity::fromDomainObject(new TestDomainObject()); @@ -63,7 +63,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain $this->assertEquals('getId()', $id->getIdentifier()); $this->assertEquals('Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject', $id->getType()); } - + /** * @dataProvider getCompareData */ @@ -75,7 +75,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain $this->assertFalse($oid1->equals($oid2)); } } - + public function getCompareData() { return array( @@ -85,7 +85,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain array(new ObjectIdentity('1', 'bla'), new ObjectIdentity('1', 'blub'), false), ); } - + protected function setUp() { if (!class_exists('Doctrine\DBAL\DriverManager')) { @@ -93,14 +93,14 @@ namespace Symfony\Component\Security\Tests\Acl\Domain } } } - + class TestDomainObject { public function getObjectIdentifier() { return 'getObjectIdentifier()'; } - + public function getId() { return 'getId()'; diff --git a/Tests/Core/Util/ClassUtilsTest.php b/Tests/Core/Util/ClassUtilsTest.php index 7a6e698..16378a6 100644 --- a/Tests/Core/Util/ClassUtilsTest.php +++ b/Tests/Core/Util/ClassUtilsTest.php @@ -3,7 +3,7 @@ namespace Symfony\Component\Security\Tests\Core\Util { use Symfony\Component\Security\Core\Util\ClassUtils; - + class ClassUtilsTest extends \PHPUnit_Framework_TestCase { static public function dataGetClass() @@ -18,7 +18,7 @@ namespace Symfony\Component\Security\Tests\Core\Util array(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Core\Util\TestObject(), 'Symfony\Component\Security\Tests\Core\Util\TestObject'), ); } - + /** * @dataProvider dataGetClass */ |