Subiendo proyecto completo sin restricciones de git ignore
This commit is contained in:
28
vendor/genealabs/laravel-sign-in-with-apple/tests/Browser/SignInWithAppleTest.php
vendored
Normal file
28
vendor/genealabs/laravel-sign-in-with-apple/tests/Browser/SignInWithAppleTest.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace GeneaLabs\LaravelSignInWithApple\Tests\Browser;
|
||||
|
||||
use GeneaLabs\LaravelSignInWithApple\Tests\BrowserTestCase;
|
||||
use Laravel\Dusk\Browser;
|
||||
|
||||
class SignInWithAppleTest extends BrowserTestCase
|
||||
{
|
||||
public function testButtonIsRendered()
|
||||
{
|
||||
$this->browse(function (Browser $browser) {
|
||||
$browser
|
||||
->visit("/tests")
|
||||
->assertSee("Sign in with Apple");
|
||||
});
|
||||
}
|
||||
|
||||
public function testRedirectShowsAppleIdLogin()
|
||||
{
|
||||
$this->browse(function (Browser $browser) {
|
||||
$browser
|
||||
->visit("/tests")
|
||||
->click('#sign-in-with-apple')
|
||||
->assertSee("Use your Apple ID to sign in to Test Service ID.");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"level": "SEVERE",
|
||||
"message": "http:\/\/127.0.0.1:8000\/favicon.ico - Failed to load resource: the server responded with a status of 404 (Not Found)",
|
||||
"source": "network",
|
||||
"timestamp": 1583082983760
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"level": "WARNING",
|
||||
"message": "https:\/\/appleid.cdn-apple.com\/appleauth\/static\/jsj\/2086116106\/profile\/app.js 254 Mixed Content: The page at 'https:\/\/appleid.apple.com\/auth\/authorize?client_id=dev.test.service-id&redirect_uri=http%3A%2F%2Ftesting.dev%2Fsiwa-callback&scope=name%20email&response_type=code&response_mode=form_post&state=DCCb1UiYHkFyhepDPSMCvHorrEQPIfQL4vD7dMZl' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http:\/\/testing.dev\/siwa-callback'. This endpoint should be made available over a secure connection.",
|
||||
"source": "security",
|
||||
"timestamp": 1583082984883
|
||||
}
|
||||
]
|
||||
10
vendor/genealabs/laravel-sign-in-with-apple/tests/BrowserTestCase.php
vendored
Normal file
10
vendor/genealabs/laravel-sign-in-with-apple/tests/BrowserTestCase.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace GeneaLabs\LaravelSignInWithApple\Tests;
|
||||
|
||||
use Orchestra\Testbench\Dusk\TestCase;
|
||||
|
||||
abstract class BrowserTestCase extends TestCase
|
||||
{
|
||||
use CreatesApplication;
|
||||
}
|
||||
42
vendor/genealabs/laravel-sign-in-with-apple/tests/CreatesApplication.php
vendored
Normal file
42
vendor/genealabs/laravel-sign-in-with-apple/tests/CreatesApplication.php
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace GeneaLabs\LaravelSignInWithApple\Tests;
|
||||
|
||||
use Illuminate\Contracts\Http\Kernel;
|
||||
use Orchestra\Testbench\Dusk\Options;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Laravel\Socialite\SocialiteServiceProvider;
|
||||
use GeneaLabs\LaravelSignInWithApple\Providers\ServiceProvider;
|
||||
use GeneaLabs\LaravelSignInWithApple\Tests\Fixtures\Providers\TestingServiceProvider;
|
||||
|
||||
trait CreatesApplication
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
Options::withUI();
|
||||
$this->artisan("view:clear");
|
||||
$this->artisan("cache:clear");
|
||||
$this->artisan("config:clear");
|
||||
}
|
||||
|
||||
protected function getEnvironmentSetUp($app)
|
||||
{
|
||||
$app['config']->set('database.redis.client', "predis");
|
||||
$app->make(Kernel::class)
|
||||
->pushMiddleware(StartSession::class);
|
||||
|
||||
$app->make("view")
|
||||
->addLocation(__DIR__ . "/Fixtures/resources/views");
|
||||
}
|
||||
|
||||
protected function getPackageProviders($app)
|
||||
{
|
||||
return [
|
||||
SocialiteServiceProvider::class,
|
||||
ServiceProvider::class,
|
||||
TestingServiceProvider::class,
|
||||
];
|
||||
}
|
||||
}
|
||||
12
vendor/genealabs/laravel-sign-in-with-apple/tests/FeatureTestCase.php
vendored
Normal file
12
vendor/genealabs/laravel-sign-in-with-apple/tests/FeatureTestCase.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace GeneaLabs\LaravelSignInWithApple\Tests;
|
||||
|
||||
use Orchestra\Testbench\BrowserKit\TestCase;
|
||||
|
||||
abstract class FeatureTestCase extends TestCase
|
||||
{
|
||||
use CreatesApplication;
|
||||
|
||||
public $baseUrl = 'http://testing.dev';
|
||||
}
|
||||
21
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/Http/Controllers/SiwaController.php
vendored
Normal file
21
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/Http/Controllers/SiwaController.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace GeneaLabs\LaravelSignInWithApple\Tests\Fixtures\Http\Controllers;
|
||||
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
|
||||
class SiwaController
|
||||
{
|
||||
public function login()
|
||||
{
|
||||
return Socialite::driver("sign-in-with-apple")
|
||||
->scopes(["name", "email"])
|
||||
->redirect();
|
||||
}
|
||||
|
||||
public function callback()
|
||||
{
|
||||
$user = Socialite::driver("sign-in-with-apple")
|
||||
->user();
|
||||
}
|
||||
}
|
||||
20
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/Providers/TestingServiceProvider.php
vendored
Normal file
20
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/Providers/TestingServiceProvider.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace GeneaLabs\LaravelSignInWithApple\Tests\Fixtures\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class TestingServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected $defer = false;
|
||||
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function register()
|
||||
{
|
||||
$this->loadRoutesFrom(__DIR__ . "/../routes/web.php");
|
||||
}
|
||||
}
|
||||
10
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/resources/views/tests.blade.php
vendored
Normal file
10
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/resources/views/tests.blade.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<! DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
@signInWithApple("black", false, "sign-in", 6)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
7
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/routes/web.php
vendored
Normal file
7
vendor/genealabs/laravel-sign-in-with-apple/tests/Fixtures/routes/web.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
use GeneaLabs\LaravelSignInWithApple\Tests\Fixtures\Http\Controllers\SiwaController;
|
||||
|
||||
Route::view("/tests", "tests");
|
||||
Route::get("/siwa-login", SiwaController::class . "@login");
|
||||
Route::post("/siwa-callback", SiwaController::class . "@callback");
|
||||
10
vendor/genealabs/laravel-sign-in-with-apple/tests/UnitTestCase.php
vendored
Normal file
10
vendor/genealabs/laravel-sign-in-with-apple/tests/UnitTestCase.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace GeneaLabs\LaravelSignInWithApple\Tests;
|
||||
|
||||
use Orchestra\Testbench\TestCase;
|
||||
|
||||
abstract class UnitTestCase extends TestCase
|
||||
{
|
||||
use CreatesApplication;
|
||||
}
|
||||
Reference in New Issue
Block a user