From #2105617-7: False pass with WebTestBase::assertFieldByName with select element

Steps to reproduce:

$ cd core
$ ./vendor/bin/phpunit modules/views/tests/Drupal/views/Tests/ViewsDataHelperTest.php

PHP Fatal error:  Call to undefined function Drupal\views\Tests\t() in core/modules/views/lib/Drupal/views/Tests/ViewTestData.php on line 214
Files: 
CommentFileSizeAuthor
ViewTestData-t.patch634 bytesolli
PASSED: [[SimpleTest]]: [MySQL] 59,319 pass(es). View

Comments

dawehner’s picture

Priority: Minor » Major
Status: Needs review » Reviewed & tested by the community

Yeah I remember something similar in another issue.

This is a broken test which is just hidden through some magic.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

It passes when you run all the tests because \Drupal\views\Tests\Plugin\Block\ViewsBlockTest includes a definition of the t() function.

Committed c816425 and pushed to 8.x. Thanks!

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