Skip to content

Commit

Permalink
Route attribute origin replace Origin attribute origins
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Jul 29, 2022
1 parent 6b85c03 commit 11cb761
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/ReflectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ public function testInChildClass() : void
'name' => null,
'action' => ChildClass::class . '::hello',
], $reflector->getRoutes());
self::assertContains([
'origins' => [
'xxx',
],
'methods' => ['GET'],
'path' => '/replace-origin',
'arguments' => '*',
'name' => null,
'action' => ChildClass::class . '::replaceOrigin',
], $reflector->getRoutes());
self::assertContains([
'origins' => [
'http://bar.xyz',
Expand Down
5 changes: 5 additions & 0 deletions tests/Support/AbstractClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ abstract class AbstractClass
public function hello() : void
{
}

#[Route('GET', '/replace-origin', origin: 'xxx')]
public function replaceOrigin() : void
{
}
}

0 comments on commit 11cb761

Please sign in to comment.