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: ClearTextPasswordTest.php
Close
<?php declare(strict_types=1); namespace Kreait\Firebase\Tests\Unit\Value; use Kreait\Firebase\Exception\InvalidArgumentException; use Kreait\Firebase\Value\ClearTextPassword; use PHPUnit\Framework\TestCase; /** * @internal */ final class ClearTextPasswordTest extends TestCase { /** * @dataProvider validValues * * @param mixed $value */ public function testWithValidValue($value): void { $password = new ClearTextPassword($value); $this->assertSame($value, (string) $password); $this->assertSame($value, $password->jsonSerialize()); $this->assertTrue($password->equalsTo($value)); } /** * @dataProvider invalidValues * * @param mixed $value */ public function testWithInvalidValue($value): void { $this->expectException(InvalidArgumentException::class); new ClearTextPassword($value); } /** * @return array<string, array<string>> */ public function validValues(): array { return [ 'long enough' => ['long enough'], ]; } /** * @return array<string, array<string>> */ public function invalidValues(): array { return [ 'empty string' => [''], 'less than 6 chars' => ['short'], ]; } }