Merge "(bug 56849) Deprecate dangerous edittime-based content update functions"
[lhc/web/wiklou.git] / tests / phpunit / includes / db / DatabaseSQLTest.php
index 726d63a..5c2d4b7 100644 (file)
@@ -27,7 +27,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideSelect
         * @covers DatabaseBase::select
         */
-       function testSelect( $sql, $sqlText ) {
+       public function testSelect( $sql, $sqlText ) {
                $this->database->select(
                        $sql['tables'],
                        $sql['fields'],
@@ -101,7 +101,11 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                                        'tables' => array( 'table', 't2' => 'table2' ),
                                        'fields' => array( 'tid', 'field', 'alias' => 'field2', 't2.id' ),
                                        'conds' => array( 'alias' => 'text' ),
-                                       'options' => array( 'LIMIT' => 1, 'GROUP BY' => array( 'field', 'field2' ), 'HAVING' => array( 'COUNT(*) > 1', 'field' => 1 ) ),
+                                       'options' => array(
+                                               'LIMIT' => 1,
+                                               'GROUP BY' => array( 'field', 'field2' ),
+                                               'HAVING' => array( 'COUNT(*) > 1', 'field' => 1 )
+                                       ),
                                        'join_conds' => array( 't2' => array(
                                                'LEFT JOIN', 'tid = t2.id'
                                        ) ),
@@ -129,7 +133,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUpdate
         * @covers DatabaseBase::update
         */
-       function testUpdate( $sql, $sqlText ) {
+       public function testUpdate( $sql, $sqlText ) {
                $this->database->update(
                        $sql['table'],
                        $sql['values'],
@@ -181,7 +185,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideDelete
         * @covers DatabaseBase::delete
         */
-       function testDelete( $sql, $sqlText ) {
+       public function testDelete( $sql, $sqlText ) {
                $this->database->delete(
                        $sql['table'],
                        $sql['conds'],
@@ -214,7 +218,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUpsert
         * @covers DatabaseBase::upsert
         */
-       function testUpsert( $sql, $sqlText ) {
+       public function testUpsert( $sql, $sqlText ) {
                $this->database->upsert(
                        $sql['table'],
                        $sql['rows'],
@@ -250,7 +254,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideDeleteJoin
         * @covers DatabaseBase::deleteJoin
         */
-       function testDeleteJoin( $sql, $sqlText ) {
+       public function testDeleteJoin( $sql, $sqlText ) {
                $this->database->deleteJoin(
                        $sql['delTable'],
                        $sql['joinTable'],
@@ -297,7 +301,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideInsert
         * @covers DatabaseBase::insert
         */
-       function testInsert( $sql, $sqlText ) {
+       public function testInsert( $sql, $sqlText ) {
                $this->database->insert(
                        $sql['table'],
                        $sql['rows'],
@@ -350,7 +354,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideInsertSelect
         * @covers DatabaseBase::insertSelect
         */
-       function testInsertSelect( $sql, $sqlText ) {
+       public function testInsertSelect( $sql, $sqlText ) {
                $this->database->insertSelect(
                        $sql['destTable'],
                        $sql['srcTable'],
@@ -413,7 +417,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideReplace
         * @covers DatabaseBase::replace
         */
-       function testReplace( $sql, $sqlText ) {
+       public function testReplace( $sql, $sqlText ) {
                $this->database->replace(
                        $sql['table'],
                        $sql['uniqueIndexes'],
@@ -528,7 +532,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideNativeReplace
         * @covers DatabaseBase::nativeReplace
         */
-       function testNativeReplace( $sql, $sqlText ) {
+       public function testNativeReplace( $sql, $sqlText ) {
                $this->database->nativeReplace(
                        $sql['table'],
                        $sql['rows'],
@@ -555,7 +559,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideConditional
         * @covers DatabaseBase::conditional
         */
-       function testConditional( $sql, $sqlText ) {
+       public function testConditional( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->conditional(
                        $sql['conds'],
                        $sql['true'],
@@ -596,7 +600,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideBuildConcat
         * @covers DatabaseBase::buildConcat
         */
-       function testBuildConcat( $stringList, $sqlText ) {
+       public function testBuildConcat( $stringList, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildConcat(
                        $stringList
                ) ), $sqlText );
@@ -619,7 +623,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideBuildLike
         * @covers DatabaseBase::buildLike
         */
-       function testBuildLike( $array, $sqlText ) {
+       public function testBuildLike( $array, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildLike(
                        $array
                ) ), $sqlText );
@@ -650,7 +654,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUnionQueries
         * @covers DatabaseBase::unionQueries
         */
-       function testUnionQueries( $sql, $sqlText ) {
+       public function testUnionQueries( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->unionQueries(
                        $sql['sqls'],
                        $sql['all']
@@ -686,7 +690,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::commit
         */
-       function testTransactionCommit() {
+       public function testTransactionCommit() {
                $this->database->begin( __METHOD__ );
                $this->database->commit( __METHOD__ );
                $this->assertLastSql( 'BEGIN; COMMIT' );
@@ -695,7 +699,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::rollback
         */
-       function testTransactionRollback() {
+       public function testTransactionRollback() {
                $this->database->begin( __METHOD__ );
                $this->database->rollback( __METHOD__ );
                $this->assertLastSql( 'BEGIN; ROLLBACK' );
@@ -704,7 +708,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testDropTable() {
+       public function testDropTable() {
                $this->database->setExistingTables( array( 'table' ) );
                $this->database->dropTable( 'table', __METHOD__ );
                $this->assertLastSql( 'DROP TABLE table' );
@@ -713,7 +717,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testDropNonExistingTable() {
+       public function testDropNonExistingTable() {
                $this->assertFalse(
                        $this->database->dropTable( 'non_existing', __METHOD__ )
                );