File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,32 @@ public function testFrameworkRequireIsTheSameWithDevRequire(): void
3636 );
3737 }
3838
39+ public function testFrameworkRequireDevIsTheSameWithDevRequireDev (): void
40+ {
41+ $ devComposer = $ this ->getComposerJson (dirname (__DIR__ , 2 ) . '/composer.json ' );
42+ $ frameworkComposer = $ this ->getComposerJson (dirname (__DIR__ , 2 ) . '/admin/framework/composer.json ' );
43+
44+ $ devRequireDev = $ devComposer ['require-dev ' ];
45+ $ fwRequireDev = $ frameworkComposer ['require-dev ' ];
46+
47+ foreach ($ devRequireDev as $ dependency => $ expectedVersion ) {
48+ if (! isset ($ fwRequireDev [$ dependency ])) {
49+ $ this ->addToAssertionCount (1 );
50+
51+ continue ;
52+ }
53+
54+ $ this ->assertSame ($ expectedVersion , $ fwRequireDev [$ dependency ], sprintf (
55+ 'Framework \'s "%s" dev dependency is expected to have version constraint of "%s", found "%s" instead. ' .
56+ "\nPlease update the version constraint at %s. " ,
57+ $ dependency ,
58+ $ expectedVersion ,
59+ $ fwRequireDev [$ dependency ],
60+ clean_path (dirname (__DIR__ , 2 ) . '/admin/framework/composer.json ' )
61+ ));
62+ }
63+ }
64+
3965 private function getComposerJson (string $ path ): array
4066 {
4167 try {
You can’t perform that action at this time.
0 commit comments