private function mockPrepareApiCall() { $this->mockApiCallLoad(); $this->apiTimeCalculator->shouldReceive('isCallStillValid')->with($this->apiCall)->andReturn(true); $this->apiCall->shouldReceive('getApi')->andReturn($this->api); $this->api->shouldReceive('getSection')->andReturn('section'); $this->api->shouldReceive('getName')->andReturn('name'); $this->sectionApiFactory->shouldReceive('create')->with($this->apiCall)->andReturn($this->sectionApi); }
public function testCreateMapSection() { $this->api->shouldReceive('getSection')->andReturn('map'); $this->assertSame($this->noKeySectionApi, $this->factory->create($this->apiCall)); }
public function create(Api $api) { return $this->container->get('tarioch.eveapi.' . $api->getSection() . '.' . $api->getName()); }