Skip to content

Commit dee7d51

Browse files
authored
Merge pull request #34 from Crizz0/validator-update-for-3.2.x
Release 1.3.10
2 parents 4a85e75 + 0fca72f commit dee7d51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+32
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "phpbb/translation-validator",
33
"description": "A language package validator for phpBB language packs. Language packs are required to pass the validator when submitted to the language pack database.",
44
"homepage": "https://github.com/phpbb/phpbb-translation-validator",
5-
"version": "1.3.9",
5+
"version": "1.3.10",
66
"license": "GPL-2.0",
77
"authors": [
88
{

src/Phpbb/TranslationValidator/Tests/FileListValidator/FileListTest.php

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public function setUp()
2020
parent::setUp();
2121

2222
$this->validator = new \Phpbb\TranslationValidator\Validator\FileListValidator($this->getMock('Symfony\Component\Console\Input\InputInterface'), $this->output);
23-
$this->validator->setOrigin('origin', dirname(__FILE__) . '/fixtures/origin', 'language/origin/')
24-
->setSource('source', dirname(__FILE__) . '/fixtures/source', 'language/source/');
2523
}
2624

2725
public function validateFileListData()
@@ -39,11 +37,10 @@ public function validateFileListData()
3937
Output::FATAL . '-Found additional file-subdir/additional.php-',
4038
Output::FATAL . '-Found additional file-additional.txt-',
4139

42-
Output::ERROR . '-Found additional file-language/origin/AUTHORS.md-',
43-
Output::ERROR . '-Found additional file-language/origin/CHANGELOG.md-',
44-
Output::ERROR . '-Found additional file-language/origin/README.md-',
45-
Output::ERROR . '-Found additional file-language/origin/VERSION.md-',
46-
40+
Output::NOTICE . '-Found additional file-language/origin/AUTHORS.md-',
41+
Output::NOTICE . '-Found additional file-language/origin/CHANGELOG.md-',
42+
Output::NOTICE . '-Found additional file-language/origin/README.md-',
43+
Output::NOTICE . '-Found additional file-language/origin/VERSION.md-',
4744
Output::NOTICE . '-Found additional file-language/origin/AUTHORS-',
4845
Output::NOTICE . '-Found additional file-language/origin/CHANGELOG-',
4946
Output::NOTICE . '-Found additional file-language/origin/README-',
@@ -75,6 +72,28 @@ public function validateFileListData()
7572
Output::NOTICE . '-Found additional file-language/origin/index.htm-',
7673
),
7774
),
75+
array(
76+
'3.2',
77+
array(
78+
Output::FATAL . '-Missing required file-missing.php-',
79+
Output::FATAL . '-Missing required file-missing.txt-',
80+
Output::FATAL . '-Missing required file-subdir/missing.php-',
81+
Output::FATAL . '-Missing required file-language/origin/LICENSE-',
82+
Output::FATAL . '-Found additional file-additional.php-',
83+
Output::FATAL . '-Found additional file-subdir/additional.php-',
84+
Output::FATAL . '-Found additional file-additional.txt-',
85+
Output::FATAL . '-Found additional file-language/origin/AUTHORS-',
86+
Output::FATAL . '-Found additional file-language/origin/CHANGELOG-',
87+
Output::FATAL . '-Found additional file-language/origin/README-',
88+
Output::FATAL . '-Found additional file-language/origin/VERSION-',
89+
90+
Output::NOTICE . '-Found additional file-language/origin/AUTHORS.md-',
91+
Output::NOTICE . '-Found additional file-language/origin/CHANGELOG.md-',
92+
Output::NOTICE . '-Found additional file-language/origin/README.md-',
93+
Output::NOTICE . '-Found additional file-language/origin/VERSION.md-',
94+
Output::NOTICE . '-Found additional file-language/origin/index.htm-',
95+
),
96+
),
7897
);
7998
}
8099

@@ -83,6 +102,9 @@ public function validateFileListData()
83102
*/
84103
public function testValidateFileList($phpbbVersion, $expected)
85104
{
105+
$this->validator->setOrigin('origin', dirname(__FILE__) . '/fixtures/'. $phpbbVersion . '/origin', 'language/origin/')
106+
->setSource('source', dirname(__FILE__) . '/fixtures/'. $phpbbVersion . '/source', 'language/source/');
107+
86108
$this->validator
87109
->setPhpbbVersion($phpbbVersion)
88110
->validate();

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/additional.php renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/additional.php

File renamed without changes.

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/additional.txt renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/additional.txt

File renamed without changes.

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/file.php renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/file.php

File renamed without changes.

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/language/origin/AUTHORS renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/language/origin/AUTHORS

File renamed without changes.

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/language/origin/AUTHORS.md renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/language/origin/AUTHORS.md

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/language/origin/CHANGELOG renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/language/origin/CHANGELOG

File renamed without changes.

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/language/origin/CHANGELOG.md renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/language/origin/CHANGELOG.md

src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/origin/language/origin/README renamed to src/Phpbb/TranslationValidator/Tests/FileListValidator/fixtures/3.0/origin/language/origin/README

File renamed without changes.

0 commit comments

Comments
 (0)