Browscap\Writer\XmlWriter::renderSectionFooter PHP Method

renderSectionFooter() public method

renders the footer for a section
public renderSectionFooter ( string $sectionName = '' ) : Browscap\Writer\WriterInterface
$sectionName string
return Browscap\Writer\WriterInterface
    public function renderSectionFooter($sectionName = '')
    {
        if ($this->isSilent()) {
            return $this;
        }
        fputs($this->file, '</browscapitem>' . PHP_EOL);
        return $this;
    }

Usage Example

Example #1
0
 /**
  * tests rendering the footer of one section
  *
  * @group writer
  * @group sourcetest
  */
 public function testRenderSectionFooterIfSilent()
 {
     $this->object->setSilent(true);
     self::assertSame($this->object, $this->object->renderSectionFooter());
     self::assertSame('', file_get_contents($this->file));
 }