Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / tests / src / Unit / Plugin / DMU / Indexer / FunctionsTest.php
1 <?php
2
3 namespace Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\Indexer;
4 use Drupal\drupalmoduleupgrader\Plugin\DMU\Indexer\Functions;
5
6 /**
7  * @group DMU.Indexer
8  * @covers \Drupal\drupalmoduleupgrader\Plugin\DMU\Indexer\Functions
9  *
10  * @expectID foo_blarg
11  * @expectType \Pharborist\Functions\FunctionDeclarationNode
12  */
13 class FunctionsTest extends IndexerTestBase {
14
15   public function setUp() {
16     parent::setUp();
17
18     $code = <<<'END'
19 <?php
20
21 function foo_blarg() {}
22 END;
23     $this->dir->getChild('foo.module')->setContent($code);
24
25     $this->indexer = new Functions([], 'function', [], $this->db, $this->target);
26     $this->indexer->build();
27   }
28
29   public function testQuery() {
30     $this->assertInstanceOf('\Drupal\Core\Database\Query\Select', $this->indexer->getQuery());
31   }
32
33 }