Browse Source

DX: Apply suggestions from PR 7210 (#7213)

Greg Korba 1 year ago
parent
commit
7ea6d6a3cb
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tests/AutoReview/ComposerFileTest.php

+ 3 - 3
tests/AutoReview/ComposerFileTest.php

@@ -26,15 +26,15 @@ use PHPUnit\Framework\TestCase;
  */
 final class ComposerFileTest extends TestCase
 {
-    public function testScriptAreHavingDescriptions(): void
+    public function testScriptsHaveDescriptions(): void
     {
         $composerJsonContent = file_get_contents(__DIR__.'/../../composer.json');
-        $composerJson = json_decode($composerJsonContent, true);
+        $composerJson = json_decode($composerJsonContent, true, 512, JSON_THROW_ON_ERROR);
 
         $scripts = array_keys($composerJson['scripts']);
         $descriptions = array_keys($composerJson['scripts-descriptions']);
 
         self::assertSame([], array_diff($scripts, $descriptions), 'There should be no scripts with missing description.');
-        self::assertSame([], array_diff($descriptions, $scripts), 'There should be no description for not defined script.');
+        self::assertSame([], array_diff($descriptions, $scripts), 'There should be no superfluous description for not defined scripts.');
     }
 }