2022-01-31 18:21:13 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace CuyZ\Valinor\Tests\Unit\Definition\Repository\Cache\Compiler;
|
|
|
|
|
|
|
|
use AssertionError;
|
|
|
|
use CuyZ\Valinor\Definition\Repository\Cache\Compiler\FunctionDefinitionCompiler;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use stdClass;
|
|
|
|
|
|
|
|
final class FunctionDefinitionCompilerTest extends TestCase
|
|
|
|
{
|
2022-05-08 14:15:58 +02:00
|
|
|
public function test_compile_wrong_type_fails_assertion(): void
|
2022-01-31 18:21:13 +01:00
|
|
|
{
|
|
|
|
$this->expectException(AssertionError::class);
|
|
|
|
|
|
|
|
(new FunctionDefinitionCompiler())->compile(new stdClass());
|
|
|
|
}
|
|
|
|
}
|