for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\ThemeBundle\Tests\Functional;
/**
* @author Kamil Kokot <[email protected]>
final class TranslationTest extends ThemeBundleTestCase
{
* @test
public function it_respects_theming_logic_while_translating_messages()
$client = $this->getClient();
$crawler = $client->request('GET', '/template/:Translation:translationsTest.txt.twig');
foreach ($this->getTranslationsLines() as $expectedContent) {
$this->assertContains($expectedContent, $crawler->text());
}
* @return array
string[]
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
protected function getTranslationsLines()
return [
'BUNDLE/Resources/translations: BUNDLE/Resources/translations',
'app/Resources/BUNDLE_NAME/translations: app/Resources/BUNDLE_NAME/translations',
'app/Resources/translations: app/Resources/translations',
'THEME/BUNDLE_NAME/translations: THEME/BUNDLE_NAME/translations',
'THEME/translations: THEME/translations',
'PARENT_THEME/BUNDLE_NAME/translations: PARENT_THEME/BUNDLE_NAME/translations',
'PARENT_THEME/translations: PARENT_THEME/translations',
];
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.