library phpunit-assert-log-entry
PHPUnit assertions for Monolog-TestHandler
phoenixrvd/phpunit-assert-log-entry
PHPUnit assertions for Monolog-TestHandler
- Monday, September 11, 2017
- by PhoenixRVD
- Repository
- 1 Watchers
- 1 Stars
- 42 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 2 Open issues
- 4 Versions
- 27 % Grown
PHPUnit assert log entry
, (*1)
, (*2)
, (*3)
This library extends PHPUnit with asserting
from Monolog logging entries., (*4)
Installation
Install the latest version with, (*5)
composer require phoenixrvd/phpunit-assert-log-entry
Example
<?php
use PHPUnit\Framework\TestCase;
class LogAssertionsTest extends TestCase
{
use \PhoenixRVD\PHPUnitLogAssertions\LogAssertions;
public function testFoo(){
// Get a Monolog instance
$logger = new \Monolog\Logger(__CLASS__);
// Register a logger in test case handler
self::attachLogger($logger);
$logger->debug('foo');
self::assertLogHasDebugRecords();
self::assertLogHasDebug('foo');
}
}
Testing
composer phpunit_log_assertions:test
Copyright and license
Code released under the MIT License., (*6)
1.0.2
1.0.2.0
PHPUnit assertions for Monolog-TestHandler
Sources
Download
MIT
The Requires
The Development Requires
by
Viacheslav Wolf
dev-master
9999999-dev
PHPUnit assertions for Monolog-TestHandler
Sources
Download
MIT
The Requires
The Development Requires
by
Viacheslav Wolf
1.0.1
1.0.1.0
PHPUnit assertions for Monolog-TestHandler
Sources
Download
MIT
The Requires
The Development Requires
by
Viacheslav Wolf
1.0.0
1.0.0.0
PHPUnit assertions for Monolog-TestHandler
Sources
Download
MIT
The Requires
by
Viacheslav Wolf