You are here

public function FunctionsTest::setUp in Drupal 7 to 8/9 Module Upgrader 8

Mocks an entire module, called foo, in a virtual file system.

Overrides TestBase::setUp

File

tests/src/Unit/Plugin/DMU/Indexer/FunctionsTest.php, line 16

Class

FunctionsTest
@group DMU.Indexer @covers \Drupal\drupalmoduleupgrader\Plugin\DMU\Indexer\Functions

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\Indexer

Code

public function setUp() {
  parent::setUp();
  $code = <<<'END'
<?php

function foo_blarg() {}
END;
  $this->dir
    ->getChild('foo.module')
    ->setContent($code);
  $this->indexer = new Functions([], 'function', [], $this->db, $this->target);
  $this->indexer
    ->build();
}