mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Add a named dataset test to output to snapshot
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
✓ not property calls
|
✓ not property calls
|
||||||
|
|
||||||
PASS Tests\Expect\toBe
|
PASS Tests\Expect\toBe
|
||||||
✓ expect true → toBeTrue → and false → toBeFalse
|
✓ expect true → toBeTrue → and false → toBeFalse
|
||||||
✓ strict comparisons
|
✓ strict comparisons
|
||||||
✓ failures
|
✓ failures
|
||||||
✓ not failures
|
✓ not failures
|
||||||
@ -255,6 +255,9 @@
|
|||||||
✓ eager wrapped registered datasets with (1)
|
✓ eager wrapped registered datasets with (1)
|
||||||
✓ eager wrapped registered datasets with (2)
|
✓ eager wrapped registered datasets with (2)
|
||||||
✓ eager registered wrapped datasets did the job right
|
✓ eager registered wrapped datasets did the job right
|
||||||
|
✓ named datasets with data set "one" (1)
|
||||||
|
✓ named datasets with data set "two" (2)
|
||||||
|
✓ named datasets did the job right
|
||||||
✓ lazy named datasets with (Bar Object (...))
|
✓ lazy named datasets with (Bar Object (...))
|
||||||
✓ it creates unique test case names with ('Name 1', Pest\Plugin Object (), true) #1
|
✓ it creates unique test case names with ('Name 1', Pest\Plugin Object (), true) #1
|
||||||
✓ it creates unique test case names with ('Name 1', Pest\Plugin Object (), true) #2
|
✓ it creates unique test case names with ('Name 1', Pest\Plugin Object (), true) #2
|
||||||
@ -292,8 +295,8 @@
|
|||||||
✓ it has bar
|
✓ it has bar
|
||||||
|
|
||||||
PASS Tests\Features\PendingHigherOrderTests
|
PASS Tests\Features\PendingHigherOrderTests
|
||||||
✓ get 'foo' → get 'bar' → expect true → toBeTrue
|
✓ get 'foo' → get 'bar' → expect true → toBeTrue
|
||||||
✓ get 'foo' → expect true → toBeTrue
|
✓ get 'foo' → expect true → toBeTrue
|
||||||
|
|
||||||
WARN Tests\Features\Skip
|
WARN Tests\Features\Skip
|
||||||
✓ it do not skips
|
✓ it do not skips
|
||||||
@ -388,5 +391,4 @@
|
|||||||
✓ depends with defined arguments
|
✓ depends with defined arguments
|
||||||
✓ depends run test only once
|
✓ depends run test only once
|
||||||
|
|
||||||
Tests: 7 skipped, 228 passed
|
Tests: 7 skipped, 231 passed
|
||||||
|
|
||||||
|
|||||||
@ -95,6 +95,18 @@ test('eager registered wrapped datasets did the job right', function () use ($st
|
|||||||
expect($state->text)->toBe('1212121212');
|
expect($state->text)->toBe('1212121212');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('named datasets', function ($text) use ($state, $datasets) {
|
||||||
|
$state->text .= $text;
|
||||||
|
expect($datasets)->toContain([$text]);
|
||||||
|
})->with([
|
||||||
|
'one' => [1],
|
||||||
|
'two' => [2],
|
||||||
|
]);
|
||||||
|
|
||||||
|
test('named datasets did the job right', function () use ($state) {
|
||||||
|
expect($state->text)->toBe('121212121212');
|
||||||
|
});
|
||||||
|
|
||||||
class Bar
|
class Bar
|
||||||
{
|
{
|
||||||
public $name = 1;
|
public $name = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user