1 | <?php |
||
11 | class QueuedJobsTest_RecordingLogger extends Logger implements TestOnly |
||
12 | { |
||
13 | /** |
||
14 | * @var QueuedJobsTest_Handler |
||
15 | */ |
||
16 | protected $testHandler = null; |
||
17 | |||
18 | public function __construct($name = 'testlogger', array $handlers = array(), array $processors = array()) |
||
25 | |||
26 | /** |
||
27 | * @return array |
||
28 | */ |
||
29 | public function getMessages() |
||
33 | |||
34 | /** |
||
35 | * Clear all messages |
||
36 | */ |
||
37 | public function clear() |
||
41 | |||
42 | /** |
||
43 | * Get messages with the given filter |
||
44 | * |
||
45 | * @param string $containing |
||
46 | * @return array Filtered array |
||
47 | */ |
||
48 | public function filterMessages($containing) |
||
57 | |||
58 | /** |
||
59 | * Count all messages containing the given substring |
||
60 | * |
||
61 | * @param string $containing Message to filter by |
||
62 | * @return int |
||
63 | */ |
||
64 | public function countMessages($containing = null) |
||
73 | } |
||
74 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: