Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function getFormat()
 {
     if (!$this->format instanceof FormatInterface) {
         $this->format = new FloatFormat();
     }
     return parent::getFormat();
 }
 public function testCreate()
 {
     $type = IntegerType::create();
     $this->assertInstanceOf('PositionalFile\\Type\\TypeInterface', $type);
     $this->assertInstanceOf('PositionalFile\\Type\\IntegerType', $type);
     $this->assertInstanceOf('PositionalFile\\Format\\FormatInterface', $type->getFormat());
     $this->assertInstanceOf('PositionalFile\\Format\\IntegerFormat', $type->getFormat());
 }