mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
27 lines
462 B
PHP
27 lines
462 B
PHP
<?php
|
|
|
|
uses()->beforeEach(function () {
|
|
expect($this)
|
|
->toHaveProperty('baz')
|
|
->and($this->baz)
|
|
->toBe(0);
|
|
|
|
$this->baz = 1;
|
|
});
|
|
|
|
beforeEach(function () {
|
|
expect($this)
|
|
->toHaveProperty('baz')
|
|
->and($this->baz)
|
|
->toBe(1);
|
|
|
|
$this->baz = 2;
|
|
});
|
|
|
|
test('global beforeEach execution order', function () {
|
|
expect($this)
|
|
->toHaveProperty('baz')
|
|
->and($this->baz)
|
|
->toBe(2);
|
|
});
|