diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-15 10:16:57 +0300 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-15 10:16:57 +0300 |
commit | a0757a9f377626939d8b6567e5269c8ab7a099f0 (patch) | |
tree | 1cd32f1d29a3e71f0cf23382a03ea4ab26d0f1a8 /plugins/Actions/tests | |
parent | 8e058da41e8ca9f584637a5fe726a8fa3cd0a6d7 (diff) |
Refs #1363 Fixing tests
git-svn-id: http://dev.piwik.org/svn/trunk@3737 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Actions/tests')
-rw-r--r-- | plugins/Actions/tests/Actions.test.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/plugins/Actions/tests/Actions.test.php b/plugins/Actions/tests/Actions.test.php index 399b07fc26..24891d1279 100644 --- a/plugins/Actions/tests/Actions.test.php +++ b/plugins/Actions/tests/Actions.test.php @@ -21,35 +21,35 @@ class Test_Piwik_Actions extends UnitTestCase $tests = array( array( 'params' => array( 'name' => 'http://example.org/', 'type' => Piwik_Tracker_Action::TYPE_ACTION_URL), - 'expected' => array('index' ), + 'expected' => array('/index' ), ), array( 'params' => array( 'name' => 'http://example.org/path/', 'type' => Piwik_Tracker_Action::TYPE_ACTION_URL), - 'expected' => array( 'path', 'index' ), + 'expected' => array( 'path', '/index' ), ), array( 'params' => array( 'name' => 'http://example.org/test/path', 'type' => Piwik_Tracker_Action::TYPE_ACTION_URL), - 'expected' => array( 'test', 'path' ), + 'expected' => array( 'test', '/path' ), ), array( 'params' => array( 'name' => 'Test / Path', 'type' => Piwik_Tracker_Action::TYPE_ACTION_URL), - 'expected' => array( 'Test', 'Path' ), + 'expected' => array( 'Test', '/Path' ), ), array( 'params' => array( 'name' => ' Test trim ', 'type' => Piwik_Tracker_Action::TYPE_ACTION_URL), - 'expected' => array( 'Test trim' ), + 'expected' => array( '/Test trim' ), ), array( 'params' => array( 'name' => 'Category / Subcategory', 'type' => Piwik_Tracker_Action::TYPE_ACTION_NAME), - 'expected' => array( 'Category', 'Subcategory' ), + 'expected' => array( 'Category', ' Subcategory' ), ), array( 'params' => array( 'name' => '/path/index.php?var=test', 'type' => Piwik_Tracker_Action::TYPE_ACTION_NAME), - 'expected' => array( 'path', 'index.php?var=test' ), + 'expected' => array( 'path', ' index.php?var=test' ), ), array( 'params' => array( 'name' => 'http://example.org/path/Default.aspx#anchor', 'type' => Piwik_Tracker_Action::TYPE_ACTION_NAME), - 'expected' => array( 'path', 'Default.aspx' ), + 'expected' => array( 'path', ' Default.aspx' ), ), array( 'params' => array( 'name' => '', 'type' => Piwik_Tracker_Action::TYPE_ACTION_NAME), @@ -80,7 +80,8 @@ class Test_Piwik_Actions extends UnitTestCase foreach($tests as $test) { $params = $test['params']; $expected = $test['expected']; - $this->assertEqual($action->public_getActionExplodedNames($params['name'],$params['type']), $expected); + $processed = $action->public_getActionExplodedNames($params['name'],$params['type']); + $this->assertEqual($processed, $expected, "Processed: ".var_export($processed, true) . " | Expected: ". var_export($expected, true)); } } } |