Code Duplication    Length = 12-12 lines in 2 locations

test/TypedArrayTest.php 2 locations

@@ 66-77 (lines=12) @@
63
    /**
64
     * @expectedException \TypeError
65
     */
66
    public function testWithObject() {
67
68
        $mockBuilder = $this->getMockBuilder('\PDO')->disableOriginalConstructor();
69
        $typedArray = new TypedArray('\PDO');
70
        $this->assertNotFalse($typedArray->add($mockBuilder->getMock()));
71
72
        $this->assertFalse($typedArray->add(true));
73
        $this->assertFalse($typedArray->add(new \stdClass()));
74
        $this->assertFalse($typedArray->add(42));
75
76
        $typedArray->delete('plpo');
77
    }
78
79
    public function testWithObjectImplementEquatable() {
80
@@ 79-90 (lines=12) @@
76
        $typedArray->delete('plpo');
77
    }
78
79
    public function testWithObjectImplementEquatable() {
80
81
        $mock = $this->getMockBuilder('Ducatel\PHPCollection\Base\Equatable')->getMock();
82
        $mock->method('equals')
83
            ->willReturn(true);
84
85
        $typedArray = new TypedArray('Ducatel\PHPCollection\Base\Equatable');
86
        $this->assertNotFalse($typedArray->add($mock));
87
        $this->assertFalse($typedArray->add(true));
88
        $this->assertFalse($typedArray->add(new \stdClass()));
89
        $this->assertFalse($typedArray->add(42));
90
    }
91
92
    public function testWithCustomEqualsFunction() {
93