Beispiel #1
0
 /**
  * Populates form with values from Opus_Iprange instance.
  * @param Opus_Iprange $ipRange
  */
 public function populateFromIpRange($ipRange)
 {
     $this->getElement('name')->setValue($ipRange->getName());
     $this->getElement('startingip')->setValue($ipRange->getStartingip());
     $this->getElement('endingip')->setValue($ipRange->getEndingip());
     $roles = $ipRange->getRole();
     $this->setSelectedRoles($roles);
 }
 public function testIp()
 {
     $ip_range = new Opus_Iprange(2);
     $this->assertEquals('IP Campus II', $ip_range->getName());
     $this->assertEquals('campus', $ip_range->getRole(0)->getName());
     $this->assertEquals('12.34.56.79', $ip_range->getStartingip());
     $this->assertEquals('12.34.56.79', $ip_range->getEndingip());
 }