瀏覽代碼

Fix namespaces

Bubka 2 年之前
父節點
當前提交
c717e6b279
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 3 3
      tests/Api/v1/ThrottlingTest.php
  2. 3 3
      tests/Feature/Extensions/RemoteUserProviderTest.php

+ 3 - 3
tests/Api/v1/ThrottlingTest.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-namespace Tests\Unit\Api\v1\Controllers;
+namespace Tests\Api\v1;
 
 
 use App\Models\User;
 use App\Models\User;
 use Illuminate\Support\Facades\Config;
 use Illuminate\Support\Facades\Config;
@@ -19,14 +19,14 @@ class ThrottlingTest extends FeatureTestCase
         /**
         /**
          * @var \App\Models\User|\Illuminate\Contracts\Auth\Authenticatable
          * @var \App\Models\User|\Illuminate\Contracts\Auth\Authenticatable
          */
          */
-        $user = User::factory()->create();
+        $user     = User::factory()->create();
         $throttle = 5;
         $throttle = 5;
 
 
         Config::set('2fauth.api.throttle', $throttle);
         Config::set('2fauth.api.throttle', $throttle);
 
 
         $this->actingAs($user, 'api-guard');
         $this->actingAs($user, 'api-guard');
 
 
-        for ($i=0; $i < $throttle - 1; $i++) {
+        for ($i = 0; $i < $throttle - 1; $i++) {
             $this->json('GET', '/api/v1/twofaccounts/count');
             $this->json('GET', '/api/v1/twofaccounts/count');
         }
         }
 
 

+ 3 - 3
tests/Feature/Extensions/RemoteUserProviderTest.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-namespace Tests\Unit\Extensions;
+namespace Tests\Feature\Extensions;
 
 
 use App\Extensions\RemoteUserProvider;
 use App\Extensions\RemoteUserProvider;
 use App\Models\User;
 use App\Models\User;
@@ -94,8 +94,8 @@ class RemoteUserProviderTest extends FeatureTestCase
 
 
         $this->app['auth']->shouldUse('reverse-proxy-guard');
         $this->app['auth']->shouldUse('reverse-proxy-guard');
 
 
-        $name = str_pad('john', 300, '_');
-        $inDbName = substr($name, 0, 191);
+        $name      = str_pad('john', 300, '_');
+        $inDbName  = substr($name, 0, 191);
         $inDbEmail = substr($name, 0, 184) . '@remote';
         $inDbEmail = substr($name, 0, 184) . '@remote';
 
 
         $this->json('GET', '/api/v1/groups', [], [
         $this->json('GET', '/api/v1/groups', [], [