rm debug echo (oops)
[lhc/web/wiklou.git] / t / DatabaseMock.inc
1 <?php
2 /**
3 * Mock database class for tests, does nothing.
4 * Include after LocalSettings.php
5 */
6
7 $wgDBtype = 'mock';
8
9 class DatabaseMock extends DatabaseBase {
10 function __construct( $server = false, $user = false, $password = false, $dbName = false,
11 $failFunction = false, $flags = 0, $tablePrefix = 'get from global' )
12 {
13 $this->mConn = true;
14 $this->mOpened = true;
15 }
16
17 function open( $server, $user, $password, $dbName ) { return true; }
18 function doQuery( $sql ) {}
19 function fetchObject( $res ) {}
20 function fetchRow( $res ) {}
21 function numRows( $res ) {}
22 function numFields( $res ) {}
23 function fieldName( $res, $n ) {}
24 function insertId() {}
25 function dataSeek( $res, $row ) {}
26 function lastErrno() { return 0; }
27 function lastError() { return ''; }
28 function affectedRows() {}
29 function fieldInfo( $table, $field ) {}
30 function strencode( $s ) {}
31 function getSoftwareLink() {}
32 function getServerVersion() {}
33 }