diff --git a/tests/FunctionsTest.php b/tests/FunctionsTest.php new file mode 100644 index 0000000..9aca678 --- /dev/null +++ b/tests/FunctionsTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Chevere\Tests; + +use Chevere\Tests\src\ActionTestAction; +use PHPUnit\Framework\TestCase; +use ReflectionMethod; +use function Chevere\Action\getParameters; +use function Chevere\Parameter\reflectionToParameters; + +final class FunctionsTest extends TestCase +{ + public function testGetParameters(): void + { + $action = ActionTestAction::class; + $reflection = new ReflectionMethod($action, $action::mainMethod()); + $toParameters = reflectionToParameters($reflection); + $parameters = getParameters($action); + $this->assertEquals( + $toParameters, + $parameters + ); + } +}