@@ -189,7 +189,7 @@ public function testSynchronizeNewPackage()
189
189
],
190
190
],
191
191
],
192
- 'entrypoints ' => ['admin.js ' , ' @symfony/new-package/entry.js ' ],
192
+ 'entrypoints ' => ['admin.js ' ],
193
193
],
194
194
json_decode (file_get_contents ($ this ->tempDir .'/assets/controllers.json ' ), true )
195
195
);
@@ -324,13 +324,15 @@ public function testSynchronizeAssetMapperNewPackage()
324
324
325
325
$ fileModulePath = $ this ->tempDir .'/vendor/symfony/new-package/assets/dist/loader.js ' ;
326
326
$ entrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry.js ' ;
327
+ $ secondEntrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry2.js ' ;
327
328
328
- $ this ->scriptExecutor ->expects ($ this ->exactly (3 ))
329
+ $ this ->scriptExecutor ->expects ($ this ->exactly (4 ))
329
330
->method ('execute ' )
330
331
->withConsecutive (
331
332
['symfony-cmd ' , 'importmap:require ' , ['@hotcake/foo@^1.9.0 ' ]],
332
333
['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 ]]
334
336
);
335
337
336
338
$ this ->synchronizer ->synchronize ([
@@ -385,7 +387,7 @@ public function testSynchronizeAssetMapperNewPackage()
385
387
],
386
388
],
387
389
],
388
- 'entrypoints ' => ['admin.js ' , ' @symfony/new-package/entry.js ' ],
390
+ 'entrypoints ' => ['admin.js ' ],
389
391
],
390
392
json_decode (file_get_contents ($ this ->tempDir .'/assets/controllers.json ' ), true )
391
393
);
@@ -403,13 +405,15 @@ public function testSynchronizeAssetMapperUpgradesPackageIfNeeded()
403
405
404
406
$ fileModulePath = $ this ->tempDir .'/vendor/symfony/new-package/assets/dist/loader.js ' ;
405
407
$ entrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry.js ' ;
408
+ $ secondEntrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry2.js ' ;
406
409
407
- $ this ->scriptExecutor ->expects ($ this ->exactly (3 ))
410
+ $ this ->scriptExecutor ->expects ($ this ->exactly (4 ))
408
411
->method ('execute ' )
409
412
->withConsecutive (
410
413
['symfony-cmd ' , 'importmap:require ' , ['@hotcake/foo@^1.9.0 ' ]],
411
414
['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 ]]
413
417
);
414
418
415
419
$ this ->synchronizer ->synchronize ([
@@ -427,6 +431,10 @@ public function testSynchronizeAssetMapperSkipsUpgradeIfAlreadySatisfied()
427
431
// constraint in package.json is ^1.9.0
428
432
'version ' => '1.9.1 ' ,
429
433
],
434
+ '@symfony/new-package/entry2.js ' => [
435
+ 'path ' => './vendor/symfony/new-package/assets/entry2.js ' ,
436
+ 'entrypoint ' => true ,
437
+ ]
430
438
];
431
439
file_put_contents ($ this ->tempDir .'/importmap.php ' , sprintf ('<?php return %s; ' , var_export ($ importMap , true )));
432
440
@@ -437,7 +445,7 @@ public function testSynchronizeAssetMapperSkipsUpgradeIfAlreadySatisfied()
437
445
->method ('execute ' )
438
446
->withConsecutive (
439
447
['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 ]],
441
449
);
442
450
443
451
$ this ->synchronizer ->synchronize ([
0 commit comments