iakio / phpunit-growlprinter
PHPUnit Growl(GNTP) Printer
0.6.0
2015-12-05 07:40 UTC
Requires
- php: >=5.3.3
- iakio/gntp-notify: ~0.3
Requires (Dev)
- phpunit/phpunit: >=4.6,<5.2
This package is not auto-updated.
Last update: 2024-12-18 14:26:59 UTC
README
Requirements
- PHP >= 5.3
- phpunit >= 4.8.*,<5.5
Usage
PHAR
-
Download phpunit-growlprinter.phar from here.
-
Create new bootstrap file.
<?php // bootstrap_growl.php require_once "phpunit-growlprinter.phar"; // Put your own bootstrap file here // require_once "bootstrap.php";
- Run
$ phpunit --bootstrap=bootstrap_growl.php --printer=iakio\\phpunit\\GrowlPrinter
Composer
- Install
$ php composer.phar require --dev iakio/phpunit-growlprinter:*
- Specify printerClass in your phpunit.xml,
<phpunit printerClass="iakio\phpunit\GrowlPrinter" printerFile="vendor/iakio/phpunit-growlprinter/src/iakio/phpunit/GrowlPrinter.php"> ... </phpunit>
or commandline.
$ phpunit --printer=iakio\\phpunit\\GrowlPrinter
Tips
If you want to use remote PHPUnit with local Growl, Use portforwarding:
$ ssh -R:23053:localhost:23053 myremotehost
or, override GrowlPrinter
class.
<?php // src/MyGrowlPrinter.php namespace app; use iakio\GntpNotify\GNTP; use iakio\GntpNotify\IO; use iakio\phpunit\GrowlPrinter; class MyGrowlPrinter extends GrowlPrinter { protected function createGrowl() { return new GNTP(new IO("10.0.2.2", 23053)); } }
<phpunit printerClass="app\MyGrowlPrinter" printerFile="src/MyGrowlPrinter.php"> ... </phpunit>