public function testContains() { $item1 = 'item 1'; $item2 = 'item 2'; $item3 = 'item 3'; $items = [$item1, $item2]; $queue = new Queue($items); $this->assertTrue($queue->contains($item2)); $this->assertFalse($queue->contains($item3)); }
private function processImportanceQueue() { if ($this->queuedImportanceSkills->size() == 0) { return; } $skills = clone $this->queuedImportanceSkills; $this->queuedImportanceSkills->clear(); foreach ($skills as $skill) { $this->calculateImportance($skill); } $this->processImportanceQueue(); }