Beispiel #1
0
 /**
  * @dataProvider provider_parse_returns_line
  */
 public function test_parse_returns_line($expected, $data)
 {
     $line = Line::parse($data);
     $this->assertTrue($line->equals($expected));
 }
 /**
  * Add line to map
  * @param string $value
  * @return boolean
  */
 public function addElementLine($value)
 {
     $return = true;
     $stringsline = explode($GLOBALS['egMultiMaps_SeparatorItems'], $value);
     foreach ($stringsline as $linevalue) {
         if (trim($linevalue) == '') {
             continue;
         }
         $line = new Line();
         if (!$line->parse($linevalue, $this->classname)) {
             $return = false;
             $this->errormessages = array_merge($this->errormessages, $line->getErrorMessages());
         }
         if (!$line->isValid()) {
             continue;
         }
         $this->lines[] = $line;
         $this->elementsBounds->extend($line->pos);
     }
     return $return;
 }