Exemplo n.º 1
0
 /**
  * If the property is a instance of Field then we can get the field type of it, otherwise return text
  * @param Property $property
  *
  * @return string
  */
 public static function getFieldType(Property $property)
 {
     $variableName = $property->getVariableName();
     if (static::$object->getFieldType($variableName) instanceof Field) {
         return static::$object->getFieldType($variableName)->getFieldType();
     }
     return 'text';
 }
Exemplo n.º 2
0
 /**
  * @covers ::__construct
  * @covers ::getVariableName
  */
 public function testHasVariableName()
 {
     $expected = 'myProperty';
     $fixture = new Property($expected);
     $this->assertSame($expected, $fixture->getVariableName());
 }