Use assertSame instead of assertEquals to test boolean attributes
This commit is contained in:
parent
0c6ba34623
commit
9e6449290f
|
@ -94,11 +94,11 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
|
||||||
$ipAddress = '1.2.0.1';
|
$ipAddress = '1.2.0.1';
|
||||||
|
|
||||||
$record = $reader->anonymousIp($ipAddress);
|
$record = $reader->anonymousIp($ipAddress);
|
||||||
$this->assertEquals(1, $record->isAnonymous);
|
$this->assertSame(true, $record->isAnonymous);
|
||||||
$this->assertEquals(1, $record->isAnonymousVpn);
|
$this->assertSame(true, $record->isAnonymousVpn);
|
||||||
$this->assertEquals(0, $record->isHostingProvider);
|
$this->assertSame(null, $record->isHostingProvider);
|
||||||
$this->assertEquals(0, $record->isPublicProxy);
|
$this->assertSame(null, $record->isPublicProxy);
|
||||||
$this->assertEquals(0, $record->isTorExitNode);
|
$this->assertSame(null, $record->isTorExitNode);
|
||||||
$this->assertEquals($ipAddress, $record->ipAddress);
|
$this->assertEquals($ipAddress, $record->ipAddress);
|
||||||
$reader->close();
|
$reader->close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user