public function testLoadCustomerFromAPI() { $api = Mockery::mock(WebshopappApiClient::class); $api->customers = Mockery::mock(WebshopappApiResourceCustomers::class); $api->customers->shouldReceive('get')->once()->andReturn(["customer" => ["id" => 530173, "createdAt" => "2013-09-20T13:21:29+02:00", "updatedAt" => null, "lastOnlineAt" => "2013-09-20T13:21:29+02:00", "isConfirmed" => true, "remoteIp" => "127.0.0.1", "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36", "referralId" => false, "gender" => false, "birthDate" => false, "nationalId" => "", "email" => "*****@*****.**", "firstname" => "Jan", "middlename" => "", "lastname" => "Janssen"]]); $client = new SEOShop($api); $customer = $client->customers(6856292); $this->assertInstanceOf(Customer::class, $customer); }
public function getHooksCount() { return $this->SEOShop->getApi()->webhooks->count(); }
/** * @return string */ private function fetchJson() { return json_decode(json_encode($this->retriever->retrieve($this->url))); }