Skip to content

Commit

Permalink
Add TaskProcessorTest.php
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Jul 17, 2024
1 parent 6eb6283 commit 357de44
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/Unit/TaskProcessorTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);

namespace Tests\Unit;

use Generator;
use Ghostwriter\Arm\TaskProcessor;
use Ghostwriter\Container\Container;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

#[CoversClass(TaskProcessor::class)]
final class TaskProcessorTest extends TestCase
{
#[DataProvider('dataProvider')]
public function test(bool $value): void
{
self::assertSame($value, $value);

self::assertTrue(Container::getInstance()->get(TaskProcessor::class)->test());
}

/**
* @return Generator<array{bool}>
*/
public static function dataProvider(): Generator
{
yield from [
'true' => [true],
'false' => [false],
];
}
}

0 comments on commit 357de44

Please sign in to comment.