public function testVirtualPageFindsCorrectCasting() { $page = new VirtualPageTest_ClassA(); $page->CastingTest = "Some content"; $page->write(); $virtual = new VirtualPage(); $virtual->CopyContentFromID = $page->ID; $virtual->write(); $this->assertEquals('VirtualPageTest_TestDBField', $virtual->castingHelper('CastingTest')); $this->assertEquals('SOME CONTENT', $virtual->obj('CastingTest')->forTemplate()); }