r85919 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85918‎ | r85919 | r85920 >
Date:20:48, 12 April 2011
Author:platonides
Status:ok
Tags:
Comment:
I forgot to commit this in r85906
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php
@@ -88,13 +88,13 @@
8989 $db->query( 'CREATE TABLE foo(foo, barfoo)' );
9090
9191 $db->duplicateTableStructure( 'foo', 'bar' );
92 - $this->assertEquals( 'CREATE TABLE bar(foo, barfoo)',
 92+ $this->assertEquals( 'CREATE TABLE "bar"(foo, barfoo)',
9393 $db->selectField( 'sqlite_master', 'sql', array( 'name' => 'bar' ) ),
9494 'Normal table duplication'
9595 );
9696
9797 $db->duplicateTableStructure( 'foo', 'baz', true );
98 - $this->assertEquals( 'CREATE TABLE baz(foo, barfoo)',
 98+ $this->assertEquals( 'CREATE TABLE "baz"(foo, barfoo)',
9999 $db->selectField( 'sqlite_temp_master', 'sql', array( 'name' => 'baz' ) ),
100100 'Creation of temporary duplicate'
101101 );
@@ -109,16 +109,16 @@
110110 if ( $db->getFulltextSearchModule() != 'FTS3' ) {
111111 $this->markTestSkipped( 'FTS3 not supported, cannot create virtual tables' );
112112 }
113 - $db->query( 'CREATE VIRTUAL TABLE foo USING FTS3(foobar)' );
 113+ $db->query( 'CREATE VIRTUAL TABLE "foo" USING FTS3(foobar)' );
114114
115115 $db->duplicateTableStructure( 'foo', 'bar' );
116 - $this->assertEquals( 'CREATE VIRTUAL TABLE bar USING FTS3(foobar)',
 116+ $this->assertEquals( 'CREATE VIRTUAL TABLE "bar" USING FTS3(foobar)',
117117 $db->selectField( 'sqlite_master', 'sql', array( 'name' => 'bar' ) ),
118118 'Duplication of virtual tables'
119119 );
120120
121121 $db->duplicateTableStructure( 'foo', 'baz', true );
122 - $this->assertEquals( 'CREATE VIRTUAL TABLE baz USING FTS3(foobar)',
 122+ $this->assertEquals( 'CREATE VIRTUAL TABLE "baz" USING FTS3(foobar)',
123123 $db->selectField( 'sqlite_master', 'sql', array( 'name' => 'baz' ) ),
124124 "Can't create temporary virtual tables, should fall back to non-temporary duplication"
125125 );
@@ -132,4 +132,4 @@
133133 $this->fail( $result );
134134 }
135135 }
136 -}
\ No newline at end of file
 136+}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85906Change the duplicateTableStructure() to use the original names....platonides18:54, 12 April 2011

Status & tagging log