Code Duplication    Length = 8-8 lines in 2 locations

Tests/EventListener/AutoJsonResponseListenerTest.php 2 locations

@@ 53-60 (lines=8) @@
50
        $this->doTest($event);
51
    }
52
53
    public function testOnKernelViewWithNonObjectControllerResult()
54
    {
55
        $nonObject = ['foo' => 'bar'];
56
        $event = $this->prophesizeEvent(true, true, $nonObject);
57
        $event->setResponse(new JsonResponse($nonObject))->shouldBeCalledTimes(1);
58
59
        $this->doTest($event);
60
    }
61
62
    public function testOnKernelViewWithPostRequestAndNonObjectControllerResult()
63
    {
@@ 62-69 (lines=8) @@
59
        $this->doTest($event);
60
    }
61
62
    public function testOnKernelViewWithPostRequestAndNonObjectControllerResult()
63
    {
64
        $nonObject = 'hello world';
65
        $event = $this->prophesizeEvent(true, true, $nonObject, true);
66
        $event->setResponse(new JsonResponse($nonObject, 201))->shouldBeCalledTimes(1);
67
68
        $this->doTest($event);
69
    }
70
71
    /**
72
     * @expectedException BadMethodCallException