laminas / laminas-db

Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations
https://docs.laminas.dev/laminas-db/
BSD 3-Clause "New" or "Revised" License
122 stars 68 forks source link

2.14.x fix uniqid in test #223

Open ZVanoZ opened 3 years ago

ZVanoZ commented 3 years ago

Sometime, "uniqid" return value, similar to number. It is give test error.

2021-09-26T13:19:58.1542106Z There was 1 failure:
2021-09-26T13:19:58.1542418Z 
2021-09-26T13:19:58.1543774Z 1) LaminasTest\Db\Sql\AbstractSqlTest::testProcessExpressionWorksWithNamedParameterPrefix
2021-09-26T13:19:58.1546087Z Failed asserting that 61507378202901 is identical to '61507378202901'.
2021-09-26T13:19:58.1546525Z 
2021-09-26T13:19:58.1558191Z ##[error]/github/workspace/test/unit/Sql/AbstractSqlTest.php:154

Forum Bug appears

This pull request fixed the error and added test for check numeric prefix error.

ZVanoZ commented 3 years ago

Whats wrong? This seems to be a bug in the test system again.

--

There was 1 failure:

1) LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Mysql\AdapterTest::testDriverDisconnectAfterQuoteWithPlatform
Failed asserting that true is false.

Error: /github/workspace/test/integration/Adapter/Driver/Pdo/AbstractAdapterTest.php:41

--
// test/integration/Adapter/Driver/Pdo/AbstractAdapterTest.php
    public function testDriverDisconnectAfterQuoteWithPlatform()
    {
        $isTcpConnection = $this->isTcpConnection();

        $this->adapter->getDriver()->getConnection()->connect();

        self::assertTrue($this->adapter->getDriver()->getConnection()->isConnected());
        if ($isTcpConnection) {
            self::assertTrue($this->isConnectedTcp());
        }

        $this->adapter->getDriver()->getConnection()->disconnect();

        self::assertFalse($this->adapter->getDriver()->getConnection()->isConnected());
        if ($isTcpConnection) {
            self::assertFalse($this->isConnectedTcp()); // LINE 41
        }
//...