This PR addresses an issue where the determineCurrentTenant method was not being executed during unit tests, causing the Spatie\Multitenancy\Exceptions\NoCurrentTenant exception to be thrown. This issue prevented proper testing of HTTP requests in a multitenant environment.
The fix ensures that determineCurrentTenant is executed not only when the application is not running in the console but also when it is running unit tests. This allows for complete test coverage of HTTP requests that involve tenant identification.
By implementing this fix, developers can now effectively write and run unit tests that cover tenant identification through HTTP requests, ensuring that their applications are robust and reliable.
This PR addresses an issue where the determineCurrentTenant method was not being executed during unit tests, causing the Spatie\Multitenancy\Exceptions\NoCurrentTenant exception to be thrown. This issue prevented proper testing of HTTP requests in a multitenant environment.
The fix ensures that determineCurrentTenant is executed not only when the application is not running in the console but also when it is running unit tests. This allows for complete test coverage of HTTP requests that involve tenant identification.
By implementing this fix, developers can now effectively write and run unit tests that cover tenant identification through HTTP requests, ensuring that their applications are robust and reliable.