public function testBuildPlaylistOwner() { $owner = (object) ['external_urls' => (object) ['spotify' => 'http://open.spotify.com/...'], 'href' => 'https://api.spotify.com/v1/users/...', 'id' => 'foo', 'type' => 'user', 'uri' => 'spotify:user:foo']; $result = $this->valueObjectBuilder->buildPlaylistOwner($owner); $this->assertEquals((array) $owner->external_urls, $result->getExternalUrls(), 'External url should be set and be assoc. array'); $this->assertValueObjectPropertyEquals('href', $owner, $result); $this->assertValueObjectPropertyEquals('id', $owner, $result); $this->assertValueObjectPropertyEquals('type', $owner, $result); $this->assertValueObjectPropertyEquals('uri', $owner, $result); }