/** * @test * @covers Cocur\Watchman\Watchman::watchLogByLevel() * @covers Cocur\Watchman\Watchman::runProcess() * @expectedException \InvalidArgumentException */ public function watchLogByLevelGetsInvalidLogLevel() { $this->watchman->watchLogByLevel('invalid', function () { }); }
<?php require_once __DIR__ . '/../vendor/autoload.php'; use Cocur\Watchman\Watchman; $watchman = new Watchman(); $watchman->watchLogByLevel('debug', function ($message) { echo "{$message}\n"; });