From 2368c97889789da357c6f14c2e37cdc03e29f3ee Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 8 Nov 2011 16:22:42 +0000 Subject: [PATCH] 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. --- .../specials/QueryAllSpecialPagesTest.php | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php 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 ); + } + } + } +} -- 2.20.1