Added the Porter Stemmer module to improve searches. This doesn't deal with some...
[yaffs-website] / web / modules / contrib / porterstemmer / tests / src / Unit / PorterPeclBase.php
1 <?php
2
3 namespace Drupal\Tests\porterstemmer\Unit;
4
5 use Drupal\Tests\UnitTestCase;
6
7 /**
8  * Base methods for all PECL stem_english() tests.
9  */
10 abstract class PorterPeclBase extends UnitTestCase {
11
12   use TestItemsTrait;
13
14   /**
15    * Modules to install.
16    *
17    * @var array
18    */
19   public static $modules = array('porterstemmer');
20
21   public $has_pecl_stem = FALSE;
22
23   /**
24    * {@inheritdoc}
25    */
26   protected function setUp() {
27     parent::setUp();
28     $this->has_pecl_stem = extension_loaded('stem') && function_exists('stem_english');
29   }
30
31 }