Code Duplication    Length = 12-12 lines in 3 locations

tests/Lists/CircularLinkedListTest.php 1 location

@@ 144-155 (lines=12) @@
141
        $this->assertEquals($this->list->getLast(), 999);
142
    }
143
    
144
    public function testGet() {
145
        $this->list->push(20);
146
        $this->list->push(true);
147
        $this->list->push(15);
148
        $this->list->push(3.14);
149
        $this->list->push("string");
150
        $this->assertEquals($this->list->get(0), 20);
151
        $this->assertTrue($this->list->get(1));
152
        $this->assertEquals($this->list->get(2), 15);
153
        $this->assertEquals($this->list->get(3), 3.14);
154
        $this->assertEquals($this->list->get(4), "string");
155
    }
156
157
    public function testGetWithException() {
158
        $this->expectException(OutOfBoundsException::class);

tests/Lists/ArrayListTest.php 1 location

@@ 142-153 (lines=12) @@
139
        $this->assertEquals($this->list->getLast(), 999);
140
    }
141
    
142
    public function testGet() {
143
        $this->list->push(20);
144
        $this->list->push(true);
145
        $this->list->push(15);
146
        $this->list->push(3.14);
147
        $this->list->push("string");
148
        $this->assertEquals($this->list->get(0), 20);
149
        $this->assertTrue($this->list->get(1));
150
        $this->assertEquals($this->list->get(2), 15);
151
        $this->assertEquals($this->list->get(3), 3.14);
152
        $this->assertEquals($this->list->get(4), "string");
153
    }
154
    
155
    public function testGetWithException() {
156
        $this->expectException(OutOfBoundsException::class);

tests/Lists/DoublyLinkedListTest.php 1 location

@@ 144-155 (lines=12) @@
141
        $this->assertEquals($this->list->getLast(), 999);
142
    }
143
    
144
    public function testGet() {
145
        $this->list->push(20);
146
        $this->list->push(true);
147
        $this->list->push(15);
148
        $this->list->push(3.14);
149
        $this->list->push("string");
150
        $this->assertEquals($this->list->get(0), 20);
151
        $this->assertTrue($this->list->get(1));
152
        $this->assertEquals($this->list->get(2), 15);
153
        $this->assertEquals($this->list->get(3), 3.14);
154
        $this->assertEquals($this->list->get(4), "string");
155
    }
156
    
157
    public function testGetWithException() {
158
        $this->expectException(OutOfBoundsException::class);