mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-02 05:10:59 +00:00
feat: add secure module marketplace runtime (#745)
This commit is contained in:
@@ -10,8 +10,7 @@ use Illuminate\Support\Facades\File;
|
||||
* and the starter i18n files that the boilerplate references.
|
||||
*
|
||||
* The test generates a throwaway module, inspects the generated files, then
|
||||
* cleans up (including nwidart's status entry) so the rest of the suite is
|
||||
* unaffected.
|
||||
* cleans it up so the rest of the suite is unaffected.
|
||||
*/
|
||||
beforeEach(function () {
|
||||
$this->scaffoldModule = 'ScaffoldProbe';
|
||||
@@ -28,15 +27,6 @@ afterEach(function () {
|
||||
File::deleteDirectory($this->scaffoldPath);
|
||||
}
|
||||
|
||||
// nwidart writes module activation state to storage/app/modules_statuses.json
|
||||
// when module:make auto-enables the new module. Remove our scaffold entry
|
||||
// so the file doesn't accumulate stale test data across runs.
|
||||
$statusesFile = storage_path('app/modules_statuses.json');
|
||||
if (File::exists($statusesFile)) {
|
||||
$statuses = json_decode(File::get($statusesFile), true) ?? [];
|
||||
unset($statuses[$this->scaffoldModule]);
|
||||
File::put($statusesFile, json_encode($statuses, JSON_PRETTY_PRINT));
|
||||
}
|
||||
});
|
||||
|
||||
test('module:make generates a ServiceProvider that uses InvoiceShelf\\Modules\\Registry', function () {
|
||||
|
||||
Reference in New Issue
Block a user