Fix codestyle in build and tests (#20586)

This commit is contained in:
Maksim Spirkov
2025-10-10 23:04:09 +03:00
committed by GitHub
parent 8005113753
commit 909396074e
361 changed files with 1422 additions and 790 deletions

View File

@ -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
);
}
/**