Code Duplication    Length = 15-15 lines in 2 locations

src/SMG/ManagerBundle/Tests/Controller/ManagersControllerTest.php 1 location

@@ 83-97 (lines=15) @@
80
        );
81
    }
82
83
    private function performJsonClientRequest(
84
        $method,
85
        $endpoint,
86
        $payload
87
    ) {
88
        $jsonHeaders = ['CONTENT_TYPE' => 'application/json'];
89
        $jsonBody = json_encode($payload);
90
91
        $this->response = $this->performClientRequest(
92
            $method,
93
            $endpoint,
94
            $jsonHeaders,
95
            $jsonBody
96
        );
97
    }
98
99
    private function loginClientAsAdmin()
100
    {

src/SMG/UserBundle/Tests/Controller/UserControllerTest.php 1 location

@@ 517-531 (lines=15) @@
514
        );
515
    }
516
517
    private function performJsonClientRequest(
518
        $method,
519
        $endpoint,
520
        $payload
521
    ) {
522
        $jsonHeaders = ['CONTENT_TYPE' => 'application/json'];
523
        $jsonBody = json_encode($payload);
524
525
        $this->response = $this->performClientRequest(
526
            $method,
527
            $endpoint,
528
            $jsonHeaders,
529
            $jsonBody
530
        );
531
    }
532
533
    private function findUserByUsername($username)
534
    {