From d888bf7bc3db15e50e1402ffe45c8e4fb079f8c9 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 20 Mar 2019 11:42:03 -0700 Subject: [PATCH] updated theme layout test. --- tests/unit/e_themeTest.php | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/unit/e_themeTest.php b/tests/unit/e_themeTest.php index 3bb265bcc..57490b210 100644 --- a/tests/unit/e_themeTest.php +++ b/tests/unit/e_themeTest.php @@ -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)