Code Duplication    Length = 8-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/BinarySearchTreeTest.php 1 location

@@ 98-105 (lines=8) @@
95
        $this->assertEquals(1, $this->tree->min()->key);
96
    }
97
    
98
    public function testMax() {
99
        $this->tree->put(1, "one");
100
        $this->assertEquals(1, $this->tree->max()->key);
101
        $this->tree->put(2, "two");
102
        $this->assertEquals(2, $this->tree->max()->key);
103
        $this->tree->put(3, "three");
104
        $this->assertEquals(3, $this->tree->max()->key);
105
    }
106
107
    public function testDelete() {
108
        $this->tree->put(1, "one");