-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstant.php
39 lines (31 loc) · 869 Bytes
/
Constant.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
/*
* This file is part of the QuidPHP package <https://quidphp.com>
* Author: Pierre-Philippe Emond <[email protected]>
* License: https://github.com/quidphp/base/blob/master/LICENSE
*/
namespace Quid\Test\Base;
use Quid\Base;
// constant
// class for testing Quid\Base\Constant
class Constant extends Base\Test
{
// trigger
final public static function trigger(array $data):bool
{
// is
assert(Base\Constant::is('QUID_VERSION'));
// get
// set
assert(Base\Constant::set('QUID_TEST','test') === true);
assert(Base\Constant::get('QUID_TEST') === 'test');
assert(Base\Constant::is('QUID_TEST'));
// all
assert(count(Base\Constant::all()) > 20);
// user
assert(count(Base\Constant::user()) < 30);
return true;
}
}
?>