summaryrefslogtreecommitdiffstats
path: root/tests/src/Unit/Plugin
diff options
context:
space:
mode:
authorJoris Vercammen2015-11-07 15:06:14 (GMT)
committerJoris Vercammen2015-11-07 15:06:14 (GMT)
commit3b0da91ba8b375e7f0ac31e3dc639a35a8b9b5ea (patch)
treeb674a44158e71388224fc753c42322c7550adf7e /tests/src/Unit/Plugin
parent7be5fc3b61f754cb0e79fd8a2778a264edbd8e37 (diff)
Apply all fixes suggested by coder module
Diffstat (limited to 'tests/src/Unit/Plugin')
-rw-r--r--tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php10
-rw-r--r--tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php6
-rw-r--r--tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php18
3 files changed, 17 insertions, 17 deletions
diff --git a/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php b/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php
index ba3a785..eb18f7e 100644
--- a/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php
@@ -45,9 +45,9 @@ class ActiveWidgetOrderProcessorTest extends UnitTestCase {
new Result('Clover', 'Clover', 50),
];
- $original_results[1]->setActiveState(true);
- $original_results[2]->setActiveState(true);
- $original_results[3]->setActiveState(true);
+ $original_results[1]->setActiveState(TRUE);
+ $original_results[2]->setActiveState(TRUE);
+ $original_results[3]->setActiveState(TRUE);
$this->original_results = $original_results;
@@ -59,7 +59,7 @@ class ActiveWidgetOrderProcessorTest extends UnitTestCase {
*/
public function testAscending() {
$sorted_results = $this->processor->sortResults($this->original_results, 'ASC');
- $expected_values = [true, true, true, false, false];
+ $expected_values = [TRUE, TRUE, TRUE, FALSE, FALSE];
foreach ($expected_values as $index => $value) {
$this->assertEquals($value, $sorted_results[$index]->isActive());
}
@@ -70,7 +70,7 @@ class ActiveWidgetOrderProcessorTest extends UnitTestCase {
*/
public function testDescending() {
$sorted_results = $this->processor->sortResults($this->original_results, 'DESC');
- $expected_values = array_reverse([true, true, true, false, false]);
+ $expected_values = array_reverse([TRUE, TRUE, TRUE, FALSE, FALSE]);
foreach ($expected_values as $index => $value) {
$this->assertEquals($value, $sorted_results[$index]->isActive());
}
diff --git a/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php b/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php
index 70e7f37..c53e0a5 100644
--- a/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php
@@ -48,7 +48,7 @@ class HideNonNarrowingResultProcessorTest extends UnitTestCase {
/**
- * Test filtering of results
+ * Test filtering of results.
*/
public function testNoFilterResults() {
@@ -68,12 +68,12 @@ class HideNonNarrowingResultProcessorTest extends UnitTestCase {
}
/**
- * Test filtering of results
+ * Test filtering of results.
*/
public function testFilterResults() {
$results = $this->original_results;
- $results[2]->setActiveState(true);
+ $results[2]->setActiveState(TRUE);
$facet = new Facet([], 'facet');
$facet->setResults($results);
diff --git a/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php b/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php
index aa1c77b..f569587 100644
--- a/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php
@@ -47,7 +47,7 @@ class MinimumCountProcessorTest extends UnitTestCase {
}
/**
- * Test no filtering happens
+ * Test no filtering happens.
*/
public function testNoFilter() {
@@ -55,8 +55,8 @@ class MinimumCountProcessorTest extends UnitTestCase {
$facet->setResults($this->original_results);
$facet->setOption('processors', [
'minimum_count' => [
- 'settings' => ['minimum_items' => 4]
- ]
+ 'settings' => ['minimum_items' => 4],
+ ],
]);
$sorted_results = $this->processor->build($facet, $this->original_results);
@@ -68,7 +68,7 @@ class MinimumCountProcessorTest extends UnitTestCase {
}
/**
- * Test no filtering happens
+ * Test no filtering happens.
*/
public function testMinEqualsValue() {
@@ -76,8 +76,8 @@ class MinimumCountProcessorTest extends UnitTestCase {
$facet->setResults($this->original_results);
$facet->setOption('processors', [
'minimum_count' => [
- 'settings' => ['minimum_items' => 5]
- ]
+ 'settings' => ['minimum_items' => 5],
+ ],
]);
$sorted_results = $this->processor->build($facet, $this->original_results);
@@ -90,7 +90,7 @@ class MinimumCountProcessorTest extends UnitTestCase {
}
/**
- * Test filtering of results
+ * Test filtering of results.
*/
public function testFilterResults() {
@@ -98,8 +98,8 @@ class MinimumCountProcessorTest extends UnitTestCase {
$facet->setResults($this->original_results);
$facet->setOption('processors', [
'minimum_count' => [
- 'settings' => ['minimum_items' => 8]
- ]
+ 'settings' => ['minimum_items' => 8],
+ ],
]);
$sorted_results = $this->processor->build($facet, $this->original_results);