mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
feat: adds toHaveLineCountLessThan
This commit is contained in:
@ -797,6 +797,10 @@
|
||||
✓ it fails
|
||||
✓ it fails with message
|
||||
|
||||
PASS Tests\Features\Expect\toHaveLineCountLessThan
|
||||
✓ it passes
|
||||
✓ it fails
|
||||
|
||||
PASS Tests\Features\Expect\toHaveMethod
|
||||
✓ class has method
|
||||
✓ opposite class has method
|
||||
@ -1521,4 +1525,4 @@
|
||||
WARN Tests\Visual\Version
|
||||
- visual snapshot of help command output
|
||||
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 24 skipped, 1066 passed (2611 assertions)
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 24 skipped, 1068 passed (2614 assertions)
|
||||
12
tests/Features/Expect/toHaveLineCountLessThan.php
Normal file
12
tests/Features/Expect/toHaveLineCountLessThan.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
||||
use Pest\Expectation;
|
||||
|
||||
it('passes', function () {
|
||||
expect(Expectation::class)->toHaveLineCountLessThan(1000);
|
||||
});
|
||||
|
||||
it('fails', function () {
|
||||
expect(Expectation::class)->toHaveLineCountLessThan(10);
|
||||
})->throws(ArchExpectationFailedException::class);
|
||||
@ -16,7 +16,7 @@ $run = function () {
|
||||
|
||||
test('parallel', function () use ($run) {
|
||||
expect($run('--exclude-group=integration'))
|
||||
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 1052 passed (2579 assertions)')
|
||||
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 1054 passed (2582 assertions)')
|
||||
->toContain('Parallel: 3 processes');
|
||||
})->skipOnWindows();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user