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

WebDriverTestBase tests always pass

$
0
0

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?


Viewing all articles
Browse latest Browse all 299620

Latest Images

Trending Articles



Latest Images

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