HttpFactory example

protected $httpMessageFactory;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->container = new ContainerBuilder();
    $class_resolver = new ClassResolver();
    $class_resolver->setContainer($this->container);
    $this->httpMessageFactory = new PsrHttpFactory(new HttpFactory()new HttpFactory()new HttpFactory()new HttpFactory());
    $this->controllerResolver = new ControllerResolver($this->httpMessageFactory, $class_resolver);
  }

  /** * Tests createController(). * * @dataProvider providerTestCreateController */
  public function testCreateController($controller$class$output) {
    $this->container->set('some_service', new MockController());
    $result = $this->controllerResolver->getControllerFromDefinition($controller);
    
Home | Imprint | This part of the site doesn't use cookies.