Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
Log: Window Handler
3
--INI--
4
date.timezone=UTC
5
--FILE--
6
<?php
7
 
8
require_once 'Log.php';
9
 
10
$conf = array('title' => 'Test Output');
11
$logger = Log::singleton('win', 'test', 'ident', $conf);
12
 
13
for ($i = 0; $i < 3; $i++) {
14
	$logger->log("Log entry $i");
15
}
16
 
17
--EXPECTF--
18
<script language="JavaScript">
19
test = window.open('', 'test', 'toolbar=no,scrollbars,width=600,height=400');
20
test.document.writeln('<html>');
21
test.document.writeln('<head>');
22
test.document.writeln('<title>Test Output</title>');
23
test.document.writeln('<style type="text/css">');
24
test.document.writeln('body { font-family: monospace; font-size: 8pt; }');
25
test.document.writeln('td,th { font-size: 8pt; }');
26
test.document.writeln('td,th { border-bottom: #999999 solid 1px; }');
27
test.document.writeln('td,th { border-right: #999999 solid 1px; }');
28
test.document.writeln('tr { text-align: left; vertical-align: top; }');
29
test.document.writeln('td.l0 { color: red; }');
30
test.document.writeln('td.l1 { color: orange; }');
31
test.document.writeln('td.l2 { color: yellow; }');
32
test.document.writeln('td.l3 { color: green; }');
33
test.document.writeln('td.l4 { color: blue; }');
34
test.document.writeln('td.l5 { color: indigo; }');
35
test.document.writeln('td.l6 { color: violet; }');
36
test.document.writeln('td.l7 { color: black; }');
37
test.document.writeln('</style>');
38
test.document.writeln('<script type="text/javascript">');
39
test.document.writeln('function scroll() {');
40
test.document.writeln(' body = document.getElementById("test");');
41
test.document.writeln(' body.scrollTop = body.scrollHeight;');
42
test.document.writeln('}');
43
test.document.writeln('<\/script>');
44
test.document.writeln('</head>');
45
test.document.writeln('<body id="test" onclick="scroll()">');
46
test.document.writeln('<table border="0" cellpadding="2" cellspacing="0">');
47
test.document.writeln('<tr><th>Time</th>');
48
test.document.writeln('<th>Ident</th>')
49
test.document.writeln('<th>Priority</th><th width="100%">Message</th></tr>');
50
</script><script language='JavaScript'>
51
test.document.writeln('<tr><td>%i:%i:%i.%i</td><td>ident</td><td>Info</td><td class=\"l6\">Log entry 0</td></tr>');
52
self.focus();
53
</script>
54
<script language='JavaScript'>
55
test.document.writeln('<tr><td>%i:%i:%i.%i</td><td>ident</td><td>Info</td><td class=\"l6\">Log entry 1</td></tr>');
56
self.focus();
57
</script>
58
<script language='JavaScript'>
59
test.document.writeln('<tr><td>%i:%i:%i.%i</td><td>ident</td><td>Info</td><td class=\"l6\">Log entry 2</td></tr>');
60
self.focus();
61
</script>
62
<script language='JavaScript'>
63
test.document.writeln('</table>');
64
self.focus();
65
</script>
66
<script language='JavaScript'>
67
test.document.writeln('</body></html>');
68
self.focus();
69
</script>