Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit f9e900b

Browse files
author
David Mathews
authored
Merge pull request #26 from spinen/feature/support5.3
Feature/support5.3
2 parents edff6a9 + 61fe806 commit f9e900b

File tree

3 files changed

+30
-12
lines changed

3 files changed

+30
-12
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ env:
1212
- setup=basic
1313

1414
matrix:
15-
allow_failures:
16-
- php: 7.0
1715
include:
18-
- php: 5.5.9
16+
- php: 5.6
1917
env: setup=lowest
20-
- php: 5.5.9
18+
- php: 5.6
2119
env: setup=stable
2220

2321
sudo: false

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
],
1818
"require": {
1919
"php": ">=5.5.0",
20-
"illuminate/support": "~5.1.10|5.2.*",
20+
"illuminate/support": "~5.1.10|5.2.*|5.3.*",
2121
"swiftmailer/swiftmailer": "~5.1"
2222
},
2323
"require-dev": {
24-
"mockery/mockery": "~0.9.1",
25-
"phpunit/phpunit": "~4.0",
26-
"psy/psysh": "~0.5.1",
27-
"satooshi/php-coveralls": "~0.6.1",
28-
"symfony/var-dumper": "~2.7|3.0.*"
24+
"mockery/mockery": "^0.9.1",
25+
"phpunit/phpunit": "~4.0|~5.0",
26+
"psy/psysh": "^0.5.1",
27+
"satooshi/php-coveralls": "^0.6.1",
28+
"symfony/var-dumper": "~2.7|~3.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

tests/MailRecorderTest.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
namespace Spinen\MailAssertions;
44

55
use Mockery;
6+
use PHPUnit_Framework_Error;
67
use PHPUnit_Framework_TestCase;
78
use StdClass;
89
use Swift_Events_SendEvent;
10+
use TypeError;
911

1012
/**
1113
* Class MailRecorderTest
@@ -32,7 +34,16 @@ public function it_can_be_constructed()
3234
*/
3335
public function it_cannot_be_constructed_without_a_PHPUnit_Framework_TestCase()
3436
{
35-
new MailRecorder();
37+
if (class_exists(TypeError::class)) {
38+
try {
39+
new MailRecorder();
40+
} catch (TypeError $e) {
41+
throw new PHPUnit_Framework_Error('Argument 1 passed to method must be an array, but not', 0,
42+
$e->getFile(), $e->getLine());
43+
}
44+
} else {
45+
new MailRecorder();
46+
}
3647
}
3748

3849
/**
@@ -42,7 +53,16 @@ public function it_cannot_be_constructed_without_a_PHPUnit_Framework_TestCase()
4253
*/
4354
public function it_cannot_be_constructed_with_class_other_than_a_PHPUnit_Framework_TestCase()
4455
{
45-
new MailRecorder(new StdClass());
56+
if (class_exists(TypeError::class)) {
57+
try {
58+
new MailRecorder(new StdClass());
59+
} catch (TypeError $e) {
60+
throw new PHPUnit_Framework_Error('Argument 1 passed to method must be an array, but not', 0,
61+
$e->getFile(), $e->getLine());
62+
}
63+
} else {
64+
new MailRecorder(new StdClass());
65+
}
4666
}
4767

4868
/**

0 commit comments

Comments
 (0)