Skip to content

Marking test as skipped will prevent execution of all subsequent tests #379

Description

@trebi
  • bug report? yes
  • feature request? no
  • version: 2.0.0

Description

If test is marked as skipped, all subsequent tests will not execute.

Steps To Reproduce

  1. Create file
<?php declare(strict_types=1);

namespace Tester\BugReport;

use Tester\Assert;

require __DIR__ . '/../bootstrap.php';

/** @TestCase */
final class BugReportTest extends \Tester\TestCase
{
	public function testSkip(): void
	{
		\Tester\Environment::skip();
	}


	public function testFail(): void
	{
		Assert::true(false);
	}
}

(new BugReportTest)->run();
  1. Run the file, the output will be:
Skipped:


Process finished with exit code 177

giving no indication that second test is failing. Such behaviour causes that I prefer commenting out the test rather than makring it as skipped.

BTW if you swap the order of the tests, it will execute the failing test and fail as expected, which is inconsistent behaviour. Order of methods should never matter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions