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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
From 94a0f8bffb1f6832fe97e4c9c67c4852fe55e2a3 Mon Sep 17 00:00:00 2001
From: Christian Schmidt <cs@blackwoodseven.com>
Date: Thu, 25 Jun 2015 21:43:00 +0200
Subject: [PATCH] Do not assume that require_once returns an object
---
composer.json | 5 +++++
tests/bootstrap.php | 3 +--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/composer.json b/composer.json
index a7b5e44..0549006 100644
--- a/composer.json
+++ b/composer.json
@@ -23,6 +23,11 @@
"autoload": {
"files": ["lib/swift_required.php"]
},
+ "autoload-dev": {
+ "psr-0": {
+ "Swift_": "tests/unit"
+ }
+ },
"extra": {
"branch-alias": {
"dev-master": "5.4-dev"
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 9b169b3..55538bb 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,7 +1,6 @@
<?php
-$autoloader = require_once dirname(__DIR__).'/vendor/autoload.php';
-$autoloader->add('Swift_', __DIR__.'/unit');
+require_once dirname(__DIR__).'/vendor/autoload.php';
set_include_path(get_include_path().PATH_SEPARATOR.dirname(__DIR__).'/lib');
From 5174336501b554dce18f304af74c4440d4b78c9d Mon Sep 17 00:00:00 2001
From: Hugo Hamon <hugo.hamon@sensiolabs.com>
Date: Sun, 23 Aug 2015 12:09:17 +0200
Subject: [PATCH] Added PHP 5.6, PHP 7 and HHVM to the build matrix.
---
.travis.yml | 22 +++++++++++-----------
phpunit.xml.dist | 2 +-
tests/bootstrap.php | 5 ++++-
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 2420586..0d3e698 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -32,6 +32,6 @@
</testsuites>
<listeners>
- <listener class="\Mockery\Adapter\Phpunit\TestListener"></listener>
+ <listener class="Mockery\Adapter\Phpunit\TestListener"/>
</listeners>
</phpunit>
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 55538bb..34f56b5 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -2,9 +2,12 @@
require_once dirname(__DIR__).'/vendor/autoload.php';
+// Disable garbage collector to prevent segfaults
+gc_disable();
+
set_include_path(get_include_path().PATH_SEPARATOR.dirname(__DIR__).'/lib');
-\Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
+Mockery::getConfiguration()->allowMockingNonExistentMethods(false);
if (is_file(__DIR__.'/acceptance.conf.php')) {
require_once __DIR__.'/acceptance.conf.php';
|