Ejemplo n.º 1
0
 public function testErrorHandlerIsRegistered()
 {
     require_once __DIR__ . '/../fixtures/CachedContainer.php';
     $root = vfsStream::setup();
     $container = \Maverick\bootstrap($root->url());
     $this->assertEquals($container->get('error_handler'), set_error_handler(function () {
     }));
 }
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $file = sprintf('%s/%s', $this->getRoot(), $this->file);
     $output->writeln('Caching the container:');
     $output->writeln(sprintf("\tFile:\t\t%s", $file));
     $container = \Maverick\bootstrap($this->getRoot(), true);
     $container->compile();
     $dumper = new PhpDumper($container);
     $dumped = $dumper->dump(['namespace' => $this->namespace, 'class' => $this->class]);
     file_put_contents($file, $dumped);
 }