You are here

public function TargetTest::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/TargetTest.php, line 17

Class

TargetTest
@group DMU

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit

Code

public function setUp() {
  parent::setUp();
  $this->indexer = $this
    ->getMockBuilder('\\Drupal\\drupalmoduleupgrader\\Plugin\\DMU\\Indexer\\Functions')
    ->disableOriginalConstructor()
    ->getMock();
  $this->container
    ->get('plugin.manager.drupalmoduleupgrader.indexer')
    ->method('createInstance')
    ->with('function')
    ->willReturn($this->indexer);
}