improved unit tests by using more specific asserts

This commit is contained in:
Nils Wisiol 2013-06-24 15:57:54 +02:00
parent f764773c89
commit b2a7dde6f4

View File

@ -181,9 +181,9 @@ class ApiDocExtractorTest extends WebTestCase
$this->assertTrue( $this->assertTrue(
$annotation->getAuthentication() $annotation->getAuthentication()
); );
$this->assertTrue(in_array('ROLE_USER', $annotation->getAuthenticationRoles())); $this->assertContains('ROLE_USER', $annotation->getAuthenticationRoles());
$this->assertTrue(in_array('ROLE_FOOBAR', $annotation->getAuthenticationRoles())); $this->assertContains('ROLE_FOOBAR', $annotation->getAuthenticationRoles());
$this->assertEquals(2, count($annotation->getAuthenticationRoles())); $this->assertCount(2, $annotation->getAuthenticationRoles());
} }
public function testGetWithCache() public function testGetWithCache()