/** * @inheritdoc */ public function getFormat() { if (!$this->format instanceof FormatInterface) { $this->format = new StringFormat(); } return parent::getFormat(); }
public function testSetAndGetFormat() { $format = $this->getMockForAbstractClass('PositionalFile\\Format\\AbstractFormat'); $this->object->setFormat($format); $this->assertInstanceOf('PositionalFile\\Format\\FormatInterface', $this->object->getFormat()); }