public function canAssemble(ContextInterface $context) { return $context instanceof TypeContext || $context instanceof PropertyContext; }
/** * @test */ function it_can_assemble_property_context() { $assembler = new UseAssembler('MyUsedClass'); $class = new ClassGenerator('MyType', 'MyNamespace'); $type = new Type('MyNamespace', 'MyType', []); $property = new Property('prop1', 'string'); $context = new PropertyContext($class, $type, $property); $this->assertTrue($assembler->canAssemble($context)); }