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
4286bea6
Commit
4286bea6
authored
Feb 16, 2011
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests
parent
9b84d58f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
library/Solarium/Result/Select/Facet/Field.php
library/Solarium/Result/Select/Facet/Field.php
+5
-12
tests/Solarium/Query/Select/FacetTest.php
tests/Solarium/Query/Select/FacetTest.php
+1
-1
No files found.
library/Solarium/Result/Select/Facet/Field.php
View file @
4286bea6
...
...
@@ -35,13 +35,6 @@
class
Solarium_Result_Select_Facet_Field
implements
Iterator
,
Countable
{
/**
* Pointer to document array position for iterator implementation
*
* @var int
*/
protected
$_position
;
/**
* Value array
*
...
...
@@ -87,7 +80,7 @@ class Solarium_Result_Select_Facet_Field implements Iterator, Countable
*/
public
function
rewind
()
{
$this
->
_position
=
0
;
reset
(
$this
->
_values
)
;
}
/**
...
...
@@ -97,7 +90,7 @@ class Solarium_Result_Select_Facet_Field implements Iterator, Countable
*/
function
current
()
{
return
$this
->
_values
[
$this
->
_position
]
;
return
current
(
$this
->
_values
)
;
}
/**
...
...
@@ -107,7 +100,7 @@ class Solarium_Result_Select_Facet_Field implements Iterator, Countable
*/
public
function
key
()
{
return
$this
->
_position
;
return
key
(
$this
->
_values
)
;
}
/**
...
...
@@ -117,7 +110,7 @@ class Solarium_Result_Select_Facet_Field implements Iterator, Countable
*/
public
function
next
()
{
++
$this
->
_position
;
next
(
$this
->
_values
)
;
}
/**
...
...
@@ -127,7 +120,7 @@ class Solarium_Result_Select_Facet_Field implements Iterator, Countable
*/
public
function
valid
()
{
return
isset
(
$this
->
_values
[
$this
->
_position
])
;
return
true
;
}
}
\ No newline at end of file
tests/Solarium/Query/Select/FacetTest.php
View file @
4286bea6
...
...
@@ -74,7 +74,7 @@ class Solarium_Query_Select_FacetTest extends PHPUnit_Framework_TestCase
public
function
testSetExcludes
()
{
$this
->
_facet
->
addExcludes
(
array
(
'e1'
,
'e2'
));
$this
->
_facet
->
add
Excludes
(
array
(
'e3'
,
'e4'
));
$this
->
_facet
->
set
Excludes
(
array
(
'e3'
,
'e4'
));
$this
->
assertEquals
(
array
(
'e3'
,
'e4'
),
$this
->
_facet
->
getExcludes
());
}
}
...
...
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