mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
BUGFIX: fixing DMS Document unit test
This commit is contained in:
parent
b20704569f
commit
ac826784f1
0
code/ea-specific/DocumentType.php
Normal file
0
code/ea-specific/DocumentType.php
Normal file
10
code/ea-specific/EADocument.php
Normal file
10
code/ea-specific/EADocument.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
class EADocument extends DMSDocument {
|
||||||
|
|
||||||
|
static $has_one = array(
|
||||||
|
'DocumentType' => 'DocumentType',
|
||||||
|
'ContentType' => 'ContentType'
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -24,7 +24,7 @@ class DMSDocumentTest extends SapphireTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testAddPageRelation() {
|
function testAddPageRelation() {
|
||||||
$this->markTestIncomplete('DMS is WIP');
|
//$this->markTestIncomplete('DMS is WIP');
|
||||||
|
|
||||||
$s1 = $this->objFromFixture('SiteTree','s1');
|
$s1 = $this->objFromFixture('SiteTree','s1');
|
||||||
$s2 = $this->objFromFixture('SiteTree','s2');
|
$s2 = $this->objFromFixture('SiteTree','s2');
|
||||||
@ -53,7 +53,7 @@ class DMSDocumentTest extends SapphireTest {
|
|||||||
|
|
||||||
$documents = $s2->Documents();
|
$documents = $s2->Documents();
|
||||||
$documentsArray = $documents->toArray();
|
$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();
|
$doc->removeAllPages();
|
||||||
$pages = $doc->Pages();
|
$pages = $doc->Pages();
|
||||||
|
Loading…
Reference in New Issue
Block a user