mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
31 lines
706 B
PHP
31 lines
706 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
beforeEach()->assertTrue(true);
|
|
|
|
it('proxies calls to object')->assertTrue(true);
|
|
|
|
it('is capable doing multiple assertions')
|
|
->assertTrue(true)
|
|
->assertFalse(false);
|
|
|
|
it('resolves expect callables correctly')
|
|
->expect(function () { return 'foo'; })
|
|
->toBeString()
|
|
->toBe('foo')
|
|
->and('bar')
|
|
->toBeString()
|
|
->toBe('bar');
|
|
|
|
test('does not treat method names as callables')
|
|
->expect('it')->toBeString();
|
|
|
|
it('can tap into the test')
|
|
->expect('foo')->toBeString()
|
|
->tap(function () { expect($this)->toBeInstanceOf(TestCase::class); })
|
|
->toBe('foo')
|
|
->and('hello world')->toBeString();
|
|
|
|
afterEach()->assertTrue(true);
|