feat(discovery): discover autoload-dev namespaces#1438
feat(discovery): discover autoload-dev namespaces#1438Treggats wants to merge 1 commit intotempestphp:mainfrom
autoload-dev namespaces#1438Conversation
autoload-dev namespaces
|
Sorry for not getting back on you via Discord. We used to discover dev locations, but that ended up causing a lot of issues. Instead, you should manually add your testing discovery locations during test setup. Here's what that looks like: protected function setUp(): void
{
$this->discoveryLocations = [
new DiscoveryLocation('Tests\\Tempest\\Integration\\Console\\Fixtures', __DIR__ . '/Console/Fixtures'),
new DiscoveryLocation('Tests\\Tempest\\Fixtures', __DIR__ . '/../Fixtures'),
];
parent::setUp();This assumes you extend |
|
@brendt Actually I'm glad, as I've also was seeing weird issues on the tests in this repository but nog my application. Is this test |
|
It's not documented no, we should add it here: https://tempestphp.com/docs/essentials/testing I made an issue for it: #1443 I'll pick this up somewhere later, or you can look at it if you want to |
I'll have a look :) |
Working on some tests and wanted to use a different database than default. Which is SQLite.
I tried adding the database config under the tests directory, only it was never discovered.
After digging it turned out that only the namespaces from
autoload.psr-4where loaded and notautoload-dev.psr-4This PR updates processing the namespaces from the
composer.jsonfile and addsautoload-dev.psr-4to it.