File: sql_ident.phpt

package info (click to toggle)
php-log 1.10.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 404 kB
  • ctags: 592
  • sloc: php: 1,822; xml: 237; sql: 8; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (3)
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
--TEST--
Log: SQL setIdent()
--SKIPIF--
<?php

require_once 'PEAR/Registry.php';
$registry = &new PEAR_Registry();

if (!$registry->packageExists('DB')) die("skip\n");
--FILE--
<?php

require_once 'Log.php';

$ident = '12345678901234567890';

$logger = &Log::singleton('sql', 'log_table', $ident, array('dsn' => ''));
echo $logger->getIdent() . "\n";

$logger->setIdent($ident);
echo $logger->getIdent() . "\n";

--EXPECT--
1234567890123456
1234567890123456