dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Set migration stage for change tag to read new"
[lhc/web/wiklou.git]
/
tests
/
parser
/
DbTestRecorder.php
diff --git
a/tests/parser/DbTestRecorder.php
b/tests/parser/DbTestRecorder.php
index
0e94301
..
2089f64
100644
(file)
--- a/
tests/parser/DbTestRecorder.php
+++ b/
tests/parser/DbTestRecorder.php
@@
-19,11
+19,14
@@
* @ingroup Testing
*/
* @ingroup Testing
*/
+use Wikimedia\Rdbms\IMaintainableDatabase;
+
class DbTestRecorder extends TestRecorder {
public $version;
class DbTestRecorder extends TestRecorder {
public $version;
+ /** @var Database */
private $db;
private $db;
- public function __construct( IDatabase $db ) {
+ public function __construct( I
Maintainable
Database $db ) {
$this->db = $db;
}
$this->db = $db;
}
@@
-38,7
+41,8
@@
class DbTestRecorder extends TestRecorder {
|| !$this->db->tableExists( 'testitem' )
) {
print "WARNING> `testrun` table not found in database. Trying to create table.\n";
|| !$this->db->tableExists( 'testitem' )
) {
print "WARNING> `testrun` table not found in database. Trying to create table.\n";
- $this->db->sourceFile( $this->db->patchPath( 'patch-testrun.sql' ) );
+ $updater = DatabaseUpdater::newForDB( $this->db );
+ $this->db->sourceFile( $updater->patchPath( $this->db, 'patch-testrun.sql' ) );
echo "OK, resuming.\n";
}
echo "OK, resuming.\n";
}
@@
-81,4
+85,3
@@
class DbTestRecorder extends TestRecorder {
$this->db->commit( __METHOD__ );
}
}
$this->db->commit( __METHOD__ );
}
}
-