summaryrefslogtreecommitdiffstats
path: root/0001-skip-tests-requiring-git-repository.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-01-12 08:38:18 +0100
committerRemi Collet <remi@php.net>2024-01-12 08:38:18 +0100
commitb4dd5d832e49eaf641edd5831895757ae4e80a77 (patch)
tree32acc50a9ea1785c70738a0aa77c756168c276b5 /0001-skip-tests-requiring-git-repository.patch
parent10775c2c97faf4986674db86603b3ea20e7bf4f0 (diff)
update to 3.8.1
add patch for test suite from https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/256
Diffstat (limited to '0001-skip-tests-requiring-git-repository.patch')
-rw-r--r--0001-skip-tests-requiring-git-repository.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/0001-skip-tests-requiring-git-repository.patch b/0001-skip-tests-requiring-git-repository.patch
new file mode 100644
index 0000000..d79dbd5
--- /dev/null
+++ b/0001-skip-tests-requiring-git-repository.patch
@@ -0,0 +1,41 @@
+From 472b4f7c56dd95ca4469ed5aad6d6620aa13e03e Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 12 Jan 2024 08:25:58 +0100
+Subject: [PATCH] skip tests requiring git repository
+
+---
+ tests/Core/Filters/GitModifiedTest.php | 3 +++
+ tests/Core/Filters/GitStagedTest.php | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/tests/Core/Filters/GitModifiedTest.php b/tests/Core/Filters/GitModifiedTest.php
+index 626fb6531..ca068e144 100644
+--- a/tests/Core/Filters/GitModifiedTest.php
++++ b/tests/Core/Filters/GitModifiedTest.php
+@@ -211,6 +211,9 @@ final class GitModifiedTest extends AbstractFilterTestCase
+ */
+ public function testExecAlwaysReturnsArray($cmd, $expected)
+ {
++ if (!is_dir(__DIR__ . '/../../../.git')) {
++ $this->markTestSkipped('Not a git repository');
++ }
+ $fakeDI = new RecursiveArrayIterator(self::getFakeFileList());
+ $filter = new GitModified($fakeDI, '/', self::$config, self::$ruleset);
+
+diff --git a/tests/Core/Filters/GitStagedTest.php b/tests/Core/Filters/GitStagedTest.php
+index 0009aefa7..cf5f69765 100644
+--- a/tests/Core/Filters/GitStagedTest.php
++++ b/tests/Core/Filters/GitStagedTest.php
+@@ -211,6 +211,9 @@ final class GitStagedTest extends AbstractFilterTestCase
+ */
+ public function testExecAlwaysReturnsArray($cmd, $expected)
+ {
++ if (!is_dir(__DIR__ . '/../../../.git')) {
++ $this->markTestSkipped('Not a git repository');
++ }
+ $fakeDI = new RecursiveArrayIterator(self::getFakeFileList());
+ $filter = new GitStaged($fakeDI, '/', self::$config, self::$ruleset);
+
+--
+2.43.0
+