@@ -40,6 +40,7 @@ public function testSynchronizeNoPackage()
4040 // Should remove existing package references as it has been removed from the lock
4141 $ this ->assertSame (
4242 [
43+ 'name ' => 'symfony/fixture ' ,
4344 'devDependencies ' => [
4445 '@symfony/stimulus-bridge ' => '^1.0.0 ' ,
4546 'stimulus ' => '^1.1.1 ' ,
@@ -64,6 +65,7 @@ public function testSynchronizeExistingPackage()
6465 // Should keep existing package references and config
6566 $ this ->assertSame (
6667 [
68+ 'name ' => 'symfony/fixture ' ,
6769 'devDependencies ' => [
6870 '@symfony/existing-package ' => 'file:vendor/symfony/existing-package/Resources/assets ' ,
6971 '@symfony/stimulus-bridge ' => '^1.0.0 ' ,
@@ -98,17 +100,18 @@ public function testSynchronizeNewPackage()
98100 {
99101 $ this ->synchronizer ->synchronize (['symfony/existing-package ' , 'symfony/new-package ' ]);
100102
101- // Should keep existing package references and config and add the new package
103+ // Should keep existing package references and config and add the new package, while keeping the formatting
102104 $ this ->assertSame (
103- [
104- 'devDependencies ' => [
105- '@symfony/existing-package ' => 'file:vendor/symfony/existing-package/Resources/assets ' ,
106- '@symfony/new-package ' => 'file:vendor/symfony/new-package/assets ' ,
107- '@symfony/stimulus-bridge ' => '^1.0.0 ' ,
108- 'stimulus ' => '^1.1.1 ' ,
109- ],
110- ],
111- json_decode (file_get_contents ($ this ->tempDir .'/package.json ' ), true )
105+ '{
106+ "name": "symfony/fixture",
107+ "devDependencies": {
108+ "@symfony/existing-package": "file:vendor/symfony/existing-package/Resources/assets",
109+ "@symfony/new-package": "file:vendor/symfony/new-package/assets",
110+ "@symfony/stimulus-bridge": "^1.0.0",
111+ "stimulus": "^1.1.1"
112+ }
113+ } ' ,
114+ file_get_contents ($ this ->tempDir .'/package.json ' )
112115 );
113116
114117 $ this ->assertSame (
0 commit comments