From bc1a90575a93b751db968a864a3b01bf3ac69b55 Mon Sep 17 00:00:00 2001 From: Maks3w Date: Fri, 1 May 2015 09:35:04 +0200 Subject: [PATCH 1/2] [test] Replace assertTrue(is_FOO) with assertInternalType('FOO') --- test/BindTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/BindTest.php b/test/BindTest.php index 59de1bc38..1f56c9038 100644 --- a/test/BindTest.php +++ b/test/BindTest.php @@ -264,7 +264,7 @@ public function testResourceIsAlwaysReturned() { $ldap = new Ldap\Ldap($this->options); $this->assertNotNull($ldap->getResource()); - $this->assertTrue(is_resource($ldap->getResource())); + $this->assertInternalType('resource', $ldap->getResource()); $this->assertEquals(TESTS_ZEND_LDAP_USERNAME, $ldap->getBoundUser()); } From 70afe76a427410952a377634375beaefdf80e359 Mon Sep 17 00:00:00 2001 From: Maks3w Date: Fri, 1 May 2015 16:47:21 +0200 Subject: [PATCH 2/2] [test] Replace assertTrue(x == y) with assertEquals(x, y) --- test/CanonTest.php | 2 +- test/Dn/ExplodingTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CanonTest.php b/test/CanonTest.php index bf67a7c25..426cdbe0a 100644 --- a/test/CanonTest.php +++ b/test/CanonTest.php @@ -117,7 +117,7 @@ public function testMismatchDomainBind() $ldap->bind('BOGUS\\doesntmatter', 'doesntmatter'); $this->fail('Expected exception not thrown'); } catch (Exception\LdapException $zle) { - $this->assertTrue($zle->getCode() == Exception\LdapException::LDAP_X_DOMAIN_MISMATCH); + $this->assertEquals(Exception\LdapException::LDAP_X_DOMAIN_MISMATCH, $zle->getCode()); } } diff --git a/test/Dn/ExplodingTest.php b/test/Dn/ExplodingTest.php index 1e69ac7c5..4726ae7ef 100644 --- a/test/Dn/ExplodingTest.php +++ b/test/Dn/ExplodingTest.php @@ -59,7 +59,7 @@ public static function explodeDnOperationProvider() public function testExplodeDnOperation($input, $expected) { $ret = Ldap\Dn::checkDn($input); - $this->assertTrue($ret === $expected); + $this->assertEquals($expected, $ret); } public function testExplodeDnCaseFold()