More tests

This commit is contained in:
Nuno Maduro
2023-05-27 14:08:38 +01:00
parent a90b90ad29
commit 26a6e7d712
12 changed files with 101 additions and 15 deletions

View File

@ -4,12 +4,24 @@ beforeEach(function () {
$this->bar = 2;
});
beforeEach(function () {
$this->bar++;
});
beforeEach(function () {
$this->bar = 0;
});
it('gets executed before each test', function () {
expect($this->bar)->toBe(2);
expect($this->bar)->toBe(1);
$this->bar = 'changed';
});
it('gets executed before each test once again', function () {
expect($this->bar)->toBe(2);
expect($this->bar)->toBe(1);
});
beforeEach(function () {
$this->bar++;
});