mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-03 03:38:52 +00:00
Remove Versions classes and all related data
This commit is contained in:
@@ -15,8 +15,6 @@ namespace tests;
|
||||
|
||||
require_once \dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'bootstrap/autoload.php';
|
||||
|
||||
use App\Extensions\util\Versions;
|
||||
use App\Models\Settings;
|
||||
|
||||
/**
|
||||
* Class InstallTest
|
||||
@@ -26,31 +24,14 @@ use App\Models\Settings;
|
||||
class InstallTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
/**
|
||||
* @throws \Cz\Git\GitException
|
||||
*
|
||||
*/
|
||||
public function testFullInstall()
|
||||
{
|
||||
$error = false;
|
||||
|
||||
public function testFullInstall()
|
||||
{
|
||||
passthru('php '.NN_ROOT.'artisan migrate:fresh --seed');
|
||||
|
||||
// Check one of the standard tables was created and has data.
|
||||
$patch = (new Versions())->getSQLPatchFromFile();
|
||||
$updateSettings = false;
|
||||
if ($patch > 0) {
|
||||
$updateSettings = Settings::query()->where(['section' => '', 'subsection' => '', 'name' => 'sqlpatch'])->update(['value' => $patch]);
|
||||
}
|
||||
// If it all worked, continue the install process.
|
||||
if ($updateSettings !== false) {
|
||||
$message = 'Database updated successfully';
|
||||
} else {
|
||||
$error = true;
|
||||
$message = 'Could not update sqlpatch to '.$patch.' for your database.';
|
||||
}
|
||||
$message = 'NNTmux installation completed successfully';
|
||||
|
||||
if (! $error) {
|
||||
$message = 'NNTmux installation completed successfully';
|
||||
}
|
||||
$this->assertEquals('NNTmux installation completed successfully', $message, 'Test Failed');
|
||||
}
|
||||
$this->assertEquals('NNTmux installation completed successfully', $message, 'Test Failed');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user