Merge pull request #2490 from KallooaSan/PHRAS-1856_PORT-PHRAS-1347

PHRAS-1856_PORT-PHRAS-1347
This commit is contained in:
Nicolas Maillat
2018-03-05 11:31:27 +01:00
committed by GitHub
8 changed files with 37 additions and 15 deletions

View File

@@ -2,6 +2,7 @@
namespace Alchemy\Tests\Phrasea\Application;
use Alchemy\Phrasea\Media\SubdefSubstituer;
use Alchemy\Phrasea\Model\Entities\Feed;
use Alchemy\Phrasea\Model\Entities\FeedEntry;
use Alchemy\Phrasea\Model\Entities\FeedItem;
@@ -254,7 +255,13 @@ class OverviewTest extends \PhraseanetAuthenticatedWebTestCase
->method('getFile')
->will($this->returnValue($symfoFile));
self::$DI['app']['subdef.substituer']->substitute($story, $name, $media);
/** @var SubdefSubstituer $substituter */
$substituter = self::$DI['app']['subdef.substituer'];
if($name == 'document') {
$substituter->substituteDocument($story, $media);
} else {
$substituter->substituteSubdef($story, $name, $media);
}
$path = self::$DI['app']['url_generator']->generate('datafile', [
'sbas_id' => $story->getDataboxId(),

View File

@@ -296,8 +296,8 @@ class LazaretTest extends \PhraseanetAuthenticatedWebTestCase
//expect one call to substitute the documents
self::$DI['app']['subdef.substituer']->expects($this->once())
->method('substitute')
->with($record, $this->equalTo('document'));
->method('substituteDocument')
->with($record);
$databox = $this->getMock('databox', [], [], '', false);