Merge pull request #15670 from eileenmcnaughton/dupe_locks
[civicrm-core.git] / tests / phpunit / api / v4 / Entity / RouteTest.php
1 <?php
2
3 /*
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
6 | |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
11 */
12
13 /**
14 *
15 * @package CRM
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 * $Id$
18 *
19 */
20
21
22 namespace api\v4\Entity;
23
24 use Civi\Api4\Route;
25 use api\v4\UnitTestCase;
26
27 /**
28 * @group headless
29 */
30 class RouteTest extends UnitTestCase {
31
32 public function testGet() {
33 $result = Route::get()->addWhere('path', '=', 'civicrm/admin')->execute();
34 $this->assertEquals(1, $result->count());
35
36 $result = Route::get()->addWhere('path', 'LIKE', 'civicrm/admin/%')->execute();
37 $this->assertGreaterThan(10, $result->count());
38 }
39
40 }