This commit is contained in:
Nuno Maduro
2024-07-20 14:15:28 +01:00
parent a7553b7593
commit b3c8c24aea
8 changed files with 87 additions and 50 deletions

View File

@ -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);

View File

@ -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);

View 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);

View 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);