getPsr7JsonResponseForFixture('Endpoints/listIPs.json'); $mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->getMock(); $mock->method('get')->willReturn($response); $mock->expects($this->once()) ->method('get') ->with( $this->equalTo('ips'), $this->equalTo([]) ); $ips = new \Cloudflare\API\Endpoints\IPs($mock); $ips = $ips->listIPs(); $this->assertObjectHasAttribute('ipv4_cidrs', $ips); $this->assertObjectHasAttribute('ipv6_cidrs', $ips); } }