This commit is contained in:
Nuno Maduro
2020-05-11 18:38:30 +02:00
commit de2929077b
112 changed files with 6211 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
$state = new stdClass();
beforeEach(function () use ($state) {
$this->state = $state;
});
afterEach(function () use ($state) {
$this->state->bar = 2;
});
it('does not get executed before the test', function () {
assertFalse(property_exists($this->state, 'bar'));
});
it('gets executed after the test', function () {
assertTrue(property_exists($this->state, 'bar'));
assertEquals(2, $this->state->bar);
});