How to run a single seeder during unit test? |
If you're placing your file into app/Database/Seeds then your namespace is incorrect when you attempt to run it.
Code: Currently: namespace Tests\Support\Database\Seeds; If you're trying to see if your Seeder works try using the spark CLI and do the following: Code: php spark make:seeder Test --suffix The seeder will do nothing, but it will create the appropriate namespaces and methods for you to modify according to your needs. Once you have it functioning as intended, then you can worry about its physical location in your system and modify the namespace accordingly. |
Messages In This Thread |
How to run a single seeder during unit test? - by Flurzo - 02-24-2023, 12:43 PM
RE: How to run a single seeder during unit test? - by InsiteFX - 02-25-2023, 01:13 AM
RE: How to run a single seeder during unit test? - by Flurzo - 02-25-2023, 08:20 AM
RE: How to run a single seeder during unit test? - by grimpirate - 02-25-2023, 08:56 AM
RE: How to run a single seeder during unit test? - by alice - 04-15-2024, 07:06 AM
RE: How to run a single seeder during unit test? - by kenjis - 04-15-2024, 05:41 PM
|