Skip to content

Commit

Permalink
Add test to assert the value of a dequeued element
Browse files Browse the repository at this point in the history
  • Loading branch information
EricNeves committed Aug 19, 2024
1 parent 1918304 commit 05efb2a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/DataStructures/QueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ public function shouldRemoveElementFromQueue(): void
$this->assertEquals(2, $queue->size());
}

/**
* @test
*/
public function shouldReturnCorrectValueWhenDequeue(): void
{
$queue = new Queue();
$queue->enqueue(1);
$queue->enqueue(2);
$queue->enqueue(3);

$this->assertEquals(1, $queue->dequeue());
$this->assertEquals(2, $queue->dequeue());
$this->assertEquals(3, $queue->dequeue());
}

/**
* @test
*/
Expand Down

0 comments on commit 05efb2a

Please sign in to comment.