ApiBlockTest: delete a block only if it exist
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 28 May 2011 21:43:06 +0000 (21:43 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 28 May 2011 21:43:06 +0000 (21:43 +0000)
Fix cruise control, follow up r89071

tests/phpunit/includes/api/ApiBlockTest.php

index ff63a04..16ae636 100644 (file)
@@ -30,7 +30,9 @@ class ApiBlockTest extends ApiTestSetup {
 
        function removeDBData() {
                $block = Block::newFromTarget('UTBlockee');
-               $block->delete();       
+               if( $block ) {
+                       $block->delete();
+               }
        }