File tree Expand file tree Collapse file tree 1 file changed +5
-28
lines changed Expand file tree Collapse file tree 1 file changed +5
-28
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ class PHPMockTest extends AbstractMockTest
17
17
18
18
use PHPMock;
19
19
20
+ protected function defineFunction ($ namespace , $ functionName )
21
+ {
22
+ self ::defineFunctionMock ($ namespace , $ functionName );
23
+ }
24
+
20
25
protected function mockFunction ($ namespace , $ functionName , callable $ function )
21
26
{
22
27
$ mock = $ this ->getFunctionMock ($ namespace , $ functionName );
@@ -27,34 +32,6 @@ protected function disableMocks()
27
32
{
28
33
}
29
34
30
- /**
31
- * Tests defineFunctionMock().
32
- *
33
- * @test
34
- */
35
- public function testDefineFunctionMock ()
36
- {
37
- self ::defineFunctionMock (__NAMESPACE__ , "escapeshellcmd " );
38
- self ::escapeshellcmd ("foo " );
39
-
40
- $ mock = $ this ->getFunctionMock (__NAMESPACE__ , "escapeshellcmd " );
41
- $ mock ->expects ($ this ->once ())->willReturn ("bar " );
42
-
43
- $ this ->assertEquals ("bar " , self ::escapeshellcmd ("foo " ));
44
- }
45
-
46
- /**
47
- * Returns the built-in call to escapeshellcmd().
48
- *
49
- * @param string $command Shell command.
50
- *
51
- * @return string The built-in call.
52
- */
53
- private static function escapeshellcmd ($ command )
54
- {
55
- return escapeshellcmd ($ command );
56
- }
57
-
58
35
/**
59
36
* Tests building a mock with arguments.
60
37
*
You can’t perform that action at this time.
0 commit comments