test element pdf path
This commit is contained in:
parent
2c79ab64ad
commit
6c6b3ad257
6 changed files with 72 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ class ElementControllerTest extends TestCase
|
|||
'Baderech HaAvodah',
|
||||
'A structured path for growth',
|
||||
'<p>A structured path for growth</p>',
|
||||
'/assets/pdfs/baderech.pdf',
|
||||
null,
|
||||
);
|
||||
$firstChildElement = $this->createElement(
|
||||
|
|
@ -38,6 +39,7 @@ class ElementControllerTest extends TestCase
|
|||
'Avodah Foundations',
|
||||
'Foundations for steady avodah',
|
||||
'<p>Foundations rich text</p>',
|
||||
'/assets/pdfs/foundations.pdf',
|
||||
$element,
|
||||
);
|
||||
$secondChildElement = $this->createElement(
|
||||
|
|
@ -45,6 +47,7 @@ class ElementControllerTest extends TestCase
|
|||
'Daily Practice',
|
||||
'Daily practices for growth',
|
||||
'<p>Daily practice rich text</p>',
|
||||
null,
|
||||
$element,
|
||||
);
|
||||
|
||||
|
|
@ -62,6 +65,10 @@ class ElementControllerTest extends TestCase
|
|||
'<p>A structured path for growth</p>',
|
||||
$body['element']['richText'],
|
||||
);
|
||||
$this->assertSame(
|
||||
'/assets/pdfs/baderech.pdf',
|
||||
$body['element']['pdfPath'],
|
||||
);
|
||||
$this->assertSame([
|
||||
[
|
||||
'id' => $firstChildElement->getId(),
|
||||
|
|
@ -113,6 +120,7 @@ class ElementControllerTest extends TestCase
|
|||
string $title,
|
||||
string $description,
|
||||
string $richText,
|
||||
?string $pdfPath,
|
||||
?Element $parentElement,
|
||||
): Element {
|
||||
return $this->elementRepo->create(new CreateElementDto(
|
||||
|
|
@ -120,6 +128,7 @@ class ElementControllerTest extends TestCase
|
|||
title: $title,
|
||||
description: $description,
|
||||
richText: $richText,
|
||||
pdfPath: $pdfPath,
|
||||
parentElement: $parentElement,
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue