Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
solarium
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
solarium
Commits
f4a00cbd
Commit
f4a00cbd
authored
Mar 13, 2015
by
Marin Purgar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the ZF2 Http Client test
parent
c249f1f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tests/Solarium/Tests/Core/Client/Adapter/Zend2HttpTest.php
tests/Solarium/Tests/Core/Client/Adapter/Zend2HttpTest.php
+7
-7
No files found.
tests/Solarium/Tests/Core/Client/Adapter/Zend2HttpTest.php
View file @
f4a00cbd
...
@@ -58,7 +58,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
...
@@ -58,7 +58,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$options
=
array
(
'optionZ'
=>
123
,
'options'
=>
array
(
'optionX'
=>
'Y'
));
$options
=
array
(
'optionZ'
=>
123
,
'options'
=>
array
(
'optionX'
=>
'Y'
));
$adapterOptions
=
array
(
'optionX'
=>
'Y'
);
$adapterOptions
=
array
(
'optionX'
=>
'Y'
);
$mock
=
$this
->
getMock
(
'Zend_Http_Client'
);
$mock
=
$this
->
getMock
(
'Zend
2
_Http_Client'
);
$mock
->
expects
(
$this
->
once
())
$mock
->
expects
(
$this
->
once
())
->
method
(
'setConfig'
)
->
method
(
'setConfig'
)
->
with
(
$this
->
equalTo
(
$adapterOptions
));
->
with
(
$this
->
equalTo
(
$adapterOptions
));
...
@@ -85,7 +85,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
...
@@ -85,7 +85,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$this
->
adapter
->
setOptions
(
$options
);
$this
->
adapter
->
setOptions
(
$options
);
$zendHttp
=
$this
->
adapter
->
getZendHttp
();
$zendHttp
=
$this
->
adapter
->
getZendHttp
();
$this
->
assertThat
(
$zendHttp
,
$this
->
isInstanceOf
(
'Zend_Http_Client'
));
$this
->
assertThat
(
$zendHttp
,
$this
->
isInstanceOf
(
'Zend
2
_Http_Client'
));
}
}
public
function
testExecuteGet
()
public
function
testExecuteGet
()
...
@@ -110,7 +110,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
...
@@ -110,7 +110,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
$responseData
);
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
$responseData
);
$mock
=
$this
->
getMock
(
'Zend_Http_Client'
);
$mock
=
$this
->
getMock
(
'Zend
2
_Http_Client'
);
$mock
->
expects
(
$this
->
once
())
$mock
->
expects
(
$this
->
once
())
->
method
(
'setMethod'
)
->
method
(
'setMethod'
)
->
with
(
$this
->
equalTo
(
$method
));
->
with
(
$this
->
equalTo
(
$method
));
...
@@ -158,7 +158,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
...
@@ -158,7 +158,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
$responseData
);
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
$responseData
);
$mock
=
$this
->
getMock
(
'Zend_Http_Client'
);
$mock
=
$this
->
getMock
(
'Zend
2
_Http_Client'
);
$mock
->
expects
(
$this
->
once
())
$mock
->
expects
(
$this
->
once
())
->
method
(
'setMethod'
)
->
method
(
'setMethod'
)
->
with
(
$this
->
equalTo
(
$method
));
->
with
(
$this
->
equalTo
(
$method
));
...
@@ -193,7 +193,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
...
@@ -193,7 +193,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
404
,
array
(),
''
);
$response
=
new
\Zend_Http_Response
(
404
,
array
(),
''
);
$endpoint
=
new
Endpoint
();
$endpoint
=
new
Endpoint
();
$mock
=
$this
->
getMock
(
'Zend_Http_Client'
);
$mock
=
$this
->
getMock
(
'Zend
2
_Http_Client'
);
$mock
->
expects
(
$this
->
once
())
$mock
->
expects
(
$this
->
once
())
->
method
(
'request'
)
->
method
(
'request'
)
->
will
(
$this
->
returnValue
(
$response
));
->
will
(
$this
->
returnValue
(
$response
));
...
@@ -212,7 +212,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
...
@@ -212,7 +212,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
'data'
);
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
'data'
);
$endpoint
=
new
Endpoint
();
$endpoint
=
new
Endpoint
();
$mock
=
$this
->
getMock
(
'Zend_Http_Client'
);
$mock
=
$this
->
getMock
(
'Zend
2
_Http_Client'
);
$mock
->
expects
(
$this
->
once
())
$mock
->
expects
(
$this
->
once
())
->
method
(
'request'
)
->
method
(
'request'
)
->
will
(
$this
->
returnValue
(
$response
));
->
will
(
$this
->
returnValue
(
$response
));
...
@@ -244,7 +244,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
...
@@ -244,7 +244,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$endpoint
=
new
Endpoint
();
$endpoint
=
new
Endpoint
();
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
'dummy'
);
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
'dummy'
);
$mock
=
$this
->
getMock
(
'Zend_Http_Client'
);
$mock
=
$this
->
getMock
(
'Zend
2
_Http_Client'
);
$mock
->
expects
(
$this
->
once
())
$mock
->
expects
(
$this
->
once
())
->
method
(
'setFileUpload'
)
->
method
(
'setFileUpload'
)
->
with
(
->
with
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment