You are here

protected function PluginTest::setUp in Database Sanitize 7

File

vendor/edisonlabs/merge-yaml/tests/src/Unit/PluginTest.php, line 36

Class

PluginTest
Tests for EdisonLabs\MergeYaml\Plugin

Namespace

EdisonLabs\MergeYaml\Unit

Code

protected function setUp() {
  $this->defaultConfig = [
    'files' => [
      'test',
    ],
    'locations' => [
      dirname(__FILE__) . '/../../assets',
    ],
    'output-dir' => '/tmp/merge-yaml',
  ];
  $this->packageMock = $this
    ->getMockBuilder('Composer\\Package\\RootPackage')
    ->disableOriginalConstructor()
    ->setMethods([
    'getExtra',
    'setExtra',
  ])
    ->getMock();
  $this->packageMock
    ->expects($this
    ->once())
    ->method('getExtra')
    ->will($this
    ->returnValue([
    'merge-yaml' => $this->defaultConfig,
  ]));
  $this->eventMock = $this
    ->getMockBuilder('Composer\\Script\\Event')
    ->disableOriginalConstructor()
    ->getMock();
}