- Issue created by @daffie
- Status changed to Needs work
over 1 year ago 1:39pm 1 May 2023 - last update
over 1 year ago 29,367 pass - 🇳🇱Netherlands arantxio Dordrecht
Here are some patches that all contain the test, but using different scenarios for the bugfix solution.
- Status changed to Needs review
over 1 year ago 12:57pm 8 May 2023 - last update
over 1 year ago 29,371 pass, 2 fail - last update
over 1 year ago 29,371 pass, 2 fail - last update
over 1 year ago 29,371 pass, 2 fail - last update
over 1 year ago 29,371 pass, 2 fail - last update
over 1 year ago 29,371 pass, 2 fail - last update
over 1 year ago 29,371 pass, 1 fail - last update
over 1 year ago 29,371 pass, 2 fail - last update
over 1 year ago 29,371 pass, 1 fail - last update
over 1 year ago 29,371 pass, 2 fail - last update
over 1 year ago 29,371 pass, 1 fail - last update
over 1 year ago 29,381 pass - last update
over 1 year ago 29,371 pass, 1 fail The last submitted patch, 3: 3357454-3-removed-bugfix.patch, failed testing. View results →
The last submitted patch, 3: 3357454-3-just-tests.patch, failed testing. View results →
The last submitted patch, 3: 3357454-3-removed-bugfix-with-insert-fix.patch, failed testing. View results →
The last submitted patch, 3: 3357454-3-working.patch, failed testing. View results →
- last update
over 1 year ago 29,381 pass - 🇳🇱Netherlands arantxio Dordrecht
As all tests fail for the other databases, we should not use this fix.
Here is a updated patch which removes this fix and adjust the test to expect the exception. and assert that there are no rows added to the table.
- last update
over 1 year ago 29,381 pass - last update
over 1 year ago 29,371 pass, 2 fail - Status changed to Needs work
over 1 year ago 1:47pm 9 May 2023 - 🇺🇸United States smustgrave
Seems didn't pass all the databases.
Did not manually test so leaving that tag.
- Status changed to Needs review
over 1 year ago 1:27pm 15 May 2023 - last update
over 1 year ago 29,390 pass - 🇳🇱Netherlands arantxio Dordrecht
I've adjusted the test a bit. The test failed on SQLite because it doesn't use strict mode on the tables. I've created a new issue regarding this and referred to it in a todo. The issue can be found here 🐛 Use strict table with SQLite 3.37 and above Active
- last update
over 1 year ago 29,390 pass - last update
over 1 year ago 29,390 pass - Status changed to RTBC
over 1 year ago 10:59pm 29 May 2023 - 🇺🇸United States smustgrave
#11 seems to pass all databases. Think this is good for committer review.
- last update
over 1 year ago 29,401 pass - last update
over 1 year ago 29,402 pass - last update
over 1 year ago 29,411 pass - Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - last update
over 1 year ago 29,420 pass - last update
over 1 year ago 29,422 pass - last update
over 1 year ago 29,422 pass 39:27 36:23 Running- last update
over 1 year ago 29,431 pass - last update
over 1 year ago 29,432 pass - last update
over 1 year ago 29,432 pass - last update
over 1 year ago 29,438 pass - last update
over 1 year ago 29,438 pass - last update
over 1 year ago 29,438 pass - last update
over 1 year ago 29,443 pass - last update
over 1 year ago 29,446 pass - last update
over 1 year ago 29,445 pass - last update
over 1 year ago 29,445 pass - last update
over 1 year ago 29,441 pass - last update
over 1 year ago 29,441 pass - last update
over 1 year ago 29,441 pass - last update
over 1 year ago 29,446 pass - last update
over 1 year ago 29,446 pass 24:26 20:47 Running- last update
over 1 year ago 29,448 pass - last update
over 1 year ago 29,448 pass -
longwave →
committed b78ae9ef on 11.x
Issue #3357454 by Arantxio, daffie: Remove bugfix for PHP bug 48383
-
longwave →
committed b78ae9ef on 11.x
- Status changed to Fixed
over 1 year ago 4:11pm 21 July 2023 - 🇬🇧United Kingdom longwave UK
The test coverage looks correct to me, so removing the tag.
Committed and pushed b78ae9ef49 to 11.x. Thanks!
This is a cleanup of harmless code and flagged as a task, so I don't think it's worth backporting.
- Status changed to Needs work
over 1 year ago 7:34pm 25 July 2023 - 🇮🇹Italy mondrake 🇮🇹
-
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php @@ -232,4 +233,66 @@ public function testInsertIntegrityViolation() { + if ($this->connection->databaseType() == 'sqlite') { + $this->markTestSkipped('SQLite does not use strict tables.'); + }
This is hardcoding a database type check. Should have used a test extending from
DriverSpecificKernelTestBase
orDriverSpecificDatabaseTestBase
instead. -
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php @@ -232,4 +233,66 @@ public function testInsertIntegrityViolation() { + $this->expectException(DatabaseExceptionWrapper::class); + $this->connection->insert('insert_bool') + ->fields(['id' => 1, 'test_field_1' => FALSE]) + ->execute(); + + // We should not have any rows in this table. + $this->assertEquals(0, $this->connection->select('insert_bool')->countQuery()->execute()->fetchField());
The
assertEquals
will never execute here, if theinsert
is expected to throw the exception -expectException
will not return execution to the test once it captures the exception thrown.
I suggest to revert this to get it fixed.
-
-
longwave →
committed b48a95b7 on 11.x
Revert "Issue #3357454 by Arantxio, daffie: Remove bugfix for PHP bug...
-
longwave →
committed b48a95b7 on 11.x
- 🇮🇹Italy mondrake 🇮🇹
+++ b/core/tests/Drupal/KernelTests/Core/Database/InsertTest.php @@ -232,4 +233,66 @@ public function testInsertIntegrityViolation() { + $this->connection->query('INSERT INTO {insert_bool} (id,test_field_1) VALUES (:id, :test_field_1)', [':id' => 1, ':test_field_1' => FALSE]);
Also, the field identifiers should be enclosed in square brackets i.e.
INSERT INTO {insert_bool} ([id],[test_field_1]) VALUES ...