Наследование: extends League\Route\Strategy\AbstractStrategy, implements League\Route\Strategy\StrategyInterface, use trait Phprest\Service\Hateoas\Util
Пример #1
0
 public function testDispatchWithClassAndMethodAndResponseObject()
 {
     $this->setRequestParameters('phprest-test', 1, '*/*');
     $result = $this->strategy->dispatch('Phprest\\Stub\\Controller\\Simple::getSampleResponse', []);
     $this->assertInstanceOf('Phprest\\HttpFoundation\\Response', $result);
     if ($result instanceof \Phprest\HttpFoundation\Response) {
         $this->assertEquals(json_encode('sample'), $result->getContent());
     }
 }