laravel-shift/blueprint

RememberToken has empty faker stmt in UserControllerTest

Konafets opened this issue · 2 comments

  • Laravel Version: 9.38.0
  • PHP Version: 8.1.12
  • Blueprint Version: 2.4
  • Platform: Mac

Issue:

The remember_token has an unfinished faker statement in the generated UserControllerTest::store_saves_and_redirects:

    /**
     * @test
     */
    public function store_saves_and_redirects(): void
    {
        $name = $this->faker->name;
        $email = $this->faker->safeEmail;
        $password = $this->faker->password;
        $remember_token = $this->faker->;
        // Error on the line above ...

draft.yaml:

models:
  User:
    name: string
    email: string unique
    email_verified_at: datetime nullable
    password: string
    remember_token: rememberToken
    softDeletes

controllers:
  User:
    resource

Blueprint uses a library to "guess" the faker input. This would be better handled there.

My first idea was to add it to this array https://github.com/laravel-shift/faker-registry/blob/master/src/Registry.php#L9, but was not sure and got inspired by this PR #229.

So should I move it to the other repo?