dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
dbxKiCmsHeroContract_test.php File Reference

Go to the source code of this file.

Variables

 $failures = array()
 $assert
 $class = new ReflectionClass(\dbx\dbxKi\dbxKiCmsService::class)
 $service = $class->newInstanceWithoutConstructor()
 $validate = $class->getMethod('assert_no_fake_inline_hero')
 $fakeHero
 $rejected = false
 try
 $realHero
 $validHeroAccepted = true
 $cardWithBadge
 $cardAccepted = true
 $workflow = $class->getMethod('page_workflows')
 $workflowText = json_encode($workflow->invoke($service), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)
 $contract = $class->getMethod('content_contract')
 $contractText = json_encode($contract->invoke($service), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)
 if ( $failures !==array())

Variable Documentation

◆ $assert

$assert
Initial value:
= static function (bool $condition, string $message) use (&$failures): void {
if (!$condition) {
$failures[] = $message;
}
}

Definition at line 7 of file dbxKiCmsHeroContract_test.php.

◆ $cardAccepted

$cardAccepted = true

Definition at line 46 of file dbxKiCmsHeroContract_test.php.

◆ $cardWithBadge

$cardWithBadge
Initial value:
= '<div class="card position-relative"><img class="card-img-top" data-cms-media-id="42" src="index.php?dbx_mid=42">'
. '<span class="position-absolute badge">Neu</span><div class="card-body"><p>Produkt</p></div></div>'

Definition at line 44 of file dbxKiCmsHeroContract_test.php.

◆ $class

$class = new ReflectionClass(\dbx\dbxKi\dbxKiCmsService::class)

Definition at line 13 of file dbxKiCmsHeroContract_test.php.

◆ $contract

$contract = $class->getMethod('content_contract')

Definition at line 57 of file dbxKiCmsHeroContract_test.php.

◆ $contractText

$contractText = json_encode($contract->invoke($service), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)

Definition at line 59 of file dbxKiCmsHeroContract_test.php.

◆ $failures

$failures = array()

Definition at line 6 of file dbxKiCmsHeroContract_test.php.

◆ $fakeHero

$fakeHero
Initial value:
= '<div class="position-relative"><img data-cms-media-id="166" src="index.php?dbx_mid=166">'
. '<div class="position-absolute top-0 start-0 w-100 h-100"><h2>Eine Plattform</h2>'
. '<p>Dieser umfangreiche Text liegt über dem Bild und bildet damit fälschlich einen Hero im normalen Inhalt nach.</p>'
. '<a href="demo">Demo ansehen</a></div></div><p>Body</p>'

Definition at line 18 of file dbxKiCmsHeroContract_test.php.

◆ $realHero

$realHero
Initial value:
= '<div class="dbx-home-hero-copy"><h2>Eine Plattform</h2><p>Hero-Text ohne Inline-Bild.</p></div>'
. '<hr class="dbx-cms-marker" data-dbx-marker="dbx:hero"><p>Body</p>'

Definition at line 34 of file dbxKiCmsHeroContract_test.php.

◆ $rejected

$rejected = false

Definition at line 22 of file dbxKiCmsHeroContract_test.php.

◆ $service

$service = $class->newInstanceWithoutConstructor()

Definition at line 14 of file dbxKiCmsHeroContract_test.php.

◆ $validate

$validate = $class->getMethod('assert_no_fake_inline_hero')

Definition at line 15 of file dbxKiCmsHeroContract_test.php.

◆ $validHeroAccepted

$validHeroAccepted = true

Definition at line 36 of file dbxKiCmsHeroContract_test.php.

◆ $workflow

$workflow = $class->getMethod('page_workflows')

Definition at line 54 of file dbxKiCmsHeroContract_test.php.

Referenced by dbx\dbxWorkflow\dbxWorkflow\run().

◆ $workflowText

$workflowText = json_encode($workflow->invoke($service), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)

Definition at line 56 of file dbxKiCmsHeroContract_test.php.

◆ if

if($failures !==array()) ( $failures ! = = array())

Definition at line 67 of file dbxKiCmsHeroContract_test.php.

◆ try