mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
fix template and tests
This commit is contained in:
parent
2c204bb0b6
commit
86e01cb6d1
@ -1,6 +1,6 @@
|
||||
<% if $getDocumentSets %>
|
||||
<% if $DocumentSets %>
|
||||
<div class="documentsets">
|
||||
<% loop $getDocumentSets %>
|
||||
<% loop $DocumentSets %>
|
||||
<% include DocumentSet %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
|
@ -50,9 +50,9 @@ class DMSDocumentSetTest extends SapphireTest
|
||||
$ds2 = $this->objFromFixture('DMSDocumentSet', 'ds2');
|
||||
$ds3 = $this->objFromFixture('DMSDocumentSet', 'ds3');
|
||||
|
||||
$this->assertCount(0, $s4->getDocumentSets(), 'Page 4 has no document sets associated');
|
||||
$this->assertCount(2, $s1->getDocumentSets(), 'Page 1 has 2 document sets');
|
||||
$this->assertEquals(array($ds1->ID, $ds2->ID), $s1->getDocumentSets()->column('ID'));
|
||||
$this->assertCount(0, $s4->DocumentSets(), 'Page 4 has no document sets associated');
|
||||
$this->assertCount(2, $s1->DocumentSets(), 'Page 1 has 2 document sets');
|
||||
$this->assertEquals(array($ds1->ID, $ds2->ID), $s1->DocumentSets()->column('ID'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -142,7 +142,7 @@ class DMSEmbargoTest extends SapphireTest
|
||||
$doc->Folder = "0";
|
||||
$dID = $doc->write();
|
||||
|
||||
$s1->getDocumentSets()->first()->getDocuments()->add($doc);
|
||||
$s1->DocumentSets()->first()->getDocuments()->add($doc);
|
||||
|
||||
$s1->publish('Stage', 'Live');
|
||||
$s1->doPublish();
|
||||
|
@ -65,9 +65,9 @@ class MigrateToDocumentSetsTaskTest extends SapphireTest
|
||||
$this->assertContains('Skipped: already has a set: 1', $result);
|
||||
|
||||
// Test that some of the relationship records were written correctly
|
||||
$this->assertCount(1, $firstPageSets = $this->objFromFixture('SiteTree', 'one')->getDocumentSets());
|
||||
$this->assertCount(1, $firstPageSets = $this->objFromFixture('SiteTree', 'one')->DocumentSets());
|
||||
$this->assertSame('Default', $firstPageSets->first()->Title);
|
||||
$this->assertCount(1, $this->objFromFixture('SiteTree', 'two')->getDocumentSets());
|
||||
$this->assertCount(1, $this->objFromFixture('SiteTree', 'two')->DocumentSets());
|
||||
|
||||
// With dryrun enabled and being run the second time, nothing should be done
|
||||
$result = $this->runTask(array('action' => 'create-default-document-set', 'dryrun' => '1'));
|
||||
|
Loading…
Reference in New Issue
Block a user