mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
test: adding tests for beforeEach and afterEach + empty tests for *All
This commit is contained in:
24
tests/Hooks/AfterEachTest.php
Normal file
24
tests/Hooks/AfterEachTest.php
Normal 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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user