ReviewOS

also looking at this

meemalabs/meema-client-php

Add More Tests

#42
Merged glennmichael123 wants to merge add-more-tests into main
6 files +170 -26
tests/MeemaMediaTest.phpmodified+22-1
Changes to tests/MeemaMediaTest.php
@@ -14,6 +14,26 @@ it('can be fetch all media', function () {
1414 $this->assertTrue(count($media) > 0);
1515});
1616
17it('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
27it('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
1737it('can be fetch specific group of media', function () {
1838 $ids = [1, 2, 3];
1939
@@ -42,7 +62,8 @@ it('can update a media', function () {
4262});
4363
4464it('can search a media', function () {
45 $query = 'people';
65 $mediaName = $this->client->media()->find(1)->toArray();
66 $query = $mediaName['name'];
4667
4768 $media = $this->client->media()->search($query);
4869