renderSectionBody() public method

renders all found useragents into a string
public renderSectionBody ( array $section, DataCollection $collection, array $sections = [], string $sectionName = '' ) : IniWriter
$section array
$collection Browscap\Data\DataCollection
$sections array
$sectionName string
return IniWriter
示例#1
0
 /**
  * tests rendering the body of one section
  *
  * @group writer
  * @group sourcetest
  */
 public function testRenderSectionBodyIfSilent()
 {
     $this->object->setSilent(true);
     $section = ['Test' => 1, 'isTest' => true, 'abc' => 'bcd'];
     $collection = $this->createMock(\Browscap\Data\DataCollection::class);
     self::assertSame($this->object, $this->object->renderSectionBody($section, $collection));
     self::assertSame('', file_get_contents($this->file));
 }
示例#2
0
 /**
  * tests rendering the body of one section
  *
  * @group writer
  * @group sourcetest
  */
 public function testRenderSectionBodyIfSilent()
 {
     $this->object->setSilent(true);
     $section = array('Test' => 1, 'isTest' => true, 'abc' => 'bcd');
     $mockCollection = $this->getMock('\\Browscap\\Data\\DataCollection', array(), array(), '', false);
     self::assertSame($this->object, $this->object->renderSectionBody($section, $mockCollection));
     self::assertSame('', file_get_contents($this->file));
 }