Code Duplication    Length = 16-18 lines in 2 locations

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

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