Code Duplication    Length = 18-18 lines in 2 locations

tests/Decorators/AuctionArrayMapDecoratorTest.php 2 locations

@@ 154-171 (lines=18) @@
151
    }
152
153
154
    public function testToApiRepresentation()
155
    {
156
        $expectedResult = [
157
            'whatever' => 'just testing if it is forwarded correctly'
158
        ];
159
160
        $auction = $this->getMockBuilder(Auction::class)
161
            ->setMethods(['toApiRepresentation'])
162
            ->getMock();
163
164
        $auction->expects($this->once())
165
            ->method('toApiRepresentation')
166
            ->willReturn($expectedResult);
167
168
        $decorator = $this->getDecorator($auction);
169
        $result = $decorator->toApiRepresentation();
170
        $this->assertSame($expectedResult, $result);
171
    }
172
173
174
    public function testFromApiRepresentation()
@@ 174-191 (lines=18) @@
171
    }
172
173
174
    public function testFromApiRepresentation()
175
    {
176
        $expectedArgument = [
177
            'whatever' => 'just testing if it is forwarded correctly'
178
        ];
179
180
        $auction = $this->getMockBuilder(Auction::class)
181
            ->setMethods(['fromApiRepresentation'])
182
            ->getMock();
183
184
        $auction->expects($this->once())
185
            ->method('fromApiRepresentation')
186
            ->with($this->equalTo($expectedArgument));
187
188
189
        $decorator = $this->getDecorator($auction);
190
        $result = $decorator->fromApiRepresentation($expectedArgument);
191
    }
192
193
}
194