Exemplo n.º 1
0
 /**
  * tests setter and getter for the division name
  *
  * @group data
  * @group sourcetest
  */
 public function testSetGetName()
 {
     $name = 'TestName';
     self::assertSame($this->object, $this->object->setName($name));
     self::assertSame($name, $this->object->getName());
 }
Exemplo n.º 2
0
 /**
  * Load the file for the default browser
  *
  * @param string $src Name of the file
  *
  * @return \Browscap\Data\DataCollection
  * @throws \RuntimeException if the file does not exist or has invalid JSON
  */
 public function addDefaultBrowser($src)
 {
     $divisionData = $this->loadFile($src);
     $division = new Division();
     $division->setName($divisionData['division'])->setSortIndex((int) $divisionData['sortIndex'])->setUserAgents($divisionData['userAgents'])->setLite(true);
     $this->defaultBrowser = $division;
     $this->divisionsHaveBeenSorted = false;
     return $this;
 }