public fileEnd ( ) : Browscap\Writer\WriterInterface | ||
return | Browscap\Writer\WriterInterface |
public function fileEnd()
{
if ($this->isSilent()) {
return $this;
}
fputs($this->file, '</browsercaps>' . PHP_EOL);
return $this;
}
/** * tests rendering the end of the file * * @group writer * @group sourcetest */ public function testFileEndIfSilent() { $this->object->setSilent(true); self::assertSame($this->object, $this->object->fileEnd()); self::assertSame('', file_get_contents($this->file)); }