Code Duplication    Length = 9-10 lines in 2 locations

tests/Lists/StackTest.php 1 location

@@ 29-38 (lines=10) @@
26
        $this->stack->push(6);
27
    }
28
    
29
    public function testPush() {
30
        $this->stack = new Stack();
31
        $this->stack->push(1);
32
        $this->stack->push(2);
33
        $this->stack->push(3);
34
        $this->stack->push(4);
35
        $this->stack->push(5);
36
        $this->assertEquals($this->stack->size(), 5);
37
        $this->assertEquals($this->stack->peek(), 5);
38
    }
39
    
40
    public function testPop() {
41
        $this->stack = new Stack();

tests/Trees/TrieTreeTest.php 1 location

@@ 14-22 (lines=9) @@
11
        $this->tree = new TrieTree();
12
    }
13
14
    public function testAdd() {
15
        $this->tree->add('hello');
16
        $this->tree->add('bye');
17
        $this->assertEquals(8, $this->tree->size());
18
        $this->tree->add('hello');
19
        $this->assertEquals(8, $this->tree->size());
20
        $this->tree->add('hell');
21
        $this->assertEquals(8, $this->tree->size());
22
    }
23
24
    public function testWordCount() {
25
        $this->tree->add('hello');