Code Duplication    Length = 14-16 lines in 3 locations

tests/integration/Modify/Contract/MergeFilesTest.php 3 locations

@@ 123-136 (lines=14) @@
120
        static::assertFalse($this->merge->canContract($collection, $out));
121
    }
122
123
    public function testCallingCanContractWithANonLocalTargetWillThrowAnException()
124
    {
125
        $collection = new FileNodeCollection();
126
        $file = m::mock(LocalFile::class);
127
        $file->shouldReceive('exists')
128
             ->andReturn(true);
129
        $file->shouldReceive('getCompression')
130
             ->andReturn(CompressionType::NONE);
131
        $collection->add($file);
132
133
        $target = m::mock(FileNodeInterface::class);
134
135
        static::assertFalse($this->merge->canContract($collection, $target));
136
    }
137
138
    public function testCallingContractWithAFileThatCannotBeContractedWillThrowAnException()
139
    {
@@ 138-153 (lines=16) @@
135
        static::assertFalse($this->merge->canContract($collection, $target));
136
    }
137
138
    public function testCallingContractWithAFileThatCannotBeContractedWillThrowAnException()
139
    {
140
        $collection = new FileNodeCollection();
141
        $file = m::mock(LocalFile::class);
142
        $file->shouldReceive('exists')
143
             ->andReturn(false);
144
        $file->shouldReceive('getCompression')
145
             ->andReturn(CompressionType::NONE);
146
        $collection->add($file);
147
148
        $target = m::mock(LocalFile::class);
149
150
        $this->expectException(InvalidArgumentException::class);
151
152
        $this->merge->contract($collection, $target);
153
    }
154
155
    public function testCallingContractWithANonLocalTargetWillThrowAnException()
156
    {
@@ 155-170 (lines=16) @@
152
        $this->merge->contract($collection, $target);
153
    }
154
155
    public function testCallingContractWithANonLocalTargetWillThrowAnException()
156
    {
157
        $collection = new FileNodeCollection();
158
        $file = m::mock(LocalFile::class);
159
        $file->shouldReceive('exists')
160
             ->andReturn(true);
161
        $file->shouldReceive('getCompression')
162
             ->andReturn(CompressionType::NONE);
163
        $collection->add($file);
164
165
        $target = m::mock(FileNodeInterface::class);
166
167
        $this->expectException(InvalidArgumentException::class);
168
169
        $this->merge->contract($collection, $target);
170
    }
171
172
    public function testSimpleMergeFiles()
173
    {