Esempio n. 1
0
 /**
  * Test get/set container.
  */
 public function testContainer()
 {
     $this->initJob();
     /* @var $container \PHPUnit_Framework_MockObject_MockObject|Container */
     $container = $this->getMockBuilder('\\AnimeDb\\Bundle\\AnimeDbBundle\\Composer\\Job\\Container')->disableOriginalConstructor()->getMock();
     $this->job->setContainer($container);
     $this->assertEquals($container, $this->job->getContainer());
 }
Esempio n. 2
0
 /**
  * @param Job $job
  */
 public function addJob(Job $job)
 {
     $job->setContainer($this);
     $job->setRootDir($this->root_dir . '/../');
     $this->jobs[$job->getPriority()][] = $job;
     $job->register();
 }