public function ClassesTest::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/ ClassesTest.php, line 16
Class
- ClassesTest
- @group DMU.Indexer @covers \Drupal\drupalmoduleupgrader\Plugin\DMU\Indexer\Classes
Namespace
Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\IndexerCode
public function setUp() {
parent::setUp();
$code = <<<'END'
<?php
class Foobaz {}
END;
$this->dir
->getChild('foo.module')
->setContent($code);
$this->indexer = new Classes([], 'class', [], $this->db, $this->target);
$this->indexer
->build();
}