BUGFIX: Clear sitemap registration at the end of each test
This commit is contained in:
parent
d67270fe7a
commit
8d787c486e
|
@ -93,6 +93,13 @@ class GoogleSitemap extends Controller {
|
|||
return isset(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.
|
||||
|
|
|
@ -22,6 +22,12 @@ class GoogleSitemapTest extends FunctionalTest {
|
|||
}
|
||||
}
|
||||
|
||||
public function tearDown() {
|
||||
parent::tearDown();
|
||||
|
||||
GoogleSitemap::clear_registered_dataobjects();
|
||||
}
|
||||
|
||||
public function testItems() {
|
||||
$sitemap = new GoogleSitemap();
|
||||
|
||||
|
|
Loading…
Reference in New Issue