remi-san / ouroboros
There is no license information available for the latest version (v0.1.1) of this package.
A lib to ease e2e testing.
v0.1.1
2017-04-21 12:16 UTC
Requires
- beberlei/assert: ^2.7
- psr/log: ^1.0
- symfony/process: ^2.8|^3.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.2
- fzaninotto/faker: ^1.6
- mockery/mockery: ^0.9.9
- monolog/monolog: ^1.22
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ^2.8
This package is auto-updated.
Last update: 2024-10-21 23:16:36 UTC
README
"εν το παν"
Ouroboros
is a simple library letting you creating end to end (e2e) tests
with your favorite PHP test framework. Like the snake eating its own tail
it's inspired from, Ouroboros lib will let you easily create, destroy the
app to test and do it all over again for each test.
How to use it?
Initialize your TestHelper
$this->testHelper = new TestHelper( new MakefileInfrastructureHelper($appBasePath), // or any other infra helper new CommandLauncherApplicationHelper($appBasePath, 'make run'), // or any other app helper new LoggerConditionWaiter( // if you want to follow a logfile for completion condition $logFile, new TextConditionMatcherFactory( [ self::CONDITION_ONE => 'This is my first condition', self::CONDITION_TWO => 'This is my second condition', ] ), $logger, 5 ) );
Use it in your test file (here with phpunit
)
/** * Init. */ public function setUp() { $this->testHelper->setUp(); } /** * Close. */ public function tearDown() { $this->testHelper->tearDown(); } /** * @test */ public function itShouldWaitForAllConditionsAndSucceed() { $this->testHelper->wait([self::CONDITION_ONE, self::CONDITION_TWO]); }