Download & Extend

Block template suggestions test fails if Block module is disabled

Project:Drupal core
Version:8.x-dev
Component:block.module
Category:bug report
Priority:minor
Assigned:Unassigned
Status:needs review
Issue tags:needs backport to D7

Issue Summary

Simpletest creates a complete Drupal installation and for each test runs in a completely new Drupal instance. Right?

Comments

#1

Status:active» needs review

for each test runs in a completely new Drupal instance

It's not about UnitTestBase tests.

AttachmentSizeStatusTest resultOperations
block_template_suggestions_test-1837620-1.patch617 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 47,983 pass(es).View details | Re-test

#2

Status:needs review» reviewed & tested by the community

Manual local testing: from web interface, block module disabled.

Before patch:

Test the template_preprocess_block() function.
0 passes, 19 fails, and 0 exceptions
The test did not complete due to a fatal error. Completion check BlockTemplateSuggestionsUnitTest.php 28 Drupal\block\Tests\BlockTemplateSuggestionsUnitTest->testBlockThemeHookSuggestions()
Call to undefined function Drupal\block\Tests\template_preprocess_block()

After patch, 3 passes, 0 fails, 0 exceptions, and everything is looking great.

#3

Status:reviewed & tested by the community» needs work

This should be able to use DrupalUnitTestBase now.

#4

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
block_template_suggestions_test-1837620-4.patch1.04 KBIdlePASSED: [[SimpleTest]]: [MySQL] 48,270 pass(es).View details | Re-test
nobody click here