From 6ca015c9e6ea3a3c0836fc5258a222b21e261ed2 Mon Sep 17 00:00:00 2001 From: hetao Date: Wed, 8 May 2024 17:49:53 +0800 Subject: [PATCH] fix #115 for mysql 8.4.0 phpunit test --- tests/Unit/Repository/MySQLRepositoryTest.php | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/tests/Unit/Repository/MySQLRepositoryTest.php b/tests/Unit/Repository/MySQLRepositoryTest.php index 5ad88ac..d126124 100644 --- a/tests/Unit/Repository/MySQLRepositoryTest.php +++ b/tests/Unit/Repository/MySQLRepositoryTest.php @@ -70,22 +70,14 @@ public function testShouldIsCheckSum(): void public function testShouldGetVersion(): void { - $expected = [ - [ - 'Value' => 'foo', - ], - [ - 'Value' => 'bar', - ], - [ - 'Value' => '123', - ], - ]; + $expected = [ + 'Value' => 'version', + ]; - $this->connection->method('fetchAllAssociative') - ->willReturn($expected); + $this->connection->method('fetchAssociative') + ->willReturn($expected); - self::assertEquals('foobar123', $this->mySQLRepositoryTest->getVersion()); + self::assertEquals('version', $this->mySQLRepositoryTest->getVersion()); } public function testShouldGetMasterStatus(): void