mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
BUGFIX: update unit tests for googlesitemap module for 3.0. MINOR: version bump in README
This commit is contained in:
parent
295aba26e6
commit
872fd9b258
@ -6,7 +6,7 @@
|
||||
|
||||
## Requirements
|
||||
|
||||
* SilverStripe 2.4
|
||||
* SilverStripe 3.0
|
||||
|
||||
## Documentation
|
||||
|
||||
@ -22,5 +22,5 @@ See http://en.wikipedia.org/wiki/Sitemaps for info on this format
|
||||
|
||||
## Usage Overview
|
||||
|
||||
See docs/en/* for more information about configuring the module.
|
||||
See docs/en for more information about configuring the module.
|
||||
|
||||
|
@ -102,10 +102,10 @@ class GoogleSitemap extends Controller {
|
||||
* Adds DataObjects to the existing DataObjectSet with pages from the
|
||||
* site tree
|
||||
*
|
||||
* @return DataObjectSet
|
||||
* @return ArrayList
|
||||
*/
|
||||
protected function addRegisteredDataObjects() {
|
||||
$output = new DataObjectSet();
|
||||
$output = new ArrayList();
|
||||
|
||||
foreach(self::$google_sitemap_dataobjects as $index => $className) {
|
||||
$dataObjectSet = DataObject::get($className);
|
||||
@ -145,7 +145,7 @@ class GoogleSitemap extends Controller {
|
||||
|
||||
$pages = Versioned::get_by_stage('SiteTree', 'Live', $filter);
|
||||
|
||||
$newPages = new DataObjectSet();
|
||||
$newPages = new ArrayList();
|
||||
|
||||
if($pages) {
|
||||
foreach($pages as $page) {
|
||||
@ -235,6 +235,7 @@ class GoogleSitemap extends Controller {
|
||||
function index($url) {
|
||||
if(self::$enabled) {
|
||||
SSViewer::set_source_file_comments(false);
|
||||
|
||||
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
|
||||
|
||||
// But we want to still render.
|
||||
|
@ -71,9 +71,8 @@ class GoogleSitemapTest extends FunctionalTest {
|
||||
function testDecoratorAddsFields() {
|
||||
$page = $this->objFromFixture('Page', 'Page1');
|
||||
|
||||
$fields = $page->getCMSFields();
|
||||
|
||||
$tab = $fields->fieldByName('Root')->fieldByName('Content')->fieldByName('GoogleSitemap');
|
||||
$fields = $page->getSettingsFields();
|
||||
$tab = $fields->fieldByName('Root')->fieldByName('Settings')->fieldByName('GoogleSitemap');
|
||||
|
||||
$this->assertInstanceOf('Tab', $tab);
|
||||
$this->assertInstanceOf('DropdownField', $tab->fieldByName('Priority'));
|
||||
|
Loading…
Reference in New Issue
Block a user