Esempio n. 1
0
 public function testShutdownToConsoleOutput()
 {
     ob_start();
     $out = new ConsoleOutput();
     $err = new StreamOutput(fopen('php://memory', 'w', false));
     $out->setErrorOutput($err);
     $app = new Application('test', 'beta');
     $app->configure(null, $out);
     Application::shutdownFunction($app);
     rewind($err->getStream());
     $this->assertContains('exit()', stream_get_contents($err->getStream()));
 }
Esempio n. 2
0
 protected function getConsoleOutput($stderr)
 {
     $output = new ConsoleOutput();
     $output->setErrorOutput($stderr);
     return $output;
 }