| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | public function testPostFieldsBuilder() |
||
| 30 | { |
||
| 31 | $request = new Request(); |
||
| 32 | |||
| 33 | // No post values yet, so it should default to GET |
||
| 34 | $this->assertArrayNotHasKey(CURLOPT_POST, $request->options); |
||
| 35 | $this->assertEmpty($request->post_data); |
||
| 36 | |||
| 37 | // With post values |
||
| 38 | $post = ['username' => 'mike', 'password' => 'pass']; |
||
| 39 | $request->post_data = $post; |
||
| 40 | $this->assertArrayHasKey(CURLOPT_POST, $request->options); |
||
| 41 | $this->assertEquals($post, $request->post_data); |
||
| 42 | } |
||
| 43 | } |