Merge pull request #17253 from mattwire/utf8convertblocksize
[civicrm-core.git] / tests / phpunit / CRM / Core / BAO / DashboardTest.php
CommitLineData
28a5ea16
CW
1<?php
2/*
7d61e75f
TO
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
28a5ea16
CW
10 */
11
12/**
13 * Test class for Dashboard BAO
14 *
15 * @package CiviCRM
16 * @group headless
17 */
18class CRM_Core_BAO_DashboardTest extends CiviUnitTestCase {
19
20 /**
21 * Sets up the fixture, for example, opens a network connection.
22 *
23 * This method is called before a test is executed.
24 */
25 protected function setUp() {
26 parent::setUp();
27 }
28
29 /**
30 * @dataProvider parseUrlTestData
31 * @param $input
32 * @param $expectedResult
33 */
34 public function testParseUrl($input, $expectedResult) {
35 $this->assertEquals($expectedResult, CRM_Core_BAO_Dashboard::parseUrl($input));
36 }
37
38 public function parseUrlTestData() {
9099cab3
CW
39 return [
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)],
42 ];
28a5ea16
CW
43 }
44
45}