-
-
Notifications
You must be signed in to change notification settings - Fork 144
Labels
Description
Tempest version
2.14
PHP version
8.4
Operating system
Windows
Description
After switching to pestphp/pest at first ".tempest/test_internal_storage/default/current_discovery_strategy" is missing.
After copying the file from ".tempest" and changing the provided "HomeControllerTest" to pests function based aproach, the following assertion in pests backtrace helper fails in Backtrace::testFile(): "assert(array_key_exists(self::FILE, $trace))"
Steps to reproduce
- Create a new project:
$ composer create-project tempest/app tempestpest - Remove PHPUnit:
$ composer remove phpunit/phpunit - Require pest:
$ composer require pestphp/pest --dev --with-all-dependencies(confirm allow plugins) - Copy ".tempest/current_discovery_strategy" to ".tempest/test_internal_storage/default/current_discovery_strategy"
- Add Pest.php to "./tests":
<?php
declare(strict_types=1);
pest()
->extend(Tests\IntegrationTestCase::class) // Note the chaged class-name
->in(__DIR__);- Change "./tests/HomeCOntrollerTest.php" to:
<?php
declare(strict_types=1);
namespace Tests;
test('home controller test', function () {
$this->http
->get('/')
->assertOk()
->assertSee('Tempest');
});- Run
$ vendor/bin/pest