Fixes #6895: Added ignoreCategories config option for message command to ignore categories specified

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Alexander Makarov
2015-03-06 21:51:42 +03:00
gitea-unlock(16/)
parent b6a591c720
commit b7a29e38d9
octicon-diff(16/tw-mr-1) 6 changed files with 71 additions and 11 deletions

12
tests/unit/framework/console/controllers/PHPMessageControllerTest.php
View File

@@ -70,15 +70,21 @@ class PHPMessageControllerTest extends BaseMessageControllerTest
/**
* @inheritdoc
*/
protected function loadMessages($category)
protected function loadMessages($category, $shouldExist = true)
{
if (defined('HHVM_VERSION')) {
// https://github.com/facebook/hhvm/issues/1447
$this->markTestSkipped('Can not test on HHVM because require is cached.');
static::markTestSkipped('Can not test on HHVM because require is cached.');
}
$messageFilePath = $this->getMessageFilePath($category);
$this->assertTrue(file_exists($messageFilePath), "There's no message file $messageFilePath!");
if ($shouldExist) {
static::assertTrue(file_exists($messageFilePath), "There's no message file $messageFilePath that should exist!");
} else {
static::assertFalse(file_exists($messageFilePath), "There's message file $messageFilePath that should not exist!");
return [];
}
return require $messageFilePath;
}
}