mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Extra tests for getThemeLayout()
This commit is contained in:
@@ -67,7 +67,8 @@
|
|||||||
'jumbotron_home' =>
|
'jumbotron_home' =>
|
||||||
array (
|
array (
|
||||||
0 => 'FRONTPAGE',
|
0 => 'FRONTPAGE',
|
||||||
1 => 'page.php?3!'
|
1 => 'page.php?3!',
|
||||||
|
2 => '/my-sef-url!',
|
||||||
),
|
),
|
||||||
'jumbotron_full' =>
|
'jumbotron_full' =>
|
||||||
array (
|
array (
|
||||||
@@ -92,22 +93,23 @@
|
|||||||
|
|
||||||
|
|
||||||
$tests = array(
|
$tests = array(
|
||||||
0 => array('url' => SITEURL."index.php", 'expected' => 'jumbotron_home'),
|
0 => array('url' => SITEURL."index.php", 'expected' => 'jumbotron_home'),
|
||||||
1 => array('url' => SITEURL."index.php?", 'expected' => 'jumbotron_home'),
|
1 => array('url' => SITEURL."index.php?", 'expected' => 'jumbotron_home'),
|
||||||
2 => array('url' => SITEURL."index.php?fbclid=asdlkjasdlakjsdasd", 'expected' => 'jumbotron_home'),
|
2 => array('url' => SITEURL."index.php?fbclid=asdlkjasdlakjsdasd", 'expected' => 'jumbotron_home'),
|
||||||
3 => array('url' => SITEURL."index.php?utm_source=asdd&utm_medium=asdsd", 'expected' => 'jumbotron_home'),
|
3 => array('url' => SITEURL."index.php?utm_source=asdd&utm_medium=asdsd", 'expected' => 'jumbotron_home'),
|
||||||
4 => array('url' => SITEURL."news", 'expected' => 'jumbotron_sidebar_right'),
|
4 => array('url' => SITEURL."news", 'expected' => 'jumbotron_sidebar_right'),
|
||||||
5 => array('url' => SITEURL."forum", 'script' => "index.php", 'expected' => 'jumbotron_full'),
|
5 => array('url' => SITEURL."forum", 'script' => "index.php", 'expected' => 'jumbotron_full'),
|
||||||
6 => array('url' => SITEURL."other/page", 'script' => null, 'expected' => 'jumbotron_sidebar_right'),
|
6 => array('url' => SITEURL."other/page", 'script' => null, 'expected' => 'jumbotron_sidebar_right'),
|
||||||
7 => array('url' => SITEURL."news.php?5.3", 'script' => null, 'expected' => 'jumbotron_sidebar_right'),
|
7 => array('url' => SITEURL."news.php?5.3", 'script' => null, 'expected' => 'jumbotron_sidebar_right'),
|
||||||
8 => array('url' => SITEURL."usersettings.php", 'script' => null, 'expected' => 'jumbotron_sidebar_right'),
|
8 => array('url' => SITEURL."usersettings.php", 'script' => null, 'expected' => 'jumbotron_sidebar_right'),
|
||||||
9 => array('url' => SITEURL."user.php", 'script' => null, 'expected' => 'jumbotron_full'),
|
9 => array('url' => SITEURL."user.php", 'script' => null, 'expected' => 'jumbotron_full'),
|
||||||
10 => array('url' => SITEURL."page.php", 'script' => null, 'expected' => 'other_layout'),
|
10 => array('url' => SITEURL."page.php", 'script' => null, 'expected' => 'other_layout'),
|
||||||
11 => array('url' => SITEURL."page.php?3", 'script' => null, 'expected' => 'jumbotron_home'),
|
11 => array('url' => SITEURL."page.php?3", 'script' => null, 'expected' => 'jumbotron_home'),
|
||||||
12 => array('url' => SITEURL."somepage/", 'script' => "user.php", 'expected' => 'jumbotron_full'),
|
12 => array('url' => SITEURL."somepage/", 'script' => "user.php", 'expected' => 'jumbotron_full'),
|
||||||
13 => array('url' => SITEURL."plugin/", 'script' => "myplugin.php", 'expected' => 'other_layout'),
|
13 => array('url' => SITEURL."plugin/", 'script' => "myplugin.php", 'expected' => 'other_layout'),
|
||||||
14 => array('url' => SITEURL."forum/index.php", 'script' => "index.php", 'expected' => 'other_layout'),
|
14 => array('url' => SITEURL."forum/index.php", 'script' => "index.php", 'expected' => 'other_layout'),
|
||||||
15 => array('url' => SITEURL."my-sef-page-chapter/my-sef-page-url", 'script' => "page.php", 'expected' => 'other_layout'),
|
15 => array('url' => SITEURL."my-chapter/my-title", 'script' => "page.php", 'expected' => 'other_layout'),
|
||||||
|
16 => array('url' => SITEURL."my-sef-url", 'script' => 'index.php', 'expected' => 'jumbotron_home'),
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach($tests as $item=>$var)
|
foreach($tests as $item=>$var)
|
||||||
|
Reference in New Issue
Block a user