File: PsrLogLoggerInterface.phpt

package info (click to toggle)
php-psr 1.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 548 kB
  • sloc: ansic: 1,485; pascal: 203; xml: 150; makefile: 2
file content (85 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
--TEST--
Psr\Log\LoggerInterface
--SKIPIF--
<?php include('skip.inc'); ?>
--FILE--
<?php
include __DIR__ . '/SampleLogger.inc';
var_dump(interface_exists('\\Psr\\Log\\LoggerInterface', false));
var_dump(class_implements('SampleLogger', false));
$logger = new SampleLogger();
$logger->emergency('msg emergency', array(1));
$logger->alert('msg alert', array(2));
$logger->critical('msg critical', array(3));
$logger->error('msg error', array(4));
$logger->warning('msg warning', array(5));
$logger->notice('msg notice', array(6));
$logger->info('msg info', array(7));
$logger->debug('msg debug', array(8));
$logger->log('level', 'msg', array(9));
$logger->log('level', 'no context');
--EXPECT--
bool(true)
array(1) {
  ["PsrExt\Log\LoggerInterface"]=>
  string(26) "PsrExt\Log\LoggerInterface"
}
string(9) "emergency"
string(13) "msg emergency"
array(1) {
  [0]=>
  int(1)
}
string(5) "alert"
string(9) "msg alert"
array(1) {
  [0]=>
  int(2)
}
string(8) "critical"
string(12) "msg critical"
array(1) {
  [0]=>
  int(3)
}
string(5) "error"
string(9) "msg error"
array(1) {
  [0]=>
  int(4)
}
string(7) "warning"
string(11) "msg warning"
array(1) {
  [0]=>
  int(5)
}
string(6) "notice"
string(10) "msg notice"
array(1) {
  [0]=>
  int(6)
}
string(4) "info"
string(8) "msg info"
array(1) {
  [0]=>
  int(7)
}
string(5) "debug"
string(9) "msg debug"
array(1) {
  [0]=>
  int(8)
}
string(5) "level"
string(3) "msg"
array(1) {
  [0]=>
  int(9)
}
string(5) "level"
string(10) "no context"
array(0) {
}