File: 0004-Workaround-autload-issue-during-tests.patch

package info (click to toggle)
php-zeta-base 1.9.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,040 kB
  • sloc: php: 2,733; makefile: 9
file content (32 lines) | stat: -rw-r--r-- 1,074 bytes parent folder | download | duplicates (4)
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
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Mon, 18 Feb 2019 11:10:54 -1000
Subject: Workaround autload issue during tests
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

It’s related to ezc_autoload, PHPUnit blacklist, that php-invoker and
composer are not installed by default and maybe the homemade autoload.

Bug-PHPUnit: https://github.com/sebastianbergmann/phpunit/issues/1598
Forwarded: not-needed
---
 tests/bootstrap.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index bd9994e..6fb5270 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -15,7 +15,10 @@ EOT
 
 function ezc_autoload( $className )
 {
-    if ( strpos( $className, '_' ) === false )
+    if ( strpos( $className, '_' ) === false &&
+         strpos( $className, 'Composer' ) === false &&
+         strpos( $className, 'Invoker' ) === false &&
+         strpos( $className, 'Symfony' ) === false )
     {
         ezcBase::autoload( $className );
     }