Code Duplication    Length = 13-14 lines in 2 locations

spec/Akeneo/Crowdin/Api/AddFileSpec.php 1 location

@@ 47-60 (lines=14) @@
44
        $this->shouldThrow('\InvalidArgumentException')->duringExecute();
45
    }
46
47
    function it_adds_a_file(HttpClient $http, Request $request, Response $response)
48
    {
49
        $this->addTranslation(__DIR__ . '/../../../fixtures/messages.en.yml', 'path/to/crowdin.yml');
50
        $content = '<?xml version="1.0" encoding="ISO-8859-1"?><success></success>';
51
        $response->getBody(true)->willReturn($content);
52
        $request->send()->willReturn($response);
53
        $http->post(
54
            'project/sylius/add-file?key=1234',
55
            array(),
56
            array('files[path/to/crowdin.yml]' => '@' . __DIR__ . '/../../../fixtures/messages.en.yml')
57
        )->willReturn($request);
58
59
        $this->execute()->shouldBe($content);
60
    }
61
} 

spec/Akeneo/Crowdin/Api/UpdateFileSpec.php 1 location

@@ 47-59 (lines=13) @@
44
        $this->shouldThrow('\InvalidArgumentException')->duringExecute();
45
    }
46
47
    function it_updates_some_translation_files(HttpClient $http, Request $request, Response $response)
48
    {
49
        $this->addTranslation(__DIR__ . '/../../../fixtures/messages.en.yml', 'crowdin/path/file.yml');
50
        $content = '<xml></xml>';
51
        $response->getBody(true)->willReturn($content);
52
        $request->send()->willReturn($response);
53
        $http->post(
54
            'project/akeneo/update-file?key=1234',
55
            array(),
56
            array("files[crowdin/path/file.yml]" => '@'.__DIR__ . '/../../../fixtures/messages.en.yml')
57
        )->willReturn($request);
58
        $this->execute()->shouldBe($content);
59
    }
60
61
    function it_sends_additionnal_parameters(HttpClient $http, Request $request, Response $response)
62
    {