From: Chad Horohoe Date: Wed, 25 May 2011 00:49:51 +0000 (+0000) Subject: Workaround for duplicate key errors X-Git-Tag: 1.31.0-rc.0~29961 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=b7bc5a8db51c6e4ff15cedfd97445ae59ddfae78;p=lhc%2Fweb%2Fwiklou.git Workaround for duplicate key errors --- diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 01e3f525a7..00eb36617b 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -152,11 +152,22 @@ class NewParserTest extends MediaWikiTestCase { 'iw_api' => '', 'iw_wikiid' => '', 'iw_local' => 1 ), - ) ); + /** + * @todo Fixme! Why are we inserting duplicate data here? Shouldn't + * need this IGNORE or shouldn't need the insert at all. + */ + ), __METHOD__, array( 'IGNORE' ) ); # Update certain things in site_stats - $this->db->insert( 'site_stats', array( 'ss_row_id' => 1, 'ss_images' => 2, 'ss_good_articles' => 1 ) ); + $this->db->insert( 'site_stats', + array( 'ss_row_id' => 1, 'ss_images' => 2, 'ss_good_articles' => 1 ), + __METHOD__, + /** + * @todo Fixme! Same as above! + */ + array( 'IGNORE' ) + ); # Reinitialise the LocalisationCache to match the database state Language::getLocalisationCache()->unloadAll();