ConstructorExtractor example

use Symfony\Component\PropertyInfo\Type;

/** * @author Dmitrii Poddubnyi <dpoddubny@gmail.com> */
class ConstructorExtractorTest extends TestCase
{
    private ConstructorExtractor $extractor;

    protected function setUp(): void
    {
        $this->extractor = new ConstructorExtractor([new DummyExtractor()]);
    }

    public function testInstanceOf()
    {
        $this->assertInstanceOf(\Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface::class$this->extractor);
    }

    public function testGetTypes()
    {
        $this->assertEquals([new Type(Type::BUILTIN_TYPE_STRING)]$this->extractor->getTypes('Foo', 'bar', []));
    }

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