Esempio n. 1
0
 public function testExecInBackground()
 {
     $result = $this->taskExec('ls')->background()->run();
     $this->process->verifyInvoked('start');
     $this->process->verifyNeverInvoked('run');
     verify('exit code was not received', $result->getExitCode())->notEquals(100);
 }
Esempio n. 2
0
 public function testExecInBackground()
 {
     $task = new \Robo\Task\Base\Exec('ls');
     $task->setLogger(new \Psr\Log\NullLogger());
     $result = $task->background()->run();
     $this->process->verifyInvoked('start');
     $this->process->verifyNeverInvoked('run');
     verify('exit code was not received', $result->getExitCode())->notEquals(100);
 }
Esempio n. 3
0
 public function testVerifyClassMethodCalled()
 {
     $user = new UserModel();
     $userProxy = new ClassProxy('demo\\UserModel');
     double::registerClass('demo\\UserModel');
     $user->setName('davert');
     $user->setName('jon');
     $userProxy->verifyInvokedMultipleTimes('setName', 2);
     $userProxy->verifyInvokedOnce('setName', ['jon']);
     $userProxy->verifyNeverInvoked('save');
     $userProxy->verifyNeverInvoked('setName', ['bob']);
     verify($user->getName())->equals('jon');
 }