@@ -173,7 +173,6 @@ public static function provideCompileTests(): iterable
173
173
];
174
174
175
175
yield 'importing_non_existent_file_without_strict_mode_is_ignored_and_no_import_added ' => [
176
- 'sourceLogicalName ' => 'app.js ' ,
177
176
'input ' => "import './non-existent.js'; " ,
178
177
'expectedJavaScriptImports ' => [],
179
178
];
@@ -277,7 +276,6 @@ public static function provideCompileTests(): iterable
277
276
];
278
277
279
278
yield 'absolute_import_ignored_and_no_dependency_added ' => [
280
- 'sourceLogicalName ' => 'app.js ' ,
281
279
'input ' => 'import "https://example.com/module.js"; ' ,
282
280
'expectedJavaScriptImports ' => [],
283
281
];
@@ -415,14 +413,14 @@ public static function providePathsCanUpdateTests(): iterable
415
413
416
414
public function testCompileHandlesCircularRelativeAssets ()
417
415
{
418
- $ appAsset = new MappedAsset ('app.js ' , 'anythingapp ' , '/assets/app.js ' );
419
- $ otherAsset = new MappedAsset ('other.js ' , 'anythingother ' , '/assets/other.js ' );
416
+ $ appAsset = new MappedAsset ('app.js ' , '/project/assets/app.js ' , '/assets/app.js ' );
417
+ $ otherAsset = new MappedAsset ('other.js ' , '/project/assets/other.js ' , '/assets/other.js ' );
420
418
421
419
$ importMapConfigReader = $ this ->createMock (ImportMapConfigReader::class);
422
420
$ assetMapper = $ this ->createMock (AssetMapperInterface::class);
423
421
$ assetMapper ->expects ($ this ->once ())
424
- ->method ('getAsset ' )
425
- ->with ('other.js ' )
422
+ ->method ('getAssetFromSourcePath ' )
423
+ ->with ('/project/assets/ other.js ' )
426
424
->willThrowException (new CircularAssetsException ($ otherAsset ));
427
425
428
426
$ compiler = new JavaScriptImportPathCompiler ($ importMapConfigReader );
0 commit comments