.
This commit is contained in:
commit
a5ce423afe
30 changed files with 1807 additions and 0 deletions
17
tests/BasicAspectTest.php
Normal file
17
tests/BasicAspectTest.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Tests\Classes\WrappedClass;
|
||||
|
||||
final class BasicAspectTest extends TestCase
|
||||
{
|
||||
public function testAspectMethodIsCalled(): void
|
||||
{
|
||||
$sideEffect = (object) ['before' => false, 'after' => false];
|
||||
$c = new WrappedClass();
|
||||
$r = $c->wrappedMethod(1, 3, $sideEffect);
|
||||
$this->assertEquals(4, $r);
|
||||
$this->assertTrue($sideEffect->before);
|
||||
$this->assertTrue($sideEffect->after);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue