All time, when we run tests we need reset VirtualBox to init state.
This commit recreate tested structure for MySQL and MSSQL.
So, we can run tests without rollback VirtualBox image - it's spend save time.
If we run integradion test two time, we got an error
phpunit --colors=always --testsuite "integration test"
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.
Integration test started.
.....FFF...................SSS..SSSS 36 / 36 (100%)
Time: 00:03.583, Memory: 10.00 MB
There were 3 failures:
1) LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Mysql\QueryTest::testQuery with data set #0 ('SELECT * FROM test WHERE id = ?', array(1), array(1, 'foo', 'bar'))
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 'id' => 1
- 'name' => 'foo'
- 'value' => 'bar'
+ 'id' => '1'
+ 'name' => 'bar'
+ 'value' => 'foo'
)
/app/test/integration/Adapter/Driver/Pdo/Mysql/QueryTest.php:52
2) LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Mysql\QueryTest::testQuery with data set #1 ('SELECT * FROM test WHERE id = :id', array(1), array(1, 'foo', 'bar'))
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 'id' => 1
- 'name' => 'foo'
- 'value' => 'bar'
+ 'id' => '1'
+ 'name' => 'bar'
+ 'value' => 'foo'
)
/app/test/integration/Adapter/Driver/Pdo/Mysql/QueryTest.php:52
3) LaminasIntegrationTest\Db\Adapter\Driver\Pdo\Mysql\QueryTest::testQuery with data set #2 ('SELECT * FROM test WHERE id = :id', array(1), array(1, 'foo', 'bar'))
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 'id' => 1
- 'name' => 'foo'
- 'value' => 'bar'
+ 'id' => '1'
+ 'name' => 'bar'
+ 'value' => 'foo'
)
/app/test/integration/Adapter/Driver/Pdo/Mysql/QueryTest.php:52
@TODO: Do it for PostgreSQL, SQLite and other databases.
Description
All time, when we run tests we need reset VirtualBox to init state. This commit recreate tested structure for MySQL and MSSQL. So, we can run tests without rollback VirtualBox image - it's spend save time.
If we run integradion test two time, we got an error
@TODO: Do it for PostgreSQL, SQLite and other databases.