From 0c8c81521b77bda76830ceef800daba0f63aa64e Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Mon, 21 Aug 2023 10:59:01 -0400 Subject: [PATCH 1/2] Update tests to set bool options with false like getopt --- tests/GitWorkflowTest.php | 70 +++++++++++++++++++-------------------- tests/SvnWorkflowTest.php | 56 +++++++++++++++---------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/tests/GitWorkflowTest.php b/tests/GitWorkflowTest.php index 6e98cc3..01a06c0 100644 --- a/tests/GitWorkflowTest.php +++ b/tests/GitWorkflowTest.php @@ -27,7 +27,7 @@ public function setUp(): void { public function testFullGitWorkflowForOneFileStaged() { $gitFile = 'foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-staged' => 1, 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-staged' => false, 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -48,8 +48,8 @@ public function testFullGitWorkflowForOneFileStagedWithReplacedGit() { $gitFile = 'foobar.php'; $gitPath = 'bin/foo/git'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-staged' => 1, + 'no-cache-git-root' => false, + 'git-staged' => false, 'files' => [$gitFile], 'git-path' => $gitPath, ]); @@ -73,8 +73,8 @@ public function testFullGitWorkflowForOneFileStagedWithReplacedPhpcs() { $gitFile = 'foobar.php'; $phpcsPath = 'bin/foo/phpcs'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-staged' => 1, + 'no-cache-git-root' => false, + 'git-staged' => false, 'files' => [$gitFile], 'phpcs-path' => $phpcsPath, ]); @@ -98,8 +98,8 @@ public function testFullGitWorkflowForOneFileStagedWithVendorDefaultPhpcs() { $gitFile = 'foobar.php'; $phpcsPath = 'vendor/bin/phpcs'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-staged' => 1, + 'no-cache-git-root' => false, + 'git-staged' => false, 'files' => [$gitFile], ]); $shell = new TestShell($options, [$gitFile]); @@ -122,10 +122,10 @@ public function testFullGitWorkflowForOneFileStagedWithNoVendorDefaultPhpcs() { $gitFile = 'foobar.php'; $phpcsPath = 'vendor/bin/phpcs'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-staged' => 1, + 'no-cache-git-root' => false, // getopt is weird and sets options to false + 'git-staged' => false, // getopt is weird and sets options to false 'files' => [$gitFile], - 'no-vendor-phpcs' => true, + 'no-vendor-phpcs' => false, // getopt is weird and sets options to false ]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); @@ -146,7 +146,7 @@ public function testFullGitWorkflowForOneFileStagedWithNoVendorDefaultPhpcs() { public function testFullGitWorkflowForOneFileUnstaged() { $gitFile = 'foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-unstaged' => '1', 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-unstaged' => false, 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -166,8 +166,8 @@ public function testFullGitWorkflowForOneFileUnstaged() { public function testFullGitWorkflowForOneChangedFileWithoutPhpcsMessagesLintsOnlyNewFile() { $gitFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-unstaged' => '1', + 'no-cache-git-root' => false, + 'git-unstaged' => false, 'files' => [$gitFile], ]); $shell = new TestShell($options, [$gitFile]); @@ -190,8 +190,8 @@ public function testFullGitWorkflowForOneChangedFileWithoutPhpcsMessagesLintsOnl public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCache() { $gitFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-unstaged' => '1', + 'no-cache-git-root' => false, + 'git-unstaged' => false, 'cache' => false, // getopt is weird and sets options to false 'files' => [$gitFile], ]); @@ -222,8 +222,8 @@ public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCache() { public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCacheWithSeveritySet() { $gitFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-unstaged' => '1', + 'no-cache-git-root' => false, + 'git-unstaged' => false, 'cache' => false, // getopt is weird and sets options to false 'standard' => 'standard', 'warning-severity' => '1', @@ -262,8 +262,8 @@ public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCacheWith public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCacheWithSeveritySetToZero() { $gitFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-unstaged' => '1', + 'no-cache-git-root' => false, + 'git-unstaged' => false, 'cache' => false, // getopt is weird and sets options to false 'standard' => 'standard', 'warning-severity' => '0', @@ -304,8 +304,8 @@ public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCacheWith public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCacheWithSeverityNotSet() { $gitFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-unstaged' => '1', + 'no-cache-git-root' => false, + 'git-unstaged' => false, 'cache' => false, // getopt is weird and sets options to false 'standard' => 'standard', 'files' => [$gitFile], @@ -344,8 +344,8 @@ public function testFullGitWorkflowForOneFileUnstagedCachesDataThenUsesCacheWith public function testFullGitWorkflowForOneFileUnstagedCachesDataThenClearsOldCacheWhenOldFileChanges() { $gitFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-unstaged' => '1', + 'no-cache-git-root' => false, + 'git-unstaged' => false, 'cache' => false, // getopt is weird and sets options to false 'files' => [$gitFile], ]); @@ -378,8 +378,8 @@ public function testFullGitWorkflowForOneFileUnstagedCachesDataThenClearsOldCach public function testFullGitWorkflowForOneFileUnstagedCachesDataThenClearsNewCacheWhenFileChanges() { $gitFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'no-cache-git-root' => 1, - 'git-unstaged' => '1', + 'no-cache-git-root' => false, + 'git-unstaged' => false, 'cache' => false, // getopt is weird and sets options to false 'files' => [$gitFile], ]); @@ -411,7 +411,7 @@ public function testFullGitWorkflowForOneFileUnstagedCachesDataThenClearsNewCach public function testFullGitWorkflowForMultipleFilesStaged() { $gitFiles = ['foobar.php', 'baz.php']; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-staged' => 1, 'files' => $gitFiles]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-staged' => false, 'files' => $gitFiles]); $shell = new TestShell($options, $gitFiles); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -439,7 +439,7 @@ public function testFullGitWorkflowForMultipleFilesStaged() { public function testFullGitWorkflowForUnchangedFileWithPhpcsMessages() { $gitFile = 'foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-staged' => 1, 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-staged' => false, 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -458,7 +458,7 @@ public function testFullGitWorkflowForUnchangedFileWithPhpcsMessages() { public function testFullGitWorkflowForUnchangedFileWithoutPhpcsMessages() { $gitFile = 'foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-staged' => 1, 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-staged' => false, 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -476,7 +476,7 @@ public function testFullGitWorkflowForUnchangedFileWithoutPhpcsMessages() { public function testFullGitWorkflowForNonGitFile() { $this->expectException(ShellException::class); $gitFile = 'foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-staged' => 1, 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-staged' => false, 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -493,7 +493,7 @@ public function testFullGitWorkflowForNonGitFile() { public function testFullGitWorkflowForNewFile() { $gitFile = 'foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-staged' => 1, 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-staged' => false, 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -511,7 +511,7 @@ public function testFullGitWorkflowForNewFile() { public function testFullGitWorkflowForEmptyNewFile() { $gitFile = 'foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-staged' => 1, 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-staged' => false, 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -534,7 +534,7 @@ public function testFullGitWorkflowForEmptyNewFile() { public function testFullGitWorkflowForInterBranchDiff() { $gitFile = 'bin/foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-base' => 'master', 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-base' => 'master', 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -557,7 +557,7 @@ public function testFullGitWorkflowForInterBranchDiff() { public function testFullGitWorkflowForUnchangedFileForInterBranchDiff() { $gitFile = 'bin/foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-base' => 'master', 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-base' => 'master', 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -578,7 +578,7 @@ public function testFullGitWorkflowForUnchangedFileForInterBranchDiff() { public function testFullGitWorkflowWithUntrackedFileForInterBranchDiff() { $gitFile = 'bin/foobar.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-base' => 'master', 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-base' => 'master', 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); @@ -601,7 +601,7 @@ public function testFullGitWorkflowWithUntrackedFileForInterBranchDiff() { public function testNameDetectionInFullGitWorkflowForInterBranchDiff() { $gitFile = 'test.php'; - $options = CliOptions::fromArray(['no-cache-git-root' => 1, 'git-base' => 'master', 'files' => [$gitFile]]); + $options = CliOptions::fromArray(['no-cache-git-root' => false, 'git-base' => 'master', 'files' => [$gitFile]]); $shell = new TestShell($options, [$gitFile]); $shell->registerExecutable('git'); $shell->registerExecutable('phpcs'); diff --git a/tests/SvnWorkflowTest.php b/tests/SvnWorkflowTest.php index 36260ed..82c0f73 100644 --- a/tests/SvnWorkflowTest.php +++ b/tests/SvnWorkflowTest.php @@ -28,7 +28,7 @@ public function setUp(): void { public function testFullSvnWorkflowForOneFile() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -48,7 +48,7 @@ public function testFullSvnWorkflowForOneFileWithReplacedSvn() { $svnFile = 'foobar.php'; $svnPath = 'bin/foo/svn'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], 'svn-path' => $svnPath, ]); @@ -69,7 +69,7 @@ public function testFullSvnWorkflowForOneFileWithReplacedCat() { $svnFile = 'foobar.php'; $catPath = 'bin/foo/cat'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], 'cat-path' => $catPath, ]); @@ -90,7 +90,7 @@ public function testFullSvnWorkflowForOneFileWithReplacedPhpcs() { $svnFile = 'foobar.php'; $phpcsPath = 'bin/foo/phpcs'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], 'phpcs-path' => $phpcsPath, ]); @@ -111,7 +111,7 @@ public function testFullSvnWorkflowForOneFileWithVendorDefaultPhpcs() { $svnFile = 'foobar.php'; $phpcsPath = 'vendor/bin/phpcs'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -131,9 +131,9 @@ public function testFullSvnWorkflowForOneFileWithNoVendorDefaultPhpcs() { $svnFile = 'foobar.php'; $phpcsPath = 'vendor/bin/phpcs'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], - 'no-vendor-phpcs' => true, + 'no-vendor-phpcs' => false, // getopt is weird and sets options to false ]); $shell = new TestShell($options, [$svnFile]); $shell->registerExecutable('svn'); @@ -152,7 +152,7 @@ public function testFullSvnWorkflowForOneFileWithNoVendorDefaultPhpcs() { public function testFullSvnWorkflowForOneFileWithNoMessages() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -171,7 +171,7 @@ public function testFullSvnWorkflowForOneFileWithNoMessages() { public function testFullSvnWorkflowForOneFileWithCachingEnabledButNoCache() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -191,7 +191,7 @@ public function testFullSvnWorkflowForOneFileWithCachingEnabledButNoCache() { public function testFullSvnWorkflowForOneFileWithOldFileCached() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -214,7 +214,7 @@ public function testFullSvnWorkflowForOneFileWithOldFileCached() { public function testFullSvnWorkflowForOneFileUncachedThenCachesBothVersionsOfTheFile() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -244,7 +244,7 @@ public function testFullSvnWorkflowForOneFileUncachedThenCachesBothVersionsOfThe public function testFullSvnWorkflowForOneDoesNotUseNewFileCacheWhenHashChanges() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -285,7 +285,7 @@ public function testFullSvnWorkflowForOneDoesNotUseNewFileCacheWhenHashChanges() public function testFullSvnWorkflowForOneClearsCacheForFileWhenHashChanges() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -334,7 +334,7 @@ public function testFullSvnWorkflowForOneClearsCacheForFileWhenHashChanges() { public function testFullSvnWorkflowForOneDoesNotClearCacheWhenStandardChanges() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -384,7 +384,7 @@ public function testFullSvnWorkflowForOneDoesNotClearCacheWhenStandardChanges() public function testFullSvnWorkflowForOneFileUncachedWhenCachingIsDisabled() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'no-cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -408,7 +408,7 @@ public function testFullSvnWorkflowForOneFileUncachedWhenCachingIsDisabled() { public function testFullSvnWorkflowForOneFileWithOldCacheVersion() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -433,7 +433,7 @@ public function testFullSvnWorkflowForOneFileWithOldCacheVersion() { public function testFullSvnWorkflowForOneFileWithCacheThatHasDifferentStandard() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'standard' => 'TestStandard1', 'files' => [$svnFile], @@ -460,7 +460,7 @@ public function testFullSvnWorkflowForOneFileWithCacheThatHasDifferentStandard() public function testFullSvnWorkflowForOneFileWithCacheOfOldFileVersionDoesNotUseCache() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -491,7 +491,7 @@ public function testFullSvnWorkflowForOneFileWithCacheOfOldFileVersionDoesNotUse public function testFullSvnWorkflowForUnchangedFileWithBothFilesCached() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -515,7 +515,7 @@ public function testFullSvnWorkflowForUnchangedFileWithBothFilesCached() { public function testFullSvnWorkflowForUnchangedFileWithOldFileCached() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'cache' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); @@ -538,7 +538,7 @@ public function testFullSvnWorkflowForUnchangedFileWithOldFileCached() { public function testFullSvnWorkflowForMultipleFiles() { $svnFiles = ['foobar.php', 'baz.php']; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => $svnFiles, ]); $shell = new TestShell($options, $svnFiles); @@ -566,7 +566,7 @@ public function testFullSvnWorkflowForMultipleFiles() { public function testFullSvnWorkflowForUnchangedFileWithPhpCsMessages() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -585,7 +585,7 @@ public function testFullSvnWorkflowForUnchangedFileWithPhpCsMessages() { public function testFullSvnWorkflowForUnchangedFileWithoutPhpCsMessages() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -604,7 +604,7 @@ public function testFullSvnWorkflowForUnchangedFileWithoutPhpCsMessages() { public function testFullSvnWorkflowForChangedFileWithoutPhpCsMessagesLintsOnlyNewFile() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -625,7 +625,7 @@ public function testFullSvnWorkflowForNonSvnFile() { $this->expectException(ShellException::class); $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -642,7 +642,7 @@ public function testFullSvnWorkflowForNonSvnFile() { public function testFullSvnWorkflowForNewFile() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -660,7 +660,7 @@ public function testFullSvnWorkflowForNewFile() { public function testFullSvnWorkflowForEmptyNewFile() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'files' => [$svnFile], ]); $shell = new TestShell($options, [$svnFile]); @@ -682,7 +682,7 @@ public function testFullSvnWorkflowForEmptyNewFile() { public function testFullSvnWorkflowForOneFileWithSeveritySetToZero() { $svnFile = 'foobar.php'; $options = CliOptions::fromArray([ - 'svn' => true, + 'svn' => false, // getopt is weird and sets options to false 'warning-severity' => '0', 'error-severity' => '0', 'cache' => false, // getopt is weird and sets options to false From 62e97a4cf5ec0a4d05b37472e5343f190d6b94ff Mon Sep 17 00:00:00 2001 From: Payton Swick Date: Mon, 21 Aug 2023 10:59:32 -0400 Subject: [PATCH 2/2] Fix no-vendor-phpcs --- PhpcsChanged/CliOptions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhpcsChanged/CliOptions.php b/PhpcsChanged/CliOptions.php index 19d0f77..a3bb12d 100644 --- a/PhpcsChanged/CliOptions.php +++ b/PhpcsChanged/CliOptions.php @@ -173,7 +173,7 @@ public static function fromArray(array $options): self { $cliOptions->files = $options['files']; } if (isset($options['no-vendor-phpcs'])) { - $cliOptions->noVendorPhpcs = $options['no-vendor-phpcs']; + $cliOptions->noVendorPhpcs = true; } if (isset($options['phpcs-path'])) { $cliOptions->phpcsPath = $options['phpcs-path'];