setData() публичный Метод

Sets the data (done by the parser)
public setData ( array $settings ) : PhpGetBrowser
$settings array
Результат PhpGetBrowser
Пример #1
0
 /**
  *
  */
 public function testSetGetData()
 {
     $data = array('Browser' => 'test', 'Comment' => 'TestComment');
     self::assertSame($this->object, $this->object->setData($data));
     $return = $this->object->getData();
     self::assertInstanceOf('\\stdClass', $return);
     self::assertSame('test', $return->browser);
     self::assertSame('TestComment', $return->comment);
 }
Пример #2
0
 /**
  *
  */
 public function testSetGetData()
 {
     $data = ['Browser' => 'test', 'Comment' => 'TestComment'];
     self::assertSame($this->object, $this->object->setData($data));
     $return = $this->object->getData();
     self::assertInstanceOf('\\stdClass', $return);
     self::assertSame('test', $return->browser);
     self::assertSame('TestComment', $return->comment);
     self::assertObjectHasAttribute('browser_type', $return);
 }