Skip to content

Instantly share code, notes, and snippets.

@deleugpn
Last active September 21, 2017 18:08
Show Gist options
  • Select an option

  • Save deleugpn/28ba8b2f10780273dd582df56630d35a to your computer and use it in GitHub Desktop.

Select an option

Save deleugpn/28ba8b2f10780273dd582df56630d35a to your computer and use it in GitHub Desktop.
<?php
namespace Tests\Feature\Version;
use Facades\App\Process;
use Tests\Fake\ProcessFake;
use Tests\TestCase;
class WebServerTest extends TestCase
{
/**
* @test
*/
public function restart_web_server()
{
Process::swap(new ProcessFake);
$this->post('/webserver/restart');
Process::assertExecuted('service httpd restart');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment