file_put_contents(__DIR__.'/../fixtures/importmaps_for_writing/assets/some_file.js', '// some_file.js contents'
);
} protected function tearDown(): void
{ $this->filesystem->
remove(__DIR__.'/../fixtures/importmaps_for_writing'
);
} public function testGetModulesToPreload() { $manager =
$this->
createImportMapManager( ['assets' => '', 'assets2' => 'namespaced_assets2'
],
__DIR__.'/../fixtures/importmaps/'
);
$this->
assertEquals([ 'https://unpkg.com/@hotwired/stimulus@3.2.1/dist/stimulus.js',
'/assets/app-ea9ebe6156adc038aba53164e2be0867.js',
// these are non-lazily imported from app.js
'/assets/pizza/index-b3fb5ee31adaf5e1b32d28edf1ab8e7a.js',
'/assets/popcorn-c0778b84ef9893592385aebc95a2896e.js',
],
$manager->
getModulesToPreload());
}