diff --git a/src/Command/FsChownCommand.php b/src/Command/FsChownCommand.php index 387b42b..3dbd50e 100644 --- a/src/Command/FsChownCommand.php +++ b/src/Command/FsChownCommand.php @@ -166,6 +166,7 @@ private function getProcess($arguments) return $this ->processBuilder ->setArguments($arguments) + ->setTimeout(0.0) ->getProcess() ; } diff --git a/src/Model/FsMount.php b/src/Model/FsMount.php index 3be12c9..ac1623e 100644 --- a/src/Model/FsMount.php +++ b/src/Model/FsMount.php @@ -77,6 +77,7 @@ private function getProcess($arguments) return $this ->processBuilder ->setArguments($arguments) + ->setTimeout(0.0) ->getProcess() ; } diff --git a/test/Command/FsChownCommandTest.php b/test/Command/FsChownCommandTest.php index 3f5b7dc..f7b61fa 100644 --- a/test/Command/FsChownCommandTest.php +++ b/test/Command/FsChownCommandTest.php @@ -32,7 +32,7 @@ protected function setUp() ; $this->processBuilder = $this ->getMockBuilder(ProcessBuilder::class) - ->setMethods(array('setArguments', 'getProcess')) + ->setMethods(array('setArguments', 'setTimeout', 'getProcess')) ->getMock() ; $this->processBuilder @@ -43,6 +43,10 @@ protected function setUp() ->method('setArguments') ->willReturnSelf() ; + $this->processBuilder + ->method('setTimeout') + ->willReturnSelf() + ; $this->lookup = $this ->getMockBuilder(AclObjectLookupInterface::class) ->getMock() @@ -225,6 +229,12 @@ public function testChownChangesOnlyUserOwnershipWhenGroupOwnershipMatchesArg() ) ) ; + $this + ->processBuilder + ->expects($this->once()) + ->method('setTimeout') + ->with($this->equalTo(0.0)) + ; $this ->process ->method('run') @@ -292,6 +302,12 @@ public function testChownChangesOnlyGroupOwnershipWhenUserOwnershipMatchesArg() ) ) ; + $this + ->processBuilder + ->expects($this->once()) + ->method('setTimeout') + ->with($this->equalTo(0.0)) + ; $this ->process ->method('run') @@ -364,6 +380,12 @@ public function testChownThrowsExceptionWhenItFailsToChangesOwnership() ) ) ; + $this + ->processBuilder + ->expects($this->once()) + ->method('setTimeout') + ->with($this->equalTo(0.0)) + ; $this ->process ->method('run') @@ -428,6 +450,12 @@ public function testChownChangesOwnership() ) ) ; + $this + ->processBuilder + ->expects($this->once()) + ->method('setTimeout') + ->with($this->equalTo(0.0)) + ; $this ->process ->method('run') @@ -484,6 +512,11 @@ public function testChownDoesNotChangeOwnershipInCheckMode() ->expects($this->never()) ->method('setArguments') ; + $this + ->processBuilder + ->expects($this->never()) + ->method('setTimeout') + ; $this ->process ->expects($this->never()) diff --git a/test/Model/FsMountTest.php b/test/Model/FsMountTest.php index e863ab1..1540c2f 100644 --- a/test/Model/FsMountTest.php +++ b/test/Model/FsMountTest.php @@ -23,7 +23,7 @@ protected function setUp() ; $this->processBuilder = $this ->getMockBuilder(ProcessBuilder::class) - ->setMethods(array('setArguments', 'getProcess')) + ->setMethods(array('setArguments', 'setTimeout', 'getProcess')) ->getMock() ; $this->processBuilder @@ -34,6 +34,10 @@ protected function setUp() ->method('setArguments') ->willReturnSelf() ; + $this->processBuilder + ->method('setTimeout') + ->willReturnSelf() + ; } /** @@ -83,6 +87,12 @@ public function testMountedWithMountedFilesystemWillReturnTrue() ->method('setArguments') ->with($this->equalTo(array('mountpoint', '-q', '/mnt/point'))) ; + $this + ->processBuilder + ->expects($this->once()) + ->method('setTimeout') + ->with($this->equalTo(0.0)) + ; $fsMount->mounted('/mnt/point'); } @@ -121,6 +131,12 @@ public function testMountWhenProcessFailsWillThrowException() ->method('setArguments') ->with($this->equalTo(array('mount', '/mnt/point'))) ; + $this + ->processBuilder + ->expects($this->once()) + ->method('setTimeout') + ->with($this->equalTo(0.0)) + ; $fsMount->mount('/mnt/point'); } @@ -175,6 +191,12 @@ public function testUmountWhenProcessFailsWillThrowException() ->method('setArguments') ->with($this->equalTo(array('umount', '/mnt/point'))) ; + $this + ->processBuilder + ->expects($this->once()) + ->method('setTimeout') + ->with($this->equalTo(0.0)) + ; $fsMount->umount('/mnt/point'); }