2FAuth/tests/Unit/Extensions/RemoteUserProviderTest.php

26 lines
587 B
PHP
Raw Normal View History

2022-03-31 08:38:35 +02:00
<?php
namespace Tests\Unit\Extensions;
use Tests\TestCase;
use App\Extensions\RemoteUserProvider;
/**
* @covers \App\Extensions\RemoteUserProvider
*/
class RemoteUserProviderTest extends TestCase
{
public function test_retreiving_a_user_returns_a_non_persisted_user_instance()
{
$provider = new RemoteUserProvider;
$user = $provider->retrieveById([
'user' => 'testUser',
'email' => 'test@example.org'
]);
$this->assertInstanceOf('\App\Models\User', $user);
$this->assertEquals(false, $user->exists);
}
}