/** * Sets up our client and key before each test */ public function setUp() { $this->apiKey = $_SERVER['BBY_API_KEY']; $this->client = $this->getMock(Client::class, ['doRequest']); $this->client->expects($this->any())->method('doRequest')->willReturnCallback([$this, 'getGeneratedUrl']); }