summaryrefslogtreecommitdiffstats
path: root/tests/src/Unit/Plugin
diff options
context:
space:
mode:
authormr.baileys2015-12-05 10:10:41 (GMT)
committermr.baileys2015-12-05 10:10:41 (GMT)
commitc9aa4ee23b5ee3fa1cf2542ee87ae5552a79177d (patch)
treeb50953401899146ac328d387c93a668e4df1b3c2 /tests/src/Unit/Plugin
parent91d7545d4bd596c119cffd4a497a99c89bb931e8 (diff)
#2624862: Namespace change from facet_api to facets.
Diffstat (limited to 'tests/src/Unit/Plugin')
-rw-r--r--tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php16
-rw-r--r--tests/src/Unit/Plugin/processor/CountWidgetOrderProcessorTest.php14
-rw-r--r--tests/src/Unit/Plugin/processor/DisplayValueWidgetOrderProcessorTest.php14
-rw-r--r--tests/src/Unit/Plugin/processor/ExcludeSpecifiedItemsProcessorTest.php22
-rw-r--r--tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php16
-rw-r--r--tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php22
-rw-r--r--tests/src/Unit/Plugin/processor/QueryStringUrlProcessorTest.php30
-rw-r--r--tests/src/Unit/Plugin/processor/RawValueWidgetOrderProcessorTest.php14
-rw-r--r--tests/src/Unit/Plugin/processor/UidToUserNameCallbackProcessorTest.php14
-rw-r--r--tests/src/Unit/Plugin/query_type/SearchApiStringTest.php20
-rw-r--r--tests/src/Unit/Plugin/widget/CheckboxWidgetTest.php18
-rw-r--r--tests/src/Unit/Plugin/widget/LinksWidgetTest.php18
12 files changed, 109 insertions, 109 deletions
diff --git a/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php b/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php
index eb18f7e..7684701 100644
--- a/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/ActiveWidgetOrderProcessorTest.php
@@ -2,31 +2,31 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\ActiveWidgetOrderProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\ActiveWidgetOrderProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Plugin\facetapi\processor\ActiveWidgetOrderProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Plugin\facets\processor\ActiveWidgetOrderProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
/**
- * @group facetapi
+ * @group facets
*/
class ActiveWidgetOrderProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\WidgetOrderProcessorInterface
+ * @var \Drupal\facets\processor\WidgetOrderProcessorInterface
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
@@ -36,7 +36,7 @@ class ActiveWidgetOrderProcessorTest extends UnitTestCase {
protected function setUp() {
parent::setUp();
- /** @var \Drupal\facetapi\Result\Result[] $original_results */
+ /** @var \Drupal\facets\Result\Result[] $original_results */
$original_results = [
new Result('Boxer', 'Boxer', 10),
new Result('Old Major', 'Old Major', 3),
diff --git a/tests/src/Unit/Plugin/processor/CountWidgetOrderProcessorTest.php b/tests/src/Unit/Plugin/processor/CountWidgetOrderProcessorTest.php
index a05d8bf..c9385f7 100644
--- a/tests/src/Unit/Plugin/processor/CountWidgetOrderProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/CountWidgetOrderProcessorTest.php
@@ -2,31 +2,31 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\CountWidgetOrderProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\CountWidgetOrderProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Plugin\facetapi\processor\CountWidgetOrderProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Plugin\facets\processor\CountWidgetOrderProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
/**
- * @group facetapi
+ * @group facets
*/
class CountWidgetOrderProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\WidgetOrderProcessorInterface
+ * @var \Drupal\facets\processor\WidgetOrderProcessorInterface
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
diff --git a/tests/src/Unit/Plugin/processor/DisplayValueWidgetOrderProcessorTest.php b/tests/src/Unit/Plugin/processor/DisplayValueWidgetOrderProcessorTest.php
index f55e1ac..a865d9b 100644
--- a/tests/src/Unit/Plugin/processor/DisplayValueWidgetOrderProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/DisplayValueWidgetOrderProcessorTest.php
@@ -2,31 +2,31 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\DisplayValueWidgetOrderProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\DisplayValueWidgetOrderProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Plugin\facetapi\processor\DisplayValueWidgetOrderProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Plugin\facets\processor\DisplayValueWidgetOrderProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
/**
- * @group facetapi
+ * @group facets
*/
class DisplayValueWidgetOrderProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\WidgetOrderProcessorInterface
+ * @var \Drupal\facets\processor\WidgetOrderProcessorInterface
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
diff --git a/tests/src/Unit/Plugin/processor/ExcludeSpecifiedItemsProcessorTest.php b/tests/src/Unit/Plugin/processor/ExcludeSpecifiedItemsProcessorTest.php
index 6d1c77e..2fad703 100644
--- a/tests/src/Unit/Plugin/processor/ExcludeSpecifiedItemsProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/ExcludeSpecifiedItemsProcessorTest.php
@@ -1,33 +1,33 @@
<?php
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\ExcludeSpecifiedItemsProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\ExcludeSpecifiedItemsProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\processor\ExcludeSpecifiedItemsProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\processor\ExcludeSpecifiedItemsProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
- * @group facetapi
+ * @group facets
*/
class ExcludeSpecifiedItemsProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\BuildProcessorInterface
+ * @var \Drupal\facets\processor\BuildProcessorInterface
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
@@ -56,11 +56,11 @@ class ExcludeSpecifiedItemsProcessorTest extends UnitTestCase {
$processorDefinitions = [
$processor_id => [
'id' => $processor_id,
- 'class' => 'Drupal\facetapi\Plugin\facetapi\processor\ExcludeSpecifiedItemsProcessor',
+ 'class' => 'Drupal\facets\Plugin\facets\processor\ExcludeSpecifiedItemsProcessor',
],
];
- $manager = $this->getMockBuilder('Drupal\facetapi\Processor\ProcessorPluginManager')
+ $manager = $this->getMockBuilder('Drupal\facets\Processor\ProcessorPluginManager')
->disableOriginalConstructor()
->getMock();
$manager->expects($this->once())
@@ -71,7 +71,7 @@ class ExcludeSpecifiedItemsProcessorTest extends UnitTestCase {
->willReturn($this->processor);
$container_builder = new ContainerBuilder();
- $container_builder->set('plugin.manager.facetapi.processor', $manager);
+ $container_builder->set('plugin.manager.facets.processor', $manager);
\Drupal::setContainer($container_builder);
}
diff --git a/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php b/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php
index c53e0a5..ba9d151 100644
--- a/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/HideNonNarrowingResultProcessorTest.php
@@ -2,32 +2,32 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\HideNonNarrowingResultProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\HideNonNarrowingResultProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\processor\HideNonNarrowingResultProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\processor\HideNonNarrowingResultProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
/**
- * @group facetapi
+ * @group facets
*/
class HideNonNarrowingResultProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\WidgetOrderProcessorInterface
+ * @var \Drupal\facets\processor\WidgetOrderProcessorInterface
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
diff --git a/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php b/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php
index 412108c..58712df 100644
--- a/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/MinimumCountProcessorTest.php
@@ -2,33 +2,33 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\MinimumCountProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\MinimumCountProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\processor\MinimumCountProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\processor\MinimumCountProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
- * @group facetapi
+ * @group facets
*/
class MinimumCountProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\BuildProcessorInterface
+ * @var \Drupal\facets\processor\BuildProcessorInterface
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
@@ -50,11 +50,11 @@ class MinimumCountProcessorTest extends UnitTestCase {
$processorDefinitions = [
$processor_id => [
'id' => $processor_id,
- 'class' => 'Drupal\facetapi\Plugin\facetapi\processor\MinimumCountProcessor',
+ 'class' => 'Drupal\facets\Plugin\facets\processor\MinimumCountProcessor',
],
];
- $manager = $this->getMockBuilder('Drupal\facetapi\Processor\ProcessorPluginManager')
+ $manager = $this->getMockBuilder('Drupal\facets\Processor\ProcessorPluginManager')
->disableOriginalConstructor()
->getMock();
$manager->expects($this->once())
@@ -65,7 +65,7 @@ class MinimumCountProcessorTest extends UnitTestCase {
->willReturn($this->processor);
$container_builder = new ContainerBuilder();
- $container_builder->set('plugin.manager.facetapi.processor', $manager);
+ $container_builder->set('plugin.manager.facets.processor', $manager);
\Drupal::setContainer($container_builder);
}
diff --git a/tests/src/Unit/Plugin/processor/QueryStringUrlProcessorTest.php b/tests/src/Unit/Plugin/processor/QueryStringUrlProcessorTest.php
index 103eeb6..a4b22eb 100644
--- a/tests/src/Unit/Plugin/processor/QueryStringUrlProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/QueryStringUrlProcessorTest.php
@@ -2,35 +2,35 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\QueryStringUrlProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\QueryStringUrlProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\processor\QueryStringUrlProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\processor\QueryStringUrlProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Request;
/**
- * @group facetapi
+ * @group facets
*/
class QueryStringUrlProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\Plugin\facetapi\processor\QueryStringUrlProcessor
+ * @var \Drupal\facets\Plugin\facets\processor\QueryStringUrlProcessor
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
@@ -102,9 +102,9 @@ class QueryStringUrlProcessorTest extends UnitTestCase {
$this->processor = new QueryStringUrlProcessor([], 'query_string', [], $request);
$results = $this->processor->build($facet, $this->original_results);
- /** @var \Drupal\facetapi\Result\ResultInterface $r */
+ /** @var \Drupal\facets\Result\ResultInterface $r */
foreach ($results as $r) {
- $this->assertInstanceOf('\Drupal\facetapi\Result\ResultInterface', $r);
+ $this->assertInstanceOf('\Drupal\facets\Result\ResultInterface', $r);
$this->assertEquals('route:test?f[0]=test%3A' . $r->getRawValue(), $r->getUrl()->toUriString());
}
}
@@ -125,9 +125,9 @@ class QueryStringUrlProcessorTest extends UnitTestCase {
$this->processor = new QueryStringUrlProcessor([], 'query_string', [], $request);
$results = $this->processor->build($facet, $original_results);
- /** @var \Drupal\facetapi\Result\ResultInterface $r */
+ /** @var \Drupal\facets\Result\ResultInterface $r */
foreach ($results as $k => $r) {
- $this->assertInstanceOf('\Drupal\facetapi\Result\ResultInterface', $r);
+ $this->assertInstanceOf('\Drupal\facets\Result\ResultInterface', $r);
if ($k === 2) {
$this->assertEquals('route:test?f[0]=king%3Akong', $r->getUrl()->toUriString());
}
@@ -150,13 +150,13 @@ class QueryStringUrlProcessorTest extends UnitTestCase {
]
);
- $fsi = $this->getMockBuilder('\Drupal\facetapi\FacetSource\FacetSourceInterface')
+ $fsi = $this->getMockBuilder('\Drupal\facets\FacetSource\FacetSourceInterface')
->disableOriginalConstructor()
->getMock();
$fsi->method('getPath')
->willReturn('search/test');
- $manager = $this->getMockBuilder('Drupal\facetapi\FacetSource\FacetSourcePluginManager')
+ $manager = $this->getMockBuilder('Drupal\facets\FacetSource\FacetSourcePluginManager')
->disableOriginalConstructor()
->getMock();
$manager->method('createInstance')
@@ -164,7 +164,7 @@ class QueryStringUrlProcessorTest extends UnitTestCase {
$container = new ContainerBuilder();
$container->set('router.no_access_checks', $router);
- $container->set('plugin.manager.facetapi.facet_source', $manager);
+ $container->set('plugin.manager.facets.facet_source', $manager);
\Drupal::setContainer($container);
}
diff --git a/tests/src/Unit/Plugin/processor/RawValueWidgetOrderProcessorTest.php b/tests/src/Unit/Plugin/processor/RawValueWidgetOrderProcessorTest.php
index 00d738c..f99a485 100644
--- a/tests/src/Unit/Plugin/processor/RawValueWidgetOrderProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/RawValueWidgetOrderProcessorTest.php
@@ -2,31 +2,31 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\RawValueWidgetOrderProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\RawValueWidgetOrderProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Plugin\facetapi\processor\RawValueWidgetOrderProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Plugin\facets\processor\RawValueWidgetOrderProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
/**
- * @group facetapi
+ * @group facets
*/
class RawValueWidgetOrderProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\WidgetOrderProcessorInterface
+ * @var \Drupal\facets\processor\WidgetOrderProcessorInterface
*/
protected $processor;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
diff --git a/tests/src/Unit/Plugin/processor/UidToUserNameCallbackProcessorTest.php b/tests/src/Unit/Plugin/processor/UidToUserNameCallbackProcessorTest.php
index 88d2e4b..efa3174 100644
--- a/tests/src/Unit/Plugin/processor/UidToUserNameCallbackProcessorTest.php
+++ b/tests/src/Unit/Plugin/processor/UidToUserNameCallbackProcessorTest.php
@@ -2,26 +2,26 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\Processor\UidToUserNameCallbackProcessorTest.
+ * Contains \Drupal\Tests\facets\Plugin\Processor\UidToUserNameCallbackProcessorTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\Processor;
+namespace Drupal\Tests\facets\Unit\Plugin\Processor;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\processor\UidToUserNameCallbackProcessor;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\processor\UidToUserNameCallbackProcessor;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
- * @group facetapi
+ * @group facets
*/
class UidToUserNameCallbackProcessorTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \Drupal\facetapi\processor\WidgetOrderProcessorInterface
+ * @var \Drupal\facets\processor\WidgetOrderProcessorInterface
*/
protected $processor;
diff --git a/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php b/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php
index 89d00d7..f49754c 100644
--- a/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php
+++ b/tests/src/Unit/Plugin/query_type/SearchApiStringTest.php
@@ -2,18 +2,18 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\query_string\SearchApiStringTest.
+ * Contains \Drupal\Tests\facets\Plugin\query_string\SearchApiStringTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\query_string;
+namespace Drupal\Tests\facets\Unit\Plugin\query_string;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\query_type\SearchApiString;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\query_type\SearchApiString;
use Drupal\search_api\Plugin\views\query\SearchApiQuery;
use Drupal\Tests\UnitTestCase;
/**
- * @group facetapi
+ * @group facets
*/
class SearchApiStringTest extends UnitTestCase {
@@ -23,7 +23,7 @@ class SearchApiStringTest extends UnitTestCase {
*/
public function testQueryType() {
$query = new SearchApiQuery([], 'search_api_query', []);
- $facet = new Facet([], 'facetapi_facet');
+ $facet = new Facet([], 'facets_facet');
$original_results = [
['count' => 3, 'filter' => 'badger'],
@@ -43,13 +43,13 @@ class SearchApiStringTest extends UnitTestCase {
);
$built_facet = $query_type->build();
- $this->assertInstanceOf('\Drupal\facetapi\FacetInterface', $built_facet);
+ $this->assertInstanceOf('\Drupal\facets\FacetInterface', $built_facet);
$results = $built_facet->getResults();
$this->assertInternalType('array', $results);
foreach ($original_results as $k => $result) {
- $this->assertInstanceOf('\Drupal\facetapi\Result\ResultInterface', $results[$k]);
+ $this->assertInstanceOf('\Drupal\facets\Result\ResultInterface', $results[$k]);
$this->assertEquals($result['count'], $results[$k]->getCount());
$this->assertEquals($result['filter'], $results[$k]->getDisplayValue());
}
@@ -60,7 +60,7 @@ class SearchApiStringTest extends UnitTestCase {
*/
public function testEmptyResults() {
$query = new SearchApiQuery([], 'search_api_query', []);
- $facet = new Facet([], 'facetapi_facet');
+ $facet = new Facet([], 'facets_facet');
$query_type = new SearchApiString(
[
@@ -72,7 +72,7 @@ class SearchApiStringTest extends UnitTestCase {
);
$built_facet = $query_type->build();
- $this->assertInstanceOf('\Drupal\facetapi\FacetInterface', $built_facet);
+ $this->assertInstanceOf('\Drupal\facets\FacetInterface', $built_facet);
$results = $built_facet->getResults();
$this->assertInternalType('array', $results);
diff --git a/tests/src/Unit/Plugin/widget/CheckboxWidgetTest.php b/tests/src/Unit/Plugin/widget/CheckboxWidgetTest.php
index 8955b7f..0dfa350 100644
--- a/tests/src/Unit/Plugin/widget/CheckboxWidgetTest.php
+++ b/tests/src/Unit/Plugin/widget/CheckboxWidgetTest.php
@@ -2,33 +2,33 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\widget\CheckboxWidgetTest.
+ * Contains \Drupal\Tests\facets\Plugin\widget\CheckboxWidgetTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\widget;
+namespace Drupal\Tests\facets\Unit\Plugin\widget;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\widget\CheckboxWidget;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\widget\CheckboxWidget;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
- * @group facetapi
+ * @group facets
*/
class CheckboxWidgetTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \drupal\facetapi\Widget\WidgetInterface
+ * @var \drupal\facets\Widget\WidgetInterface
*/
protected $widget;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
@@ -38,7 +38,7 @@ class CheckboxWidgetTest extends UnitTestCase {
protected function setUp() {
parent::setUp();
- /** @var \Drupal\facetapi\Result\Result[] $original_results */
+ /** @var \Drupal\facets\Result\Result[] $original_results */
$original_results = [
new Result('llama', 'Llama', 10),
new Result('badger', 'Badger', 20),
diff --git a/tests/src/Unit/Plugin/widget/LinksWidgetTest.php b/tests/src/Unit/Plugin/widget/LinksWidgetTest.php
index 22befd6..5159b64 100644
--- a/tests/src/Unit/Plugin/widget/LinksWidgetTest.php
+++ b/tests/src/Unit/Plugin/widget/LinksWidgetTest.php
@@ -2,33 +2,33 @@
/**
* @file
- * Contains \Drupal\Tests\facetapi\Plugin\widget\LinksWidgetTest.
+ * Contains \Drupal\Tests\facets\Plugin\widget\LinksWidgetTest.
*/
-namespace Drupal\Tests\facetapi\Unit\Plugin\widget;
+namespace Drupal\Tests\facets\Unit\Plugin\widget;
-use Drupal\facetapi\Entity\Facet;
-use Drupal\facetapi\Plugin\facetapi\widget\LinksWidget;
-use Drupal\facetapi\Result\Result;
+use Drupal\facets\Entity\Facet;
+use Drupal\facets\Plugin\facets\widget\LinksWidget;
+use Drupal\facets\Result\Result;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
- * @group facetapi
+ * @group facets
*/
class LinksWidgetTest extends UnitTestCase {
/**
* The processor to be tested.
*
- * @var \drupal\facetapi\Widget\WidgetInterface
+ * @var \drupal\facets\Widget\WidgetInterface
*/
protected $widget;
/**
* An array containing the results before the processor has ran.
*
- * @var \Drupal\facetapi\Result\Result[]
+ * @var \Drupal\facets\Result\Result[]
*/
protected $original_results;
@@ -38,7 +38,7 @@ class LinksWidgetTest extends UnitTestCase {
protected function setUp() {
parent::setUp();
- /** @var \Drupal\facetapi\Result\Result[] $original_results */
+ /** @var \Drupal\facets\Result\Result[] $original_results */
$original_results = [
new Result('llama', 'Llama', 10),
new Result('badger', 'Badger', 20),