This commit is contained in:
icefox 2025-12-22 17:54:16 -03:00
commit a5ce423afe
No known key found for this signature in database
30 changed files with 1807 additions and 0 deletions

17
tests/BasicAspectTest.php Normal file
View 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);
}
}