-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
112 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/vendor | ||
/tests/_log/* | ||
/tests/_temp/* | ||
/composer.lock | ||
/composer*.lock | ||
|
||
!.gitkeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
sniffer: | ||
script: | ||
- composer install | ||
- composer update --no-interaction --prefer-source | ||
- ./vendor/bin/phpcs -p --standard=vendor/arachne/coding-style/ruleset.xml --ignore=_* src tests | ||
|
||
latest: | ||
script: | ||
- composer install | ||
- composer update --no-interaction --prefer-source | ||
- ./vendor/bin/codecept build | ||
- ./vendor/bin/codecept run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: php | ||
|
||
env: | ||
matrix: | ||
- NETTE=nette-2.3 | ||
- NETTE=nette-2.2 COMPOSER=composer-nette_2.2.json | ||
|
||
php: | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- hhvm | ||
|
||
before_install: | ||
- composer self-update | ||
|
||
install: | ||
- composer update --no-interaction --prefer-source | ||
|
||
before_script: | ||
- vendor/bin/phpcs -p --standard=vendor/arachne/coding-style/ruleset.xml --ignore=_* src tests | ||
- vendor/bin/codecept build | ||
|
||
script: vendor/bin/codecept run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"require": { | ||
"php": ">=5.4.0", | ||
"arachne/bootstrap": "~0.1", | ||
"codeception/codeception": "~2.1", | ||
"nette/bootstrap": "~2.2.0", | ||
"nette/di": "~2.2.0", | ||
"nette/http": "~2.2.0" | ||
}, | ||
"require-dev": { | ||
"php": ">=5.5.0", | ||
"arachne/coding-style": "~0.3", | ||
"enumag/application": "~0.2", | ||
"nette/nette": "~2.2", | ||
"squizlabs/php_codesniffer": "~2.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Arachne\\Codeception\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\Unit\\": "tests/unit/src", | ||
"Tests\\Integration\\": "tests/integration/src" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
How to run tests | ||
==== | ||
|
||
``` | ||
# go to the project's root directory, but NOT the tests subdirectory | ||
cd <project_dir> | ||
# install dependencies | ||
composer update | ||
# run the coding style checker and all tests | ||
sh ./tests/run.sh | ||
# fix coding style problems automatically | ||
sh ./tests/fix.sh | ||
``` | ||
|
||
Advanced usage | ||
---- | ||
|
||
You can use these commands to do more specific tasks. | ||
|
||
``` | ||
# generate necessary files to run the tests | ||
./vendor/bin/codecept build | ||
# run the unit suite | ||
./vendor/bin/codecept run unit | ||
# run the integration suite | ||
./vendor/bin/codecept run integration | ||
# run specific test | ||
./vendor/bin/codecept tests/unit/src/FooTest.php | ||
``` | ||
|
||
Testing with Nette 2.2 | ||
---- | ||
|
||
If you want to run the tests with Nette 2.2 use these commands to install the dependencies. Then run the tests normally. | ||
|
||
``` | ||
# tell composer to use different json file | ||
set COMPOSER=composer-nette_2.2.json | ||
# install dependencies | ||
composer update | ||
# reset the environment variable to normal | ||
set COMPOSER=composer.json | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
./vendor/bin/phpcs -p --standard=vendor/arachne/coding-style/ruleset.xml --ignore=_* src tests | ||
./vendor/bin/codecept build | ||
./vendor/bin/codecept run --coverage-html | ||
./vendor/bin/codecept run |