feat: allows to use test calls on before each calls

This commit is contained in:
Nuno Maduro
2023-05-01 22:18:45 +01:00
parent cddddc3ec1
commit 97898a0a8e
14 changed files with 118 additions and 26 deletions

View File

@ -0,0 +1,15 @@
<?php
beforeEach()->expect(true)->toBeTrue();
test('runs 1', function () {
// This test did performs assertions...
});
test('runs 2', function () {
// This test did performs assertions...
});
test('runs 3', function () {
// This test did performs assertions...
});

View File

@ -0,0 +1,15 @@
<?php
beforeEach()->skip();
test('does not run 1', function () {
$this->fail('This test should not run');
});
test('does not run 2', function () {
$this->fail('This test should not run');
});
test('does not run 3', function () {
$this->fail('This test should not run');
});

View File

@ -0,0 +1,15 @@
<?php
beforeEach()->todo();
test('is marked as todo 1', function () {
$this->fail('This test should not run');
});
test('is marked as todo 2', function () {
$this->fail('This test should not run');
});
test('is marked as todo 3');
test()->shouldBeMarkedAsTodo();