Last active
September 21, 2017 18:18
-
-
Save deleugpn/0e5c334efe3b16d2aa84d50aaeba9157 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Tests\Fake; | |
| use App\Process; | |
| use PHPUnit\Framework\Assert as PHPUnit; | |
| class ProcessFake extends Process | |
| { | |
| /** | |
| * @var array | |
| */ | |
| protected $commands = []; | |
| public function run($command, $directory = null) | |
| { | |
| $this->commands[] = $command; | |
| } | |
| public function assertExecuted($command) | |
| { | |
| PHPUnit::assertTrue( | |
| in_array($command, $this->commands), | |
| "The expected $command was never executed" | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment