Move some tests into their own subfodlers
This commit is contained in:
parent
0dd6adfa0e
commit
e1aa814d8c
18 changed files with 29 additions and 31 deletions
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
namespace Tests\Feature\Admin;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class AdminHomeControllerTest extends TestCase
|
||||
{
|
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
namespace Tests\Feature\Admin;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class AdminTest extends TestCase
|
||||
{
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
namespace Tests\Feature\Admin;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ArticlesAdminTest extends TestCase
|
||||
class ArticlesTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
namespace Tests\Feature\Admin;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ClientsAdminTest extends TestCase
|
||||
class ClientsTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
namespace Tests\Feature\Admin;
|
||||
|
||||
use App\Contact;
|
||||
use Tests\TestCase;
|
||||
|
@ -11,7 +11,7 @@ use Illuminate\Http\UploadedFile;
|
|||
use GuzzleHttp\Handler\MockHandler;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class ContactsAdminTest extends TestCase
|
||||
class ContactsTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
|
@ -83,7 +83,7 @@ class ContactsAdminTest extends TestCase
|
|||
|
||||
public function test_edit_contact_with_uploaded_avatar()
|
||||
{
|
||||
copy(__DIR__ . '/../aaron.png', sys_get_temp_dir() . '/tantek.png');
|
||||
copy(__DIR__ . '/../../aaron.png', sys_get_temp_dir() . '/tantek.png');
|
||||
$path = sys_get_temp_dir() . '/tantek.png';
|
||||
$file = new UploadedFile($path, 'tantek.png', 'image/png', filesize($path), null, true);
|
||||
$this->withSession([
|
||||
|
@ -97,7 +97,7 @@ class ContactsAdminTest extends TestCase
|
|||
'avatar' => $file,
|
||||
]);
|
||||
$this->assertFileEquals(
|
||||
__DIR__ . '/../aaron.png',
|
||||
__DIR__ . '/../../aaron.png',
|
||||
public_path() . '/assets/profile-images/tantek.com/image'
|
||||
);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class ContactsAdminTest extends TestCase
|
|||
<img class="u-photo" src="http://tantek.com/tantek.png">
|
||||
</div>
|
||||
HTML;
|
||||
$file = fopen(__DIR__ . '/../aaron.png', 'r');
|
||||
$file = fopen(__DIR__ . '/../../aaron.png', 'r');
|
||||
$mock = new MockHandler([
|
||||
new Response(200, ['Content-Type' => 'text/html'], $html),
|
||||
new Response(200, ['Content-Type' => 'iamge/png'], $file),
|
||||
|
@ -135,7 +135,7 @@ HTML;
|
|||
])->get('/admin/contacts/1/getavatar');
|
||||
|
||||
$this->assertFileEquals(
|
||||
__DIR__ . '/../aaron.png',
|
||||
__DIR__ . '/../../aaron.png',
|
||||
public_path() . '/assets/profile-images/tantek.com/image'
|
||||
);
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
namespace Tests\Feature\Admin;
|
||||
|
||||
use Tests\TestCase;
|
||||
use App\Jobs\SendWebMentions;
|
||||
use Illuminate\Support\Facades\Queue;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class NotesAdminTest extends TestCase
|
||||
class NotesTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
namespace Tests\Feature\Admin;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
|
||||
class PlacesAdminTest extends TestCase
|
||||
class PlacesTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use Tests\TestCase;
|
||||
use App\Jobs\AddClientToDatabase;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use Tests\TestCase;
|
||||
use GuzzleHttp\Client;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use App\Bookmark;
|
||||
use Tests\TestCase;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use Storage;
|
||||
use Tests\TestCase;
|
||||
|
@ -24,7 +24,7 @@ class ProcessMediaJobTest extends TestCase
|
|||
{
|
||||
Storage::fake('s3');
|
||||
$manager = app()->make(ImageManager::class);
|
||||
Storage::disk('local')->put('aaron.png', file_get_contents(__DIR__.'/../aaron.png'));
|
||||
Storage::disk('local')->put('aaron.png', file_get_contents(__DIR__.'/../../aaron.png'));
|
||||
$job = new ProcessMedia('aaron.png');
|
||||
$job->handle($manager);
|
||||
|
||||
|
@ -34,7 +34,7 @@ class ProcessMediaJobTest extends TestCase
|
|||
public function test_large_images_have_smaller_files_created()
|
||||
{
|
||||
$manager = app()->make(ImageManager::class);
|
||||
Storage::disk('local')->put('test-image.jpg', file_get_contents(__DIR__.'/../test-image.jpg'));
|
||||
Storage::disk('local')->put('test-image.jpg', file_get_contents(__DIR__.'/../../test-image.jpg'));
|
||||
Storage::fake('s3');
|
||||
$job = new ProcessMedia('test-image.jpg');
|
||||
$job->handle($manager);
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use App\Note;
|
||||
use Tests\TestCase;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use Tests\TestCase;
|
||||
use GuzzleHttp\Client;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use App\Note;
|
||||
use Tests\TestCase;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use App\Bookmark;
|
||||
use Tests\TestCase;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use App\Bookmark;
|
||||
use Tests\TestCase;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use App\Note;
|
||||
use Tests\TestCase;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
namespace Tests\Unit\Jobs;
|
||||
|
||||
use App\Note;
|
||||
use Tests\TestCase;
|
Loading…
Add table
Reference in a new issue