added some documentation; added test files, tests do not work yet

This commit is contained in:
Roland Lehmann 2011-06-12 16:14:29 +02:00
parent 74de83227a
commit 805c7e2ee4
3 changed files with 29 additions and 2 deletions

View File

@ -104,8 +104,6 @@ class GoogleSitemap extends Controller {
* Adds DataObjects to the existing DataObjectSet with pages from the
* site tree
*
* @param DataObjectSet $newPages
*
* @return DataObjectSet
*/
protected function addRegisteredDataObjects() {

View File

@ -0,0 +1,20 @@
<?php
/**
* Unit test for GoogleSitemap
*
* @author Roland Lehmann <rlehmann@pixeltricks.de>
* @since 11.06.2011
*/
class GoogleSitemapTest extends SapphireTest {
public function testItems() {
//Publish a page and check if it returns
$obj = $this->objFromFixture("Page", "Page1");
$page = DataObject::get_by_id("Page", $obj->ID);
#$page->publish();
#$sitemap = new GoogleSitemap();
#$this->assertEquals(1, $sitemap->Items()->Count());
}
}

View File

@ -0,0 +1,9 @@
Page:
Page1:
Page2:
Page3:
DataObject:
DataObject1:
DataObject2:
DataObject3: