If the class schema has a certain property.
public hasProperty ( string $propertyName ) : boolean | ||
$propertyName | string | Name of the property |
리턴 | boolean |
/** * @test */ public function hasPropertyReturnsTrueOnlyForExistingProperties() { $classSchema = new ClassSchema('SomeClass'); $classSchema->addProperty('a', 'string'); $classSchema->addProperty('b', 'integer'); $this->assertTrue($classSchema->hasProperty('a')); $this->assertTrue($classSchema->hasProperty('b')); $this->assertFalse($classSchema->hasProperty('c')); }