Code Duplication    Length = 10-10 lines in 3 locations

tests/Lists/CircularLinkedListTest.php 1 location

@@ 197-206 (lines=10) @@
194
        $this->assertSame([20, true, 15, 3.14], $nodes);
195
    }
196
    
197
    public function testClear() {
198
        $this->list->push(20);
199
        $this->list->push(true);
200
        $this->list->push(15);
201
        $this->list->push(3.14);
202
        $this->list->push("string");
203
        $this->list->clear();
204
        $this->assertEmpty($this->list->toArray());
205
        $this->assertEquals(0, $this->list->size());
206
    }
207
}

tests/Lists/SimpleLinkedListTest.php 1 location

@@ 135-144 (lines=10) @@
132
        $this->assertSame([20, true, 15, 3.14], $nodes);
133
    }
134
135
    public function testClear() {
136
        $this->list->push(20);
137
        $this->list->push(true);
138
        $this->list->push(15);
139
        $this->list->push(3.14);
140
        $this->list->push("string");
141
        $this->list->clear();
142
        $this->assertEmpty($this->list->toArray());
143
        $this->assertEquals($this->list->size(), 0);
144
    }
145
}

tests/Lists/DoublyLinkedListTest.php 1 location

@@ 196-205 (lines=10) @@
193
        $this->assertSame([20, true, 15, 3.14], $nodes);
194
    }
195
    
196
    public function testClear() {
197
        $this->list->push(20);
198
        $this->list->push(true);
199
        $this->list->push(15);
200
        $this->list->push(3.14);
201
        $this->list->push("string");
202
        $this->list->clear();
203
        $this->assertEmpty($this->list->toArray());
204
        $this->assertEquals($this->list->size(), 0);
205
    }
206
207
    public function testIterator() {
208
        $this->list->push(20);