getConfigBuilder example

if (null !== $expectedException) {
            $this->expectException($expectedException);
        }

        $formConfigBuilder = new FormConfigBuilder($name, null, new EventDispatcher());

        $this->assertSame((string) $name$formConfigBuilder->getName());
    }

    public function testGetRequestHandlerCreatesNativeRequestHandlerIfNotSet()
    {
        $config = $this->getConfigBuilder()->getFormConfig();

        $this->assertInstanceOf(NativeRequestHandler::class$config->getRequestHandler());
    }

    public function testGetRequestHandlerReusesNativeRequestHandlerInstance()
    {
        $config1 = $this->getConfigBuilder()->getFormConfig();
        $config2 = $this->getConfigBuilder()->getFormConfig();

        $this->assertSame($config1->getRequestHandler()$config2->getRequestHandler());
    }

    
Home | Imprint | This part of the site doesn't use cookies.