public function testGetElement() { $pl = new ElggPriorityList(); $priorities = array(); $elements = array('Test element 0', 'Test element 1', 'Test element 2'); foreach ($elements as $element) { $priorities[] = $pl->add($element); } $this->assertSame($elements[0], $pl->getElement($priorities[0])); $this->assertSame($elements[1], $pl->getElement($priorities[1])); $this->assertSame($elements[2], $pl->getElement($priorities[2])); }