Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL and MSQL fixtures now recreate test structure. #222

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

ZVanoZ
Copy link
Contributor

@ZVanoZ ZVanoZ commented Sep 24, 2021

Q A
Documentation no
Bugfix no
BC Break no
New Feature no
RFC no
QA yes

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

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.

@Xerkus Xerkus changed the base branch from 2.14.x to 2.19.x February 1, 2024 18:18
Signed-off-by: ZVanoZ <edu.ZVanoZ@gmail.com>
@Xerkus Xerkus added this to the 2.19.0 milestone Feb 1, 2024
@Xerkus Xerkus merged commit 7e1bbe4 into laminas:2.19.x Feb 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants