Fixed tests

This commit is contained in:
Alexander Makarov
2015-03-07 00:31:22 +03:00
parent 52df3466f4
commit 0e567bdd9c
3 changed files with 5 additions and 12 deletions

View File

@@ -70,7 +70,7 @@ class PHPMessageControllerTest extends BaseMessageControllerTest
/**
* @inheritdoc
*/
protected function loadMessages($category, $shouldExist = true)
protected function loadMessages($category)
{
if (defined('HHVM_VERSION')) {
// https://github.com/facebook/hhvm/issues/1447
@@ -79,10 +79,7 @@ class PHPMessageControllerTest extends BaseMessageControllerTest
$messageFilePath = $this->getMessageFilePath($category);
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!");
if (!file_exists($messageFilePath)) {
return [];
}
return require $messageFilePath;