feat(expect): adds toBe

This commit is contained in:
Nuno Maduro
2020-07-06 00:32:12 +02:00
parent 3eb0a95955
commit 01b9bab55f
5 changed files with 145 additions and 2 deletions

View File

@ -3,6 +3,7 @@
declare(strict_types=1);
use Pest\Datasets;
use Pest\Expectation;
use Pest\PendingObjects\AfterEachCall;
use Pest\PendingObjects\BeforeEachCall;
use Pest\PendingObjects\TestCall;
@ -104,3 +105,11 @@ function afterAll(Closure $closure = null): void
{
TestSuite::getInstance()->afterAll->set($closure);
}
/**
* Creates a new expectation.
*/
function expect($value): Expectation
{
return new Expectation($value);
}