Skip to content

Commit

Permalink
Add schema creation
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah authored Sep 25, 2024
1 parent f3d032b commit 8cfdd11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Unit/ValidationRuleParsingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Knuckles\Scribe\Tests\Unit;

use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Validator;
use Illuminate\Translation\Translator;
use Illuminate\Validation\Rule;
Expand Down Expand Up @@ -40,6 +41,11 @@ public function parse($validationRules, $customParameterData = []): array
*/
public function can_parse_supported_rules(array $ruleset, array $customInfo, array $expected)
{
// Needed for `exists` rule
Schema::create('users', function (Blueprint $table) {
$table->id();
});

$results = $this->strategy->parse($ruleset, $customInfo);

$parameterName = array_keys($ruleset)[0];
Expand Down

0 comments on commit 8cfdd11

Please sign in to comment.