Skip to content

Commit

Permalink
Update tests/009-rayaop-final.phpt
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
koriym and coderabbitai[bot] authored Nov 5, 2024
1 parent e9d5a64 commit 79f6911
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/009-rayaop-final.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,22 @@ class TestInterceptor implements Ray\Aop\MethodInterceptorInterface {
}

method_intercept_init();
// Verify initialization
var_dump(method_intercept_enable());

method_intercept(FinalTestClass::class, 'finalMethod', new TestInterceptor());

$test = new FinalTestClass();
$result = $test->finalMethod("test");
echo "Result: $result\n";

// Test edge case with null parameter
$result = $test->finalMethod(null);
echo "Null test: $result\n";

// Cleanup
method_intercept_enable(false);

?>
--EXPECT--
Before final method
Expand Down

0 comments on commit 79f6911

Please sign in to comment.