-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
74 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Provider; | ||
|
||
use PHPUnit\Framework\Attributes\DataProvider; | ||
use Yiisoft\Queue\Provider\ChannelNotFoundException; | ||
use Yiisoft\Queue\Tests\TestCase; | ||
use Yiisoft\Queue\Tests\Unit\Support\StringEnum; | ||
|
||
final class ChannelNotFoundExceptionTest extends TestCase | ||
{ | ||
public static function dataBase(): iterable | ||
{ | ||
yield 'string' => ['channel1', 'channel1']; | ||
yield 'string-enum' => ['red', StringEnum::RED]; | ||
} | ||
|
||
#[DataProvider('dataBase')] | ||
public function testBase(string $expectedChannelName, mixed $channel): void | ||
{ | ||
$exception = new ChannelNotFoundException($channel); | ||
|
||
$this->assertSame( | ||
'Channel "' . $expectedChannelName . '" not found.', | ||
$exception->getMessage(), | ||
); | ||
} | ||
} |