Skip to content

Commit 0888578

Browse files
committed
Add local phpUnit and fix autoloading for test classes
1 parent 7b4039a commit 0888578

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ before_script:
1010
- composer install
1111

1212
script:
13-
- phpunit --verbose --coverage-text --coverage-clover=clover.xml --colors
13+
- vendor/bin/phpunit --verbose --coverage-text --coverage-clover=clover.xml --colors
1414

1515
after_script:
1616
- sh .travis.coverage.sh

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"beberlei/assert": "^2.4"
77
},
88
"require-dev": {
9-
"symfony/console": "~2.7|~3.0"
9+
"symfony/console": "~2.7|~3.0",
10+
"phpunit/phpunit": "^5.7"
1011
},
1112
"license": "MIT",
1213
"authors": [
@@ -23,6 +24,7 @@
2324
"psr-4": {"PhpDeal\\": "src/"}
2425
},
2526
"autoload-dev": {
26-
"psr-0": {"Demo\\": "demo/"}
27+
"psr-0": {"Demo\\": "demo/"},
28+
"psr-4": {"PhpDeal\\": "tests/"}
2729
}
2830
}

tests/bootstrap.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22

33
use PhpDeal\ContractApplication;
44

5-
if (defined("AUTOLOAD_PATH")) {
6-
if (is_file(__DIR__ . '/../' .AUTOLOAD_PATH)) {
7-
$loader = include_once __DIR__ . '/../' . AUTOLOAD_PATH;
8-
$loader->addPsr4('PhpDeal\\', __DIR__);
9-
} else {
10-
throw new InvalidArgumentException("Cannot load custom autoload file located at ".AUTOLOAD_PATH);
11-
}
12-
}
13-
145
if (!class_exists('\PHPUnit_Framework_TestCase')) {
156
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
167
}

0 commit comments

Comments
 (0)