Skip to content

Commit 9111275

Browse files
committed
Repair tests for 4.0 in FileListValidator
1 parent a78a007 commit 9111275

27 files changed

Lines changed: 5 additions & 18 deletions

File tree

src/Phpbb/TranslationValidator/Command/DownloadCommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ protected function configure()
3131
->setName('download')
3232
->setDescription('If you are missing important files, this tool can automatically download them for you.')
3333
->addOption('files', null, InputOption::VALUE_REQUIRED, 'Which files do you want to download?', 'phpbb-extensions/viglink')
34-
->addOption('phpbb-version', null, InputOption::VALUE_OPTIONAL, 'The phpBB version you use to validate against', '3.3');
34+
->addOption('phpbb-version', null, InputOption::VALUE_OPTIONAL, 'The phpBB version you use to validate against', '4.0');
3535
}
36-
3736
protected function execute(InputInterface $input, OutputInterface $output)
3837
{
3938
$files = $input->getOption('files');

src/Phpbb/TranslationValidator/Validator/FileListValidator.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ public function validate()
194194
{
195195
$level = Output::NOTICE;
196196
}
197-
else if ($this->phpbbVersion === '3.2' && strpos($origin_file, 'styles/subsilver2/') === 0)
198-
{
199-
$level = Output::FATAL;
200-
}
201197
else if (in_array(substr($origin_file, -4), array('.gif', '.png')) && $this->direction === 'rtl')
202198
{
203199
$level = Output::WARNING;

src/Phpbb/TranslationValidator/Validator/LangKeyValidator.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,7 @@ public function validateHtml($file, $key, $sourceString, $originString)
619619
'SUPPORT_BODY',
620620
'UPDATE_INSTALLATION_EXPLAIN',
621621
'OVERVIEW_BODY',
622-
)) || ($this->phpbbVersion == '3.2' && ($this->originLanguagePath . 'ucp.php' === $file && in_array($key, array( //Check for 3.2
623-
'TERMS_OF_USE_CONTENT',
624-
'PRIVACY_POLICY',
625-
)))))
622+
)))
626623
{
627624
$sourceString = '<p>' . $sourceString . '</p>';
628625
$originString = '<p>' . $originString . '</p>';
@@ -729,11 +726,6 @@ public function validateHtml($file, $key, $sourceString, $originString)
729726
}
730727
}
731728

732-
if ($this->originLanguagePath . 'ucp.php' === $file && in_array($key, array('TERMS_OF_USE_CONTENT', 'PRIVACY_POLICY')) && ($this->phpbbVersion != '3.2'))
733-
{
734-
$level = Output::ERROR;
735-
}
736-
737729
$this->output->addMessage($level, 'String is using additional html: ' . $possibleHtml, $file, $key);
738730
}
739731
}

tests/FileListValidator/FileListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function validateFileListData()
2626
{
2727
return array(
2828
array(
29-
'3.2',
29+
'4.0',
3030
array(
3131
Output::FATAL . '-Missing required file-missing.php-',
3232
Output::FATAL . '-Missing required file-missing.txt-',

tests/FileListValidator/fixtures/3.2/origin/additional.php renamed to tests/FileListValidator/fixtures/4.0/origin/additional.php

File renamed without changes.

tests/FileListValidator/fixtures/3.2/origin/additional.txt renamed to tests/FileListValidator/fixtures/4.0/origin/additional.txt

File renamed without changes.
File renamed without changes.

tests/FileListValidator/fixtures/3.2/origin/language/origin/AUTHORS renamed to tests/FileListValidator/fixtures/4.0/origin/language/origin/AUTHORS

File renamed without changes.

tests/FileListValidator/fixtures/3.2/origin/language/origin/AUTHORS.md renamed to tests/FileListValidator/fixtures/4.0/origin/language/origin/AUTHORS.md

File renamed without changes.

tests/FileListValidator/fixtures/3.2/origin/language/origin/CHANGELOG renamed to tests/FileListValidator/fixtures/4.0/origin/language/origin/CHANGELOG

File renamed without changes.

0 commit comments

Comments
 (0)