Code Duplication    Length = 10-11 lines in 2 locations

tests/CsrfHeaderCheckMiddlewareFactoryTest.php 1 location

@@ 10-19 (lines=10) @@
7
8
class CsrfHeaderCheckMiddlewareFactoryTest extends AbstractMiddlewareTest
9
{
10
    public function testFactory()
11
    {
12
        $request = new ServerRequest([], [], "http://alice.com/hello", "Get");
13
14
        $middleware = CsrfHeaderCheckMiddlewareFactory::createDefault();
15
16
        $response = $middleware->process($request, $this->getDelegate());
17
18
        $this->assertSame('foobar', (string) $response->getBody());
19
    }
20
}
21

tests/CsrfHeaderCheckMiddlewareTest.php 1 location

@@ 16-26 (lines=11) @@
13
14
class CsrfHeaderCheckMiddlewareTest extends AbstractMiddlewareTest
15
{
16
    public function testGetRequest()
17
    {
18
        $request = new ServerRequest([], [], "http://alice.com/hello", "Get");
19
20
        $middleware = CsrfHeaderCheckMiddlewareFactory::createDefault();
21
22
23
        $response = $middleware->process($request, $this->getDelegate());
24
25
        $this->assertSame('foobar', (string) $response->getBody());
26
    }
27
28
    public function testFailingPostRequestNoHost()
29
    {