/** * Setup the test environment. */ public function setUp() { parent::setUp(); SocialConnection::setUsersModel(User::class); $this->withFactories(__DIR__ . '/../database/factories'); $this->artisan('migrate', ['--database' => 'testing', '--realpath' => realpath(__DIR__ . '/../database/migrations')]); $this->artisan('db:seed', ['--database' => 'testing', '--class' => 'SociableDatabaseSeeder']); $this->beforeApplicationDestroyed(function () { $this->artisan('migrate:rollback'); }); }
/** * @test */ public function it_can_set_and_retrieve_the_users_model() { SocialConnection::setUsersModel('foo'); $this->assertEquals('foo', SocialConnection::getUsersModel()); }