OrnoTest\Route\DispatcherTest::testClassBasedControllerRouteThrowsExceptionWhenNoFunctionPresent PHP Метод

testClassBasedControllerRouteThrowsExceptionWhenNoFunctionPresent() публичный Метод

Assert that an exception is thrown when no controller method is specified
    public function testClassBasedControllerRouteThrowsExceptionWhenNoFunctionPresent()
    {
        $this->setExpectedException('RuntimeException', 'A class method must be provided as a controller. ClassName::methodName');
        $container = $this->getMock('Orno\\Di\\Container');
        $collection = new Route\RouteCollection($container);
        $collection->setStrategy(Route\RouteStrategyInterface::URI_STRATEGY);
        $collection->get('/route/', 'SomeClass');
        $dispatcher = $collection->getDispatcher();
        $response = $dispatcher->dispatch('GET', '/route/');
    }