mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 19:51:30 +00:00
updated streamline-setup v2
This commit is contained in:
+17
-8
@@ -2,20 +2,19 @@
|
||||
|
||||
namespace Laravel\Ui\Tests\AuthBackend;
|
||||
|
||||
use Illuminate\Foundation\Auth\ThrottlesLogins;
|
||||
use Illuminate\Foundation\Auth\ThrottlesLogins as ThrottlesLoginsTrait;
|
||||
use Orchestra\Testbench\TestCase;
|
||||
use Illuminate\Http\Request;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
|
||||
class ThrottleLoginsTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @test
|
||||
* @dataProvider emailProvider
|
||||
*/
|
||||
#[Test]
|
||||
#[DataProvider('emailProvider')]
|
||||
public function it_can_generate_throttle_key(string $email, string $expectedEmail): void
|
||||
{
|
||||
$throttle = $this->getMockForTrait(ThrottlesLogins::class, [], '', true, true, true, ['username']);
|
||||
$throttle = $this->createMock(ThrottlesLogins::class);
|
||||
$throttle->method('username')->willReturn('email');
|
||||
$reflection = new \ReflectionClass($throttle);
|
||||
$method = $reflection->getMethod('throttleKey');
|
||||
@@ -33,8 +32,18 @@ class ThrottleLoginsTest extends TestCase
|
||||
return [
|
||||
'lowercase special characters' => ['ⓣⓔⓢⓣ@ⓛⓐⓡⓐⓥⓔⓛ.ⓒⓞⓜ', 'test@laravel.com'],
|
||||
'uppercase special characters' => ['ⓉⒺⓈⓉ@ⓁⒶⓇⒶⓋⒺⓁ.ⒸⓄⓂ', 'test@laravel.com'],
|
||||
'special character numbers' =>['test⑩⓸③@laravel.com', 'test1043@laravel.com'],
|
||||
'special character numbers' => ['test⑩⓸③@laravel.com', 'test1043@laravel.com'],
|
||||
'default email' => ['test@laravel.com', 'test@laravel.com'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
class ThrottlesLogins
|
||||
{
|
||||
use ThrottlesLoginsTrait;
|
||||
|
||||
public function username()
|
||||
{
|
||||
return 'email';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user