OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
kreait
/
firebase-php
/
tests
/
Unit
/
Value
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:35:44 AM
rwxr-xr-x
📄
ClearTextPasswordTest.php
1.36 KB
08/12/2024 10:35:44 AM
rw-r--r--
📄
EmailTest.php
1.25 KB
08/12/2024 10:35:44 AM
rw-r--r--
📄
PhoneNumberTest.php
1.34 KB
08/12/2024 10:35:44 AM
rw-r--r--
📄
UidTest.php
1.28 KB
08/12/2024 10:35:44 AM
rw-r--r--
📄
UrlTest.php
1.56 KB
08/12/2024 10:35:44 AM
rw-r--r--
Editing: EmailTest.php
Close
<?php declare(strict_types=1); namespace Kreait\Firebase\Tests\Unit\Value; use Kreait\Firebase\Exception\InvalidArgumentException; use Kreait\Firebase\Value\Email; use PHPUnit\Framework\TestCase; /** * @internal */ final class EmailTest extends TestCase { /** * @dataProvider validValues */ public function testWithValidValue(string $value): void { $email = new Email($value); $this->assertSame($value, (string) $email); $this->assertSame($value, $email->jsonSerialize()); $this->assertTrue($email->equalsTo($value)); } /** * @dataProvider invalidValues */ public function testWithInvalidValue(string $value): void { $this->expectException(InvalidArgumentException::class); new EMail($value); } /** * @return array<string, array<string>> */ public function validValues(): array { return [ 'user@domain.tld' => ['user@domain.tld'], ]; } /** * @return array<string, array<string>> */ public function invalidValues(): array { return [ 'empty string' => [''], 'invalid' => ['invalid'], ]; } }