grithin / phpunit
PHPUnit tools
0.1
2021-07-21 12:14 UTC
Requires
- php: >=7.2
- grithin/phpbase: ^5.0
This package is not auto-updated.
Last update: 2024-11-08 02:54:34 UTC
README
$closure = function(){ throw new \Exception; }; $this->assert_exception($closure); # pass with 1 assertion $this->assert_no_exception($closure); # fail
assert_method_result
class Test extends TestCase{ use Grithin\Phpunit\TestTrait; $this->assert_equal_standard($expect, $input, 'merge_deep', 'test straigt list merge'); function __construct(){ parent::__construct(); $this->class = \Grithin\Arrays::class; # set this to use `assert_method_result` } function test(){ $x = ['bill'=>['moe'=>'bob']] $this->assert_method_result('bob', 'bill.moe', 'get', 'Array::get failed'); }