public function testMyTest() {
    $this->assertEquals(1, 2, 'The values are equal.');

This test fails, as expected.

But run-tests.sh shows this:

Status    Group      Filename          Line Function
--------------------------------------------------------------------------------
Fail      Other      MyTest   59 Drupal\Tests\my_module\Kernel\
    Failed asserting that 2 matches expected 1.

where line 59 is the line of the function declaration, not of the failing assertion. The assertion message is also not used.

The Simpletest UI has the same problem.

Comments

joachim created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Status: Active » Closed (outdated)
Issue tags: +Bug Smash Initiative

Tested on 8.6.19-dev and the line number where the error occurred is reported correctly using phpunit and runtests.sh. The tests was done by adding the assertion in the IS at line 156 in MigrateSourceTestBase. The results below are correct.

    1)
    Drupal\Tests\tracker\Kernel\Plugin\migrate\source\d7\TrackerNodeTest::testSource
    with data set #0 (array(array(array('2', '1', '1421727536'))),
    array(array('2', '1', '1421727536')))
    The values are equal.
    Failed asserting that 2 matches expected 1.
    
    /var/www/html/core/tests/Drupal/KernelTests/KernelTestBase.php:1133
    /var/www/html/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php:156
    /var/www/html/core/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php:85

Therefore, closing this as outdated. If you think that is an error, please reopen.