1 | <?php |
||
15 | class DataObjectHandlerTest extends SapphireTest |
||
16 | { |
||
17 | /** |
||
18 | * A Logger instance |
||
19 | * @var Monolog\Logger |
||
20 | */ |
||
21 | protected $logger; |
||
22 | |||
23 | /** |
||
24 | * The original logger handlers |
||
25 | * @var Monolog\LoggerInterface[] |
||
26 | */ |
||
27 | protected $originalHandlers = []; |
||
28 | |||
29 | /** |
||
30 | * {@inheritDoc} |
||
31 | */ |
||
32 | protected $usesDatabase = true; |
||
33 | |||
34 | /** |
||
35 | * Create a Logger to test with and clear the existing logger handlers |
||
36 | * |
||
37 | * {@inheritDoc} |
||
38 | */ |
||
39 | public function setUp() |
||
51 | |||
52 | /** |
||
53 | * Test that arbitary log levels are all written to the database through the DataObjectHandler |
||
54 | */ |
||
55 | public function testWriteToDefaultLogger() |
||
64 | |||
65 | /** |
||
66 | * Test that logs are handled at a minimum level, but not lower than it. |
||
67 | */ |
||
68 | public function testDontLogMessagesLowerThanMinimumLever() |
||
83 | |||
84 | /** |
||
85 | * Test that the minumum log capture level is returned from configuration |
||
86 | */ |
||
87 | public function testGetMinimumLogLevelFromConfiguration() |
||
92 | |||
93 | /** |
||
94 | * Restore the original logger handlers |
||
95 | * |
||
96 | * {@inheritDoc} |
||
97 | */ |
||
98 | public function tearDown() |
||
106 | } |
||
107 |