Definition at line 18 of file RedisHandlerTest.php.
◆ testConstructorShouldThrowExceptionForInvalidRedis()
Monolog\Handler\RedisHandlerTest::testConstructorShouldThrowExceptionForInvalidRedis |
( |
| ) |
|
◆ testConstructorShouldWorkWithPredis()
Monolog\Handler\RedisHandlerTest::testConstructorShouldWorkWithPredis |
( |
| ) |
|
Definition at line 28 of file RedisHandlerTest.php.
30 $redis = $this->getMock(
'Predis\Client');
31 $this->assertInstanceof(
'Monolog\Handler\RedisHandler',
new RedisHandler($redis,
'key'));
◆ testConstructorShouldWorkWithRedis()
Monolog\Handler\RedisHandlerTest::testConstructorShouldWorkWithRedis |
( |
| ) |
|
Definition at line 34 of file RedisHandlerTest.php.
36 $redis = $this->getMock(
'Redis');
37 $this->assertInstanceof(
'Monolog\Handler\RedisHandler',
new RedisHandler($redis,
'key'));
◆ testPredisHandle()
Monolog\Handler\RedisHandlerTest::testPredisHandle |
( |
| ) |
|
Definition at line 40 of file RedisHandlerTest.php.
References $handler, Monolog\TestCase\getRecord(), Sabre\Event\once(), and Monolog\Logger\WARNING.
42 $redis = $this->getMock(
'Predis\Client', array(
'rpush'));
45 $redis->expects($this->
once())
47 ->with(
'key',
'test');
51 $handler =
new RedisHandler($redis,
'key');
52 $handler->setFormatter(
new LineFormatter(
"%message%"));
getRecord($level=Logger::WARNING, $message='test', $context=array())
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
const WARNING
Exceptional occurrences that are not errors.
◆ testPredisHandleCapped()
Monolog\Handler\RedisHandlerTest::testPredisHandleCapped |
( |
| ) |
|
Definition at line 100 of file RedisHandlerTest.php.
References $handler, Monolog\Logger\DEBUG, Monolog\TestCase\getRecord(), Sabre\Event\once(), and Monolog\Logger\WARNING.
102 $redis = $this->getMock(
'Predis\Client', array(
'transaction'));
104 $redisTransaction = $this->getMock(
'Predis\Client', array(
'rpush',
'ltrim'));
106 $redisTransaction->expects($this->
once())
108 ->will($this->returnSelf());
110 $redisTransaction->expects($this->
once())
112 ->will($this->returnSelf());
115 $redis->expects($this->
once())
116 ->method(
'transaction')
117 ->will($this->returnCallback(
function ($cb) use ($redisTransaction) {
118 $cb($redisTransaction);
124 $handler->setFormatter(
new LineFormatter(
"%message%"));
const DEBUG
Detailed debug information.
getRecord($level=Logger::WARNING, $message='test', $context=array())
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
const WARNING
Exceptional occurrences that are not errors.
◆ testRedisHandle()
Monolog\Handler\RedisHandlerTest::testRedisHandle |
( |
| ) |
|
Definition at line 56 of file RedisHandlerTest.php.
References $handler, Monolog\TestCase\getRecord(), Sabre\Event\once(), and Monolog\Logger\WARNING.
58 $redis = $this->getMock(
'Redis', array(
'rpush'));
61 $redis->expects($this->
once())
63 ->with(
'key',
'test');
67 $handler =
new RedisHandler($redis,
'key');
68 $handler->setFormatter(
new LineFormatter(
"%message%"));
getRecord($level=Logger::WARNING, $message='test', $context=array())
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
const WARNING
Exceptional occurrences that are not errors.
◆ testRedisHandleCapped()
Monolog\Handler\RedisHandlerTest::testRedisHandleCapped |
( |
| ) |
|
Definition at line 72 of file RedisHandlerTest.php.
References $handler, Monolog\Logger\DEBUG, Monolog\TestCase\getRecord(), Sabre\Event\once(), and Monolog\Logger\WARNING.
74 $redis = $this->getMock(
'Redis', array(
'multi',
'rpush',
'ltrim',
'exec'));
77 $redis->expects($this->
once())
79 ->will($this->returnSelf());
81 $redis->expects($this->
once())
83 ->will($this->returnSelf());
85 $redis->expects($this->
once())
87 ->will($this->returnSelf());
89 $redis->expects($this->
once())
91 ->will($this->returnSelf());
96 $handler->setFormatter(
new LineFormatter(
"%message%"));
const DEBUG
Detailed debug information.
getRecord($level=Logger::WARNING, $message='test', $context=array())
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
const WARNING
Exceptional occurrences that are not errors.
The documentation for this class was generated from the following file: