File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public function testGetControllersMap()
53
53
return new MappedAsset ($ path , '/path/to ' .$ path );
54
54
});
55
55
} else {
56
+ // @legacy for AssetMapper 6.3
56
57
$ autoImportLocator ->expects ($ this ->never ())
57
58
->method ('locateAsset ' );
58
59
}
@@ -92,6 +93,11 @@ public function testGetControllersMap()
92
93
$ this ->assertSame ('fake-vendor/ux-package1/package-controller-second.js ' , $ controllerSecond ->asset ->logicalPath );
93
94
// lazy from user's controller.json
94
95
$ this ->assertTrue ($ controllerSecond ->isLazy );
96
+ // @legacy: assert can be without the conditional for AssetMapper 6.4+
97
+ if (class_exists (ImportMapConfigReader::class)) {
98
+ // 4 auto imports from package.json
99
+ $ this ->assertCount (4 , $ controllerSecond ->autoImports );
100
+ }
95
101
$ this ->assertCount (4 , $ controllerSecond ->autoImports );
96
102
97
103
$ helloControllerFromPackage = $ map ['fake-vendor--ux-package2--hello-controller ' ];
Original file line number Diff line number Diff line change 13
13
14
14
use PHPUnit \Framework \TestCase ;
15
15
use Symfony \Component \AssetMapper \AssetMapperInterface ;
16
+ use Symfony \Component \AssetMapper \ImportMap \ImportMapConfigReader ;
16
17
use Symfony \Component \AssetMapper \MappedAsset ;
17
18
use Symfony \UX \StimulusBundle \AssetMapper \ControllersMapGenerator ;
18
19
use Symfony \UX \StimulusBundle \Twig \UxControllersTwigRuntime ;
19
20
use Symfony \UX \StimulusBundle \Ux \UxPackageReader ;
20
21
21
22
class UxControllersTwigRuntimeTest extends TestCase
22
23
{
24
+ /**
25
+ * @group legacy
26
+ */
23
27
public function testRenderLinkTags ()
24
28
{
29
+ if (class_exists (ImportMapConfigReader::class)) {
30
+ $ this ->markTestSkipped ('Skip test for AssetMapper 6.4+ ' );
31
+ }
32
+
25
33
$ controllersMapGenerator = $ this ->createMock (ControllersMapGenerator::class);
26
34
$ controllersMapGenerator ->expects ($ this ->any ())
27
35
->method ('getControllersJsonPath ' )
You can’t perform that action at this time.
0 commit comments