mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Reworks
This commit is contained in:
@ -715,14 +715,6 @@
|
||||
✓ failures with custom message
|
||||
✓ not failures
|
||||
|
||||
PASS Tests\Features\Expect\toHaveAllMethodsDocumented
|
||||
✓ it passes
|
||||
✓ it fails
|
||||
|
||||
PASS Tests\Features\Expect\toHaveAllPropertiesDocumented
|
||||
✓ it passes
|
||||
✓ it fails
|
||||
|
||||
PASS Tests\Features\Expect\toHaveAttribute
|
||||
✓ class has attribute
|
||||
✓ opposite class has attribute
|
||||
@ -823,6 +815,11 @@
|
||||
✓ failures with custom message
|
||||
✓ not failures
|
||||
|
||||
PASS Tests\Features\Expect\toHaveMethodsDocumented
|
||||
✓ it passes
|
||||
✓ it fails 1
|
||||
✓ it fails 2
|
||||
|
||||
PASS Tests\Features\Expect\toHavePrefix
|
||||
✓ missing prefix
|
||||
✓ has prefix
|
||||
@ -835,6 +832,11 @@
|
||||
✓ failures with custom message
|
||||
✓ not failures
|
||||
|
||||
PASS Tests\Features\Expect\toHavePropertiesDocumented
|
||||
✓ it passes
|
||||
✓ it fails 1
|
||||
✓ it fails 2
|
||||
|
||||
PASS Tests\Features\Expect\toHaveProperty
|
||||
✓ pass
|
||||
✓ failures
|
||||
@ -1533,4 +1535,4 @@
|
||||
WARN Tests\Visual\Version
|
||||
- visual snapshot of help command output
|
||||
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 24 skipped, 1072 passed (2620 assertions)
|
||||
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 24 skipped, 1074 passed (2626 assertions)
|
||||
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
||||
use Pest\Expectation;
|
||||
use Tests\Fixtures\Inheritance\ExampleTest;
|
||||
|
||||
it('passes', function () {
|
||||
expect(Expectation::class)->toHaveAllMethodsDocumented();
|
||||
});
|
||||
|
||||
it('fails', function () {
|
||||
expect(ExampleTest::class)->toHaveAllMethodsDocumented();
|
||||
})->throws(ArchExpectationFailedException::class);
|
||||
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
||||
use Pest\Expectation;
|
||||
use Tests\Fixtures\Inheritance\ExampleTest;
|
||||
|
||||
it('passes', function () {
|
||||
expect(Expectation::class)->toHaveAllPropertiesDocumented();
|
||||
});
|
||||
|
||||
it('fails', function () {
|
||||
expect(ExampleTest::class)->toHaveAllPropertiesDocumented();
|
||||
})->throws(ArchExpectationFailedException::class);
|
||||
19
tests/Features/Expect/toHaveMethodsDocumented.php
Normal file
19
tests/Features/Expect/toHaveMethodsDocumented.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
||||
use Pest\Configuration;
|
||||
use Pest\Expectation;
|
||||
use Tests\Fixtures\Inheritance\ExampleTest;
|
||||
|
||||
it('passes', function () {
|
||||
expect(Expectation::class)->toHaveMethodsDocumented()
|
||||
->and(ExampleTest::class)->not->toHaveMethodsDocumented();
|
||||
});
|
||||
|
||||
it('fails 1', function () {
|
||||
expect(ExampleTest::class)->toHaveMethodsDocumented();
|
||||
})->throws(ArchExpectationFailedException::class);
|
||||
|
||||
it('fails 2', function () {
|
||||
expect(Configuration::class)->not->toHaveMethodsDocumented();
|
||||
})->throws(ArchExpectationFailedException::class);
|
||||
19
tests/Features/Expect/toHavePropertiesDocumented.php
Normal file
19
tests/Features/Expect/toHavePropertiesDocumented.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
||||
use Pest\Expectation;
|
||||
use Pest\Factories\TestCaseFactory;
|
||||
use Tests\Fixtures\Inheritance\ExampleTest;
|
||||
|
||||
it('passes', function () {
|
||||
expect(Expectation::class)->toHavePropertiesDocumented()
|
||||
->and(ExampleTest::class)->not->toHavePropertiesDocumented();
|
||||
});
|
||||
|
||||
it('fails 1', function () {
|
||||
expect(ExampleTest::class)->toHavePropertiesDocumented();
|
||||
})->throws(ArchExpectationFailedException::class);
|
||||
|
||||
it('fails 2', function () {
|
||||
expect(TestCaseFactory::class)->not->toHavePropertiesDocumented();
|
||||
})->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, 1058 passed (2588 assertions)')
|
||||
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 1060 passed (2594 assertions)')
|
||||
->toContain('Parallel: 3 processes');
|
||||
})->skipOnWindows();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user