test element rich text
This commit is contained in:
parent
ef54aa97aa
commit
827abde41b
8 changed files with 69 additions and 1 deletions
|
|
@ -30,18 +30,21 @@ class ElementControllerTest extends TestCase
|
|||
$set,
|
||||
'Baderech HaAvodah',
|
||||
'A structured path for growth',
|
||||
'<p>A structured path for growth</p>',
|
||||
null,
|
||||
);
|
||||
$firstChildElement = $this->createElement(
|
||||
$set,
|
||||
'Avodah Foundations',
|
||||
'Foundations for steady avodah',
|
||||
'<p>Foundations rich text</p>',
|
||||
$element,
|
||||
);
|
||||
$secondChildElement = $this->createElement(
|
||||
$set,
|
||||
'Daily Practice',
|
||||
'Daily practices for growth',
|
||||
'<p>Daily practice rich text</p>',
|
||||
$element,
|
||||
);
|
||||
|
||||
|
|
@ -55,6 +58,10 @@ class ElementControllerTest extends TestCase
|
|||
'A structured path for growth',
|
||||
$body['element']['description'],
|
||||
);
|
||||
$this->assertSame(
|
||||
'<p>A structured path for growth</p>',
|
||||
$body['element']['richText'],
|
||||
);
|
||||
$this->assertSame([
|
||||
[
|
||||
'id' => $firstChildElement->getId(),
|
||||
|
|
@ -105,12 +112,14 @@ class ElementControllerTest extends TestCase
|
|||
DomainSet $set,
|
||||
string $title,
|
||||
string $description,
|
||||
string $richText,
|
||||
?Element $parentElement,
|
||||
): Element {
|
||||
return $this->elementRepo->create(new CreateElementDto(
|
||||
set: $set,
|
||||
title: $title,
|
||||
description: $description,
|
||||
richText: $richText,
|
||||
parentElement: $parentElement,
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue