mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
fix notification chanels and more tests (#108)
* fix notification chanels and more tests * fix code style
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Livewire\Application\AutoDeployment;
|
||||
use App\Http\Livewire\Application\ChangeBranch;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http\Auth;
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http\Auth;
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http\Auth;
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use JsonException;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http\Auth;
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use Illuminate\Auth\Notifications\ResetPassword;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http\Auth;
|
||||
namespace Tests\Feature\Auth;
|
||||
|
||||
use App\Http\Livewire\Profile\UpdatePassword;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\CronjobStatus;
|
||||
use App\Http\Livewire\Cronjobs\CreateCronjob;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\BackupStatus;
|
||||
use App\Facades\SSH;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\DatabaseStatus;
|
||||
use App\Facades\SSH;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\DatabaseUserStatus;
|
||||
use App\Http\Livewire\Databases\DatabaseUserList;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\FirewallRuleStatus;
|
||||
use App\Http\Livewire\Firewall\CreateFirewallRule;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Livewire\ServerLogs\LogsList;
|
||||
use App\Models\ServerLog;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\NotificationChannel;
|
||||
use App\Http\Livewire\NotificationChannels\AddChannel;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Http\Livewire\Php\DefaultCli;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Livewire\Profile\UpdatePassword;
|
||||
use App\Http\Livewire\Profile\UpdateProfileInformation;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Livewire\Projects\CreateProject;
|
||||
use App\Http\Livewire\Projects\EditProject;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\QueueStatus;
|
||||
use App\Http\Livewire\Queues\CreateQueue;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\SshKeyStatus;
|
||||
use App\Http\Livewire\ServerSshKeys\AddExistingKey;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\ServerProvider;
|
||||
use App\Http\Livewire\ServerProviders\ConnectProvider;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\Database;
|
||||
use App\Enums\OperatingSystem;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\ServiceStatus;
|
||||
use App\Http\Livewire\Services\InstallPHPMyAdmin;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\SiteStatus;
|
||||
use App\Enums\SiteType;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Livewire\SourceControls\Connect;
|
||||
use App\Http\Livewire\SourceControls\SourceControlsList;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Livewire\SshKeys\AddKey;
|
||||
use App\Http\Livewire\SshKeys\KeysList;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\SslStatus;
|
||||
use App\Enums\SslType;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Http;
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\StorageProvider;
|
||||
use App\Http\Livewire\StorageProviders\ConnectProvider;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Models;
|
||||
namespace Tests\Unit\Models;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
87
tests/Unit/NotificationChannels/DiscordTest.php
Normal file
87
tests/Unit/NotificationChannels/DiscordTest.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\NotificationChannels;
|
||||
|
||||
use App\Models\NotificationChannel;
|
||||
use App\NotificationChannels\Discord;
|
||||
use Illuminate\Http\Client\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DiscordTest extends TestCase
|
||||
{
|
||||
public function test_create_rules(): void
|
||||
{
|
||||
$provider = new Discord(NotificationChannel::factory()->create([
|
||||
'provider' => 'discord',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'webhook_url' => 'required|url',
|
||||
], $provider->createRules([]));
|
||||
}
|
||||
|
||||
public function test_create_data(): void
|
||||
{
|
||||
$provider = new Discord(NotificationChannel::factory()->create([
|
||||
'provider' => 'discord',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'webhook_url' => 'https://discord.com/xxxxx',
|
||||
], $provider->createData([
|
||||
'webhook_url' => 'https://discord.com/xxxxx',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_data(): void
|
||||
{
|
||||
$provider = new Discord(NotificationChannel::factory()->create([
|
||||
'provider' => 'discord',
|
||||
'data' => [
|
||||
'webhook_url' => 'https://discord.com/xxxxx',
|
||||
],
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'webhook_url' => 'https://discord.com/xxxxx',
|
||||
], $provider->data());
|
||||
}
|
||||
|
||||
public function test_connect(): void
|
||||
{
|
||||
$provider = new Discord(NotificationChannel::factory()->create([
|
||||
'provider' => 'discord',
|
||||
'data' => [
|
||||
'webhook_url' => 'https://discord.com/xxxxx',
|
||||
],
|
||||
]));
|
||||
|
||||
Http::fake();
|
||||
|
||||
$this->assertTrue($provider->connect());
|
||||
|
||||
Http::assertSent(function ($request) {
|
||||
return $request->url() === 'https://discord.com/xxxxx';
|
||||
});
|
||||
}
|
||||
|
||||
public function test_send(): void
|
||||
{
|
||||
$channel = NotificationChannel::factory()->create([
|
||||
'provider' => 'discord',
|
||||
'data' => [
|
||||
'webhook_url' => 'https://discord.com/xxxxx',
|
||||
],
|
||||
]);
|
||||
$provider = new Discord($channel);
|
||||
|
||||
Http::fake();
|
||||
|
||||
$provider->send($channel, new TestNotification());
|
||||
|
||||
Http::assertSent(function (Request $request) {
|
||||
return $request->body() === '{"content":"Hello"}';
|
||||
});
|
||||
}
|
||||
}
|
83
tests/Unit/NotificationChannels/EmailTest.php
Normal file
83
tests/Unit/NotificationChannels/EmailTest.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\NotificationChannels;
|
||||
|
||||
use App\Mail\NotificationMail;
|
||||
use App\Models\NotificationChannel;
|
||||
use App\NotificationChannels\Email;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Tests\TestCase;
|
||||
|
||||
class EmailTest extends TestCase
|
||||
{
|
||||
public function test_create_rules(): void
|
||||
{
|
||||
$provider = new Email(NotificationChannel::factory()->create([
|
||||
'provider' => 'email',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'email' => 'required|email',
|
||||
], $provider->createRules([]));
|
||||
}
|
||||
|
||||
public function test_create_data(): void
|
||||
{
|
||||
$provider = new Email(NotificationChannel::factory()->create([
|
||||
'provider' => 'email',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'email' => 'user@example.com',
|
||||
], $provider->createData([
|
||||
'email' => 'user@example.com',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_data(): void
|
||||
{
|
||||
$provider = new Email(NotificationChannel::factory()->create([
|
||||
'provider' => 'email',
|
||||
'data' => [
|
||||
'email' => 'user@example.com',
|
||||
],
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'email' => 'user@example.com',
|
||||
], $provider->data());
|
||||
}
|
||||
|
||||
public function test_connect(): void
|
||||
{
|
||||
$provider = new Email(NotificationChannel::factory()->create([
|
||||
'provider' => 'email',
|
||||
'data' => [
|
||||
'email' => 'user@example.com',
|
||||
],
|
||||
]));
|
||||
|
||||
Mail::fake();
|
||||
|
||||
$this->assertTrue($provider->connect());
|
||||
|
||||
Mail::assertSent(NotificationMail::class);
|
||||
}
|
||||
|
||||
public function test_send(): void
|
||||
{
|
||||
$channel = NotificationChannel::factory()->create([
|
||||
'provider' => 'email',
|
||||
'data' => [
|
||||
'email' => 'user@example.com',
|
||||
],
|
||||
]);
|
||||
$provider = new Email($channel);
|
||||
|
||||
Mail::fake();
|
||||
|
||||
$provider->send($channel, new TestNotification());
|
||||
|
||||
Mail::assertSent(NotificationMail::class);
|
||||
}
|
||||
}
|
87
tests/Unit/NotificationChannels/SlackTest.php
Normal file
87
tests/Unit/NotificationChannels/SlackTest.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\NotificationChannels;
|
||||
|
||||
use App\Models\NotificationChannel;
|
||||
use App\NotificationChannels\Slack;
|
||||
use Illuminate\Http\Client\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Tests\TestCase;
|
||||
|
||||
class SlackTest extends TestCase
|
||||
{
|
||||
public function test_create_rules(): void
|
||||
{
|
||||
$provider = new Slack(NotificationChannel::factory()->create([
|
||||
'provider' => 'slack',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'webhook_url' => 'required|url',
|
||||
], $provider->createRules([]));
|
||||
}
|
||||
|
||||
public function test_create_data(): void
|
||||
{
|
||||
$provider = new Slack(NotificationChannel::factory()->create([
|
||||
'provider' => 'slack',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'webhook_url' => 'https://slack.com/xxxxx',
|
||||
], $provider->createData([
|
||||
'webhook_url' => 'https://slack.com/xxxxx',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_data(): void
|
||||
{
|
||||
$provider = new Slack(NotificationChannel::factory()->create([
|
||||
'provider' => 'slack',
|
||||
'data' => [
|
||||
'webhook_url' => 'https://slack.com/xxxxx',
|
||||
],
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'webhook_url' => 'https://slack.com/xxxxx',
|
||||
], $provider->data());
|
||||
}
|
||||
|
||||
public function test_connect(): void
|
||||
{
|
||||
$provider = new Slack(NotificationChannel::factory()->create([
|
||||
'provider' => 'slack',
|
||||
'data' => [
|
||||
'webhook_url' => 'https://slack.com/xxxxx',
|
||||
],
|
||||
]));
|
||||
|
||||
Http::fake();
|
||||
|
||||
$this->assertTrue($provider->connect());
|
||||
|
||||
Http::assertSent(function ($request) {
|
||||
return $request->url() === 'https://slack.com/xxxxx';
|
||||
});
|
||||
}
|
||||
|
||||
public function test_send(): void
|
||||
{
|
||||
$channel = NotificationChannel::factory()->create([
|
||||
'provider' => 'slack',
|
||||
'data' => [
|
||||
'webhook_url' => 'https://slack.com/xxxxx',
|
||||
],
|
||||
]);
|
||||
$provider = new Slack($channel);
|
||||
|
||||
Http::fake();
|
||||
|
||||
$provider->send($channel, new TestNotification());
|
||||
|
||||
Http::assertSent(function (Request $request) {
|
||||
return $request->body() === '{"text":"Hello"}';
|
||||
});
|
||||
}
|
||||
}
|
108
tests/Unit/NotificationChannels/TelegramTest.php
Normal file
108
tests/Unit/NotificationChannels/TelegramTest.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\NotificationChannels;
|
||||
|
||||
use App\Models\NotificationChannel;
|
||||
use App\NotificationChannels\Telegram;
|
||||
use Illuminate\Http\Client\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Tests\TestCase;
|
||||
|
||||
class TelegramTest extends TestCase
|
||||
{
|
||||
public function test_create_rules(): void
|
||||
{
|
||||
$provider = new Telegram(NotificationChannel::factory()->create([
|
||||
'provider' => 'telegram',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'bot_token' => 'required|string',
|
||||
'chat_id' => 'required',
|
||||
], $provider->createRules([]));
|
||||
}
|
||||
|
||||
public function test_create_data(): void
|
||||
{
|
||||
$provider = new Telegram(NotificationChannel::factory()->create([
|
||||
'provider' => 'telegram',
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'bot_token' => 'xxxxx',
|
||||
'chat_id' => '12345',
|
||||
], $provider->createData([
|
||||
'bot_token' => 'xxxxx',
|
||||
'chat_id' => '12345',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_data(): void
|
||||
{
|
||||
$provider = new Telegram(NotificationChannel::factory()->create([
|
||||
'provider' => 'telegram',
|
||||
'data' => [
|
||||
'bot_token' => 'xxxxx',
|
||||
'chat_id' => '12345',
|
||||
],
|
||||
]));
|
||||
|
||||
$this->assertSame([
|
||||
'bot_token' => 'xxxxx',
|
||||
'chat_id' => '12345',
|
||||
], $provider->data());
|
||||
}
|
||||
|
||||
public function test_connect(): void
|
||||
{
|
||||
$provider = new Telegram(NotificationChannel::factory()->create([
|
||||
'provider' => 'telegram',
|
||||
'data' => [
|
||||
'bot_token' => 'xxxxx',
|
||||
'chat_id' => '12345',
|
||||
],
|
||||
]));
|
||||
|
||||
Http::fake();
|
||||
|
||||
$this->assertTrue($provider->connect());
|
||||
|
||||
Http::assertSent(function ($request) {
|
||||
if ($request->url() === 'https://api.telegram.org/botxxxxx/sendMessage') {
|
||||
return $request->data() === [
|
||||
'chat_id' => '12345',
|
||||
'text' => 'Connected!',
|
||||
'parse_mode' => 'markdown',
|
||||
'disable_web_page_preview' => true,
|
||||
];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function test_send(): void
|
||||
{
|
||||
$channel = NotificationChannel::factory()->create([
|
||||
'provider' => 'telegram',
|
||||
'data' => [
|
||||
'bot_token' => 'xxxxx',
|
||||
'chat_id' => '12345',
|
||||
],
|
||||
]);
|
||||
$provider = new Telegram($channel);
|
||||
|
||||
Http::fake();
|
||||
|
||||
$provider->send($channel, new TestNotification());
|
||||
|
||||
Http::assertSent(function (Request $request) {
|
||||
if ($request->url() === 'https://api.telegram.org/botxxxxx/sendMessage') {
|
||||
return $request->data() === [
|
||||
'chat_id' => '12345',
|
||||
'text' => 'Hello',
|
||||
'parse_mode' => 'markdown',
|
||||
'disable_web_page_preview' => true,
|
||||
];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
13
tests/Unit/NotificationChannels/TestNotification.php
Normal file
13
tests/Unit/NotificationChannels/TestNotification.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\NotificationChannels;
|
||||
|
||||
use App\Notifications\AbstractNotification;
|
||||
|
||||
class TestNotification extends AbstractNotification
|
||||
{
|
||||
public function rawText(): string
|
||||
{
|
||||
return 'Hello';
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\CronJob;
|
||||
namespace Tests\Unit\SSHCommands\CronJob;
|
||||
|
||||
use App\SSHCommands\CronJob\UpdateCronJobsCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\BackupDatabaseCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\CreateCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\CreateUserCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\DeleteCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\DeleteUserCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\InstallMariadbCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\InstallMysqlCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\LinkCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
namespace Tests\Unit\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\UnlinkCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Firewall;
|
||||
namespace Tests\Unit\SSHCommands\Firewall;
|
||||
|
||||
use App\SSHCommands\Firewall\AddRuleCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Firewall;
|
||||
namespace Tests\Unit\SSHCommands\Firewall;
|
||||
|
||||
use App\SSHCommands\Firewall\InstallUfwCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Firewall;
|
||||
namespace Tests\Unit\SSHCommands\Firewall;
|
||||
|
||||
use App\SSHCommands\Firewall\RemoveRuleCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Installation;
|
||||
namespace Tests\Unit\SSHCommands\Installation;
|
||||
|
||||
use App\SSHCommands\Installation\InstallNodejsCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Installation;
|
||||
namespace Tests\Unit\SSHCommands\Installation;
|
||||
|
||||
use App\SSHCommands\Installation\InstallRedisCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Installation;
|
||||
namespace Tests\Unit\SSHCommands\Installation;
|
||||
|
||||
use App\SSHCommands\Installation\InstallRequirementsCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Nginx;
|
||||
namespace Tests\Unit\SSHCommands\Nginx;
|
||||
|
||||
use App\SSHCommands\Nginx\ChangeNginxPHPVersionCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Nginx;
|
||||
namespace Tests\Unit\SSHCommands\Nginx;
|
||||
|
||||
use App\SSHCommands\Nginx\CreateNginxVHostCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Nginx;
|
||||
namespace Tests\Unit\SSHCommands\Nginx;
|
||||
|
||||
use App\SSHCommands\Nginx\DeleteNginxSiteCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Nginx;
|
||||
namespace Tests\Unit\SSHCommands\Nginx;
|
||||
|
||||
use App\SSHCommands\Nginx\InstallNginxCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Nginx;
|
||||
namespace Tests\Unit\SSHCommands\Nginx;
|
||||
|
||||
use App\SSHCommands\Nginx\UpdateNginxRedirectsCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Nginx;
|
||||
namespace Tests\Unit\SSHCommands\Nginx;
|
||||
|
||||
use App\SSHCommands\Nginx\UpdateNginxVHostCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHP;
|
||||
namespace Tests\Unit\SSHCommands\PHP;
|
||||
|
||||
use App\SSHCommands\PHP\ChangeDefaultPHPCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHP;
|
||||
namespace Tests\Unit\SSHCommands\PHP;
|
||||
|
||||
use App\SSHCommands\PHP\GetPHPIniCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHP;
|
||||
namespace Tests\Unit\SSHCommands\PHP;
|
||||
|
||||
use App\SSHCommands\PHP\InstallComposerCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHP;
|
||||
namespace Tests\Unit\SSHCommands\PHP;
|
||||
|
||||
use App\SSHCommands\PHP\InstallPHPCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHP;
|
||||
namespace Tests\Unit\SSHCommands\PHP;
|
||||
|
||||
use App\SSHCommands\PHP\InstallPHPExtensionCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHP;
|
||||
namespace Tests\Unit\SSHCommands\PHP;
|
||||
|
||||
use App\SSHCommands\PHP\UninstallPHPCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHPMyAdmin;
|
||||
namespace Tests\Unit\SSHCommands\PHPMyAdmin;
|
||||
|
||||
use App\SSHCommands\PHPMyAdmin\CreateNginxPHPMyAdminVHostCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHPMyAdmin;
|
||||
namespace Tests\Unit\SSHCommands\PHPMyAdmin;
|
||||
|
||||
use App\SSHCommands\PHPMyAdmin\DeleteNginxPHPMyAdminVHostCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\PHPMyAdmin;
|
||||
namespace Tests\Unit\SSHCommands\PHPMyAdmin;
|
||||
|
||||
use App\SSHCommands\PHPMyAdmin\DownloadPHPMyAdminCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\SSL;
|
||||
namespace Tests\Unit\SSHCommands\SSL;
|
||||
|
||||
use App\SSHCommands\SSL\CreateCustomSSLCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\SSL;
|
||||
namespace Tests\Unit\SSHCommands\SSL;
|
||||
|
||||
use App\SSHCommands\SSL\CreateLetsencryptSSLCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\SSL;
|
||||
namespace Tests\Unit\SSHCommands\SSL;
|
||||
|
||||
use App\SSHCommands\SSL\InstallCertbotCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\SSL;
|
||||
namespace Tests\Unit\SSHCommands\SSL;
|
||||
|
||||
use App\SSHCommands\SSL\RemoveSSLCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Service;
|
||||
namespace Tests\Unit\SSHCommands\Service;
|
||||
|
||||
use App\SSHCommands\Service\RestartServiceCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Service;
|
||||
namespace Tests\Unit\SSHCommands\Service;
|
||||
|
||||
use App\SSHCommands\Service\ServiceStatusCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Service;
|
||||
namespace Tests\Unit\SSHCommands\Service;
|
||||
|
||||
use App\SSHCommands\Service\StartServiceCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Service;
|
||||
namespace Tests\Unit\SSHCommands\Service;
|
||||
|
||||
use App\SSHCommands\Service\StopServiceCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Storage;
|
||||
namespace Tests\Unit\SSHCommands\Storage;
|
||||
|
||||
use App\SSHCommands\Storage\DownloadFromDropboxCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Storage;
|
||||
namespace Tests\Unit\SSHCommands\Storage;
|
||||
|
||||
use App\SSHCommands\Storage\DownloadFromFTPCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Storage;
|
||||
namespace Tests\Unit\SSHCommands\Storage;
|
||||
|
||||
use App\SSHCommands\Storage\UploadToDropboxCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Storage;
|
||||
namespace Tests\Unit\SSHCommands\Storage;
|
||||
|
||||
use App\SSHCommands\Storage\UploadToFTPCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Supervisor;
|
||||
namespace Tests\Unit\SSHCommands\Supervisor;
|
||||
|
||||
use App\SSHCommands\Supervisor\CreateWorkerCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Supervisor;
|
||||
namespace Tests\Unit\SSHCommands\Supervisor;
|
||||
|
||||
use App\SSHCommands\Supervisor\DeleteWorkerCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Supervisor;
|
||||
namespace Tests\Unit\SSHCommands\Supervisor;
|
||||
|
||||
use App\SSHCommands\Supervisor\InstallSupervisorCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Supervisor;
|
||||
namespace Tests\Unit\SSHCommands\Supervisor;
|
||||
|
||||
use App\SSHCommands\Supervisor\RestartWorkerCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Supervisor;
|
||||
namespace Tests\Unit\SSHCommands\Supervisor;
|
||||
|
||||
use App\SSHCommands\Supervisor\StartWorkerCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Supervisor;
|
||||
namespace Tests\Unit\SSHCommands\Supervisor;
|
||||
|
||||
use App\SSHCommands\Supervisor\StopWorkerCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\CreateUserCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\DeleteSshKeyCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\DeploySshKeyCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\EditFileCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\GenerateSshKeyCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\GetPublicKeyCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\ReadFileCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\ReadSshKeyCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\RebootCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\RunScriptCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\System;
|
||||
namespace Tests\Unit\SSHCommands\System;
|
||||
|
||||
use App\SSHCommands\System\UpgradeCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Website;
|
||||
namespace Tests\Unit\SSHCommands\Website;
|
||||
|
||||
use App\SSHCommands\Website\CloneRepositoryCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Website;
|
||||
namespace Tests\Unit\SSHCommands\Website;
|
||||
|
||||
use App\SSHCommands\Website\ComposerInstallCommand;
|
||||
use Tests\TestCase;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Website;
|
||||
namespace Tests\Unit\SSHCommands\Website;
|
||||
|
||||
use App\SSHCommands\Website\UpdateBranchCommand;
|
||||
use Tests\TestCase;
|
Reference in New Issue
Block a user