Skip to content

Commit 6589f6b

Browse files
committed
Add make command for updating tests with new standards
1 parent 7b2a65f commit 6589f6b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ test-fix: vendor
1414
vendor: composer.json
1515
composer update
1616
touch -c vendor
17+
18+
update-tests-to-latest-standards: vendor
19+
./bin/update-tests-to-latest-standards

bin/update-tests-to-latest-standards

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
set +e
4+
5+
cp -R tests/input/ tests/updated/
6+
vendor/bin/phpcbf tests/updated
7+
8+
rm -rf tests/fixed
9+
mv tests/updated tests/fixed
10+
11+
# shellcheck disable=SC2046
12+
vendor/bin/phpcs $(find tests/input/* | sort) --report=summary --report-file=updated-report.txt
13+
mv updated-report.txt tests/expected_report.txt

0 commit comments

Comments
 (0)