laracasts / TestDummy

Easy factories for PHP integration testing.
https://laracasts.com/lessons/whats-new-in-testdummy
MIT License
456 stars 80 forks source link

Problem of Duplicate entry #31

Closed gold3bear closed 9 years ago

gold3bear commented 10 years ago

I'm Learning the lesson "21.Browsing Users With Pagination" of laracasts. When I run UserRepositoryTest, I some times get a failure. it tells me: Duplicate entry username or email.

1) UserRepositoryTest::it_paginates_all_users
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'quia' for key 'users_username_unique' (SQL: insert into `users` (`username`, `email`, `password`, `created_at`, `updated_at`) values (quia, asperiores@example.com, y$JZayLEON7qjipeooyaillOey6L1AHPidyXmsXRzbTyLpganKINEsK, 2013-11-19 20:17:46, 2014-05-04 21:07:12))