@@ -17,34 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "Roll Over Beethoven", |
|
22 | - "info": "This is a song", |
|
23 | - "tape": 1, |
|
24 | - "cover" : { |
|
25 | - "mbid" : "592a3b6d-c42b-4567-99c9-ecf63bd66499", |
|
26 | - "tmid" : 734540, |
|
27 | - "name" : "Chuck Berry", |
|
28 | - "sortName" : "Berry, Chuck", |
|
29 | - "disambiguation" : "", |
|
30 | - "url" : "https://www.setlist.fm/setlists/chuck-berry-63d6a2b7.html" |
|
31 | - }, |
|
32 | - "with" : { |
|
33 | - "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d", |
|
34 | - "tmid" : 735610, |
|
35 | - "name" : "The Beatles", |
|
36 | - "sortName" : "Beatles, The", |
|
37 | - "disambiguation" : "", |
|
38 | - "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html" |
|
39 | - } |
|
40 | - } |
|
41 | - EOD; |
|
42 | - |
|
43 | - $song = Song::fromApi(json_decode($data, true)); |
|
44 | - $this->assertSame('Roll Over Beethoven', $song->getName()); |
|
45 | - $this->assertSame('This is a song', $song->getInfo()); |
|
46 | - $this->assertNotNull($song->getCover()); |
|
47 | - $this->assertNotNull($song->getFeaturings()); |
|
48 | - $this->assertTrue($song->isTaped()); |
|
49 | - } |
|
50 | -} |
@@ -17,34 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "Roll Over Beethoven", |
|
22 | - "info": "This is a song", |
|
23 | - "tape": 1, |
|
24 | - "cover" : { |
|
25 | - "mbid" : "592a3b6d-c42b-4567-99c9-ecf63bd66499", |
|
26 | - "tmid" : 734540, |
|
27 | - "name" : "Chuck Berry", |
|
28 | - "sortName" : "Berry, Chuck", |
|
29 | - "disambiguation" : "", |
|
30 | - "url" : "https://www.setlist.fm/setlists/chuck-berry-63d6a2b7.html" |
|
31 | - }, |
|
32 | - "with" : { |
|
33 | - "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d", |
|
34 | - "tmid" : 735610, |
|
35 | - "name" : "The Beatles", |
|
36 | - "sortName" : "Beatles, The", |
|
37 | - "disambiguation" : "", |
|
38 | - "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html" |
|
39 | - } |
|
40 | - } |
|
41 | - EOD; |
|
42 | - |
|
43 | - $song = Song::fromApi(json_decode($data, true)); |
|
44 | - $this->assertSame('Roll Over Beethoven', $song->getName()); |
|
45 | - $this->assertSame('This is a song', $song->getInfo()); |
|
46 | - $this->assertNotNull($song->getCover()); |
|
47 | - $this->assertNotNull($song->getFeaturings()); |
|
48 | - $this->assertTrue($song->isTaped()); |
|
49 | - } |
|
50 | -} |
@@ -17,12 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "North American Tour 1964" |
|
22 | - } |
|
23 | - EOD; |
|
24 | - |
|
25 | - $tour = Tour::fromApi(json_decode($data, true)); |
|
26 | - $this->assertSame('North American Tour 1964', $tour->getName()); |
|
27 | - } |
|
28 | -} |
@@ -17,12 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "name" : "North American Tour 1964" |
|
22 | - } |
|
23 | - EOD; |
|
24 | - |
|
25 | - $tour = Tour::fromApi(json_decode($data, true)); |
|
26 | - $this->assertSame('North American Tour 1964', $tour->getName()); |
|
27 | - } |
|
28 | -} |
@@ -17,20 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "userId": "Metal-42", |
|
22 | - "fullname": "Max", |
|
23 | - "about": "Some dummy text", |
|
24 | - "website": "http://example.com", |
|
25 | - "url": "https://www.setlist.fm/user/Metal-42" |
|
26 | - } |
|
27 | - EOD; |
|
28 | - |
|
29 | - $user = User::fromApi(json_decode($data, true)); |
|
30 | - $this->assertSame('Metal-42', $user->getId()); |
|
31 | - $this->assertSame('Some dummy text', $user->getAbout()); |
|
32 | - $this->assertSame('Max', $user->getFullname()); |
|
33 | - $this->assertSame('http://example.com', $user->getWebsite()); |
|
34 | - $this->assertSame('https://www.setlist.fm/user/Metal-42', $user->getUrl()); |
|
35 | - } |
|
36 | -} |
@@ -17,20 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "userId": "Metal-42", |
|
22 | - "fullname": "Max", |
|
23 | - "about": "Some dummy text", |
|
24 | - "website": "http://example.com", |
|
25 | - "url": "https://www.setlist.fm/user/Metal-42" |
|
26 | - } |
|
27 | - EOD; |
|
28 | - |
|
29 | - $user = User::fromApi(json_decode($data, true)); |
|
30 | - $this->assertSame('Metal-42', $user->getId()); |
|
31 | - $this->assertSame('Some dummy text', $user->getAbout()); |
|
32 | - $this->assertSame('Max', $user->getFullname()); |
|
33 | - $this->assertSame('http://example.com', $user->getWebsite()); |
|
34 | - $this->assertSame('https://www.setlist.fm/user/Metal-42', $user->getUrl()); |
|
35 | - } |
|
36 | -} |
@@ -17,31 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "city" : { |
|
22 | - "id" : "5357527", |
|
23 | - "name" : "Hollywood", |
|
24 | - "stateCode" : "CA", |
|
25 | - "state" : "California", |
|
26 | - "coords" : { |
|
27 | - "long" : -118.3267434, |
|
28 | - "lat" : 34.0983425 |
|
29 | - }, |
|
30 | - "country" : { |
|
31 | - "code" : "US", |
|
32 | - "name" : "United States" |
|
33 | - } |
|
34 | - }, |
|
35 | - "url" : "https://www.setlist.fm/venue/compaq-center-san-jose-ca-usa-6bd6ca6e.html", |
|
36 | - "id" : "6bd6ca6e", |
|
37 | - "name" : "Compaq Center" |
|
38 | - } |
|
39 | - EOD; |
|
40 | - |
|
41 | - $venue = Venue::fromApi(json_decode($data, true)); |
|
42 | - $this->assertSame('6bd6ca6e', $venue->getId()); |
|
43 | - $this->assertSame('Compaq Center', $venue->getName()); |
|
44 | - $this->assertNotNull($venue->getCity()); |
|
45 | - $this->assertSame('https://www.setlist.fm/venue/compaq-center-san-jose-ca-usa-6bd6ca6e.html', $venue->getUrl()); |
|
46 | - } |
|
47 | -} |
@@ -17,31 +17,3 @@ |
||
17 | 17 | public function testFromApi(): void |
18 | 18 | { |
19 | 19 | $data = <<<'EOD' |
20 | - { |
|
21 | - "city" : { |
|
22 | - "id" : "5357527", |
|
23 | - "name" : "Hollywood", |
|
24 | - "stateCode" : "CA", |
|
25 | - "state" : "California", |
|
26 | - "coords" : { |
|
27 | - "long" : -118.3267434, |
|
28 | - "lat" : 34.0983425 |
|
29 | - }, |
|
30 | - "country" : { |
|
31 | - "code" : "US", |
|
32 | - "name" : "United States" |
|
33 | - } |
|
34 | - }, |
|
35 | - "url" : "https://www.setlist.fm/venue/compaq-center-san-jose-ca-usa-6bd6ca6e.html", |
|
36 | - "id" : "6bd6ca6e", |
|
37 | - "name" : "Compaq Center" |
|
38 | - } |
|
39 | - EOD; |
|
40 | - |
|
41 | - $venue = Venue::fromApi(json_decode($data, true)); |
|
42 | - $this->assertSame('6bd6ca6e', $venue->getId()); |
|
43 | - $this->assertSame('Compaq Center', $venue->getName()); |
|
44 | - $this->assertNotNull($venue->getCity()); |
|
45 | - $this->assertSame('https://www.setlist.fm/venue/compaq-center-san-jose-ca-usa-6bd6ca6e.html', $venue->getUrl()); |
|
46 | - } |
|
47 | -} |