ldc-mesbr-app/tests/Pest.php
2026-09-08 16:33:54 +02:00

40 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
use DG\BypassFinals;
use Tests\TestCase;
// Prevents mock-final-classes/bypass-finals from removing final/readonly.
if (class_exists(BypassFinals::class)) {
BypassFinals::denyPaths([
dirname(__DIR__) . '/src/*',
]);
}
/*
*--------------------------------------------------------------------------
* Test Case
*--------------------------------------------------------------------------
*
* The closure you provide to your test functions is always bound to a specific PHPUnit test
* case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
* need to change it using the "pest()" function to bind different classes or traits.
*
*/
pest()->extend(TestCase::class)
->in('Architecture', 'Unit');
/*
*--------------------------------------------------------------------------
* Expectations
*--------------------------------------------------------------------------
*
* When you're writing tests, you often need to check that values meet certain conditions. The
* "expect()" function gives you access to a set of "expectations" methods that you can use
* to assert different things. Of course, you may extend the Expectation API at any time.
*
*/
expect()->extend('toBeOne', fn () => $this->toBe(1));