diff --git a/tests/Adapter/GuzzleTest.php b/tests/Adapter/GuzzleTest.php index 3d1e27a..88c3ff3 100644 --- a/tests/Adapter/GuzzleTest.php +++ b/tests/Adapter/GuzzleTest.php @@ -58,7 +58,7 @@ class GuzzleTest extends PHPUnit_Framework_TestCase $this->assertEquals("application/json", $headers["Content-Type"][0]); $body = json_decode($response->getBody()); - $this->assertEquals("Testing a PUT request.", $body->json->{"X-Put-Test"}); + $this->assertEquals("Testing a PUT request.", json_decode($body->json)->{"X-Put-Test"}); } public function testPatch() @@ -70,7 +70,7 @@ class GuzzleTest extends PHPUnit_Framework_TestCase $this->assertEquals("application/json", $headers["Content-Type"][0]); $body = json_decode($response->getBody()); - $this->assertEquals("Testing a PATCH request.", $body->json->{"X-Patch-Test"}); + $this->assertEquals("Testing a PATCH request.", json_decode($body->json)->{"X-Patch-Test"}); } public function testDelete() @@ -82,7 +82,7 @@ class GuzzleTest extends PHPUnit_Framework_TestCase $this->assertEquals("application/json", $headers["Content-Type"][0]); $body = json_decode($response->getBody()); - $this->assertEquals("Testing a DELETE request.", $body->form->{"X-Delete-Test"}); + $this->assertEquals("Testing a DELETE request.", $body->json->{"X-Delete-Test"}); } public function testErrors() diff --git a/tests/Endpoints/ZonesTest.php b/tests/Endpoints/ZonesTest.php index b6bc87a..b3bc4d7 100644 --- a/tests/Endpoints/ZonesTest.php +++ b/tests/Endpoints/ZonesTest.php @@ -290,7 +290,7 @@ class ZonesTest extends PHPUnit_Framework_TestCase $this->assertEquals("023e105f4ecef8ad9ca31a8372d0c353", $result); } - public function testPurgeAll() + public function testCachePurgeEverything() { $stream = GuzzleHttp\Psr7\stream_for('{ "success": true, @@ -312,7 +312,7 @@ class ZonesTest extends PHPUnit_Framework_TestCase ); $zones = new \Cloudflare\API\Endpoints\Zones($mock); - $result = $zones->purgeAll("c2547eb745079dac9320b638f5e225cf483cc5cfdda41"); + $result = $zones->cachePurgeEverything("c2547eb745079dac9320b638f5e225cf483cc5cfdda41"); $this->assertTrue($result); }