Download the PHP package coccoinomane/phpunit-log without Composer
On this page you can find all versions of the php package coccoinomane/phpunit-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download coccoinomane/phpunit-log
More information about coccoinomane/phpunit-log
Files in coccoinomane/phpunit-log
Download coccoinomane/phpunit-log
More information about coccoinomane/phpunit-log
Files in coccoinomane/phpunit-log
Vendor coccoinomane
Package phpunit-log
Short Description Log from within your PHPUnit tests.
License GPL-3.0-or-later
Homepage https://github.com/coccoinomane/phpunit-log
Package phpunit-log
Short Description Log from within your PHPUnit tests.
License GPL-3.0-or-later
Homepage https://github.com/coccoinomane/phpunit-log
Please rate this library. Is it a good library?
Informations about the package phpunit-log
Defines the Loggable trait to log from within your PHPUnit tests.
Usage
- Install the package with
composer require --dev coccoinomane/phpunit-log. - Include the trait in your TestCase with
\use PHPUnitLog\Loggable;. - Start logging with
this->log( $message )orthis->print( $message ).
Features
- To log a message to screen, call
self::print( $message ). - To log a message to file, call
self::log( $message ). - The file will be named after the test class and placed in the subfolder tests/logs.
- Customize the log folder via the
logsPathenvironment variable. -
To delete the log files before each run:
- For further customizations, see the docs in
LoggableTest.
The Loggable trait is used by WordPressTestCase.
Custom folder for the logs
By default, the log files will be placed in the tests/logs folder; set the logsPath environment variable to use a different folder.
You can use both relative and absolute paths.
To set logsPath in phpunit.xml:
All versions of phpunit-log with dependencies
PHP Build Version
Package Version
No informations.
The package coccoinomane/phpunit-log contains the following files
Loading the files please wait ...