Beispiel #1
0
 /**
  * @covers ::getOutputFilePath
  *
  * @expectedException \Kicaj\Tools\Exception
  * @expectedExceptionMessage Cannot write vfs://root/cfg/tmp/schema.php file.
  */
 public function test_getOutputFilePath_outputFileNotWritable()
 {
     // Given
     $vCfg = vfsStream::newDirectory('cfg')->at($this->vfsRoot);
     $vTmp = vfsStream::newDirectory('tmp')->at($vCfg);
     vfsStream::newFile('schema.php', 00)->at($vTmp);
     $cfgFile = vfsStream::newFile('db_config.json')->withContent(self::getFixtureRawData('db_config.json'))->at($vCfg)->url();
     $configDir = dirname($cfgFile);
     // When
     $gotPath = $this->cmd->getOutputFilePath($configDir, 'tmp/schema.php');
     // Then
     $this->assertSame('vfs://root/cfg/tmp/schema.php', $gotPath);
 }