public function testCall() { $this->object->setApiKey('b25b959554ed76058ac220b7b2e0a026'); // API key from last.fm api demo $result = $this->object->call('album.search', array('album' => 'believe')); $this->assertInstanceOf('SimpleXmlElement', $result); }
/** * 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); }