2022-03-31 08:38:35 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Unit\Extensions;
|
|
|
|
|
|
|
|
use App\Extensions\RemoteUserProvider;
|
2022-11-22 15:15:52 +01:00
|
|
|
use Tests\TestCase;
|
2022-03-31 08:38:35 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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([
|
2022-11-22 15:15:52 +01:00
|
|
|
'user' => 'testUser',
|
|
|
|
'email' => 'test@example.org',
|
2022-03-31 08:38:35 +02:00
|
|
|
]);
|
|
|
|
|
|
|
|
$this->assertInstanceOf('\App\Models\User', $user);
|
|
|
|
$this->assertEquals(false, $user->exists);
|
|
|
|
}
|
2022-11-22 15:15:52 +01:00
|
|
|
}
|