Replace alias functions with origin functions

This commit is contained in:
Kleis Auke Wolthuizen
2017-11-21 17:41:21 +01:00
parent 90eaea7be2
commit ee4a42ea06
6 changed files with 7 additions and 7 deletions

View File

@@ -96,7 +96,7 @@ class Zones implements API
{ {
$zones = $this->listZones($name); $zones = $this->listZones($name);
if (sizeof($zones->result) < 1) { if (count($zones->result) < 1) {
throw new EndpointException('Could not find zones with specified name.'); throw new EndpointException('Could not find zones with specified name.');
} }

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, sizeof($headers)); $this->assertEquals(2, count($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, sizeof($headers)); $this->assertEquals(1, count($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, sizeof($array)); $this->assertEquals(1, count($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

@@ -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, sizeof($array)); $this->assertEquals(1, count($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);
} }

View File

@@ -14,7 +14,7 @@ class ConfigurationZoneLockdownTest extends TestCase
$configuration->addIP('1.2.3.4'); $configuration->addIP('1.2.3.4');
$array = $configuration->getArray(); $array = $configuration->getArray();
$this->assertEquals(1, sizeof($array)); $this->assertEquals(1, count($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 ConfigurationZoneLockdownTest 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, sizeof($array)); $this->assertEquals(2, count($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);