Code Duplication    Length = 10-10 lines in 3 locations

tests/unit/Arguments/RequestArgumentTest.php 1 location

@@ 45-54 (lines=10) @@
42
    /**
43
     * @test
44
     */
45
    public function shouldRejectResolvingWithoutRequest()
46
    {
47
        $this->expectException(InvalidArgumentException::class);
48
49
        $requestStack = $this->createMock(RequestStack::class);
50
        $requestStack->method('getCurrentRequest')->willReturn(null);
51
52
        $argument = new RequestArgument($requestStack, "some-request-key");
53
        $argument->resolve();
54
    }
55
56
}
57

tests/unit/Arguments/RequestFileArgumentTest.php 1 location

@@ 170-179 (lines=10) @@
167
    /**
168
     * @test
169
     */
170
    public function shouldRejectResolvingWithoutRequest()
171
    {
172
        $this->expectException(InvalidArgumentException::class);
173
174
        $requestStack = $this->createMock(RequestStack::class);
175
        $requestStack->method('getCurrentRequest')->willReturn(null);
176
177
        $argument = new RequestFileArgument($requestStack, "some-key", "content");
178
        $argument->resolve();
179
    }
180
181
}
182

tests/unit/Arguments/RequestPayloadArgumentTest.php 1 location

@@ 47-56 (lines=10) @@
44
    /**
45
     * @test
46
     */
47
    public function shouldRejectResolvingWithoutRequest()
48
    {
49
        $this->expectException(InvalidArgumentException::class);
50
51
        $requestStack = $this->createMock(RequestStack::class);
52
        $requestStack->method('getCurrentRequest')->willReturn(null);
53
54
        $argument = new RequestPayloadArgument($requestStack);
55
        $argument->resolve();
56
    }
57
58
}
59