also looking at this
Add More Tests
#42
6 files
+170
-26
| @@ -14,6 +14,26 @@ it('can be fetch all media', function () { | ||
| 14 | 14 | $this->assertTrue(count($media) > 0); |
| 15 | 15 | }); |
| 16 | 16 | |
| 17 | it('can be fetch all media for a tag', function () { | |
| 18 | // 8 is the tag id for images | |
| 19 | $tag = $this->client->tags()->find(8); | |
| 20 | ||
| 21 | $media = $tag->media()->get(); | |
| 22 | ||
| 23 | $this->assertTrue(is_array($media)); | |
| 24 | $this->assertTrue(count($media) > 0); | |
| 25 | }); | |
| 26 | ||
| 27 | it('can be fetch all media for a folder', function () { | |
| 28 | // 8 is the tag id for images | |
| 29 | $folder = $this->client->folders()->find(1); | |
| 30 | ||
| 31 | $media = $folder->media()->get(); | |
| 32 | ||
| 33 | $this->assertTrue(is_array($media)); | |
| 34 | $this->assertTrue(count($media) > 0); | |
| 35 | }); | |
| 36 | ||
| 17 | 37 | it('can be fetch specific group of media', function () { |
| 18 | 38 | $ids = [1, 2, 3]; |
| 19 | 39 | |
| @@ -42,7 +62,8 @@ it('can update a media', function () { | ||
| 42 | 62 | }); |
| 43 | 63 | |
| 44 | 64 | it('can search a media', function () { |
| 45 | $query = 'people'; | |
| 65 | $mediaName = $this->client->media()->find(1)->toArray(); | |
| 66 | $query = $mediaName['name']; | |
| 46 | 67 | |
| 47 | 68 | $media = $this->client->media()->search($query); |
| 48 | 69 | |