mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
added some documentation; added test files, tests do not work yet
This commit is contained in:
parent
74de83227a
commit
805c7e2ee4
@ -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() {
|
||||
|
20
tests/GoogleSitemapTest.php
Normal file
20
tests/GoogleSitemapTest.php
Normal 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());
|
||||
}
|
||||
}
|
||||
|
9
tests/GoogleSitemapTest.yml
Normal file
9
tests/GoogleSitemapTest.yml
Normal file
@ -0,0 +1,9 @@
|
||||
Page:
|
||||
Page1:
|
||||
Page2:
|
||||
Page3:
|
||||
|
||||
DataObject:
|
||||
DataObject1:
|
||||
DataObject2:
|
||||
DataObject3:
|
Loading…
Reference in New Issue
Block a user