1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

updated theme layout test.

This commit is contained in:
Cameron
2019-03-20 11:42:03 -07:00
parent 81687565d6
commit d888bf7bc3

View File

@@ -74,7 +74,7 @@
array (
0 => 'forum',
1 => 'user.php', // <-- match user.php script or URL
2 => '/user', // <-- Expecting URL to match both user and usersetting since it contains no "!"
// 2 => '/user', // <-- Expecting URL to match both user and usersetting since it contains no "!"
),
'jumbotron_sidebar_right' =>
array (
@@ -93,23 +93,25 @@
$tests = array(
0 => 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'),
3 => array('url' => SITEURL."index.php?utm_source=asdd&utm_medium=asdsd", 'expected' => 'jumbotron_home'),
4 => array('url' => SITEURL."news", 'expected' => 'jumbotron_sidebar_right'),
5 => array('url' => SITEURL."forum", 'script' => "index.php", 'expected' => 'jumbotron_full'),
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'),
8 => array('url' => SITEURL."usersettings.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'),
11 => array('url' => SITEURL."page.php?3", 'script' => null, 'expected' => 'jumbotron_home'),
12 => array('url' => SITEURL."somepage/", 'script' => "user.php", 'expected' => 'jumbotron_full'),
13 => array('url' => SITEURL."plugin/", 'script' => "myplugin.php", 'expected' => 'other_layout'),
14 => array('url' => SITEURL."forum/index.php", 'script' => "index.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'),
0 => 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'),
3 => array('url' => SITEURL."index.php?utm_source=asdd&utm_medium=asdsd", 'expected' => 'jumbotron_home'),
4 => array('url' => SITEURL."news", 'expected' => 'jumbotron_sidebar_right'),
5 => array('url' => SITEURL."forum", 'script' => "index.php", 'expected' => 'jumbotron_full'),
6 => array('url' => SITEURL."other/page", 'script' => 'page.php', 'expected' => 'other_layout'),
7 => array('url' => SITEURL."news.php?5.3", 'script' => 'news.php', 'expected' => 'jumbotron_sidebar_right'),
8 => array('url' => SITEURL."usersettings.php", 'script' => 'usersettings.php', 'expected' => 'jumbotron_sidebar_right'),
9 => array('url' => SITEURL."user.php", 'script' => 'user.php', 'expected' => 'jumbotron_full'),
10 => array('url' => SITEURL."page.php", 'script' => 'page.php', 'expected' => 'other_layout'),
11 => array('url' => SITEURL."page.php?3", 'script' => 'page.php', 'expected' => 'jumbotron_home'),
12 => array('url' => SITEURL."somepage/", 'script' => "user.php", 'expected' => 'jumbotron_full'),
13 => array('url' => SITEURL."plugin/", 'script' => "myplugin.php", 'expected' => 'other_layout'),
14 => array('url' => SITEURL."forum/index.php", 'script' => "index.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'),
17 => array('url' => SITEURL."/user/settings?id=1", 'script' => 'usersettings.php', 'expected' => 'jumbotron_sidebar_right'),
18 => array('url' => SITEURL."/user/Tijn", 'script' => 'user.php', 'expected' => 'jumbotron_full'),
);
foreach($tests as $item=>$var)