Comments (6)
Nice. I wonder if we should create the new phpunit* files in addition to the existing ones, so the existing ones can still be run separately. Or maybe the container phpunit* files, being an integration, should be moved up to tests/ and run from there, to include the actual unit tests. Then test-runners can get the full gamut of tests.
Thanks for working on this @Beanow, please comment more as you continue working.
from aura.router.
The idea for moving the tests up one level was primarily so we only need one copy of all the vendor packages. If we can build the existing tests to use the same vendor folder we can have the best of both.
Another option is to have variations only on the phpunit.xml
files and set them specifically as a phpunit parameter.
I do think that for TDD it makes sense to always run both tests, checking for unexpected side-effects is precisely one of the great benefits of automated tests in my experience. I'll have a look none the less.
from aura.router.
I've implemented the multiple phpunit.xml
variation and made a more flexible phpunit.sh
script accepting several commonly used options.
$ tests/phpunit.sh -h
Usage: phpunit.sh [-hcdsp] [SUITE]...
Run the PHPUnit tests defined by the given suite.
By default the suite is '.', which runs all suites.
-h Display this help and exit.
-d Deploy the vendor package using composer.
-s Supress PHPUnit status code, always returning 0.
-p Preparations only, this skips the actual testing.
Useful for doing a one-time deployment with -d for example.
-c type[=path] Generate code coverage reports.
Type indicated the type of reports, based on phpunit functionality.
The optional path indicates where to store the report.
Examples scenarios:
phpunit.sh -dc html=coverage.html
Deploy the vendor package and generate a code coverage report in HTML format.
phpunit.sh -c text unit
Run the unit test suite only and report code coverage in TEXT format.
phpunit.sh -dp
Deploy vendor package only and skip testing.
My library now has 3 test suites you could run.
.
which maps totests/phpunit.xml
which runs both the unit and container tests.unit
which maps totests/unit/phpunit.xml
.container
which maps totests/container/phpunit.xml
.
Please note your current working directory when running the script matters.
You should always cd tests
before executing. As in the .travis.yml
file.
from aura.router.
This script is working well for us. Feel free to help yourself to a copy.
Perhaps you may decide to remove edge cases like the status code suppression.
from aura.router.
@Beanow please see #72 . Feedback welcome :) . Discussion over google group https://groups.google.com/d/msg/auraphp/Dcxoigi13ss/HEjP3iJ_Wc8J
from aura.router.
For the record I have not forgotten this. I am working on a revised testing structure that, while it is not exactly what I like best, will cover this and perhaps other cases. Thanks for your continued patience.
from aura.router.
Related Issues (20)
- Map does not have method 'setDefault' HOT 1
- The 'Aura\Router\Rule\AbstractRuleTest' class not found HOT 3
- Unable to generate URL with port number HOT 2
- Basepath concatenation could be improved HOT 3
- [Question] Benchmark HOT 1
- Route.php @property-read array $accept
- Feature Request: Generator.. what data values don't get substituted? HOT 1
- Custom Placeholder Token Matching on optional token
- Can't use $ to match the end of the string HOT 3
- Route Failure - Path Rule HOT 1
- What's the name paramter for , when defining routes? HOT 1
- Route::clone HOT 4
- zendframework/zend-diactoros abandoned, replacement. HOT 1
- Auth Routing
- Routing Error HOT 5
- Pagination Route not accepeted HOT 3
- More explanation HOT 1
- psr/log dependency is outdated HOT 3
- Abandoned or still active ? HOT 3
- Remove hold folder HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aura.router.