Code Duplication    Length = 14-15 lines in 2 locations

Tests/Mapping/ServiceMappingTest.php 1 location

@@ 173-187 (lines=15) @@
170
    /**
171
     * @test
172
     */
173
    public function shouldNotAssertLaxFieldMappings()
174
    {
175
        $this->setUp(true);
176
177
        $this->container->expects($this->never())->method('has');
178
        $this->container->expects($this->never())->method('get');
179
180
        /** @var HydrationContextInterface $context */
181
        $context = $this->createMock(HydrationContextInterface::class);
182
        $context->method('getEntityClass')->willReturn(EntityExample::class);
183
184
        $service = new ServiceExample("lorem", 123);
185
186
        $this->serviceMapping->assertValue($context, [], $service);
187
    }
188
189
    /**
190
     * @test

Tests/Mapping/ArrayMappingTest.php 1 location

@@ 172-185 (lines=14) @@
169
    /**
170
     * @test
171
     */
172
    public function shouldNotRevertForNonArray()
173
    {
174
        /** @var HydrationContextInterface $context */
175
        $context = $this->createMock(HydrationContextInterface::class);
176
        $context->method('getEntityClass')->willReturn(EntityExample::class);
177
178
        $this->mappingA->expects($this->never())->method('revertValue');
179
        $this->mappingB->expects($this->never())->method('revertValue');
180
181
        /** @var mixed $actualResult */
182
        $actualResult = $this->arrayMapping->revertValue($context, "a non-array");
183
184
        $this->assertEquals([], $actualResult);
185
    }
186
187
    /**
188
     * @test