private function createRepo() { $dbw = wfGetDB(DB_MASTER); $dbw->insert('code_repo', array('repo_name' => 'Test', 'repo_path' => 'somewhere', 'repo_viewvc' => 'http://example.com/view/', 'repo_bugzilla' => 'http://www.example.com/$1'), __METHOD__); $id = $dbw->insertId(); $this->repo = CodeRepository::newFromId($id); # Now insert a revision $row = new StdClass(); $row->cr_repo_id = $this->repo->getId(); $row->cr_id = 777; $row->cr_author = 'hashar'; $row->cr_timestamp = '20110731063300'; $row->cr_message = 'I am the very first revision of this life'; $row->cr_status = ''; $row->cr_path = '/trunk/'; $rev = CodeRevision::newFromRow($this->repo, $row); $rev->save(); }