From b2a7dde6f4c3166c5ba3acb0e43ea3b980fc7d24 Mon Sep 17 00:00:00 2001 From: Nils Wisiol Date: Mon, 24 Jun 2013 15:57:54 +0200 Subject: [PATCH] improved unit tests by using more specific asserts --- Tests/Extractor/ApiDocExtractorTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Extractor/ApiDocExtractorTest.php b/Tests/Extractor/ApiDocExtractorTest.php index c6a4d70..66d620f 100644 --- a/Tests/Extractor/ApiDocExtractorTest.php +++ b/Tests/Extractor/ApiDocExtractorTest.php @@ -181,9 +181,9 @@ class ApiDocExtractorTest extends WebTestCase $this->assertTrue( $annotation->getAuthentication() ); - $this->assertTrue(in_array('ROLE_USER', $annotation->getAuthenticationRoles())); - $this->assertTrue(in_array('ROLE_FOOBAR', $annotation->getAuthenticationRoles())); - $this->assertEquals(2, count($annotation->getAuthenticationRoles())); + $this->assertContains('ROLE_USER', $annotation->getAuthenticationRoles()); + $this->assertContains('ROLE_FOOBAR', $annotation->getAuthenticationRoles()); + $this->assertCount(2, $annotation->getAuthenticationRoles()); } public function testGetWithCache()