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
5dd54a93
Commit
5dd54a93
authored
Mar 30, 2011
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- improved unittests
parent
95a8381f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
tests/Solarium/ClientTest.php
tests/Solarium/ClientTest.php
+16
-1
No files found.
tests/Solarium/ClientTest.php
View file @
5dd54a93
...
@@ -179,7 +179,7 @@ class Solarium_ClientTest extends PHPUnit_Framework_TestCase
...
@@ -179,7 +179,7 @@ class Solarium_ClientTest extends PHPUnit_Framework_TestCase
public
function
testSetAndGetAdapterOptionsWithObject
()
public
function
testSetAndGetAdapterOptionsWithObject
()
{
{
$options
=
array
(
'useragent'
=>
'myAgent'
);
$options
=
array
(
'useragent'
=>
'myAgent'
);
$optionObject
=
(
object
)
$options
;
$optionObject
=
new
myConfig
(
$options
)
;
$client
=
new
Solarium_Client
();
$client
=
new
Solarium_Client
();
$client
->
setAdapterOptions
(
$optionObject
);
$client
->
setAdapterOptions
(
$optionObject
);
...
@@ -203,3 +203,18 @@ class MyAdapter extends Solarium_Client_Adapter_Http{
...
@@ -203,3 +203,18 @@ class MyAdapter extends Solarium_Client_Adapter_Http{
}
}
}
}
class
myConfig
{
protected
$_options
;
public
function
__construct
(
$options
)
{
$this
->
_options
=
$options
;
}
public
function
toArray
()
{
return
$this
->
_options
;
}
}
\ No newline at end of file
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