Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Oct 23, 2023
1 parent 53fa9a8 commit eeffb28
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/Bootstrap/ConfigureRay.php
Expand Up @@ -3,7 +3,6 @@
namespace Orchestra\Testbench\Bootstrap;

use Illuminate\Contracts\Foundation\Application;
use PHPUnit\Framework\Attributes\IgnoreClassForCodeCoverage;
use Spatie\Ray\Settings\Settings;

use function Orchestra\Testbench\after_resolving;
Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/Database/InteractsWithSqliteDatabaseFile.php
Expand Up @@ -6,9 +6,7 @@
use Illuminate\Support\Collection;
use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles;
use PHPUnit\Framework\Attributes\AfterClass;
use PHPUnit\Framework\Attributes\IgnoreMethodForCodeCoverage;

#[IgnoreMethodForCodeCoverage(InteractsWithSqliteDatabaseFile::class, 'cleanupBackupSqliteDatabaseFilesOnFailed')]
trait InteractsWithSqliteDatabaseFile
{
use InteractsWithPublishedFiles;
Expand Down Expand Up @@ -69,6 +67,8 @@ protected function withSqliteDatabase(callable $callback): void
* Tear down the Dusk test case class.
*
* @return void
*
* @codeCoverageIgnore
*/
#[AfterClass]
public static function cleanupBackupSqliteDatabaseFilesOnFailed()
Expand Down
7 changes: 4 additions & 3 deletions src/Concerns/InteractsWithPHPUnit.php
Expand Up @@ -4,13 +4,10 @@

use Illuminate\Support\Collection;
use Orchestra\Testbench\PHPUnit\AttributeParser;
use PHPUnit\Framework\Attributes\IgnoreMethodForCodeCoverage;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
use PHPUnit\Metadata\Annotation\Parser\Registry as PHPUnit10Registry;
use ReflectionClass;

#[IgnoreMethodForCodeCoverage(InteractsWithPHPUnit::class, 'setupBeforeClassUsingPHPUnit')]
#[IgnoreMethodForCodeCoverage(InteractsWithPHPUnit::class, 'teardownAfterClassUsingPHPUnit')]
trait InteractsWithPHPUnit
{
/**
Expand Down Expand Up @@ -109,6 +106,8 @@ public static function cachedUsesForTestCase(): array
* Prepare the testing environment before the running the test case.
*
* @return void
*
* @codeCoverageIgnore
*/
public static function setupBeforeClassUsingPHPUnit(): void
{
Expand All @@ -119,6 +118,8 @@ public static function setupBeforeClassUsingPHPUnit(): void
* Clean up the testing environment before the next test case.
*
* @return void
*
* @codeCoverageIgnore
*/
public static function teardownAfterClassUsingPHPUnit(): void
{
Expand Down
7 changes: 4 additions & 3 deletions src/Concerns/InteractsWithWorkbench.php
Expand Up @@ -4,10 +4,7 @@

use Illuminate\Support\Arr;
use Orchestra\Testbench\Workbench\Workbench;
use PHPUnit\Framework\Attributes\IgnoreMethodForCodeCoverage;

#[IgnoreMethodForCodeCoverage(InteractsWithWorkbench::class, 'setupBeforeClassUsingWorkbench')]
#[IgnoreMethodForCodeCoverage(InteractsWithWorkbench::class, 'teardownAfterClassUsingWorkbench')]
trait InteractsWithWorkbench
{
use InteractsWithPHPUnit;
Expand Down Expand Up @@ -135,6 +132,8 @@ public static function cachedConfigurationForWorkbench()
* Prepare the testing environment before the running the test case.
*
* @return void
*
* @codeCoverageIgnore
*/
public static function setupBeforeClassUsingWorkbench(): void
{
Expand All @@ -153,6 +152,8 @@ public static function setupBeforeClassUsingWorkbench(): void
* Clean up the testing environment before the next test case.
*
* @return void
*
* @codeCoverageIgnore
*/
public static function teardownAfterClassUsingWorkbench(): void
{
Expand Down

0 comments on commit eeffb28

Please sign in to comment.