Skip to content

Commit f476257

Browse files
committed
fix: rename 'user' to 'username' in MySQL test classes for consistency.
1 parent a69fe70 commit f476257

12 files changed

+22
-13
lines changed

tests/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TestCase extends \PHPUnit\Framework\TestCase
4242
protected string|null $dsn = null;
4343
protected string $fixtureDirectory = __DIR__ . '/support/data/';
4444
protected string $password = '';
45-
protected string $user = '';
45+
protected string $username = '';
4646

4747
protected function setUp(): void
4848
{
@@ -354,8 +354,8 @@ protected function mockConsoleApplication(): void
354354
'db' => [
355355
'class' => Connection::class,
356356
'dsn' => $this->dsn !== null ? $this->dsn : 'sqlite::memory:',
357-
'username' => $this->user,
358357
'password' => $this->password,
358+
'username' => $this->username,
359359
],
360360
],
361361
],

tests/mysql/CacheManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
final class CacheManagementTest extends AbstractCacheManagement
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
1514
protected string $password = 'root';
15+
protected string $username = 'root';
1616
}

tests/mysql/ExceptionHandlingTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
final class ExceptionHandlingTest extends AbstractExceptionHandling
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
14+
1515
protected string $password = 'root';
16+
protected string $username = 'root';
1617
}

tests/mysql/ExtensibilityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
final class ExtensibilityTest extends AbstractExtensibility
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
1514
protected string $password = 'root';
15+
protected string $username = 'root';
1616
}

tests/mysql/NodeAppendTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
final class NodeAppendTest extends AbstractNodeAppend
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
14+
1515
protected string $password = 'root';
16+
protected string $username = 'root';
1617
}

tests/mysql/NodeDeleteTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
final class NodeDeleteTest extends AbstractNodeDelete
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
14+
1515
protected string $password = 'root';
16+
protected string $username = 'root';
1617
}

tests/mysql/NodeInsertTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
final class NodeInsertTest extends AbstractNodeInsert
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
14+
1515
protected string $password = 'root';
16+
protected string $username = 'root';
1617
}

tests/mysql/NodePrependTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
final class NodePrependTest extends AbstractNodePrepend
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
14+
1515
protected string $password = 'root';
16+
protected string $username = 'root';
1617
}

tests/mysql/NodeStateTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
final class NodeStateTest extends AbstractNodeState
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
14+
1515
protected string $password = 'root';
16+
protected string $username = 'root';
1617
}

tests/mysql/QueryBehaviorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
final class QueryBehaviorTest extends AbstractQueryBehavior
1212
{
1313
protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4';
14-
protected string $user = 'root';
14+
1515
protected string $password = 'root';
16+
protected string $username = 'root';
1617
}

0 commit comments

Comments
 (0)