-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFunc.php
38 lines (31 loc) · 869 Bytes
/
Func.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
<?php
declare(strict_types=1);
/*
* This file is part of the QuidPHP package <https://quidphp.com>
* Author: Pierre-Philippe Emond <emondpph@gmail.com>
* License: https://github.com/quidphp/base/blob/master/LICENSE
*/
namespace Quid\Test\Base;
use Quid\Base;
// func
// class for testing Quid\Base\Func
class Func extends Base\Test
{
// trigger
final public static function trigger(array $data):bool
{
// is
assert(Base\Func::is('strlen'));
assert(!Base\Func::is('strlenz'));
assert(!Base\Func::is([Base\Func::class,'is']));
assert(!Base\Func::is([new \DateTime(),'setDate']));
// call
assert(Base\Func::call('strlen','lala') === 4);
// all
assert(count(Base\Func::all()) === 2);
// user
assert(count(Base\Func::user()) < 60);
return true;
}
}
?>