You are here

public function InfoFileTest::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/Analyzer/InfoFileTest.php, line 11

Class

InfoFileTest
@group DMU.Analyzer @covers \Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\InfoFile

Namespace

Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\Analyzer

Code

public function setUp() {
  parent::setUp();
  $info = <<<'END'
name = "Foobar"
core = "7.x"
files[] = foo.test
END;
  $this->dir
    ->getChild('foo.info')
    ->setContent($info);
  $this->analyzer = $this
    ->getPlugin([], [
    'documentation' => [
      [
        'url' => 'http://www.google.com',
        'title' => 'Google it, baby.',
      ],
    ],
  ]);
}