Helper to skip tests if they're being run with a specific DBMS where the
test currently fails.
The main use case for this is to temporarily disable failing postgres
and sqlite tests so we can make those test runs voting (so we don't
regress any further), and re-enable the tests once they've been fixed.
Change-Id: I1fd7ca6b2d21fed59ed387376d03489c7cbccdfe
return $loaded;
}
+ /**
+ * Skip the test if using the specified database type
+ *
+ * @param string $type Database type
+ * @since 1.32
+ */
+ protected function markTestSkippedIfDbType( $type ) {
+ if ( $this->db->getType() === $type ) {
+ $this->markTestSkipped( "The $type database type isn't supported for this test" );
+ }
+ }
+
/**
* Used as a marker to prevent wfResetOutputBuffers from breaking PHPUnit.
* @param string $buffer
public function setUp() {
parent::setUp();
- if ( $this->db->getType() == 'postgres' ) {
- $this->markTestSkipped( __CLASS__ . ' does not support postgres' );
- }
+ // FIXME: fails under postgres
+ $this->markTestSkippedIfDbType( 'postgres' );
}
public function getSchemaOverrides( IMaintainableDatabase $db ) {
public function setUp() {
parent::setUp();
- if ( $this->db->getType() == 'postgres' ) {
- $this->markTestSkipped( __CLASS__ . ' does not support postgres' );
- }
+ // FIXME: fails under postgres
+ $this->markTestSkippedIfDbType( 'postgres' );
}
public function testMediaWikiTestCaseSchemaTestOrder() {