Code Duplication    Length = 10-10 lines in 2 locations

tests/Lists/SimpleLinkedListTest.php 1 location

@@ 21-30 (lines=10) @@
18
        $this->assertTrue($this->list->empty());
19
    }
20
21
    public function testPush() {
22
        $this->list->push(20);
23
        $this->assertEquals(1, $this->list->size());
24
        $this->assertEquals(20, $this->list->get(0));
25
        $this->list->push(true);
26
        $this->assertEquals(2, $this->list->size());
27
        $this->assertTrue($this->list->get(1));
28
        $this->list->push(30);
29
        $this->assertEquals(30, $this->list->get(2));
30
    }
31
32
    public function testInsert() {
33
        $this->list->insert(0, 100);

tests/Trees/TrieTreeTest.php 1 location

@@ 24-33 (lines=10) @@
21
        $this->assertEquals(8, $this->tree->size());
22
    }
23
24
    public function testWordCount() {
25
        $this->tree->add('hello');
26
        $this->assertEquals(1, $this->tree->wordCount());
27
        $this->tree->add('bye');
28
        $this->assertEquals(2, $this->tree->wordCount());
29
        $this->tree->add('hello');
30
        $this->assertEquals(2, $this->tree->wordCount());
31
        $this->tree->add('hell');
32
        $this->assertEquals(3, $this->tree->wordCount());
33
    }
34
35
    public function testContains() {
36
        $this->tree->add('hello');