OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
kreait
/
firebase-php
/
tests
/
Unit
/
Messaging
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
๐
..
-
08/12/2024 10:35:44 AM
rwxr-xr-x
๐
AndroidConfigTest.php
2.15 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
ApiClientTest.php
3.47 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
ApnsConfigTest.php
2.67 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
CloudMessageTest.php
5.79 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
ConditionTest.php
1.79 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
MessageDataTest.php
2.81 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
MessageTargetTest.php
486 bytes
08/12/2024 10:35:42 AM
rw-r--r--
๐
NotificationTest.php
2.27 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
RegistrationTokenTest.php
805 bytes
08/12/2024 10:35:42 AM
rw-r--r--
๐
RegistrationTokensTest.php
1.96 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
TopicTest.php
1.32 KB
08/12/2024 10:35:42 AM
rw-r--r--
๐
WebPushConfigTest.php
1.89 KB
08/12/2024 10:35:42 AM
rw-r--r--
Editing: TopicTest.php
Close
<?php declare(strict_types=1); namespace Kreait\Firebase\Tests\Unit\Messaging; use Kreait\Firebase\Exception\Messaging\InvalidArgument; use Kreait\Firebase\Messaging\Topic; use PHPUnit\Framework\TestCase; /** * @internal */ final class TopicTest extends TestCase { /** * @dataProvider valueProvider */ public function testFromValue(string $expected, string $value): void { $this->assertSame($expected, Topic::fromValue($value)->value()); } /** * @dataProvider invalidValueProvider */ public function testFromInvalidValue(string $value): void { $this->expectException(InvalidArgument::class); Topic::fromValue($value); } /** * @return array<string, array<int, string>> */ public function valueProvider(): array { return [ 'no slashes' => ['foo', 'foo'], 'leading slash' => ['foo', '/foo'], 'trailing slash' => ['foo', 'foo/'], 'with topic prefix' => ['foo', '/topic/foo'], ]; } /** * @return array<string, array<int, string>> */ public function invalidValueProvider(): array { return [ '$' => ['$'], 'รค' => ['รค'], 'รฉ' => ['รฉ'], ]; } }