Example #1
0
 function it_should_setup_container(Container $container, EventDispatcherInterface $dispatcher)
 {
     $container->setShared(Argument::any(), Argument::any())->shouldBeCalled();
     $container->set('phpguard', Argument::any())->shouldBeCalled();
     $container->get('dispatcher')->shouldBeCalled()->willReturn($dispatcher);
     $container->set('ui.application', $this)->shouldBeCalled();
     $container->setShared('ui.shell', Argument::any())->shouldBeCalled();
     $container->setShared(Argument::containingString('listeners'), Argument::any())->shouldBeCalled();
     $this->setupContainer($container);
 }
Example #2
0
 public function testShouldSetupConsoleServices()
 {
     $container = new Container();
     $container->set('ui.output', new StreamOutput(fopen('php://memory', 'w', false)));
     $application = new Application($container);
     $this->assertInstanceOf('PhpGuard\\Application\\Console\\Shell', $container->get('ui.shell'));
     $this->assertInstanceOf('PhpGuard\\Application\\Console\\Application', $container->get('ui.application'));
 }