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
8a3cdbf6
Commit
8a3cdbf6
authored
Mar 13, 2015
by
Marin Purgar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert back to Zend_Http_Client
parent
8c6b43f2
Changes
1
Hide 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 @
8a3cdbf6
...
...
@@ -58,7 +58,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$options
=
array
(
'optionZ'
=>
123
,
'options'
=>
array
(
'optionX'
=>
'Y'
));
$adapterOptions
=
array
(
'optionX'
=>
'Y'
);
$mock
=
$this
->
getMock
(
'Zend
\Http\
Client'
);
$mock
=
$this
->
getMock
(
'Zend
_Http_
Client'
);
$mock
->
expects
(
$this
->
once
())
->
method
(
'setConfig'
)
->
with
(
$this
->
equalTo
(
$adapterOptions
));
...
...
@@ -85,7 +85,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$this
->
adapter
->
setOptions
(
$options
);
$zendHttp
=
$this
->
adapter
->
getZendHttp
();
$this
->
assertThat
(
$zendHttp
,
$this
->
isInstanceOf
(
'Zend
\Http\
Client'
));
$this
->
assertThat
(
$zendHttp
,
$this
->
isInstanceOf
(
'Zend
_Http_
Client'
));
}
public
function
testExecuteGet
()
...
...
@@ -110,7 +110,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
$responseData
);
$mock
=
$this
->
getMock
(
'Zend
\Http\
Client'
);
$mock
=
$this
->
getMock
(
'Zend
_Http_
Client'
);
$mock
->
expects
(
$this
->
once
())
->
method
(
'setMethod'
)
->
with
(
$this
->
equalTo
(
$method
));
...
...
@@ -158,7 +158,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
$responseData
);
$mock
=
$this
->
getMock
(
'Zend
\Http\
Client'
);
$mock
=
$this
->
getMock
(
'Zend
_Http_
Client'
);
$mock
->
expects
(
$this
->
once
())
->
method
(
'setMethod'
)
->
with
(
$this
->
equalTo
(
$method
));
...
...
@@ -193,7 +193,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
404
,
array
(),
''
);
$endpoint
=
new
Endpoint
();
$mock
=
$this
->
getMock
(
'Zend
\Http\
Client'
);
$mock
=
$this
->
getMock
(
'Zend
_Http_
Client'
);
$mock
->
expects
(
$this
->
once
())
->
method
(
'request'
)
->
will
(
$this
->
returnValue
(
$response
));
...
...
@@ -212,7 +212,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
'data'
);
$endpoint
=
new
Endpoint
();
$mock
=
$this
->
getMock
(
'Zend
\Http\
Client'
);
$mock
=
$this
->
getMock
(
'Zend
_Http_
Client'
);
$mock
->
expects
(
$this
->
once
())
->
method
(
'request'
)
->
will
(
$this
->
returnValue
(
$response
));
...
...
@@ -244,7 +244,7 @@ class Zend2HttpTest extends \PHPUnit_Framework_TestCase
$endpoint
=
new
Endpoint
();
$response
=
new
\Zend_Http_Response
(
200
,
array
(
'status'
=>
'HTTP 1.1 200 OK'
),
'dummy'
);
$mock
=
$this
->
getMock
(
'Zend
\Http\
Client'
);
$mock
=
$this
->
getMock
(
'Zend
_Http_
Client'
);
$mock
->
expects
(
$this
->
once
())
->
method
(
'setFileUpload'
)
->
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