Code Duplication    Length = 10-10 lines in 2 locations

tests/Lists/SimpleLinkedListTest.php 1 location

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

tests/Trees/TrieTreeTest.php 1 location

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