public function testValueStorage()
 {
     $a = new \CrazyCodr\Data\Grouper\GroupResult();
     $this->assertEquals(NULL, $a->getGroupValue());
     $a->setGroupValue('testGroup');
     $this->assertEquals('testGroup', $a->getGroupValue());
 }
Esempio n. 2
0
 public function testGroupResultContainerRemoveClear()
 {
     $a = new \CrazyCodr\Data\Grouper\GroupResult();
     $b = new \CrazyCodr\Data\Grouper\GroupResult();
     $c = new \CrazyCodr\Data\Grouper\GroupResult();
     $d = new \CrazyCodr\Data\Grouper\GroupResult();
     $b->setGroupValue('test1');
     $c->setGroupValue('test2');
     $d->setGroupValue('test3');
     $a->addGroup($b);
     $a->addGroup($c);
     $a->addGroup($d);
     $this->assertCount(3, $a->getGroups());
     $a->removeGroup('test3');
     $this->assertCount(2, $a->getGroups());
     $a->clearGroups();
     $this->assertCount(0, $a->getGroups());
 }