Code Duplication    Length = 12-12 lines in 3 locations

tests/Lists/DoublyLinkedListTest.php 1 location

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

tests/Lists/ArrayListTest.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/CircularLinkedListTest.php 1 location

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