3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * Test class for Dashboard BAO
18 class CRM_Core_BAO_DashboardTest
extends CiviUnitTestCase
{
21 * Sets up the fixture, for example, opens a network connection.
23 * This method is called before a test is executed.
25 protected function setUp() {
30 * @dataProvider parseUrlTestData
32 * @param $expectedResult
34 public function testParseUrl($input, $expectedResult) {
35 $this->assertEquals($expectedResult, CRM_Core_BAO_Dashboard
::parseUrl($input));
38 public function parseUrlTestData() {
40 ['https://foo.bar', 'https://foo.bar'],
41 ['civicrm/path?reset=1&unit=test', CRM_Utils_System
::url('civicrm/path', 'reset=1&unit=test', FALSE, NULL, FALSE)],