Skip to content

Commit

Permalink
Set connection to sync
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurkirkosa committed Jul 3, 2024
1 parent 48115cb commit 10e3a5e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2]
php: [8.3, 8.2]
laravel: [10.*, 11.*]
stability: [prefer-stable]
include:
Expand Down
2 changes: 1 addition & 1 deletion src/Replacers/ModelAttributesReplacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ModelAttributesReplacer implements Replacer
{
use ReplaceModelAttributes;

/** * @var Model */
/** @var Model */
protected $model;

public function replace(string $html, MailTemplateable $template): string
Expand Down
2 changes: 1 addition & 1 deletion src/Support/WithMailTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function template(MailTemplateable $template)

$this->template = $template;

/** * @var PersonalizeMailAction $replacerAction */
/** @var PersonalizeMailAction $replacerAction */
$replacerAction = app(PersonalizeMailAction::class);

// replace placehlders
Expand Down
3 changes: 3 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ protected function getPackageProviders($app)

protected function getEnvironmentSetUp($app)
{
$app['config']->set('queue.default', 'sync');

$app['config']->set('database.default', 'sqlite');

$app['config']->set('database.connections.sqlite', [
Expand All @@ -45,6 +47,7 @@ protected function getEnvironmentSetUp($app)
'prefix' => '',
]);


include_once __DIR__.'/../database/migrations/create_mailator_tables.php.stub';
(new \CreateMailatorTables())->up();
}
Expand Down
20 changes: 20 additions & 0 deletions tests/database/migrations/2017_10_10_000000_create_jobs_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
public function up(): void
{
Schema::create('jobs', function (Blueprint $table): void {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
}
};
16 changes: 3 additions & 13 deletions tests/database/migrations/2017_10_10_000000_create_posts_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
return new class () extends Migration {
public function up(): void
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
Expand All @@ -20,12 +15,7 @@ public function up()
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('posts');
}
Expand Down
19 changes: 4 additions & 15 deletions tests/database/migrations/2017_10_10_000000_create_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
return new class () extends Migration {
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
Expand All @@ -24,13 +18,8 @@ public function up()
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
public function down(): void
{
Schema::dropIfExists('users');
}
}
};

0 comments on commit 10e3a5e

Please sign in to comment.