2017 © Pedro Peláez
 

library phpunit-assert-log-entry

PHPUnit assertions for Monolog-TestHandler

image

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

The README.md

PHPUnit assert log entry

Minimum PHP Version Latest Stable Version composer.lock License, (*1)

Build Status Code Climate StyleCI Test Coverage Latest Unstable Version, (*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

Code released under the MIT License., (*6)

The Versions

11/09 2017

1.0.2

1.0.2.0

PHPUnit assertions for Monolog-TestHandler

  Sources   Download

MIT

The Requires

 

The Development Requires

by Viacheslav Wolf

09/09 2017

dev-master

9999999-dev

PHPUnit assertions for Monolog-TestHandler

  Sources   Download

MIT

The Requires

 

The Development Requires

by Viacheslav Wolf

08/09 2017

1.0.1

1.0.1.0

PHPUnit assertions for Monolog-TestHandler

  Sources   Download

MIT

The Requires

 

The Development Requires

by Viacheslav Wolf

08/09 2017

1.0.0

1.0.0.0

PHPUnit assertions for Monolog-TestHandler

  Sources   Download

MIT

The Requires

 

by Viacheslav Wolf