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
2b3e7315
Commit
2b3e7315
authored
Aug 16, 2012
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced deprecated waitFlush param with softCommit
parent
4a17793d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
68 additions
and
73 deletions
+68
-73
library/Solarium/Plugin/BufferedAdd/BufferedAdd.php
library/Solarium/Plugin/BufferedAdd/BufferedAdd.php
+4
-4
library/Solarium/Plugin/BufferedAdd/Event/PreCommit.php
library/Solarium/Plugin/BufferedAdd/Event/PreCommit.php
+8
-8
library/Solarium/QueryType/Update/Query/Command/Commit.php
library/Solarium/QueryType/Update/Query/Command/Commit.php
+7
-7
library/Solarium/QueryType/Update/Query/Command/Optimize.php
library/Solarium/QueryType/Update/Query/Command/Optimize.php
+7
-7
library/Solarium/QueryType/Update/Query/Query.php
library/Solarium/QueryType/Update/Query/Query.php
+9
-9
library/Solarium/QueryType/Update/RequestBuilder.php
library/Solarium/QueryType/Update/RequestBuilder.php
+5
-10
tests/Solarium/Tests/Plugin/BufferedAdd/Event/PreCommitTest.php
...Solarium/Tests/Plugin/BufferedAdd/Event/PreCommitTest.php
+7
-7
tests/Solarium/Tests/QueryType/Select/RequestBuilder/Component/GroupingTest.php
...ueryType/Select/RequestBuilder/Component/GroupingTest.php
+1
-1
tests/Solarium/Tests/QueryType/Update/Query/Command/CommitTest.php
...arium/Tests/QueryType/Update/Query/Command/CommitTest.php
+5
-5
tests/Solarium/Tests/QueryType/Update/Query/Command/OptimizeTest.php
...ium/Tests/QueryType/Update/Query/Command/OptimizeTest.php
+5
-5
tests/Solarium/Tests/QueryType/Update/Query/QueryTest.php
tests/Solarium/Tests/QueryType/Update/Query/QueryTest.php
+6
-6
tests/Solarium/Tests/QueryType/Update/RequestBuilderTest.php
tests/Solarium/Tests/QueryType/Update/RequestBuilderTest.php
+4
-4
No files found.
library/Solarium/Plugin/BufferedAdd/BufferedAdd.php
View file @
2b3e7315
...
@@ -218,18 +218,18 @@ class BufferedAdd extends Plugin
...
@@ -218,18 +218,18 @@ class BufferedAdd extends Plugin
* Any remaining documents in the buffer will also be flushed
* Any remaining documents in the buffer will also be flushed
*
*
* @param boolean $overwrite
* @param boolean $overwrite
* @param boolean $
waitFlush
* @param boolean $
softCommit
* @param boolean $waitSearcher
* @param boolean $waitSearcher
* @param boolean $expungeDeletes
* @param boolean $expungeDeletes
* @return UpdateResult
* @return UpdateResult
*/
*/
public
function
commit
(
$overwrite
=
null
,
$
waitFlush
=
null
,
$waitSearcher
=
null
,
$expungeDeletes
=
null
)
public
function
commit
(
$overwrite
=
null
,
$
softCommit
=
null
,
$waitSearcher
=
null
,
$expungeDeletes
=
null
)
{
{
$event
=
new
PreCommitEvent
(
$this
->
buffer
,
$overwrite
,
$
waitFlush
,
$waitSearcher
,
$expungeDeletes
);
$event
=
new
PreCommitEvent
(
$this
->
buffer
,
$overwrite
,
$
softCommit
,
$waitSearcher
,
$expungeDeletes
);
$this
->
client
->
getEventDispatcher
()
->
dispatch
(
Events
::
PRE_COMMIT
,
$event
);
$this
->
client
->
getEventDispatcher
()
->
dispatch
(
Events
::
PRE_COMMIT
,
$event
);
$this
->
updateQuery
->
addDocuments
(
$this
->
buffer
,
$event
->
getOverwrite
());
$this
->
updateQuery
->
addDocuments
(
$this
->
buffer
,
$event
->
getOverwrite
());
$this
->
updateQuery
->
addCommit
(
$event
->
get
WaitFlush
(),
$event
->
getWaitSearcher
(),
$event
->
getExpungeDeletes
());
$this
->
updateQuery
->
addCommit
(
$event
->
get
SoftCommit
(),
$event
->
getWaitSearcher
(),
$event
->
getExpungeDeletes
());
$result
=
$this
->
client
->
update
(
$this
->
updateQuery
);
$result
=
$this
->
client
->
update
(
$this
->
updateQuery
);
$this
->
clear
();
$this
->
clear
();
...
...
library/Solarium/Plugin/BufferedAdd/Event/PreCommit.php
View file @
2b3e7315
...
@@ -58,7 +58,7 @@ class PreCommit extends Event
...
@@ -58,7 +58,7 @@ class PreCommit extends Event
/**
/**
* @var boolean
* @var boolean
*/
*/
protected
$
waitFlush
;
protected
$
softCommit
;
/**
/**
* @var boolean
* @var boolean
...
@@ -75,11 +75,11 @@ class PreCommit extends Event
...
@@ -75,11 +75,11 @@ class PreCommit extends Event
*
*
* @param array $buffer
* @param array $buffer
*/
*/
public
function
__construct
(
$buffer
,
$overwrite
,
$
waitFlush
,
$waitSearcher
,
$expungeDeletes
)
public
function
__construct
(
$buffer
,
$overwrite
,
$
softCommit
,
$waitSearcher
,
$expungeDeletes
)
{
{
$this
->
buffer
=
$buffer
;
$this
->
buffer
=
$buffer
;
$this
->
overwrite
=
$overwrite
;
$this
->
overwrite
=
$overwrite
;
$this
->
waitFlush
=
$waitFlush
;
$this
->
softCommit
=
$softCommit
;
$this
->
waitSearcher
=
$waitSearcher
;
$this
->
waitSearcher
=
$waitSearcher
;
$this
->
expungeDeletes
=
$expungeDeletes
;
$this
->
expungeDeletes
=
$expungeDeletes
;
}
}
...
@@ -144,19 +144,19 @@ class PreCommit extends Event
...
@@ -144,19 +144,19 @@ class PreCommit extends Event
/**
/**
* Optionally override the value
* Optionally override the value
*
*
* @param boolean $
waitFlush
* @param boolean $
softCommit
*/
*/
public
function
set
WaitFlush
(
$waitFlush
)
public
function
set
SoftCommit
(
$softCommit
)
{
{
$this
->
waitFlush
=
$waitFlush
;
$this
->
softCommit
=
$softCommit
;
}
}
/**
/**
* @return boolean
* @return boolean
*/
*/
public
function
get
WaitFlush
()
public
function
get
SoftCommit
()
{
{
return
$this
->
waitFlush
;
return
$this
->
softCommit
;
}
}
/**
/**
...
...
library/Solarium/QueryType/Update/Query/Command/Commit.php
View file @
2b3e7315
...
@@ -58,24 +58,24 @@ class Commit extends Command
...
@@ -58,24 +58,24 @@ class Commit extends Command
}
}
/**
/**
* Get
waitFlush
option
* Get
softCommit
option
*
*
* @return boolean
* @return boolean
*/
*/
public
function
get
WaitFlush
()
public
function
get
SoftCommit
()
{
{
return
$this
->
getOption
(
'
waitflush
'
);
return
$this
->
getOption
(
'
softcommit
'
);
}
}
/**
/**
* Set
waitFlush
option
* Set
softCommit
option
*
*
* @param boolean $
waitFlush
* @param boolean $
softCommit
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
set
WaitFlush
(
$waitFlush
)
public
function
set
SoftCommit
(
$softCommit
)
{
{
return
$this
->
setOption
(
'
waitflush'
,
$waitFlush
);
return
$this
->
setOption
(
'
softcommit'
,
$softCommit
);
}
}
/**
/**
...
...
library/Solarium/QueryType/Update/Query/Command/Optimize.php
View file @
2b3e7315
...
@@ -57,24 +57,24 @@ class Optimize extends Command
...
@@ -57,24 +57,24 @@ class Optimize extends Command
}
}
/**
/**
* Get
waitFlush
option
* Get
softCommit
option
*
*
* @return boolean
* @return boolean
*/
*/
public
function
get
WaitFlush
()
public
function
get
SoftCommit
()
{
{
return
$this
->
getOption
(
'
waitflush
'
);
return
$this
->
getOption
(
'
softcommit
'
);
}
}
/**
/**
* Set
waitFlush
option
* Set
softCommit
option
*
*
* @param boolean $
waitFlush
* @param boolean $
softCommit
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
set
WaitFlush
(
$waitFlush
)
public
function
set
SoftCommit
(
$softCommit
)
{
{
return
$this
->
setOption
(
'
waitflush'
,
$waitFlush
);
return
$this
->
setOption
(
'
softcommit'
,
$softCommit
);
}
}
/**
/**
...
...
library/Solarium/QueryType/Update/Query/Query.php
View file @
2b3e7315
...
@@ -383,19 +383,19 @@ class Query extends BaseQuery
...
@@ -383,19 +383,19 @@ class Query extends BaseQuery
* If you need more control, like choosing a key for the command you need to
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
* create you own command instance and use the add method.
*
*
* @param boolean $
waitFlush
* @param boolean $
softCommit
* @param boolean $waitSearcher
* @param boolean $waitSearcher
* @param boolean $expungeDeletes
* @param boolean $expungeDeletes
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
addCommit
(
$
waitFlush
=
null
,
$waitSearcher
=
null
,
public
function
addCommit
(
$
softCommit
=
null
,
$waitSearcher
=
null
,
$expungeDeletes
=
null
)
$expungeDeletes
=
null
)
{
{
$commit
=
new
Command\Commit
();
$commit
=
new
Command\Commit
();
if
(
null
!==
$
waitFlush
)
{
if
(
null
!==
$
softCommit
)
{
$commit
->
set
WaitFlush
(
$waitFlush
);
$commit
->
set
SoftCommit
(
$softCommit
);
}
}
if
(
null
!==
$waitSearcher
)
{
if
(
null
!==
$waitSearcher
)
{
$commit
->
setWaitSearcher
(
$waitSearcher
);
$commit
->
setWaitSearcher
(
$waitSearcher
);
...
@@ -414,18 +414,18 @@ class Query extends BaseQuery
...
@@ -414,18 +414,18 @@ class Query extends BaseQuery
* If you need more control, like choosing a key for the command you need to
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
* create you own command instance and use the add method.
*
*
* @param boolean $
waitFlush
* @param boolean $
softCommit
* @param boolean $waitSearcher
* @param boolean $waitSearcher
* @param int $maxSegments
* @param int $maxSegments
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
addOptimize
(
$
waitFlush
=
null
,
$waitSearcher
=
null
,
public
function
addOptimize
(
$
softCommit
=
null
,
$waitSearcher
=
null
,
$maxSegments
=
null
)
$maxSegments
=
null
)
{
{
$optimize
=
new
Command\Optimize
();
$optimize
=
new
Command\Optimize
();
if
(
null
!==
$
waitFlush
)
{
if
(
null
!==
$
softCommit
)
{
$optimize
->
set
WaitFlush
(
$waitFlush
);
$optimize
->
set
SoftCommit
(
$softCommit
);
}
}
if
(
null
!==
$waitSearcher
)
{
if
(
null
!==
$waitSearcher
)
{
...
...
library/Solarium/QueryType/Update/RequestBuilder.php
View file @
2b3e7315
...
@@ -171,12 +171,10 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -171,12 +171,10 @@ class RequestBuilder extends BaseRequestBuilder
{
{
$xml
=
'<delete>'
;
$xml
=
'<delete>'
;
foreach
(
$command
->
getIds
()
as
$id
)
{
foreach
(
$command
->
getIds
()
as
$id
)
{
$xml
.=
'<id>'
.
htmlspecialchars
(
$id
,
ENT_NOQUOTES
,
'UTF-8'
)
$xml
.=
'<id>'
.
htmlspecialchars
(
$id
,
ENT_NOQUOTES
,
'UTF-8'
)
.
'</id>'
;
.
'</id>'
;
}
}
foreach
(
$command
->
getQueries
()
as
$query
)
{
foreach
(
$command
->
getQueries
()
as
$query
)
{
$xml
.=
'<query>'
.
htmlspecialchars
(
$query
,
ENT_NOQUOTES
,
'UTF-8'
)
$xml
.=
'<query>'
.
htmlspecialchars
(
$query
,
ENT_NOQUOTES
,
'UTF-8'
)
.
'</query>'
;
.
'</query>'
;
}
}
$xml
.=
'</delete>'
;
$xml
.=
'</delete>'
;
...
@@ -192,7 +190,7 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -192,7 +190,7 @@ class RequestBuilder extends BaseRequestBuilder
public
function
buildOptimizeXml
(
$command
)
public
function
buildOptimizeXml
(
$command
)
{
{
$xml
=
'<optimize'
;
$xml
=
'<optimize'
;
$xml
.=
$this
->
boolAttrib
(
'
waitFlush'
,
$command
->
getWaitFlush
());
$xml
.=
$this
->
boolAttrib
(
'
softCommit'
,
$command
->
getSoftCommit
());
$xml
.=
$this
->
boolAttrib
(
'waitSearcher'
,
$command
->
getWaitSearcher
());
$xml
.=
$this
->
boolAttrib
(
'waitSearcher'
,
$command
->
getWaitSearcher
());
$xml
.=
$this
->
attrib
(
'maxSegments'
,
$command
->
getMaxSegments
());
$xml
.=
$this
->
attrib
(
'maxSegments'
,
$command
->
getMaxSegments
());
$xml
.=
'/>'
;
$xml
.=
'/>'
;
...
@@ -209,12 +207,9 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -209,12 +207,9 @@ class RequestBuilder extends BaseRequestBuilder
public
function
buildCommitXml
(
$command
)
public
function
buildCommitXml
(
$command
)
{
{
$xml
=
'<commit'
;
$xml
=
'<commit'
;
$xml
.=
$this
->
boolAttrib
(
'
waitFlush'
,
$command
->
getWaitFlush
());
$xml
.=
$this
->
boolAttrib
(
'
softCommit'
,
$command
->
getSoftCommit
());
$xml
.=
$this
->
boolAttrib
(
'waitSearcher'
,
$command
->
getWaitSearcher
());
$xml
.=
$this
->
boolAttrib
(
'waitSearcher'
,
$command
->
getWaitSearcher
());
$xml
.=
$this
->
boolAttrib
(
$xml
.=
$this
->
boolAttrib
(
'expungeDeletes'
,
$command
->
getExpungeDeletes
());
'expungeDeletes'
,
$command
->
getExpungeDeletes
()
);
$xml
.=
'/>'
;
$xml
.=
'/>'
;
return
$xml
;
return
$xml
;
...
...
tests/Solarium/Tests/Plugin/BufferedAdd/Event/PreCommitTest.php
View file @
2b3e7315
...
@@ -39,15 +39,15 @@ class PreCommitTest extends \PHPUnit_Framework_TestCase
...
@@ -39,15 +39,15 @@ class PreCommitTest extends \PHPUnit_Framework_TestCase
{
{
$buffer
=
array
(
1
,
2
,
3
);
$buffer
=
array
(
1
,
2
,
3
);
$overwrite
=
true
;
$overwrite
=
true
;
$
waitFlush
=
false
;
$
softCommit
=
false
;
$waitSearcher
=
true
;
$waitSearcher
=
true
;
$expungeDeletes
=
false
;
$expungeDeletes
=
false
;
$event
=
new
PreCommit
(
$buffer
,
$overwrite
,
$
waitFlush
,
$waitSearcher
,
$expungeDeletes
);
$event
=
new
PreCommit
(
$buffer
,
$overwrite
,
$
softCommit
,
$waitSearcher
,
$expungeDeletes
);
$this
->
assertEquals
(
$buffer
,
$event
->
getBuffer
());
$this
->
assertEquals
(
$buffer
,
$event
->
getBuffer
());
$this
->
assertEquals
(
$overwrite
,
$event
->
getOverwrite
());
$this
->
assertEquals
(
$overwrite
,
$event
->
getOverwrite
());
$this
->
assertEquals
(
$
waitFlush
,
$event
->
getWaitFlush
());
$this
->
assertEquals
(
$
softCommit
,
$event
->
getSoftCommit
());
$this
->
assertEquals
(
$waitSearcher
,
$event
->
getWaitSearcher
());
$this
->
assertEquals
(
$waitSearcher
,
$event
->
getWaitSearcher
());
$this
->
assertEquals
(
$expungeDeletes
,
$event
->
getExpungeDeletes
());
$this
->
assertEquals
(
$expungeDeletes
,
$event
->
getExpungeDeletes
());
...
@@ -95,11 +95,11 @@ class PreCommitTest extends \PHPUnit_Framework_TestCase
...
@@ -95,11 +95,11 @@ class PreCommitTest extends \PHPUnit_Framework_TestCase
*
*
* @param PreCommit $event
* @param PreCommit $event
*/
*/
public
function
testSetAndGet
WaitFlush
(
$event
)
public
function
testSetAndGet
SoftCommit
(
$event
)
{
{
$
waitFlush
=
true
;
$
softCommit
=
true
;
$event
->
set
WaitFlush
(
$waitFlush
);
$event
->
set
SoftCommit
(
$softCommit
);
$this
->
assertEquals
(
$
waitFlush
,
$event
->
getWaitFlush
());
$this
->
assertEquals
(
$
softCommit
,
$event
->
getSoftCommit
());
}
}
/**
/**
...
...
tests/Solarium/Tests/QueryType/Select/RequestBuilder/Component/GroupingTest.php
View file @
2b3e7315
...
@@ -71,7 +71,7 @@ class GroupingTest extends \PHPUnit_Framework_TestCase
...
@@ -71,7 +71,7 @@ class GroupingTest extends \PHPUnit_Framework_TestCase
'group.cache.percent'
=>
50
,
'group.cache.percent'
=>
50
,
'group.truncate'
=>
'true'
,
'group.truncate'
=>
'true'
,
'group.func'
=>
'log(foo)'
,
'group.func'
=>
'log(foo)'
,
'group.facet'
=>
true
,
'group.facet'
=>
'true'
,
'group.format'
=>
'grouped'
,
'group.format'
=>
'grouped'
,
),
),
$request
->
getParams
()
$request
->
getParams
()
...
...
tests/Solarium/Tests/QueryType/Update/Query/Command/CommitTest.php
View file @
2b3e7315
...
@@ -53,7 +53,7 @@ class CommitTest extends \PHPUnit_Framework_TestCase
...
@@ -53,7 +53,7 @@ class CommitTest extends \PHPUnit_Framework_TestCase
public
function
testConfigMode
()
public
function
testConfigMode
()
{
{
$options
=
array
(
$options
=
array
(
'
waitflush
'
=>
true
,
'
softcommit
'
=>
true
,
'waitsearcher'
=>
false
,
'waitsearcher'
=>
false
,
'expungedeletes'
=>
true
,
'expungedeletes'
=>
true
,
);
);
...
@@ -62,7 +62,7 @@ class CommitTest extends \PHPUnit_Framework_TestCase
...
@@ -62,7 +62,7 @@ class CommitTest extends \PHPUnit_Framework_TestCase
$this
->
assertEquals
(
$this
->
assertEquals
(
true
,
true
,
$command
->
get
WaitFlush
()
$command
->
get
SoftCommit
()
);
);
$this
->
assertEquals
(
$this
->
assertEquals
(
...
@@ -76,12 +76,12 @@ class CommitTest extends \PHPUnit_Framework_TestCase
...
@@ -76,12 +76,12 @@ class CommitTest extends \PHPUnit_Framework_TestCase
);
);
}
}
public
function
testGetAndSet
WaitFlush
()
public
function
testGetAndSet
SoftCommit
()
{
{
$this
->
command
->
set
WaitFlush
(
false
);
$this
->
command
->
set
SoftCommit
(
false
);
$this
->
assertEquals
(
$this
->
assertEquals
(
false
,
false
,
$this
->
command
->
get
WaitFlush
()
$this
->
command
->
get
SoftCommit
()
);
);
}
}
...
...
tests/Solarium/Tests/QueryType/Update/Query/Command/OptimizeTest.php
View file @
2b3e7315
...
@@ -45,7 +45,7 @@ class OptimizeTest extends \PHPUnit_Framework_TestCase
...
@@ -45,7 +45,7 @@ class OptimizeTest extends \PHPUnit_Framework_TestCase
public
function
testConfigMode
()
public
function
testConfigMode
()
{
{
$options
=
array
(
$options
=
array
(
'
waitflush
'
=>
true
,
'
softcommit
'
=>
true
,
'waitsearcher'
=>
false
,
'waitsearcher'
=>
false
,
'maxsegments'
=>
6
,
'maxsegments'
=>
6
,
);
);
...
@@ -54,7 +54,7 @@ class OptimizeTest extends \PHPUnit_Framework_TestCase
...
@@ -54,7 +54,7 @@ class OptimizeTest extends \PHPUnit_Framework_TestCase
$this
->
assertEquals
(
$this
->
assertEquals
(
true
,
true
,
$command
->
get
WaitFlush
()
$command
->
get
SoftCommit
()
);
);
$this
->
assertEquals
(
$this
->
assertEquals
(
...
@@ -76,12 +76,12 @@ class OptimizeTest extends \PHPUnit_Framework_TestCase
...
@@ -76,12 +76,12 @@ class OptimizeTest extends \PHPUnit_Framework_TestCase
);
);
}
}
public
function
testGetAndSet
WaitFlush
()
public
function
testGetAndSet
SoftCommit
()
{
{
$this
->
command
->
set
WaitFlush
(
false
);
$this
->
command
->
set
SoftCommit
(
false
);
$this
->
assertEquals
(
$this
->
assertEquals
(
false
,
false
,
$this
->
command
->
get
WaitFlush
()
$this
->
command
->
get
SoftCommit
()
);
);
}
}
...
...
tests/Solarium/Tests/QueryType/Update/Query/QueryTest.php
View file @
2b3e7315
...
@@ -74,13 +74,13 @@ class QueryTest extends \PHPUnit_Framework_TestCase
...
@@ -74,13 +74,13 @@ class QueryTest extends \PHPUnit_Framework_TestCase
),
),
'key2'
=>
array
(
'key2'
=>
array
(
'type'
=>
'commit'
,
'type'
=>
'commit'
,
'
waitflush
'
=>
true
,
'
softcommit
'
=>
true
,
'waitsearcher'
=>
false
,
'waitsearcher'
=>
false
,
'expungedeletes'
=>
true
,
'expungedeletes'
=>
true
,
),
),
'key3'
=>
array
(
'key3'
=>
array
(
'type'
=>
'optimize'
,
'type'
=>
'optimize'
,
'
waitflush
'
=>
true
,
'
softcommit
'
=>
true
,
'waitsearcher'
=>
false
,
'waitsearcher'
=>
false
,
'maxsegments'
=>
5
,
'maxsegments'
=>
5
,
),
),
...
@@ -115,7 +115,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
...
@@ -115,7 +115,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
$commit
=
$commands
[
'key2'
];
$commit
=
$commands
[
'key2'
];
$this
->
assertEquals
(
$this
->
assertEquals
(
true
,
true
,
$commit
->
get
WaitFlush
()
$commit
->
get
SoftCommit
()
);
);
$this
->
assertEquals
(
$this
->
assertEquals
(
false
,
false
,
...
@@ -129,7 +129,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
...
@@ -129,7 +129,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
$optimize
=
$commands
[
'key3'
];
$optimize
=
$commands
[
'key3'
];
$this
->
assertEquals
(
$this
->
assertEquals
(
true
,
true
,
$optimize
->
get
WaitFlush
()
$optimize
->
get
SoftCommit
()
);
);
$this
->
assertEquals
(
$this
->
assertEquals
(
false
,
false
,
...
@@ -368,7 +368,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
...
@@ -368,7 +368,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
$this
->
assertEquals
(
$this
->
assertEquals
(
true
,
true
,
$commands
[
0
]
->
get
WaitFlush
()
$commands
[
0
]
->
get
SoftCommit
()
);
);
$this
->
assertEquals
(
$this
->
assertEquals
(
...
@@ -395,7 +395,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
...
@@ -395,7 +395,7 @@ class QueryTest extends \PHPUnit_Framework_TestCase
$this
->
assertEquals
(
$this
->
assertEquals
(
true
,
true
,
$commands
[
0
]
->
get
WaitFlush
()
$commands
[
0
]
->
get
SoftCommit
()
);
);
$this
->
assertEquals
(
$this
->
assertEquals
(
...
...
tests/Solarium/Tests/QueryType/Update/RequestBuilderTest.php
View file @
2b3e7315
...
@@ -253,10 +253,10 @@ class RequestBuilderTest extends \PHPUnit_Framework_TestCase
...
@@ -253,10 +253,10 @@ class RequestBuilderTest extends \PHPUnit_Framework_TestCase
public
function
testBuildOptimizeXmlWithParams
()
public
function
testBuildOptimizeXmlWithParams
()
{
{
$command
=
new
OptimizeCommand
(
array
(
'
waitflush
'
=>
true
,
'waitsearcher'
=>
false
,
'maxsegments'
=>
10
));
$command
=
new
OptimizeCommand
(
array
(
'
softcommit
'
=>
true
,
'waitsearcher'
=>
false
,
'maxsegments'
=>
10
));
$this
->
assertEquals
(
$this
->
assertEquals
(
'<optimize
waitFlush
="true" waitSearcher="false" maxSegments="10"/>'
,
'<optimize
softCommit
="true" waitSearcher="false" maxSegments="10"/>'
,
$this
->
builder
->
buildOptimizeXml
(
$command
)
$this
->
builder
->
buildOptimizeXml
(
$command
)
);
);
}
}
...
@@ -273,10 +273,10 @@ class RequestBuilderTest extends \PHPUnit_Framework_TestCase
...
@@ -273,10 +273,10 @@ class RequestBuilderTest extends \PHPUnit_Framework_TestCase
public
function
testBuildCommitXmlWithParams
()
public
function
testBuildCommitXmlWithParams
()
{
{
$command
=
new
CommitCommand
(
array
(
'
waitflush
'
=>
true
,
'waitsearcher'
=>
false
,
'expungedeletes'
=>
true
));
$command
=
new
CommitCommand
(
array
(
'
softcommit
'
=>
true
,
'waitsearcher'
=>
false
,
'expungedeletes'
=>
true
));
$this
->
assertEquals
(
$this
->
assertEquals
(
'<commit
waitFlush
="true" waitSearcher="false" expungeDeletes="true"/>'
,
'<commit
softCommit
="true" waitSearcher="false" expungeDeletes="true"/>'
,
$this
->
builder
->
buildCommitXml
(
$command
)
$this
->
builder
->
buildCommitXml
(
$command
)
);
);
}
}
...
...
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