Beispiel #1
0
 public function testSqlAsAServiceOverAnnotation()
 {
     $container = $this->getContainer('/index.service2');
     $this->insertDummyData($container);
     $instancer = new Instancer($container);
     $this->assertEquals('Hi Gonzalo', $instancer->invokeAction());
 }
Beispiel #2
0
 public function testHandling404_2()
 {
     $request = Request::create('/foo/dummy2.nonExistentMethod', 'GET', array());
     $parser = $this->getParserForOneAction('App\\Foo', 'Dummy2', 'nonExistentMethod', $request);
     $instancer = new Instancer($this->getContainerFromParser($parser));
     try {
         $instancer->invokeAction();
         $this->assertTrue(FALSE, 'Un recheable code');
     } catch (Exception $e) {
         $this->assertEquals(404, $e->getCode());
         $this->assertEquals('Not Found', $e->getMessage());
     }
 }