test element youtube url

This commit is contained in:
Yisroel Baum 2026-05-27 20:36:34 +03:00
parent 8a06f5a57c
commit f9c4d72e60
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
6 changed files with 75 additions and 0 deletions

View file

@ -15,6 +15,8 @@ class ElementsEndpointTest extends TestCase
public function testReturnsElementTitle(): void
{
$sampleYoutubeUrl = 'https://www.youtube.com/watch?v='
. 'yHx-r4p6hHU&t=1s';
$setRepository = app(SetRepository::class);
$elementRepository = app(ElementRepository::class);
$set = $setRepository->create(new CreateSetDto(
@ -28,6 +30,7 @@ class ElementsEndpointTest extends TestCase
description: 'A structured path for growth',
richText: '<p>A structured path for growth</p>',
pdfPath: '/assets/pdfs/baderech.pdf',
youtubeUrl: $sampleYoutubeUrl,
parentElement: null,
));
$firstChildElement = $elementRepository->create(new CreateElementDto(
@ -36,6 +39,7 @@ class ElementsEndpointTest extends TestCase
description: 'Foundations for steady avodah',
richText: '<p>Foundations rich text</p>',
pdfPath: '/assets/pdfs/foundations.pdf',
youtubeUrl: null,
parentElement: $element,
));
$secondChildElement = $elementRepository->create(new CreateElementDto(
@ -44,6 +48,7 @@ class ElementsEndpointTest extends TestCase
description: 'Daily practices for growth',
richText: '<p>Daily practice rich text</p>',
pdfPath: null,
youtubeUrl: null,
parentElement: $element,
));
@ -69,6 +74,7 @@ class ElementsEndpointTest extends TestCase
'description' => 'A structured path for growth',
'richText' => '<p>A structured path for growth</p>',
'pdfPath' => '/assets/pdfs/baderech.pdf',
'youtubeUrl' => $sampleYoutubeUrl,
],
]);
}