File tree 6 files changed +17
-29
lines changed
6 files changed +17
-29
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
- All notable changes to ` phpunitrunfailed ` will be documented in this file
3
+ All notable changes to ` phpunit-failed-runner ` will be documented in this file
4
4
5
- ## 1.0.0 - 201X-XX-XX
5
+ ## 1.0.0 - 2021-07-18
6
6
7
- - initial release
7
+ - Initial release
Original file line number Diff line number Diff line change 1
- # Very short description of the package
1
+ # Run Only Your Failed Tests
2
2
3
3
[ ![ Latest Version on Packagist] ( https://img.shields.io/packagist/v/chrisdicarl/phpunit-failed-runner.svg?style=flat-square )] ( https://packagist.org/packages/chrisdicarl/phpunit-failed-runner )
4
4
[ ![ Total Downloads] ( https://img.shields.io/packagist/dt/chrisdicarl/phpunit-failed-runner.svg?style=flat-square )] ( https://packagist.org/packages/chrisdicarl/phpunit-failed-runner )
@@ -11,7 +11,7 @@ Small package that allows you to run only your previously failed tests.
11
11
You can install the package via composer:
12
12
13
13
``` bash
14
- composer require chrisdicarl/phpunit-failed-runner
14
+ composer require chrisdicarl/phpunit-failed-runner --dev
15
15
```
16
16
17
17
## Configuration
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " chrisdicarlo/phpunit-failed-runner" ,
3
- "description" : " Run only your failed Phpunit tests" ,
3
+ "description" : " Run only your failed PHPUnit tests" ,
4
4
"keywords" : [
5
5
" chrisdicarlo" ,
6
6
" phpunit-failed-runner" ,
Original file line number Diff line number Diff line change 7
7
</xsl : template >
8
8
9
9
<xsl : template match =" tests" >
10
- <xsl : apply-templates select =" ./test[@status = '3']" />
10
+ <xsl : apply-templates select =" ./test[@status = '3']" />
11
11
</xsl : template >
12
12
13
13
<xsl : template match =" test" >
14
- <xsl : choose >
15
- <xsl : when test =" @status = 3" >
16
- <xsl : value-of select =" @methodName" />
17
- <xsl : if test =" position() != last()" >
18
- <xsl : text >,</xsl : text >
19
- </xsl : if >
20
- </xsl : when >
21
- <xsl : otherwise />
22
- </xsl : choose >
14
+ <xsl : value-of select =" @methodName" />
15
+ <xsl : if test =" position() != last()" >
16
+ <xsl : text >|</xsl : text >
17
+ </xsl : if >
23
18
</xsl : template >
24
19
</xsl : stylesheet >
Original file line number Diff line number Diff line change 2
2
3
3
logfile=./testdox.xml
4
4
if test -f " $logfile " ; then
5
- echo " Logfile found. Filter for failed..."
6
- failed_tests=" $( xmlstarlet tr --omit-decl ./vendor/chrisdicarlo/phpunit-failed-runner/failed-tests.xsl testdox.xml | sed s/ \, / \| /g ) "
5
+ echo " Logfile found. Searching for failed tests ..."
6
+ failed_tests=" $( xmlstarlet tr --omit-decl ./vendor/chrisdicarlo/phpunit-failed-runner/failed-tests.xsl testdox.xml) "
7
7
8
8
if [ " $failed_tests " = " " ]; then
9
- echo " No failed tests! Great job!"
9
+ echo " No failed tests! Great job!"
10
+ rm ./testdox.xml
10
11
else
11
12
./vendor/bin/phpunit --filter " '$failed_tests '"
12
13
fi
13
14
14
15
else
15
- echo " Logfile not found. Running the full test suite..."
16
- . /phpunit
16
+ echo " Logfile not found. Running the full test suite..."
17
+ ./vendor/bin /phpunit
17
18
fi
18
19
19
20
exit 0
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments