Follow-up to #2757007: Convert all book web tests to BrowserTestBase

Child to #2735005: Convert all Simpletest web tests to BrowserTestBase (or UnitTestBase/KernelTestBase)

Problem/Motivation

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

None.

CommentFileSizeAuthor
#2 2889350.patch1.04 KBnaveenvalecha

Comments

naveenvalecha created an issue. See original summary.

naveenvalecha’s picture

Status: Active » Needs review
StatusFileSize
new1.04 KB
dawehner’s picture

It would be quite cool if this is the only thing missing ...

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice! I'm curious whether we could maybe group some of the conversions given the views tests aren't hard to fix?

naveenvalecha’s picture

#4,
yup we could do that. These are the conversions left in the modules which are already converted. however, it's a nice idea to convert it in a single go.

//Naveen

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php
@@ -45,8 +45,8 @@ class BookRelationshipTest extends ViewTestBase {
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);

Why are we adding this? We did not have it before.

naveenvalecha’s picture

BTB ViewTestBase::setup requires the argument $import_test_views

$ ../vendor/bin/phpunit modules/book/tests/src/Functional/Views/BookRelationshipTest.php
Declaration of Drupal\Tests\book\Functional\Views\BookRelationshipTest::setUp() should be compatible with Drupal\Tests\views\Functional\ViewTestBase::setUp($import_test_views = true)

//Naveen

lendude’s picture

Status: Needs review » Reviewed & tested by the community

Yup it needs to match the parent setUp() method.

Checked and this is the only remaining WebTestBase and simpletest component left in the Book module, so the scope of 1 test is correct.

  • Gábor Hojtsy committed 6189fae on 8.3.x
    Issue #2889350 by naveenvalecha, Lendude, dawehner: Convert...

  • Gábor Hojtsy committed 10c1528 on 8.4.x
    Issue #2889350 by naveenvalecha, Lendude, dawehner: Convert...
gábor hojtsy’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Reviewed & tested by the community » Fixed

Indeed, thanks.

Status: Fixed » Closed (fixed)

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