APIv4 - Reorganize test classes, don't use transactions for custom value tests
[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 */
18
19
20 namespace api\v4\Entity;
21
22 use Civi\Api4\Route;
23 use api\v4\Api4TestBase;
24
25 /**
26 * @group headless
27 */
28 class RouteTest extends Api4TestBase {
29
30 public function testGet() {
31 $result = Route::get()->addWhere('path', '=', 'civicrm/admin')->execute();
32 $this->assertEquals(1, $result->count());
33
34 $result = Route::get()->addWhere('path', 'LIKE', 'civicrm/admin/%')->execute();
35 $this->assertGreaterThan(10, $result->count());
36 }
37
38 }