Skip to content

Commit

Permalink
Fix test in php54 and bump coding standards to PSR12
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanphp committed Mar 15, 2024
1 parent 0173119 commit b2585a6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"cebe/indent": "~1.0.2",
"johnkary/phpunit-speedtrap": "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"yiisoft/yii2-coding-standards": "^2.0"
"yiisoft/yii2-coding-standards": "^3.0"
},
"repositories": [
{
Expand Down
41 changes: 26 additions & 15 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion tests/framework/log/TargetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ public function testFilter($filter, $expected)
$logger->log('testH', Logger::LEVEL_ERROR, 'yii.db.Command.whatever');
$logger->log('testI', Logger::LEVEL_ERROR, 'yii\db\Command::query');

$this->assertEquals(count($expected), count(static::$messages), 'Expected ' . implode(',', $expected) . ', got ' . implode(',', array_column(static::$messages, 0)));
$messageColumn = [];
foreach (static::$messages as $message) {
$messageColumn[] = $message[0];
}

$this->assertEquals(count($expected), count(static::$messages), 'Expected ' . implode(',', $expected) . ', got ' . implode(',', $messageColumn));
$i = 0;
foreach ($expected as $e) {
$this->assertEquals('test' . $e, static::$messages[$i++][0]);
Expand Down

0 comments on commit b2585a6

Please sign in to comment.