public canAssemble ( Phpro\SoapClient\CodeGenerator\Context\ContextInterface $context ) : boolean | ||
$context | Phpro\SoapClient\CodeGenerator\Context\ContextInterface | |
리턴 | boolean |
public function canAssemble(ContextInterface $context)
{
return $context instanceof TypeContext || $context instanceof PropertyContext;
}
/** * @test */ function it_can_assemble_property_context() { $assembler = new InterfaceAssembler('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)); }