@@ -189,7 +189,7 @@ public function testSynchronizeNewPackage()
189189 ],
190190 ],
191191 ],
192- 'entrypoints ' => ['admin.js ' , ' @symfony/new-package/entry.js ' ],
192+ 'entrypoints ' => ['admin.js ' ],
193193 ],
194194 json_decode (file_get_contents ($ this ->tempDir .'/assets/controllers.json ' ), true )
195195 );
@@ -324,13 +324,15 @@ public function testSynchronizeAssetMapperNewPackage()
324324
325325 $ fileModulePath = $ this ->tempDir .'/vendor/symfony/new-package/assets/dist/loader.js ' ;
326326 $ entrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry.js ' ;
327+ $ secondEntrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry2.js ' ;
327328
328- $ this ->scriptExecutor ->expects ($ this ->exactly (3 ))
329+ $ this ->scriptExecutor ->expects ($ this ->exactly (4 ))
329330 ->method ('execute ' )
330331 ->withConsecutive (
331332 ['symfony-cmd ' , 'importmap:require ' , ['@hotcake/foo@^1.9.0 ' ]],
332333 ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]],
333- ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]]
334+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]],
335+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry2.js ' , '--path= ' .$ secondEntrypointPath ]]
334336 );
335337
336338 $ this ->synchronizer ->synchronize ([
@@ -385,7 +387,7 @@ public function testSynchronizeAssetMapperNewPackage()
385387 ],
386388 ],
387389 ],
388- 'entrypoints ' => ['admin.js ' , ' @symfony/new-package/entry.js ' ],
390+ 'entrypoints ' => ['admin.js ' ],
389391 ],
390392 json_decode (file_get_contents ($ this ->tempDir .'/assets/controllers.json ' ), true )
391393 );
@@ -403,13 +405,15 @@ public function testSynchronizeAssetMapperUpgradesPackageIfNeeded()
403405
404406 $ fileModulePath = $ this ->tempDir .'/vendor/symfony/new-package/assets/dist/loader.js ' ;
405407 $ entrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry.js ' ;
408+ $ secondEntrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry2.js ' ;
406409
407- $ this ->scriptExecutor ->expects ($ this ->exactly (3 ))
410+ $ this ->scriptExecutor ->expects ($ this ->exactly (4 ))
408411 ->method ('execute ' )
409412 ->withConsecutive (
410413 ['symfony-cmd ' , 'importmap:require ' , ['@hotcake/foo@^1.9.0 ' ]],
411414 ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]],
412- ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]]
415+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]],
416+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry2.js ' , '--path= ' .$ secondEntrypointPath ]]
413417 );
414418
415419 $ this ->synchronizer ->synchronize ([
@@ -427,6 +431,10 @@ public function testSynchronizeAssetMapperSkipsUpgradeIfAlreadySatisfied()
427431 // constraint in package.json is ^1.9.0
428432 'version ' => '1.9.1 ' ,
429433 ],
434+ '@symfony/new-package/entry2.js ' => [
435+ 'path ' => './vendor/symfony/new-package/assets/entry2.js ' ,
436+ 'entrypoint ' => true ,
437+ ]
430438 ];
431439 file_put_contents ($ this ->tempDir .'/importmap.php ' , sprintf ('<?php return %s; ' , var_export ($ importMap , true )));
432440
@@ -437,7 +445,7 @@ public function testSynchronizeAssetMapperSkipsUpgradeIfAlreadySatisfied()
437445 ->method ('execute ' )
438446 ->withConsecutive (
439447 ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]],
440- ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]]
448+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' , '@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]],
441449 );
442450
443451 $ this ->synchronizer ->synchronize ([
0 commit comments