Skip to content

Commit

Permalink
covers functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Jan 11, 2024
1 parent 9c27337 commit a4687b1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/FunctionsTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

/*
* This file is part of Chevere.
*
* (c) Rodolfo Berrios <rodolfo@chevere.org>
*
* 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
);
}
}

0 comments on commit a4687b1

Please sign in to comment.