Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 21dc737

Browse files
committed
extended testcase
1 parent 3341894 commit 21dc737

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tests/ZendDiagnosticsTest/GuzzleHttpServiceTest.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ class GuzzleHttpServiceTest extends \PHPUnit_Framework_TestCase
1212
/**
1313
* @dataProvider checkProvider
1414
*/
15-
public function testCheck($content, $actualContent, $actualStatusCode, $resultClass)
15+
public function testCheck($content, $actualContent, $actualStatusCode, $resultClass, $method = 'GET', $body = null)
1616
{
1717
$check = new GuzzleHttpService(
1818
'http://www.example.com/foobar',
1919
array(),
2020
array(),
2121
200,
2222
$content,
23-
$this->getMockClient($actualStatusCode, $actualContent)
23+
$this->getMockClient($actualStatusCode, $actualContent),
24+
$method,
25+
$body
2426
);
2527
$result = $check->check();
2628

@@ -31,9 +33,17 @@ public function checkProvider()
3133
{
3234
return array(
3335
array(null, null, 200, 'ZendDiagnostics\Result\SuccessInterface'),
36+
array(null, null, 200, 'ZendDiagnostics\Result\SuccessInterface', 'POST', array('key' => 'value')),
37+
array(null, null, 200, 'ZendDiagnostics\Result\SuccessInterface', 'PUT'),
3438
array(null, null, 404, 'ZendDiagnostics\Result\FailureInterface'),
39+
array(null, null, 404, 'ZendDiagnostics\Result\FailureInterface', 'POST', array('key' => 'value')),
40+
array(null, null, 404, 'ZendDiagnostics\Result\FailureInterface', 'PUT'),
3541
array('foo', 'foobar', 200, 'ZendDiagnostics\Result\SuccessInterface'),
36-
array('baz', 'foobar', 200, 'ZendDiagnostics\Result\FailureInterface')
42+
array('foo', 'foobar', 200, 'ZendDiagnostics\Result\SuccessInterface', 'POST', array('key' => 'value')),
43+
array('foo', 'foobar', 200, 'ZendDiagnostics\Result\SuccessInterface', 'PUT'),
44+
array('baz', 'foobar', 200, 'ZendDiagnostics\Result\FailureInterface'),
45+
array('baz', 'foobar', 200, 'ZendDiagnostics\Result\FailureInterface', 'POST', array('key' => 'value')),
46+
array('baz', 'foobar', 200, 'ZendDiagnostics\Result\FailureInterface', 'PUT'),
3747
);
3848
}
3949

0 commit comments

Comments
 (0)