Permalink
Browse files

Run latest PHP fixer against tests to use more specific methods

  • Loading branch information...
oschwald committed Nov 30, 2017
1 parent c908f22 commit 5de66aaa31879fde80bd09e0afdb4768a38c6926
@@ -109,11 +109,11 @@ public function testAnonymousIp()
$ipAddress = '1.2.0.1';
$record = $reader->anonymousIp($ipAddress);
$this->assertSame(true, $record->isAnonymous);
$this->assertSame(true, $record->isAnonymousVpn);
$this->assertSame(false, $record->isHostingProvider);
$this->assertSame(false, $record->isPublicProxy);
$this->assertSame(false, $record->isTorExitNode);
$this->assertTrue($record->isAnonymous);
$this->assertTrue($record->isAnonymousVpn);
$this->assertFalse($record->isHostingProvider);
$this->assertFalse($record->isPublicProxy);
$this->assertFalse($record->isTorExitNode);
$this->assertSame($ipAddress, $record->ipAddress);
$reader->close();
}
@@ -169,7 +169,7 @@ public function testEnterprise()
$this->assertSame(27, $record->location->accuracyRadius);
$this->assertSame('Cable/DSL', $record->traits->connectionType);
$this->assertSame(true, $record->traits->isLegitimateProxy);
$this->assertTrue($record->traits->isLegitimateProxy);
$this->assertSame($ipAddress, $record->traits->ipAddress);
$reader->close();
@@ -116,8 +116,7 @@ public function testValues()
'country name is United States of America'
);
$this->assertSame(
null,
$this->assertNull(
$this->model->country->confidence,
'country confidence is undef'
);
@@ -147,8 +146,7 @@ public function testValues()
);
foreach (['isAnonymousProxy', 'isSatelliteProvider'] as $meth) {
$this->assertSame(
false,
$this->assertFalse(
$this->model->traits->$meth,
"traits $meth returns 0 by default"
);
@@ -63,8 +63,7 @@ public function testTwoFallbacks()
{
$model = new Country($this->raw, ['ru', 'ja']);
$this->assertSame(
null,
$this->assertNull(
$model->continent->name,
'continent name is undef (no Russian or Japanese available)'
);
@@ -90,14 +89,12 @@ public function testNoFallbacks()
{
$model = new Country($this->raw, ['ja']);
$this->assertSame(
null,
$this->assertNull(
$model->continent->name,
'continent name is undef (no Japanese available) '
);
$this->assertSame(
null,
$this->assertNull(
$model->country->name,
'country name is undef (no Japanese available) '
);

0 comments on commit 5de66aa

Please sign in to comment.