From: Antoine Musso Date: Tue, 8 Nov 2011 16:22:42 +0000 (+0000) Subject: test SQL for our QueryPages objects X-Git-Tag: 1.31.0-rc.0~26641 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=2368c97889789da357c6f14c2e37cdc03e29f3ee;p=lhc%2Fweb%2Fwiklou.git test SQL for our QueryPages objects Part of bug 32118: test special pages SQL queries against all supported DB Still need to add all the other non QueryPage special pages and then setup jenkins to support other databases. --- diff --git a/tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php b/tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php new file mode 100644 index 0000000000..3debaf70d3 --- /dev/null +++ b/tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php @@ -0,0 +1,51 @@ +manualTest ) ) { + $this->queryPages[$class] = new $class; + } + } + } + + /** + * Test SQL for each of our QueryPages objects + * @group Database + */ + function testQuerypageSqlQuery() { + foreach( $this->queryPages as $page ) { + + $msg = "SQL query for page {$page->getName()} should give a result wrapper object" ; + + $result = $page->reallyDoQuery( 50 ); + if( $result instanceof ResultWrapper ) { + $this->assertTrue( true, $msg ); + } else { + $this->assertFalse( false, $msg ); + } + } + } +}