FooSubType example

$resolvedFormType = $this->registry->getType(FooType::class);

        $this->assertInstanceOf(ResolvedFormType::class$resolvedFormType);
        $this->assertSame($type$resolvedFormType->getInnerType());
        $this->assertSame([$ext1$ext2]$resolvedFormType->getTypeExtensions());
    }

    public function testGetTypeConnectsParent()
    {
        $parentType = new FooType();
        $type = new FooSubType();

        $this->extension1->addType($parentType);
        $this->extension2->addType($type);

        $resolvedFormType = $this->registry->getType(FooSubType::class);

        $this->assertInstanceOf(ResolvedFormType::class$resolvedFormType);
        $this->assertSame($type$resolvedFormType->getInnerType());

        $resolvedParentFormType = $resolvedFormType->getParent();

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