test element youtube url
This commit is contained in:
parent
8a06f5a57c
commit
f9c4d72e60
6 changed files with 75 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ class ElementControllerTest extends TestCase
|
|||
'A structured path for growth',
|
||||
'<p>A structured path for growth</p>',
|
||||
'/assets/pdfs/baderech.pdf',
|
||||
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
||||
null,
|
||||
);
|
||||
$firstChildElement = $this->createElement(
|
||||
|
|
@ -40,6 +41,7 @@ class ElementControllerTest extends TestCase
|
|||
'Foundations for steady avodah',
|
||||
'<p>Foundations rich text</p>',
|
||||
'/assets/pdfs/foundations.pdf',
|
||||
null,
|
||||
$element,
|
||||
);
|
||||
$secondChildElement = $this->createElement(
|
||||
|
|
@ -48,6 +50,7 @@ class ElementControllerTest extends TestCase
|
|||
'Daily practices for growth',
|
||||
'<p>Daily practice rich text</p>',
|
||||
null,
|
||||
null,
|
||||
$element,
|
||||
);
|
||||
|
||||
|
|
@ -69,6 +72,10 @@ class ElementControllerTest extends TestCase
|
|||
'/assets/pdfs/baderech.pdf',
|
||||
$body['element']['pdfPath'],
|
||||
);
|
||||
$this->assertSame(
|
||||
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
||||
$body['element']['youtubeUrl'],
|
||||
);
|
||||
$this->assertSame([
|
||||
[
|
||||
'id' => $firstChildElement->getId(),
|
||||
|
|
@ -121,6 +128,7 @@ class ElementControllerTest extends TestCase
|
|||
string $description,
|
||||
string $richText,
|
||||
?string $pdfPath,
|
||||
?string $youtubeUrl,
|
||||
?Element $parentElement,
|
||||
): Element {
|
||||
return $this->elementRepo->create(new CreateElementDto(
|
||||
|
|
@ -129,6 +137,7 @@ class ElementControllerTest extends TestCase
|
|||
description: $description,
|
||||
richText: $richText,
|
||||
pdfPath: $pdfPath,
|
||||
youtubeUrl: $youtubeUrl,
|
||||
parentElement: $parentElement,
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue