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.
Expected behaviour
If we use dump() in the kernel test file, then use of dump file should not cause to fail the test case.