| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 32 | 
| Code Lines | 23 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 25 | public function testChangeOptions() | ||
| 26 |     { | ||
| 27 | //Disable the curl request as we are only checking the URL | ||
| 28 | $CF = $this->getCloudflare(); | ||
| 29 | $CF->diableRequests(); | ||
| 30 | |||
| 31 | $options = [ | ||
| 32 | 'status' => 'pending', | ||
| 33 | 'page' => 2, | ||
| 34 | 'per_page' => 50, | ||
| 35 | 'order' => 'name', | ||
| 36 | 'direction' => 'desc', | ||
| 37 | 'match' => 'any', | ||
| 38 | ]; | ||
| 39 | $domain = 'test.com'; | ||
| 40 | |||
| 41 |         $this->Zone->get('test.com', $options); | ||
| 42 | $RequestURL = $this->Zone->getRequestURL(); | ||
| 43 | $this->assertNotNull($RequestURL, "Request URL was null"); | ||
| 44 | |||
| 45 |         $sting = explode('zones?', $RequestURL)[1]; | ||
| 46 | |||
| 47 | $shouldBe = "name=" . $domain | ||
| 48 | . "&status=" . $options['status'] | ||
| 49 | . "&page=" . $options['page'] | ||
| 50 | . "&per_page=" . $options['per_page'] | ||
| 51 | . "&order=" . $options['order'] | ||
| 52 | . "&direction=" . $options['direction'] | ||
| 53 | . "&match=". $options['match']; | ||
| 54 | |||
| 55 | $this->assertSame($sting, $shouldBe, 'Request URL is not correct'); | ||
| 56 | } | ||
| 57 | } |