File: Use-installed-class-for-DEP-8-tests.patch

package info (click to toggle)
php-codesniffer 3.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 13,772 kB
  • sloc: php: 84,771; pascal: 10,061; xml: 6,832; javascript: 2,096; sh: 11; makefile: 4
file content (66 lines) | stat: -rw-r--r-- 2,975 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From: =?utf-8?q?David_Pr=C3=A9vot?= <david@tilapin.org>
Date: Tue, 8 Aug 2017 18:11:25 -0400
Subject: Use installed class for DEP-8 tests

---
 tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml | 4 ++--
 tests/Core/Ruleset/RuleInclusionTest.xml              | 6 +++---
 tests/bootstrap.php                                   | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml b/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml
index 2978cef..f0d2c5b 100644
--- a/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml
+++ b/tests/Core/Ruleset/RuleInclusionAbsoluteLinuxTest.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="RuleInclusionAbsoluteLinuxTest" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd">
 
-    <!-- %path_slash_forward% will be replaced on the fly -->
-    <rule ref="%path_slash_forward%/src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php">
+    <!-- path_slash_forward% will be replaced on the fly -->
+    <rule ref="/usr/share/php/PHP/CodeSniffer/src/Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php">
         <properties>
             <property name="spacing" value="10" />
         </properties>
diff --git a/tests/Core/Ruleset/RuleInclusionTest.xml b/tests/Core/Ruleset/RuleInclusionTest.xml
index 6b5c0a9..54ec8cb 100644
--- a/tests/Core/Ruleset/RuleInclusionTest.xml
+++ b/tests/Core/Ruleset/RuleInclusionTest.xml
@@ -28,20 +28,20 @@
     </rule>
 
     <!-- Sniff directory include. -->
-    <rule ref="./src/Standards/Squiz/Sniffs/Files/">
+    <rule ref="/usr/share/php/PHP/CodeSniffer/src/Standards/Squiz/Sniffs/Files/">
         <properties>
             <property name="setforsquizfilessniffs" value="true" />
         </properties>
     </rule>
 
     <!-- Sniff file include. -->
-    <rule ref="./src/Standards/Generic/Sniffs/Files/LineLengthSniff.php">
+    <rule ref="/usr/share/php/PHP/CodeSniffer/src/Standards/Generic/Sniffs/Files/LineLengthSniff.php">
         <properties>
             <property name="lineLimit" value="10" />
         </properties>
     </rule>
 
-    <rule ref="./../%path_root_dir%/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php">
+    <rule ref="/usr/share/php/PHP/CodeSniffer/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php">
         <properties>
             <property name="strict" value="false" />
         </properties>
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index e8ebdbb..8f8adea 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -38,7 +38,7 @@ if (defined('PHP_CODESNIFFER_VERBOSITY') === false) {
     define('PHP_CODESNIFFER_VERBOSITY', 0);
 }
 
-require_once __DIR__.'/../autoload.php';
+require_once __DIR__.'/autoload.php';
 
 $tokens = new \PHP_CodeSniffer\Util\Tokens();