Open
Description
I am trying this package to modularise one of our application. I have configured Laravel to use pest for testing.
In the main Laravel tree, I have tests/Pest.php configuration file.
I am creating modules in modules
directory instead of app-modules
. The namespace is set to Talkad.
I have created a module called hms-post
.
When I run pest, I see
Modules\hmspost\tests\Unit\ExampleTest
instead of Talkad\HmsPost\Tests\Unit\ExampleTest
The ExampleTest (modules/hms-post/tests/Unit/ExampleTest.php)
<?php
namespace Talkad\HmsPost\Tests\Unit;
use Tests\TestCase;
uses(TestCase::class);
test('that true is true', function () {
echo get_class($this); // shows T\Modules\hmspost\tests\Unit\ExampleTest
expect(true)->toBeTrue();
});
The Pest configuration
tests/Pest.php under the main Laravel tree
<?php
use Tests\TestCase;
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
uses(
TestCase::class,
LazilyRefreshDatabase::class,
)->in(__DIR__);
Need help on this.
Metadata
Metadata
Assignees
Labels
No labels