Skip to content

Commit 0adb04d

Browse files
authored
Merge pull request #215 from clue-labs/update-tests
Update test suite and report failed assertions
2 parents e5b2802 + 4b29005 commit 0adb04d

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
with:
3030
php-version: ${{ matrix.php }}
3131
coverage: xdebug
32+
ini-file: development
3233
- run: composer install
3334
- run: vendor/bin/phpunit --coverage-text
3435
if: ${{ matrix.php >= 7.3 }}

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
"email": "christian@clue.engineering"
1818
}
1919
],
20+
"require": {
21+
"php": ">=5.3"
22+
},
23+
"require-dev": {
24+
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
25+
},
26+
"suggest": {
27+
"graphp/graphviz": "GraphViz graph drawing / DOT output",
28+
"graphp/algorithms": "Common graph algorithms, such as Dijkstra and Moore-Bellman-Ford (shortest path), minimum spanning tree (MST), Kruskal, Prim and many more.."
29+
},
2030
"autoload": {
2131
"psr-4": {
2232
"Graphp\\Graph\\": "src/"
@@ -26,15 +36,5 @@
2636
"psr-4": {
2737
"Graphp\\Graph\\Tests\\": "tests/"
2838
}
29-
},
30-
"require": {
31-
"php": ">=5.3"
32-
},
33-
"require-dev": {
34-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
35-
},
36-
"suggest": {
37-
"graphp/graphviz": "GraphViz graph drawing / DOT output",
38-
"graphp/algorithms": "Common graph algorithms, such as Dijkstra and Moore-Bellman-Ford (shortest path), minimum spanning tree (MST), Kruskal, Prim and many more.."
3939
}
4040
}

phpunit.xml.dist

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.5+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
77
cacheResult="false"
88
colors="true"
@@ -19,5 +19,10 @@
1919
</coverage>
2020
<php>
2121
<ini name="error_reporting" value="-1" />
22+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
23+
<!-- <ini name="zend.assertions=1" value="1" /> -->
24+
<ini name="assert.active" value="1" />
25+
<ini name="assert.exception" value="1" />
26+
<ini name="assert.bail" value="0" />
2227
</php>
2328
</phpunit>

phpunit.xml.legacy

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,12 @@
1515
<directory>./src/</directory>
1616
</whitelist>
1717
</filter>
18+
<php>
19+
<ini name="error_reporting" value="-1" />
20+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
21+
<!-- <ini name="zend.assertions=1" value="1" /> -->
22+
<ini name="assert.active" value="1" />
23+
<ini name="assert.exception" value="1" />
24+
<ini name="assert.bail" value="0" />
25+
</php>
1826
</phpunit>

0 commit comments

Comments
 (0)