BUGFIX: fixing DMS Document unit test

This commit is contained in:
Julian Seidenberg 2012-07-25 18:08:15 +12:00
parent b20704569f
commit ac826784f1
3 changed files with 12 additions and 2 deletions

View File

View File

@ -0,0 +1,10 @@
<?php
class EADocument extends DMSDocument {
static $has_one = array(
'DocumentType' => 'DocumentType',
'ContentType' => 'ContentType'
);
}

View File

@ -24,7 +24,7 @@ class DMSDocumentTest extends SapphireTest {
}
function testAddPageRelation() {
$this->markTestIncomplete('DMS is WIP');
//$this->markTestIncomplete('DMS is WIP');
$s1 = $this->objFromFixture('SiteTree','s1');
$s2 = $this->objFromFixture('SiteTree','s2');
@ -53,7 +53,7 @@ class DMSDocumentTest extends SapphireTest {
$documents = $s2->Documents();
$documentsArray = $documents->toArray();
$this->assertContains($documentsArray, $doc, "Document associated with page");
$this->assertDOSContains(array(array('Filename'=>$doc->Filename)), $documentsArray, "Document associated with page");
$doc->removeAllPages();
$pages = $doc->Pages();