The following test ought to fail in three separate ways, but it passes when I run this test.
namespace Drupal\Tests\my_module\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
/**
* Basic test.
*
* @group MyTest
*/
class MyTestBasicTest extends WebDriverTestBase {
protected $defaultTheme = 'stark';
/**
* Basic test.
*/
public function testPage() {
$this->drupalGet('');
$this->assertSession()->pageTextContains('Text that is not on the page.');
non_existant_function();
exit;
}
}
This is the test output:
Status Group Filename Line Function
--------------------------------------------------------------------------------
Pass Other MyTestBasicTest.p 19 Drupal\Tests\my_module\FunctionalJa
It finds the test method on line 19, but it doesn't run it. Does anyone know what the problem is?