Add paragraph spaces to post excerpts

[MAILPOET-2627]
This commit is contained in:
Pavel Dohnal
2020-05-27 15:55:55 +02:00
committed by Veljko V
parent cf5e761ba4
commit 00fa2379e3
2 changed files with 1 additions and 34 deletions

View File

@@ -310,39 +310,6 @@ class PostContentTransformerTest extends \MailPoetTest {
$transformer->transform($post);
}
public function testShouldNotAddClassToParagraphsInExcerptWithLayout() {
$args = [
'withLayout' => true,
'displayType' => 'excerpt',
'featuredImagePosition' => 'right',
];
$post = (object)[
'post_type' => 'post',
];
$expectedWithPostClass = false;
/** @var PostTransformerContentsExtractor&MockObject $extractor */
$extractor = $this->make(
PostTransformerContentsExtractor::class,
[
'getContent' => Expected::once($this->contentMock),
'getFeaturedImage' => null,
'getTitle' => 'Title',
]
);
$extractor->expects($this->once())
->method('getContent')
->with(
$this->equalTo($post),
$this->equalTo($expectedWithPostClass),
$this->equalTo('excerpt')
);
$transformer = new PostTransformer($args, $extractor);
$transformer->transform($post);
}
/**
* @return PostTransformer
*/