objFromFixture('BlogEntry', 'testpost'); $entry->Content = "[url=admin]the CMS[/url]"; $this->assertEquals('

the CMS

', $entry->Content()->value); BlogEntry::$allow_wysiwyg_editing = $tmpFlag; } function testContent() { $tmpFlag = BlogEntry::$allow_wysiwyg_editing; BlogEntry::$allow_wysiwyg_editing = true; $entry = $this->objFromFixture('BlogEntry', 'testpost'); $entry->Content = 'the CMS'; $this->assertEquals('the CMS', $entry->Content()); BlogEntry::$allow_wysiwyg_editing = $tmpFlag; } function testTrackback() { $blog = $this->objFromFixture('BlogHolder', 'mainblog'); $blog->TrackBacksEnabled = true; $blog->write(); $entry = $this->objFromFixture('BlogEntry', 'testpost'); $response = $entry->trackbackping(); $this->assertContains("1", $response); $_POST['url'] = 'test trackback post url'; $_POST['title'] = 'test trackback post title'; $_POST['excerpt'] = 'test trackback post excerpt'; $_POST['blog_name'] = 'test trackback blog name'; $response = $entry->trackbackping(); $this->assertContains("0", $response); $trackback = DataObject::get_one('TrackBackPing'); $this->assertEquals('test trackback post url', $trackback->Url); $this->assertEquals('test trackback post title', $trackback->Title); $this->assertEquals('test trackback post excerpt', $trackback->Excerpt); $this->assertEquals('test trackback blog name', $trackback->BlogName); unset($_POST); } }