Definition at line 16 of file DynamoDbHandlerTest.php.
◆ setUp()
Monolog\Handler\DynamoDbHandlerTest::setUp |
( |
| ) |
|
Definition at line 18 of file DynamoDbHandlerTest.php.
20 if (!class_exists(
'Aws\DynamoDb\DynamoDbClient')) {
21 $this->markTestSkipped(
'aws/aws-sdk-php not installed');
24 $this->client = $this->getMockBuilder(
'Aws\DynamoDb\DynamoDbClient')
25 ->setMethods(array(
'formatAttributes',
'__call'))
26 ->disableOriginalConstructor()->getMock();
◆ testConstruct()
Monolog\Handler\DynamoDbHandlerTest::testConstruct |
( |
| ) |
|
Definition at line 29 of file DynamoDbHandlerTest.php.
31 $this->assertInstanceOf(
'Monolog\Handler\DynamoDbHandler',
new DynamoDbHandler($this->client,
'foo'));
◆ testGetFormatter()
Monolog\Handler\DynamoDbHandlerTest::testGetFormatter |
( |
| ) |
|
Definition at line 39 of file DynamoDbHandlerTest.php.
41 $handler =
new DynamoDbHandler($this->client,
'foo');
42 $this->assertInstanceOf(
'Monolog\Formatter\ScalarFormatter', $handler->getFormatter());
◆ testHandle()
Monolog\Handler\DynamoDbHandlerTest::testHandle |
( |
| ) |
|
Definition at line 45 of file DynamoDbHandlerTest.php.
References Monolog\TestCase\getRecord().
48 $formatter = $this->getMock(
'Monolog\Formatter\FormatterInterface');
49 $formatted = array(
'foo' => 1,
'bar' => 2);
50 $handler =
new DynamoDbHandler($this->client,
'foo');
51 $handler->setFormatter($formatter);
54 ->expects($this->once())
57 ->will($this->returnValue($formatted));
59 ->expects($this->once())
60 ->method(
'formatAttributes')
61 ->with($this->isType(
'array'))
62 ->will($this->returnValue($formatted));
64 ->expects($this->once())
66 ->with(
'putItem', array(array(
71 $handler->handle($record);
getRecord($level=Logger::WARNING, $message='test', $context=array())
◆ testInterface()
Monolog\Handler\DynamoDbHandlerTest::testInterface |
( |
| ) |
|
Definition at line 34 of file DynamoDbHandlerTest.php.
36 $this->assertInstanceOf(
'Monolog\Handler\HandlerInterface',
new DynamoDbHandler($this->client,
'foo'));
The documentation for this class was generated from the following file: