/** * @test * @group command-create * @group command */ public function ファイルの作成() { $path = 'sample.txt'; $this->file->setpath($path); $this->file->create(); $this->expectoutputstring($path . 'を作成しました'); }
/** * @test * @group command-execute-create * @group command */ public function 正常な処理() { $file = new File(); $path = 'sample.txt'; $file->setPath($path); $this->command->setFile($file); $this->command->execute(); $this->expectOutputString($path . 'を作成しました'); }
/** * @test * @group command-run * @group command */ public function 正常な処理() { $file = new File(); $path = 'sample.txt'; $file->setPath($path); $touch = new TouchCommand(); $touch->setFile($file); $compass = new CompassCommand(); $compass->setFile($file); $copy = new CopyCommand(); $copy->setFile($file); $this->queue->addCommand($touch); $this->queue->addCommand($compass); $this->queue->addCommand($copy); $this->queue->run(); $result = $path . 'を作成しました' . $path . 'を圧縮しました' . 'copy_of_' . $path . 'を作成しました'; $this->expectOutputString($result); }