test introduction audio child

This commit is contained in:
Yisroel Baum 2026-05-27 22:07:08 +03:00
parent b0ffcdf27b
commit 99fa93587a
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 38 additions and 0 deletions

View file

@ -79,6 +79,25 @@ class DemoSeedDataTest extends TestCase
'/assets/pdfs/baderech.pdf',
$childElements[0]->getPdfPath(),
);
$introductionChildElements = $elementRepository->findByParentElement(
$childElements[0],
);
$this->assertCount(1, $introductionChildElements);
$introductionAudioElement = $introductionChildElements[0];
$this->assertSame(
'Fundamentals # 1: Living Our Way to a Wholesome Fulfilled Life '
. '(Audio)',
$introductionAudioElement->getTitle(),
);
$this->assertSame('', $introductionAudioElement->getDescription());
$this->assertNull($introductionAudioElement->getIconImageUrl());
$this->assertSame('', $introductionAudioElement->getRichText());
$this->assertNull($introductionAudioElement->getPdfPath());
$this->assertSame(
'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
$introductionAudioElement->getYoutubeUrl(),
);
}
private function serializeChildElements(array $childElements): array