/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { $this->object = new Album(); $client = new Client(); $client->setApiKey('b25b959554ed76058ac220b7b2e0a026'); // Demo api key provided by lastfm $this->object->setClient($client); }
/** * @depends testSetClient */ public function testGetClient() { $album = new Album(); $client = new \Lastfm\Service\Client(); $album->setClient($client); $this->assertInstanceOf('\\Lastfm\\Service\\Client', $album->getClient()); }