test element icons
This commit is contained in:
parent
c5ea3640b7
commit
ac7af2463d
7 changed files with 80 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ class ElementTest extends TestCase
|
|||
id: 1,
|
||||
title: 'Root',
|
||||
description: 'Root description',
|
||||
iconImageUrl: null,
|
||||
richText: '<p>Root rich text</p>',
|
||||
pdfPath: null,
|
||||
youtubeUrl: null,
|
||||
|
|
@ -30,6 +31,7 @@ class ElementTest extends TestCase
|
|||
id: 2,
|
||||
title: 'Child',
|
||||
description: 'Child description',
|
||||
iconImageUrl: '/assets/child-icon.svg',
|
||||
richText: '<p>Child rich text</p>',
|
||||
pdfPath: '/assets/pdfs/child.pdf',
|
||||
youtubeUrl: 'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s',
|
||||
|
|
@ -43,6 +45,10 @@ class ElementTest extends TestCase
|
|||
'Child description',
|
||||
$childElement->getDescription(),
|
||||
);
|
||||
$this->assertSame(
|
||||
'/assets/child-icon.svg',
|
||||
$childElement->getIconImageUrl(),
|
||||
);
|
||||
$this->assertSame(
|
||||
'<p>Child rich text</p>',
|
||||
$childElement->getRichText(),
|
||||
|
|
@ -57,6 +63,7 @@ class ElementTest extends TestCase
|
|||
);
|
||||
$this->assertSame($set, $childElement->getSet());
|
||||
$this->assertSame($rootElement, $childElement->getParentElement());
|
||||
$this->assertNull($rootElement->getIconImageUrl());
|
||||
$this->assertNull($rootElement->getPdfPath());
|
||||
$this->assertNull($rootElement->getYoutubeUrl());
|
||||
$this->assertNull($rootElement->getParentElement());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue