mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fix codestyle in build and tests (#20586)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
@ -149,8 +150,10 @@ abstract class BaseMessageControllerTest extends TestCase
|
||||
{
|
||||
$configFileName = $this->configFileName;
|
||||
$out = $this->runMessageControllerAction('config', [$configFileName]);
|
||||
$this->assertFileExists($configFileName,
|
||||
"Unable to create config file from template. Command output:\n\n" . $out);
|
||||
$this->assertFileExists(
|
||||
$configFileName,
|
||||
"Unable to create config file from template. Command output:\n\n" . $out
|
||||
);
|
||||
}
|
||||
|
||||
public function testActionConfigSubDir()
|
||||
@ -196,8 +199,10 @@ abstract class BaseMessageControllerTest extends TestCase
|
||||
$out = $this->runMessageControllerAction('extract', [$this->configFileName]);
|
||||
$out .= $this->runMessageControllerAction('extract', [$this->configFileName]);
|
||||
|
||||
$this->assertNotFalse(strpos($out, 'Nothing to save'),
|
||||
"Controller should respond with \"Nothing to save\" if there's nothing to update. Command output:\n\n" . $out);
|
||||
$this->assertNotFalse(
|
||||
strpos($out, 'Nothing to save'),
|
||||
"Controller should respond with \"Nothing to save\" if there's nothing to update. Command output:\n\n" . $out
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -300,12 +305,16 @@ abstract class BaseMessageControllerTest extends TestCase
|
||||
$out = $this->runMessageControllerAction('extract', [$this->configFileName]);
|
||||
|
||||
$messages = $this->loadMessages($category);
|
||||
$this->assertSame($zeroMessageContent,
|
||||
$this->assertSame(
|
||||
$zeroMessageContent,
|
||||
$messages[$zeroMessage],
|
||||
"Message content \"0\" is lost. Command output:\n\n" . $out);
|
||||
$this->assertSame($falseMessageContent,
|
||||
"Message content \"0\" is lost. Command output:\n\n" . $out
|
||||
);
|
||||
$this->assertSame(
|
||||
$falseMessageContent,
|
||||
$messages[$falseMessage],
|
||||
"Message content \"false\" is lost. Command output:\n\n" . $out);
|
||||
"Message content \"false\" is lost. Command output:\n\n" . $out
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -484,8 +493,11 @@ abstract class BaseMessageControllerTest extends TestCase
|
||||
$out = $this->runMessageControllerAction('extract', [$this->configFileName]);
|
||||
|
||||
$messages = $this->loadMessages($category);
|
||||
$this->assertArrayHasKey($mainMessage, $messages,
|
||||
"\"$mainMessage\" is missing in translation file. Command output:\n\n" . $out);
|
||||
$this->assertArrayHasKey(
|
||||
$mainMessage,
|
||||
$messages,
|
||||
"\"$mainMessage\" is missing in translation file. Command output:\n\n" . $out
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user