Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294574

dump() calls in tests are producing a PHPUnit\Framework\Exception

$
0
0

Problem/Motivation

dump() statements in kernel tests are now causing the test to fail with exception: PHPUnit\Framework\Exception, rather than the actual failure of the test.

I'm not sure why testVarDump() isn't showing this up!

Steps to reproduce

Open any kernel test file like:
root_folder_project/core/modules/views/tests/src/Kernel/TokenReplaceTest.php
Use dump($variable) anywhere in the file
Go to terminal run the kernel test
You 'll observe variable render , but test fails with PHPUnit\Framework\Exception error, but in actual there is no error in the file.

kernel-test

Expected behaviour

If we use dump() in the kernel test file, then use of dump file should not cause to fail the test case.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 294574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>