2009-05-01 00:05:54 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class BlogTreeTest extends SapphireTest {
|
|
|
|
static $fixture_file = 'blog/tests/BlogTreeTest.yml';
|
|
|
|
|
|
|
|
function testGetAllBlogEntries() {
|
2009-07-08 02:28:29 +02:00
|
|
|
$node = $this->objFromFixture('BlogTree', 'root');
|
2009-05-01 00:05:54 +02:00
|
|
|
$this->assertEquals($node->Entries()->Count(), 3);
|
|
|
|
|
2009-07-08 02:28:29 +02:00
|
|
|
$node = $this->objFromFixture('BlogTree', 'levela');
|
2009-05-01 00:05:54 +02:00
|
|
|
$this->assertEquals($node->Entries()->Count(), 2);
|
|
|
|
|
2009-07-08 02:28:29 +02:00
|
|
|
$node = $this->objFromFixture('BlogTree', 'levelaa');
|
2009-05-01 00:05:54 +02:00
|
|
|
$this->assertEquals($node->Entries()->Count(), 2);
|
|
|
|
|
2009-07-08 02:28:29 +02:00
|
|
|
$node = $this->objFromFixture('BlogTree', 'levelab');
|
2009-05-01 00:05:54 +02:00
|
|
|
$this->assertNull($node->Entries());
|
|
|
|
|
2009-07-08 02:28:29 +02:00
|
|
|
$node = $this->objFromFixture('BlogTree', 'levelb');
|
2009-05-01 00:05:54 +02:00
|
|
|
$this->assertEquals($node->Entries()->Count(), 1);
|
|
|
|
|
2009-07-08 02:28:29 +02:00
|
|
|
$node = $this->objFromFixture('BlogTree', 'levelba');
|
2009-05-01 00:05:54 +02:00
|
|
|
$this->assertEquals($node->Entries()->Count(), 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|