public function register(Application $app)
 {
     $app['hodor'] = $app->protect(function ($config_file) use($app) {
         return $app->share(function (Application $app) use($config_file) {
             $job_queue = new JobQueue();
             $job_queue->setConfigFile($config_file);
             return $job_queue;
         });
     });
 }
Beispiel #2
0
 /**
  * @covers ::setConfigFile
  * @covers ::getConfig
  */
 public function testConfigCanBeRetrievedMultipleTimes()
 {
     $this->job_queue->setConfigFile(__DIR__ . '/../../../../config/config.test.php');
     $this->assertSame($this->job_queue->getConfig(), $this->job_queue->getConfig());
 }