Ejemplo n.º 1
0
 /**
  * @test
  */
 public function extractMetaDataUsesMParameter()
 {
     ExecRecorder::setReturnExecOutput(array('foo'));
     $file = new File(array('identifier' => 'testWORD.doc', 'name' => 'testWORD.doc'), $this->documentsStorageMock);
     $service = new AppService($this->getConfiguration());
     $service->extractMetaData($file);
     $this->assertContains('-m', ExecRecorder::$execCommand);
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function stopStopsProcess()
 {
     $process = new Process('/usr/bin/foo', '-bar');
     $process->setPid(1337);
     ExecRecorder::setReturnExecOutput(array('1337 /usr/bin/foo -bar'));
     $running = $process->isRunning();
     $this->assertTrue($running);
     $stopped = $process->stop();
     $this->assertTrue($stopped);
     $running = $process->isRunning();
     $this->assertFalse($running);
 }