test element rich text
This commit is contained in:
parent
ef54aa97aa
commit
827abde41b
8 changed files with 69 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ class GetElementTest extends TestCase
|
|||
$set,
|
||||
'Baderech HaAvodah',
|
||||
'A structured path for growth',
|
||||
'<p>A structured path for growth</p>',
|
||||
null,
|
||||
);
|
||||
|
||||
|
|
@ -46,6 +47,10 @@ class GetElementTest extends TestCase
|
|||
'A structured path for growth',
|
||||
$foundElement->getDescription(),
|
||||
);
|
||||
$this->assertSame(
|
||||
'<p>A structured path for growth</p>',
|
||||
$foundElement->getRichText(),
|
||||
);
|
||||
}
|
||||
|
||||
public function testReturnsDirectChildElements(): void
|
||||
|
|
@ -55,24 +60,28 @@ class GetElementTest 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>',
|
||||
$parentElement,
|
||||
);
|
||||
$secondChildElement = $this->createElement(
|
||||
$set,
|
||||
'Daily Practice',
|
||||
'Daily practices for growth',
|
||||
'<p>Daily practice rich text</p>',
|
||||
$parentElement,
|
||||
);
|
||||
$this->createElement(
|
||||
$set,
|
||||
'Nested Practice',
|
||||
'Nested description',
|
||||
'<p>Nested rich text</p>',
|
||||
$firstChildElement,
|
||||
);
|
||||
$otherSet = $this->createSet(2, 'Daily Learning');
|
||||
|
|
@ -80,12 +89,14 @@ class GetElementTest extends TestCase
|
|||
$otherSet,
|
||||
'Other Parent',
|
||||
'Other parent description',
|
||||
'<p>Other parent rich text</p>',
|
||||
null,
|
||||
);
|
||||
$this->createElement(
|
||||
$otherSet,
|
||||
'Other Child',
|
||||
'Other child description',
|
||||
'<p>Other child rich text</p>',
|
||||
$otherParentElement,
|
||||
);
|
||||
|
||||
|
|
@ -145,12 +156,14 @@ class GetElementTest 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