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

Go to the source code of this file.

Functions

foreach(array(array( $editorClass, "array('save', 'delete', 'rename', 'copy')", 'dbxEditor:gemeinsamer Mutations-Guard fehlt'), array( $editorClass, ' $form->submit()', 'dbxEditor:dbxForm-Submit-Prüfung fehlt'), array( $editorTemplate, 'dbx-editor-security', 'dbxEditor:Sicherheitstoken fehlt im Editor-Template'), array( $aceJs, ' requestMutation(data)', 'ace.js:zentrale Mutationsfunktion fehlt'), array( $aceJs, "method: 'POST'", 'ace.js:Mutationen werden nicht per POST gesendet'),) as $check) if (strpos($aceJs, 'dbx_run1=delete &file=') !==false||strpos($aceJs, "requestJson('?dbx_modul=dbxEditor&dbx_run1=rename") !==false||strpos($aceJs, "requestJson('?dbx_modul=dbxEditor&dbx_run1=copy") !==false)

Variables

 $root = dirname(__DIR__, 2)
 Statischer Regressionstest für Formular-Templates und kritische Shop-Aktionen.
 $moduleRoot = $root . DIRECTORY_SEPARATOR . 'modules'
 $errors = array()
 $checked = 0
 $iterator
foreach($iterator as $file) $requiredTemplates
foreach( $requiredTemplates as $relative) foreach(array('dbxAdmin/tpl/htm/fdedit-create-from-dd.htm', 'dbxShop_admin/tpl/htm/shop-product-channel-mapping.htm', 'dbxShop/tpl/htm/shop-checkout-form.htm', 'dbxShop/tpl/htm/shop-withdrawal-form.htm',) as $relative) $shopServicePath
 $shopService = (string)file_get_contents($shopServicePath)
foreach(array(' $cartReport->submit()'=> 'Warenkorb-Report', ' $buyForm->submit()'=> 'Add-to-cart-Formular', ' $row=$this->repo() ->saveWithdrawal($values)'=> 'Widerrufsformular', 'if($form->submit())'=> 'dbxForm-Submit',) as $needle=> $label) $shopAdminPath
 $shopAdmin = (string)file_get_contents($shopAdminPath)
foreach(array(' $form->submit()'=> 'zentraler Karten-Token-Guard', ' $this->postedFormError'=> 'sichtbare Karten-Fehlermeldung', ' $content .=$this->shopMediaFormTemplates( $this->shopMediaConfig())'=> 'Medienformulare außerhalb der Kartenform',) as $needle=> $label) foreach(array('productImagesPanel', 'productGroupImagePanel') as $method) $cmsJs
 $cmsJsWithoutComments = (string)preg_replace('~/\*.*?\*/|//[^\r\n]*~s', '', $cmsJs)
if(preg_match('/ $editorClass [\'"`][^\'"`] *< form\b/i', $cmsJsWithoutComments))
 $editorTemplate
 $aceJs
 $formClass = (string)file_get_contents($root . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'dbxForm.class.php')
 if ( $errors)

Function Documentation

◆ if()

foreach(array(array($editorClass, "array('save', 'delete', 'rename', 'copy')", 'dbxEditor:gemeinsamer Mutations-Guard fehlt'), array($editorClass, ' $form->submit()', 'dbxEditor:dbxForm-Submit-Prüfung fehlt'), array($editorTemplate, 'dbx-editor-security', 'dbxEditor:Sicherheitstoken fehlt im Editor-Template'), array($aceJs, ' requestMutation(data)', 'ace.js:zentrale Mutationsfunktion fehlt'), array($aceJs, "method: 'POST'", 'ace.js:Mutationen werden nicht per POST gesendet'),) as $check) if ( )

Definition at line 181 of file dbxForm_structure_test.php.

References $aceJs, and $errors.

Variable Documentation

◆ $aceJs

$aceJs
Initial value:
= (string)file_get_contents(
$root . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'ace.js'
)

Definition at line 167 of file dbxForm_structure_test.php.

Referenced by if().

◆ $checked

$checked = 0

Definition at line 15 of file dbxForm_structure_test.php.

◆ $cmsJs

foreach(array(' $form->submit()'=> 'zentraler Karten-Token-Guard', ' $this->postedFormError'=> 'sichtbare Karten-Fehlermeldung', ' $content .=$this->shopMediaFormTemplates($this->shopMediaConfig())'=> 'Medienformulare außerhalb der Kartenform',) as $needle=> $label) foreach (array( 'productImagesPanel', 'productGroupImagePanel') as $method) $cmsJs
Initial value:
= (string)file_get_contents($root . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'lib'
. DIRECTORY_SEPARATOR . 'cms.js')

Definition at line 153 of file dbxForm_structure_test.php.

◆ $cmsJsWithoutComments

$cmsJsWithoutComments = (string)preg_replace('~/\*.*?\*/|//[^\r\n]*~s', '', $cmsJs)

Definition at line 155 of file dbxForm_structure_test.php.

◆ $editorClass

if (preg_match('/ $editorClass[\'"`][^\'"`] *< form\b/i', $cmsJsWithoutComments))
Initial value:
= (string)file_get_contents(
$moduleRoot . DIRECTORY_SEPARATOR . 'dbxEditor' . DIRECTORY_SEPARATOR . 'dbxEditor.class.php'
)

Definition at line 160 of file dbxForm_structure_test.php.

◆ $editorTemplate

$editorTemplate
Initial value:
= (string)file_get_contents(
$moduleRoot . DIRECTORY_SEPARATOR . 'dbxEditor' . DIRECTORY_SEPARATOR . 'tpl'
. DIRECTORY_SEPARATOR . 'htm' . DIRECTORY_SEPARATOR . 'editor.htm'
)

Definition at line 163 of file dbxForm_structure_test.php.

◆ $errors

$errors = array()

Definition at line 14 of file dbxForm_structure_test.php.

◆ $formClass

$formClass = (string)file_get_contents($root . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'dbxForm.class.php')

Definition at line 187 of file dbxForm_structure_test.php.

◆ $iterator

$iterator
Initial value:
= new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($moduleRoot, FilesystemIterator::SKIP_DOTS)
)

Definition at line 17 of file dbxForm_structure_test.php.

◆ $moduleRoot

$moduleRoot = $root . DIRECTORY_SEPARATOR . 'modules'

Definition at line 13 of file dbxForm_structure_test.php.

◆ $requiredTemplates

foreach ( $iterator as $file) $requiredTemplates
Initial value:
= array(
'dbxAdmin/tpl/htm/fdedit-create-from-dd.htm',
'dbxContent_admin/tpl/htm/cms-media-upload-form.htm',
'dbxContent_admin/tpl/htm/cms-external-video-form.htm',
'dbxKi/tpl/htm/ki-briefing-page-create.htm',
'dbxKi/tpl/htm/ki-briefing-page-update.htm',
'dbxKi/tpl/htm/ki-briefing-page-translation.htm',
'dbxKi/tpl/htm/ki-bundle-start.htm',
'dbxKi/tpl/htm/ki-module-briefing.htm',
'dbxKi/tpl/htm/ki-module-bundle-import.htm',
'dbxKi/tpl/htm/ki-translation-sync-all.htm',
'dbxShop_admin/tpl/htm/shop-product-channel-mapping.htm',
'dbxShop/tpl/htm/shop-cart-report.htm',
'dbxShop/tpl/htm/shop-checkout-form.htm',
'dbxShop/tpl/htm/shop-withdrawal-form.htm',
'dbxWorkflow/tpl/htm/workflow-review.htm',
'dbxWorkflow/tpl/htm/workflow-step-choice.htm',
'dbxWorkflow_admin/tpl/htm/workflow-bind-generator.htm',
)

Definition at line 72 of file dbxForm_structure_test.php.

◆ $root

$root = dirname(__DIR__, 2)

Statischer Regressionstest für Formular-Templates und kritische Shop-Aktionen.

Der Test benötigt weder Datenbank noch Webserver. Er stellt sicher, dass aktive Templates ausgeglichene, nicht verschachtelte Form-Tags besitzen und dass die zuletzt migrierten Formulare ihre zentralen dbxForm-Platzhalter nicht versehentlich verlieren.

Definition at line 12 of file dbxForm_structure_test.php.

◆ $shopAdmin

$shopAdmin = (string)file_get_contents($shopAdminPath)

Definition at line 133 of file dbxForm_structure_test.php.

◆ $shopAdminPath

foreach (array( ' $cartReport->submit()'=> 'Warenkorb-Report', ' $buyForm->submit()'=> 'Add-to-cart-Formular', ' $row=$this->repo() ->saveWithdrawal( $values)'=> 'Widerrufsformular', 'if( $form->submit())'=> 'dbxForm-Submit',) as $needle=> $label) $shopAdminPath
Initial value:
= $moduleRoot . DIRECTORY_SEPARATOR . 'dbxShop_admin' . DIRECTORY_SEPARATOR . 'include'
. DIRECTORY_SEPARATOR . 'dbxShopAdmin.class.php'

Definition at line 131 of file dbxForm_structure_test.php.

◆ $shopService

$shopService = (string)file_get_contents($shopServicePath)

Definition at line 119 of file dbxForm_structure_test.php.

◆ $shopServicePath

foreach($requiredTemplates as $relative) foreach (array( 'dbxAdmin/tpl/htm/fdedit-create-from-dd.htm', 'dbxShop_admin/tpl/htm/shop-product-channel-mapping.htm', 'dbxShop/tpl/htm/shop-checkout-form.htm', 'dbxShop/tpl/htm/shop-withdrawal-form.htm',) as $relative) $shopServicePath
Initial value:
= $moduleRoot . DIRECTORY_SEPARATOR . 'dbxShop' . DIRECTORY_SEPARATOR . 'include'
. DIRECTORY_SEPARATOR . 'dbxShopService.class.php'

Definition at line 117 of file dbxForm_structure_test.php.

◆ if

if($errors) ( $errors = == 0)

Definition at line 196 of file dbxForm_structure_test.php.