Skip to content

Commit f7e727d

Browse files
ademarcolstrojny
authored andcommitted
Make sure latest version works on both PHP 5.6 and 7 (#42)
* Remove PHP 7 dependency. * Fix dependencies. * Revert "PHPUnit 6" This reverts commit 6c01f56. * Fix Composer versions and revert commit. * Fix PHPUnit version. * Fix fatal error tests for both PHP 7 and 5.6. * Revert "Revert "PHPUnit 6"" This reverts commit 05d95cf. * Fix tests. * Revert "Fix tests." This reverts commit 5dda0a9. * Revert "Revert "Revert "PHPUnit 6""" This reverts commit 072b6bb. * Revert "Revert "Revert "Revert "PHPUnit 6"""" This reverts commit 62230ac. * Revert "Revert "Fix tests."" This reverts commit c0a5a04. * Allow both PHPUnit 5 and 6. * Restore tests for PHP7 and fix dev dependencies. * Update HttpMockMultiPHPUnitIntegrationTest.php
1 parent 21b28ef commit f7e727d

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
language: php
22

33
php:
4+
- 5.6
45
- 7.0
56
- 7.1
67
- 7.2
7-
- nightly
8-
- hhvm
9-
10-
matrix:
11-
allow_failures:
12-
- php: hhvm
138

149
before_script:
1510
- composer install

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
}
1414
],
1515
"require": {
16-
"php": "~7",
1716
"silex/silex": "~2.0",
1817
"guzzle/guzzle": "*",
1918
"symfony/process": "~3",
2019
"jeremeamia/superclosure": "~2",
2120
"lstrojny/hmmmath": ">=0.5.0"
2221
},
2322
"require-dev": {
24-
"internations/kodierungsregelwerksammlung": "0.24.1",
23+
"internations/kodierungsregelwerksammlung": "~0.23.0",
2524
"internations/testing-component": "1.0.1",
26-
"phpunit/phpunit": "6.0"
25+
"phpunit/phpunit": "^5.7|^6",
26+
"phpunit/phpunit-mock-objects": "^3|^4"
2727
},
2828
"autoload": {
2929
"psr-4": {"InterNations\\Component\\HttpMock\\": "src/"}

tests/PHPUnit/HttpMockMultiPHPUnitIntegrationTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
use InterNations\Component\Testing\AbstractTestCase;
55
use InterNations\Component\HttpMock\PHPUnit\HttpMockTrait;
6-
use PHPUnit\Framework\ExpectationFailedException;
76
use Symfony\Component\HttpFoundation\Response;
87
use PHPUnit\Framework\TestCase;
98

@@ -103,7 +102,7 @@ public function testErrorLogOutput()
103102
try {
104103
$this->tearDown();
105104
$this->fail('Exception expected');
106-
} catch (ExpectationFailedException $e) {
105+
} catch (\Exception $e) {
107106
$this->assertContains('HTTP mock server standard error output should be empty', $e->getMessage());
108107
}
109108
}

tests/PHPUnit/HttpMockPHPUnitIntegrationTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
use InterNations\Component\HttpMock\PHPUnit\HttpMockTrait;
55
use InterNations\Component\Testing\AbstractTestCase;
6-
use PHPUnit\Framework\ExpectationFailedException;
76
use Symfony\Component\HttpFoundation\Request;
87
use Symfony\Component\HttpFoundation\Response;
98
use PHPUnit\Framework\TestCase;
@@ -103,7 +102,7 @@ public function testErrorLogOutput()
103102
try {
104103
$this->tearDown();
105104
$this->fail('Exception expected');
106-
} catch (ExpectationFailedException $e) {
105+
} catch (\Exception $e) {
107106
$this->assertContains('HTTP mock server standard error output should be empty', $e->getMessage());
108107
}
109108
}

0 commit comments

Comments
 (0)