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
95a8381f
Commit
95a8381f
authored
Mar 30, 2011
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- improved unittests
parent
6da31abc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
tests/Solarium/Client/RequestTest.php
tests/Solarium/Client/RequestTest.php
+1
-1
tests/Solarium/ClientTest.php
tests/Solarium/ClientTest.php
+21
-1
No files found.
tests/Solarium/Client/RequestTest.php
View file @
95a8381f
...
@@ -44,7 +44,7 @@ class Solarium_Client_RequestTest extends PHPUnit_Framework_TestCase
...
@@ -44,7 +44,7 @@ class Solarium_Client_RequestTest extends PHPUnit_Framework_TestCase
protected
function
_getRequest
(
$options
,
$class
=
'Solarium_Client_Request_Ping'
)
protected
function
_getRequest
(
$options
,
$class
=
'Solarium_Client_Request_Ping'
)
{
{
$query
=
new
Solarium_Query
;
$query
=
new
Solarium_Query
;
$query
->
set
Path
(
'/mypath'
);
$query
->
set
Handler
(
'/mypath'
);
return
new
$class
(
$options
,
$query
);
return
new
$class
(
$options
,
$query
);
}
}
...
...
tests/Solarium/ClientTest.php
View file @
95a8381f
...
@@ -166,6 +166,26 @@ class Solarium_ClientTest extends PHPUnit_Framework_TestCase
...
@@ -166,6 +166,26 @@ class Solarium_ClientTest extends PHPUnit_Framework_TestCase
$client
->
update
(
$query
);
$client
->
update
(
$query
);
}
}
public
function
testSetAndGetAdapterOptions
()
{
$options
=
array
(
'useragent'
=>
'myAgent'
);
$client
=
new
Solarium_Client
();
$client
->
setAdapterOptions
(
$options
);
$this
->
assertEquals
(
$options
,
$client
->
getAdapterOptions
());
}
public
function
testSetAndGetAdapterOptionsWithObject
()
{
$options
=
array
(
'useragent'
=>
'myAgent'
);
$optionObject
=
(
object
)
$options
;
$client
=
new
Solarium_Client
();
$client
->
setAdapterOptions
(
$optionObject
);
$this
->
assertEquals
(
$options
,
$client
->
getAdapterOptions
());
}
}
}
class
MyAdapter
extends
Solarium_Client_Adapter_Http
{
class
MyAdapter
extends
Solarium_Client_Adapter_Http
{
...
...
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