Problem/Motivation

BookInstallTest makes no HTTP requests but is a functional test

Proposed resolution

Convert BookInstallTest into a Kernel test

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Status: Active » Needs review
FileSize
2.57 KB

This patch decreases the locally test run from 7.4 to 2.4 seconds.

Lendude’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/book/tests/src/Kernel/BookInstallTest.php
@@ -0,0 +1,39 @@
+    // Install the Book module. Using the module installer service ensures that
+    // all the install rituals, including default and optional configuration
+    // import, are performed.

Good addition.

Good clean up and conversion, I see no possible loss of coverage.

catch’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/book/tests/src/Kernel/BookInstallTest.php
@@ -0,0 +1,39 @@
+  ];
...
+    $this->assertTrue($status);

The assertion should have a message I think 'Book module installed successfully' or similar. Otherwise this looks good.

vadim.hirbu’s picture

Status: Needs work » Needs review
FileSize
2.61 KB
562 bytes

Just added message recommended in latest comment.

naveenvalecha’s picture

Status: Needs review » Reviewed & tested by the community

Good to RTBC

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 46d96a4066 to 8.8.x and ee9ba65243 to 8.7.x. Thanks!

Credited @catch and @Lendude for issue comments that reviewed the patch and influenced it.

  • alexpott committed 46d96a4 on 8.8.x
    Issue #3046694 by vadim.hirbu, claudiu.cristea, Lendude, catch: Convert...
alexpott’s picture

Version: 8.8.x-dev » 8.7.x-dev

  • alexpott committed ee9ba65 on 8.7.x
    Issue #3046694 by vadim.hirbu, claudiu.cristea, Lendude, catch: Convert...

Status: Fixed » Closed (fixed)

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