webforge / testplate
This package is abandoned and no longer maintained.
No replacement package was suggested.
Testplate for webforge for base testcases
1.6.0
2017-11-14 21:49 UTC
Requires
Requires (Dev)
- liip/rmt: 0.9.*
- pscheit/psc-cms: dev-master
- webforge/dom: *
- webforge/translation: dev-master
Suggests
- guzzle/guzzle: Needed for the GuzzleTester
- mockery/mockery: Better replacement for PHPUnits mock library
- webforge/dom: If you want to use the css() tests in your unit tests for html
Provides
None
Conflicts
None
Replaces
None
README
Testplate for webforge for base testcases
installation
Use Composer to install.
composer require -v --prefer-source webforge/testplate:dev-master
to run the tests use:
phpunit
configuration
if you want to use the getFile() or other file helpers you need to
$bootLoader->registerPackageRoot();
in your bootstrap.php. If you use registerCMSContainer this is already done.
usage (css tester)
if you install webforge/dom along testplate you can use fancy css tests (when you extend from Webforge\Code\Test\Base).
In your class implement: Webforge\Code\Test\HTMLTesting (base is already doing this, you only have to enable it)
$this->html = <<<'HTML' <div class="team"> <h1 class="active">team</h1> <div class="mitarbeiter"> imme </div> <div class="mitarbeiter"> philipp </div> </div> HTML; $this->css('div.team')->count(1) ->css('h1')->count(1)->hasClass('active')->end() ->css('div.mitarbeiter')->count(2)->end() ;
See here for a more detailed documentation