Merge branch 'master' into upstream-master (big-o team branch)

This commit is contained in:
Ingo Schommer 2013-01-07 13:59:39 +01:00
commit 90f3c82660
2 changed files with 13 additions and 0 deletions

View File

@ -102,6 +102,13 @@ class GoogleSitemap extends Controller {
unset(self::$dataobjects[$className]);
}
/**
* Clears registered dataobjects. Useful for unit tests.
*/
public static function clear_registered_dataobjects() {
self::$dataobjects = array();
}
/**
* Returns a list containing each viewable {@link DataObject} instance of
* the registered class names.

View File

@ -27,6 +27,12 @@ class GoogleSitemapTest extends FunctionalTest {
GoogleSitemap::unregister_dataobject('GoogleSitemapTest_UnviewableDataObject');
}
public function tearDown() {
parent::tearDown();
GoogleSitemap::clear_registered_dataobjects();
}
public function testItems() {
$sitemap = new GoogleSitemap();