mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
16c7b2d431
@todo: More Tests Better documentation
31 lines
858 B
PHP
31 lines
858 B
PHP
<?php
|
|
|
|
class BlogTreeTest extends SapphireTest {
|
|
static $fixture_file = 'blog/tests/BlogTreeTest.yml';
|
|
|
|
function testGetAllBlogEntries() {
|
|
$node = $this->fixture->objFromFixture('BlogTree', 'root');
|
|
$this->assertEquals($node->Entries()->Count(), 3);
|
|
|
|
$node = $this->fixture->objFromFixture('BlogTree', 'levela');
|
|
$this->assertEquals($node->Entries()->Count(), 2);
|
|
|
|
$node = $this->fixture->objFromFixture('BlogTree', 'levelaa');
|
|
$this->assertEquals($node->Entries()->Count(), 2);
|
|
|
|
$node = $this->fixture->objFromFixture('BlogTree', 'levelab');
|
|
$this->assertNull($node->Entries());
|
|
|
|
$node = $this->fixture->objFromFixture('BlogTree', 'levelb');
|
|
$this->assertEquals($node->Entries()->Count(), 1);
|
|
|
|
$node = $this->fixture->objFromFixture('BlogTree', 'levelba');
|
|
$this->assertEquals($node->Entries()->Count(), 1);
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
?>
|