Repository: symfony/symfony
File: src/Symfony/Component/Translation/Bridge/Crowdin/Tests/CrowdinProviderTest.php (PHP)

Code before:

        yield ['en', 'messages', <<<'XLIFF'
            <?xml version="1.0" encoding="UTF-8"?>
            <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
              <file source-language="en" target-language="fr" datatype="plaintext" tool-id="crowdin">
                <header>
                  <tool tool-id="symfony" tool-name="Symfony"/>
                </header>
                <body>
                  <trans-unit id="crowdin:5fd89b853ee27904dd6c5f67" resname="index.hello" datatype="plaintext">
                    <source>index.hello</source>
                    <target state="translated">Hello</target>
                  </trans-unit>
                  <trans-unit id="crowdin:5fd89b8542e5aa5cc27457e2" resname="index.greetings" datatype="plaintext" extradata="crowdin:format=icu">
                    <source>index.greetings</source>
                    <target state="translated">Welcome, {firstname} !</target>
                  </trans-unit>
                </body>
              </file>
            </xliff>
            XLIFF,
            $expectedTranslatorBagEn,
        ];
    }

    public function testReadWithTooManyRequests(): void
    {
        $responses = [
            'listFiles' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.crowdin.com/api/v2/projects/1/files', $url);

                return new JsonMockResponse([
                    'data' => [
                        [
                            'data' => [
                                'id' => 12,
                                'name' => 'messages.xlf',
                            ]
                        ],
                    ],
                ]);
            },
            'getProject' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.crowdin.com/api/v2/projects/1/', $url);

                return new JsonMockResponse([
                    'data' => [
                        'languageMapping' => [
                            'pt-PT' => [

Review comment (suggestion):
see fabbot ;)
```suggestion
    public function testReadWithTooManyRequests()
```

Code after:

        yield ['en', 'messages', <<<'XLIFF'
            <?xml version="1.0" encoding="UTF-8"?>
            <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
              <file source-language="en" target-language="fr" datatype="plaintext" tool-id="crowdin">
                <header>
                  <tool tool-id="symfony" tool-name="Symfony"/>
                </header>
                <body>
                  <trans-unit id="crowdin:5fd89b853ee27904dd6c5f67" resname="index.hello" datatype="plaintext">
                    <source>index.hello</source>
                    <target state="translated">Hello</target>
                  </trans-unit>
                  <trans-unit id="crowdin:5fd89b8542e5aa5cc27457e2" resname="index.greetings" datatype="plaintext" extradata="crowdin:format=icu">
                    <source>index.greetings</source>
                    <target state="translated">Welcome, {firstname} !</target>
                  </trans-unit>
                </body>
              </file>
            </xliff>
            XLIFF,
            $expectedTranslatorBagEn,
        ];
    }

    public function testReadWithTooManyRequests()
    {
        $responses = [
            'listFiles' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.crowdin.com/api/v2/projects/1/files', $url);

                return new JsonMockResponse([
                    'data' => [
                        [
                            'data' => [
                                'id' => 12,
                                'name' => 'messages.xlf',
                            ]
                        ],
                    ],
                ]);
            },
            'getProject' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.crowdin.com/api/v2/projects/1/', $url);

                return new JsonMockResponse([
                    'data' => [
                        'languageMapping' => [
                            'pt-PT' => [