コード例 #1
0
 /** カレントディレクトリ値を改変する */
 protected function setCurrentDirectory(array &$world, array $arguments)
 {
     $this->assertEquals(1, count($arguments), '引数は 1 つ必要');
     Environment::setCurrentDirectory(getcwd() . $arguments[0]);
 }
コード例 #2
0
ファイル: EnvironmentTest.php プロジェクト: danmaq/unityCrash
 /** 存在しないカレントディレクトリ値は設定できない */
 protected function errorIfSetInvalidDirectory(array &$world, array $arguments)
 {
     $this->assertEquals(1, count($arguments), '引数は 1 つ必要');
     $callback = function () use($world, $arguments) {
         Environment::setCurrentDirectory($arguments[0]);
     };
     $this->assertException($callback, 'InvalidArgumentException', "The path does not exist. :{$arguments[0]}");
 }