dbxapp
4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
dbxapp.de
Portal
Start
Anwender
Entwickler
KI-Bereiche
Loading...
Searching...
No Matches
dbxContentMissingPermalink_test.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
$moduleRoot
= dirname(__DIR__);
6
$renderer
= (string)file_get_contents(
$moduleRoot
.
'/include/dbxContentRenderer.class.php'
);
7
$contentModule
= (string)file_get_contents(
$moduleRoot
.
'/include/dbxContent_content.class.php'
);
8
9
if
(!str_contains(
$renderer
,
"get_system_var('dbx_permalink', '')"
)
10
|| !str_contains(
$renderer
,
"'permalink' => dbx()->esc("
)
11
|| !str_contains(
$renderer
,
'public function renderNotFound(): string'
)) {
12
fwrite(STDERR,
"FAIL: Der Renderer übergibt den angeforderten Permalink nicht sicher an das Missing-Template.\n"
);
13
exit
(1);
14
}
15
16
if
(!str_contains(
$contentModule
,
'return $renderer->renderNotFound();'
)
17
|| str_contains(
$contentModule
,
'show cid=($cid) nicht gefunden'
)) {
18
fwrite(STDERR,
"FAIL: Der cid=0-Pfad verwendet nicht die einheitliche Missing-Ausgabe.\n"
);
19
exit
(2);
20
}
21
22
foreach
(array(
''
,
'_en'
,
'_es'
) as $suffix) {
23
$template
= (string)file_get_contents(
24
$moduleRoot
.
'/tpl/htm/no-page'
. $suffix .
'.htm'
25
);
26
if
(!str_contains(
$template
,
'{permalink}'
) || str_contains(
$template
,
'{cid}'
)) {
27
fwrite(STDERR,
"FAIL: Missing-Template verwendet nicht den Permalink: "
. ($suffix ?:
'_de'
) .
"\n"
);
28
exit
(3);
29
}
30
}
31
32
echo
"OK dbxContent missing permalink\n"
;
$template
$template
Definition
dbxCmsEditorPerformance_contract_test.php:5
$renderer
$renderer
Definition
dbxCmsVideoSizing_contract_test.php:12
$contentModule
$contentModule
Definition
dbxContentMissingPermalink_test.php:7
$moduleRoot
$moduleRoot
Definition
dbxForm_fd_language_messages_test.php:25
exit
exit
Definition
index.php:146
dbx
modules
dbxContent
tests
dbxContentMissingPermalink_test.php
Generated by
1.17.0