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

@ -22,6 +22,7 @@ class ElementTest extends TestCase
description: 'Root description',
richText: '<p>Root rich text</p>',
pdfPath: null,
youtubeUrl: null,
set: $set,
parentElement: null,
);
@ -31,6 +32,7 @@ class ElementTest extends TestCase
description: 'Child description',
richText: '<p>Child rich text</p>',
pdfPath: '/assets/pdfs/child.pdf',
youtubeUrl: 'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
set: $set,
parentElement: $rootElement,
);
@ -49,9 +51,14 @@ class ElementTest extends TestCase
'/assets/pdfs/child.pdf',
$childElement->getPdfPath(),
);
$this->assertSame(
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
$childElement->getYoutubeUrl(),
);
$this->assertSame($set, $childElement->getSet());
$this->assertSame($rootElement, $childElement->getParentElement());
$this->assertNull($rootElement->getPdfPath());
$this->assertNull($rootElement->getYoutubeUrl());
$this->assertNull($rootElement->getParentElement());
}
}