2017-05-01 16:29:04 +12:00
|
|
|
<?php
|
|
|
|
|
2017-05-08 23:57:52 +12:00
|
|
|
/**
|
|
|
|
* Class StubRelatedDocumentExtension
|
|
|
|
*
|
|
|
|
* @package dms
|
|
|
|
*/
|
2017-05-01 16:29:04 +12:00
|
|
|
class StubRelatedDocumentExtension extends DataExtension implements TestOnly
|
|
|
|
{
|
|
|
|
/**
|
2017-05-02 14:49:41 +12:00
|
|
|
* For method {@link DMSDocument::getRelatedDocuments}
|
2017-05-01 16:29:04 +12:00
|
|
|
*
|
|
|
|
* @param ArrayList $relatedDocuments
|
|
|
|
* @return ArrayList
|
|
|
|
*/
|
2017-05-02 14:49:41 +12:00
|
|
|
public function updateRelatedDocuments($relatedDocuments)
|
|
|
|
{
|
|
|
|
$relatedDocuments->push($this->getFakeDocument());
|
|
|
|
return $relatedDocuments;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For method {@link DMSDocumentSet::getDocuments}
|
|
|
|
*
|
|
|
|
* @param ArrayList $relatedDocuments
|
|
|
|
* @return ArrayList
|
|
|
|
*/
|
|
|
|
public function updateDocuments($documents)
|
|
|
|
{
|
|
|
|
$documents->push($this->getFakeDocument());
|
|
|
|
return $documents;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a dummy document for testing purposes
|
|
|
|
*
|
|
|
|
* @return DMSDocument
|
|
|
|
*/
|
|
|
|
protected function getFakeDocument()
|
2017-05-01 16:29:04 +12:00
|
|
|
{
|
|
|
|
$fakeDocument = new DMSDocument;
|
|
|
|
$fakeDocument->Filename = 'Extended';
|
2017-05-02 14:49:41 +12:00
|
|
|
return $fakeDocument;
|
2017-05-01 16:29:04 +12:00
|
|
|
}
|
|
|
|
}
|