Skip to content

Commit 1921d41

Browse files
committed
IHF: Test.
1 parent 80c54e3 commit 1921d41

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
<?php
22

3-
use Mockery as m;
4-
3+
// use Mockery as m;
4+
//
55
// /**
66
// * @runTestsInSeparateProcesses
77
// * @preserveGlobalState disabled
88
// */
9-
class CallInBackgroundTest extends TestCase
10-
{
11-
protected function setUp()
12-
{
13-
$phpMock = m::mock('overload:Symfony\Component\Process\PhpExecutableFinder');
14-
$phpMock->shouldReceive('find')->with(false)->once()->andReturn('php');
15-
16-
$utilsMock = m::mock('alias:Symfony\Component\Process\ProcessUtils');
17-
$utilsMock->shouldReceive('escapeArgument')->withAnyArgs()->atLeast()->once()->andReturnUsing(function ($v) {
18-
return $v;
19-
});
20-
}
21-
22-
/** @test */
23-
public function it_works_without_before_and_after_parameters()
24-
{
25-
$mock = m::mock('alias:Illuminated\Helpers\System\Command');
26-
$mock->shouldReceive('exec')->with('(php artisan test command) > /dev/null 2>&1 &')->once();
27-
28-
call_in_background('test command');
29-
}
30-
31-
// /** @test */
32-
// public function it_works_with_only_before_parameter()
33-
// {
34-
// $mock = m::mock('alias:Illuminated\Helpers\System\Command');
35-
// $mock->shouldReceive('exec')->with('(before command && php artisan test command) > /dev/null 2>&1 &')->once();
36-
//
37-
// call_in_background('test command', 'before command');
38-
// }
39-
//
40-
// /** @test */
41-
// public function it_works_with_only_after_parameter()
42-
// {
43-
// $mock = m::mock('alias:Illuminated\Helpers\System\Command');
44-
// $mock->shouldReceive('exec')->with('(php artisan test command && after command) > /dev/null 2>&1 &')->once();
45-
//
46-
// call_in_background('test command', null, 'after command');
47-
// }
48-
//
49-
// /** @test */
50-
// public function it_works_with_before_and_after_parameters()
51-
// {
52-
// $mock = m::mock('alias:Illuminated\Helpers\System\Command');
53-
// $mock->shouldReceive('exec')->with('(before && php artisan test command && after) > /dev/null 2>&1 &')->once();
54-
//
55-
// call_in_background('test command', 'before', 'after');
56-
// }
57-
}
9+
// class CallInBackgroundTest extends TestCase
10+
// {
11+
// protected function setUp()
12+
// {
13+
// $phpMock = m::mock('overload:Symfony\Component\Process\PhpExecutableFinder');
14+
// $phpMock->shouldReceive('find')->with(false)->once()->andReturn('php');
15+
//
16+
// $utilsMock = m::mock('alias:Symfony\Component\Process\ProcessUtils');
17+
// $utilsMock->shouldReceive('escapeArgument')->withAnyArgs()->atLeast()->once()->andReturnUsing(function ($v) {
18+
// return $v;
19+
// });
20+
// }
21+
//
22+
// /** @test */
23+
// public function it_works_without_before_and_after_parameters()
24+
// {
25+
// $mock = m::mock('alias:Illuminated\Helpers\System\Command');
26+
// $mock->shouldReceive('exec')->with('(php artisan test command) > /dev/null 2>&1 &')->once();
27+
//
28+
// call_in_background('test command');
29+
// }
30+
//
31+
// /** @test */
32+
// public function it_works_with_only_before_parameter()
33+
// {
34+
// $mock = m::mock('alias:Illuminated\Helpers\System\Command');
35+
// $mock->shouldReceive('exec')->with('(before command && php artisan test command) > /dev/null 2>&1 &')->once();
36+
//
37+
// call_in_background('test command', 'before command');
38+
// }
39+
//
40+
// /** @test */
41+
// public function it_works_with_only_after_parameter()
42+
// {
43+
// $mock = m::mock('alias:Illuminated\Helpers\System\Command');
44+
// $mock->shouldReceive('exec')->with('(php artisan test command && after command) > /dev/null 2>&1 &')->once();
45+
//
46+
// call_in_background('test command', null, 'after command');
47+
// }
48+
//
49+
// /** @test */
50+
// public function it_works_with_before_and_after_parameters()
51+
// {
52+
// $mock = m::mock('alias:Illuminated\Helpers\System\Command');
53+
// $mock->shouldReceive('exec')->with('(before && php artisan test command && after) > /dev/null 2>&1 &')->once();
54+
//
55+
// call_in_background('test command', 'before', 'after');
56+
// }
57+
// }

0 commit comments

Comments
 (0)