@@ -58,7 +58,7 @@ public function testGetTasksNoCrontab()
58
58
59
59
$ this ->shellMock ->expects ($ this ->once ())
60
60
->method ('execute ' )
61
- ->with ('crontab -l ' , [])
61
+ ->with ('crontab -l 2>/dev/null ' , [])
62
62
->willThrowException ($ localizedException );
63
63
64
64
$ this ->assertEquals ([], $ this ->crontabManager ->getTasks ());
@@ -74,7 +74,7 @@ public function testGetTasks($content, $tasks)
74
74
{
75
75
$ this ->shellMock ->expects ($ this ->once ())
76
76
->method ('execute ' )
77
- ->with ('crontab -l ' , [])
77
+ ->with ('crontab -l 2>/dev/null ' , [])
78
78
->willReturn ($ content );
79
79
80
80
$ this ->assertEquals ($ tasks , $ this ->crontabManager ->getTasks ());
@@ -127,7 +127,7 @@ public function testRemoveTasksWithException()
127
127
128
128
$ this ->shellMock ->expects ($ this ->at (0 ))
129
129
->method ('execute ' )
130
- ->with ('crontab -l ' , [])
130
+ ->with ('crontab -l 2>/dev/null ' , [])
131
131
->willReturn ('' );
132
132
133
133
$ this ->shellMock ->expects ($ this ->at (1 ))
@@ -148,7 +148,7 @@ public function testRemoveTasks($contentBefore, $contentAfter)
148
148
{
149
149
$ this ->shellMock ->expects ($ this ->at (0 ))
150
150
->method ('execute ' )
151
- ->with ('crontab -l ' , [])
151
+ ->with ('crontab -l 2>/dev/null ' , [])
152
152
->willReturn ($ contentBefore );
153
153
154
154
$ this ->shellMock ->expects ($ this ->at (1 ))
@@ -276,7 +276,7 @@ public function testSaveTasks($tasks, $content, $contentToSave)
276
276
277
277
$ this ->shellMock ->expects ($ this ->at (0 ))
278
278
->method ('execute ' )
279
- ->with ('crontab -l ' , [])
279
+ ->with ('crontab -l 2>/dev/null ' , [])
280
280
->willReturn ($ content );
281
281
282
282
$ this ->shellMock ->expects ($ this ->at (1 ))
0 commit comments