test: adding tests for beforeEach and afterEach + empty tests for *All

This commit is contained in:
jordanbrauer
2021-04-06 19:26:42 -05:00
parent 99500d0cae
commit 53333b56ab
5 changed files with 82 additions and 7 deletions

View File

@ -0,0 +1,24 @@
<?php
uses()->afterEach(function () {
expect($this)
->toHaveProperty('ith')
->and($this->ith)
->toBe(0);
$this->ith = 1;
});
afterEach(function () {
expect($this)
->toHaveProperty('ith')
->and($this->ith)
->toBe(1);
});
test('global afterEach execution order', function () {
expect($this)
->not()
->toHaveProperty('ith');
});