Problem/Motivation

NodeCreationTest hardwires dblog queries into the test.

Proposed resolution

Move those queries into a method so that the test can be easily reused.

CommentFileSizeAuthor
#4 2426659_4.patch1.82 KBchx
#2 2426659_1.patch1.76 KBchx
nct.patch7.39 KBchx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, nct.patch, failed testing.

chx’s picture

Status: Needs work » Needs review
FileSize
1.76 KB

Wrong patch/issue.

dawehner’s picture

+++ b/core/modules/node/src/Tests/NodeCreationTest.php
@@ -185,4 +185,24 @@ function testNodeAddWithoutContentTypes () {
+  protected static function testExceptionForRollback() {
...
+  protected static function explicitRollbackFailed() {

IMHO this function naming is not really helpful. What about protected function getWatchdogIdsForTestExceptionRollback and getWatchdogIdsForFailedExplicitRollback

chx’s picture

FileSize
1.82 KB
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thank you.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Test only change not subject to beta evaluation. Committed ea2e91a and pushed to 8.0.x. Thanks!

  • alexpott committed ea2e91a on 8.0.x
    Issue #2426659 by chx: NodeCreationTest is not reusable
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.