also looking at this
Modify tests
#40
2 files
+13
-21
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -50,14 +50,14 @@ it('can update a folder', function () { | ||
| 50 | 50 | $this->assertTrue($folders['data']['name'] === $name); |
| 51 | 51 | }); |
| 52 | 52 | |
| 53 | // it('can search a folder', function () { | |
| 54 | // $query = 'Invoice'; | |
| 53 | it('can search a folder', function () { | |
| 54 | $query = 'Invoice'; | |
| 55 | 55 | |
| 56 | // $folders = $this->client->folders()->search($query); | |
| 56 | $folders = $this->client->folders()->search($query); | |
| 57 | 57 | |
| 58 | // $this->assertTrue(is_array($folders)); | |
| 59 | // $this->assertTrue(str_contains($folders['data'][0]['name'], $query)); | |
| 60 | // }); | |
| 58 | $this->assertTrue(is_array($folders)); | |
| 59 | $this->assertTrue(str_contains($folders['data'][0]['name'], $query)); | |
| 60 | }); | |
| 61 | 61 | |
| 62 | 62 | it('can archive a folder', function () { |
| 63 | 63 | $folders = $this->client->folders()->archive(1); |
| @@ -41,14 +41,14 @@ it('can update a media', function () { | ||
| 41 | 41 | $this->assertTrue($media['data']['name'] === $name); |
| 42 | 42 | }); |
| 43 | 43 | |
| 44 | // it('can search a media', function () { | |
| 45 | // $query = 'michael'; | |
| 44 | it('can search a media', function () { | |
| 45 | $query = 'test media'; | |
| 46 | 46 | |
| 47 | // $media = $this->client->media()->search($query); | |
| 47 | $media = $this->client->media()->search($query); | |
| 48 | 48 | |
| 49 | // $this->assertTrue(is_array($media)); | |
| 50 | // $this->assertTrue(str_contains($media['data'][0]['name'], $query)); | |
| 51 | // }); | |
| 49 | $this->assertTrue(is_array($media)); | |
| 50 | $this->assertTrue(str_contains($media['data'][0]['name'], $query)); | |
| 51 | }); | |
| 52 | 52 | |
| 53 | 53 | it('can archive a media', function () { |
| 54 | 54 | $query = 'michael'; |
| @@ -99,7 +99,7 @@ it('can delete a media', function () { | ||
| 99 | 99 | $media = $this->client->media()->get(); |
| 100 | 100 | |
| 101 | 101 | $media = array_reverse($media['data']); |
| 102 | $response = $this->client->media()->delete((int) $media[0]['upload_id']); | |
| 102 | $response = $this->client->media()->delete((int) $media[0]['media_id']); | |
| 103 | 103 | |
| 104 | 104 | $this->assertTrue(is_null($response)); |
| 105 | 105 | }); |