assertCount should be used instead

This commit is contained in:
Kleis Auke Wolthuizen
2017-11-21 17:50:28 +01:00
parent b15b4ecc51
commit c9d21466aa
5 changed files with 6 additions and 6 deletions

View File

@@ -18,6 +18,6 @@ class APIKeyTest extends TestCase
$this->assertEquals('example@example.com', $headers['X-Auth-Email']); $this->assertEquals('example@example.com', $headers['X-Auth-Email']);
$this->assertEquals('1234567893feefc5f0q5000bfo0c38d90bbeb', $headers['X-Auth-Key']); $this->assertEquals('1234567893feefc5f0q5000bfo0c38d90bbeb', $headers['X-Auth-Key']);
$this->assertEquals(2, count($headers)); $this->assertCount(2, $headers);
} }
} }

View File

@@ -19,6 +19,6 @@ class UserServiceKeyTest extends TestCase
$headers['X-Auth-User-Service-Key'] $headers['X-Auth-User-Service-Key']
); );
$this->assertEquals(1, count($headers)); $this->assertCount(1, $headers);
} }
} }

View File

@@ -14,7 +14,7 @@ class ConfigurationsUARulesTest extends TestCase
$configuration->addUA('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4'); $configuration->addUA('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4');
$array = $configuration->getArray(); $array = $configuration->getArray();
$this->assertEquals(1, count($array)); $this->assertCount(1, $array);
$this->assertObjectHasAttribute('target', $array[0]); $this->assertObjectHasAttribute('target', $array[0]);
$this->assertEquals('ua', $array[0]->target); $this->assertEquals('ua', $array[0]->target);

View File

@@ -14,7 +14,7 @@ class ConfigurationsZoneLockdownTest extends TestCase
$configuration->addIP('1.2.3.4'); $configuration->addIP('1.2.3.4');
$array = $configuration->getArray(); $array = $configuration->getArray();
$this->assertEquals(1, count($array)); $this->assertCount(1, $array);
$this->assertObjectHasAttribute('target', $array[0]); $this->assertObjectHasAttribute('target', $array[0]);
$this->assertEquals('ip', $array[0]->target); $this->assertEquals('ip', $array[0]->target);
@@ -24,7 +24,7 @@ class ConfigurationsZoneLockdownTest extends TestCase
$configuration->addIPRange('1.2.3.4/24'); $configuration->addIPRange('1.2.3.4/24');
$array = $configuration->getArray(); $array = $configuration->getArray();
$this->assertEquals(2, count($array)); $this->assertCount(2, $array);
$this->assertObjectHasAttribute('target', $array[1]); $this->assertObjectHasAttribute('target', $array[1]);
$this->assertEquals('ip_range', $array[1]->target); $this->assertEquals('ip_range', $array[1]->target);

View File

@@ -15,7 +15,7 @@ class PageRulesTargetTest extends TestCase
$targets = new PageRulesTargets('junade.com/*'); $targets = new PageRulesTargets('junade.com/*');
$array = $targets->getArray(); $array = $targets->getArray();
$this->assertEquals(1, count($array)); $this->assertCount(1, $array);
$this->assertEquals('junade.com/*', $array[0]->constraint->value); $this->assertEquals('junade.com/*', $array[0]->constraint->value);
$this->assertEquals('matches', $array[0]->constraint->operator); $this->assertEquals('matches', $array[0]->constraint->operator);
} }