2017-05-01 06:29:04 +02:00
|
|
|
<?php
|
|
|
|
|
2017-05-08 13:57:52 +02:00
|
|
|
/**
|
|
|
|
* Class StubRelatedDocumentExtension
|
|
|
|
*
|
|
|
|
* @package dms
|
|
|
|
*/
|
2017-05-01 06:29:04 +02:00
|
|
|
class StubRelatedDocumentExtension extends DataExtension implements TestOnly
|
|
|
|
{
|
|
|
|
/**
|
2017-05-02 04:49:41 +02:00
|
|
|
* For method {@link DMSDocument::getRelatedDocuments}
|
2017-05-01 06:29:04 +02:00
|
|
|
*
|
|
|
|
* @param ArrayList $relatedDocuments
|
|
|
|
* @return ArrayList
|
|
|
|
*/
|
2017-05-02 04:49:41 +02: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 06:29:04 +02:00
|
|
|
{
|
|
|
|
$fakeDocument = new DMSDocument;
|
|
|
|
$fakeDocument->Filename = 'Extended';
|
2017-05-02 04:49:41 +02:00
|
|
|
return $fakeDocument;
|
2017-05-01 06:29:04 +02:00
|
|
|
}
|
|
|
|
}
|