Exemplo n.º 1
0
 /**
  * Set the properties to the default values
  *
  * @param   array|null  $properties  An optional array of properties to set after setting it to the default values
  *
  * @internal
  */
 public function reset($properties = null)
 {
     parent::reset();
     unset($this->family);
     if (is_array($properties)) {
         $this->set($properties);
     }
 }
Exemplo n.º 2
0
 /**
  * Set the properties to the default values
  *
  * @param   array|null  $properties  An optional array of properties to set after setting it to the default values
  *
  * @internal
  */
 public function reset($properties = null)
 {
     parent::reset();
     unset($this->family);
     unset($this->edition);
     $this->hidden = false;
     if (is_array($properties)) {
         $this->set($properties);
     }
 }
Exemplo n.º 3
0
 /**
  * Set the properties to the default values
  *
  * @param   array|null  $properties  An optional array of properties to set after setting it to the default values
  *
  * @internal
  */
 public function reset($properties = null)
 {
     parent::reset();
     unset($this->channel);
     unset($this->useing);
     unset($this->family);
     $this->stock = true;
     $this->hidden = false;
     $this->mode = '';
     if (is_array($properties)) {
         $this->set($properties);
     }
 }
Exemplo n.º 4
0
 public function testIdentifyVersion()
 {
     $nameversion = new NameVersion();
     $nameversion->identifyVersion('/Version\\/([0-9\\.]+)/u', 'Version/1.0');
     $this->assertEquals('1.0', $nameversion->getVersion());
     $nameversion->reset();
     $nameversion->identifyVersion('/Version\\/([0-9\\.]+)/u', 'Other/1.0');
     $this->assertEquals('', $nameversion->getVersion());
     $nameversion->reset();
     $nameversion->identifyVersion('/Version\\/([0-9\\.]+)/u', 'Version/1.0', ['details' => 1]);
     $this->assertEquals('1', $nameversion->getVersion());
     $nameversion->reset();
     $nameversion->identifyVersion('/Version\\/([0-9_]+)/u', 'Version/1_0_2', ['type' => 'underscore']);
     $this->assertEquals('1.0.2', $nameversion->getVersion());
     $nameversion->reset();
     $nameversion->identifyVersion('/Version\\/([0-9\\.]+)/u', 'Version/1.02', ['type' => 'legacy']);
     $this->assertEquals('1.0.2', $nameversion->getVersion());
 }