private function mockPrepareApiCall() { $keyId = 'keyId'; $vcode = 'vcode'; $this->apiCall->shouldReceive('getKey')->andReturn($this->key); $this->key->shouldReceive('isActive')->andReturn(true); $this->key->shouldReceive('getKeyId')->andReturn($keyId); $this->key->shouldReceive('getVcode')->andReturn($vcode); $this->phealFactory->shouldReceive('createEveOnline')->with($keyId, $vcode)->andReturn($this->pheal); $this->apiCall->shouldReceive('getApi')->andReturn($this->api); $this->specificApiFactory->shouldReceive('create')->with($this->api)->andReturn($this->specificApi); }