octicon-rss(16/)
You've already forked yii2
mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 02:13:17 +08:00
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/)
octicon-diff(16/tw-mr-1) 6 changed files with 71 additions and 11 deletions
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user