Comments (9)
Let me see your factories file.
from testdummy.
Hi Jeff,
I get the same issue as above. But when in iterm2 all works fine apart from 5 of these messages each time..
Warning: include_once(): Failed opening '/Users/nigel/projects/work/laravel/tests/functional' for inclusion (include_path='/Users/nigel/projects/work/laravel/vendor/phpunit/php-text-template:/Users/nigel/projects/work/laravel/vendor/phpunit/php-timer:/Users/nigel/projects/work/laravel/vendor/phpunit/php-file-iterator:.:/Applications/XAMPP/xamppfiles/lib/php') in /Applications/XAMPP/xamppfiles/lib/php/PHPUnit/Util/Fileloader.php on line 95
Hope that might shed some light ont he issue..
from testdummy.
I'm getting same error, but only in remote server.
In my local installation all works fine without any problems.
Dumping composer autoload and clearing cache did not help.
$ php artisan db:seed -vvv --class=WishTableSeeder
[Laracasts\TestDummy\TestDummyException]
Could not locate a factory with the name: App\Models\Wish
Exception trace:
() at ...vendor/laracasts/testdummy/src/Builder.php:196
Laracasts\TestDummy\Builder->getFixture() at ...vendor/laracasts/testdummy/src/Builder.php:155
Laracasts\TestDummy\Builder->getAttributes() at ...vendor/laracasts/testdummy/src/Builder.php:96
Laracasts\TestDummy\Builder->build() at ...vendor/laracasts/testdummy/src/Builder.php:134
Laracasts\TestDummy\Builder->persist() at ...vendor/laracasts/testdummy/src/Builder.php:115
Laracasts\TestDummy\Builder->create() at ...database/seeds/WishTableSeeder.php:11
from testdummy.
I have the same issue. in my case, because the name of defineAs
and factory
method is different.
this happen for me after I change the namespaces of Model and I forgot to update the namespaces in factory()
method
// ModelFactory.php
$factory->defineAs(App\Models\User::class, 'superadmin', function ($faker) use ($factory) {
$user = $factory->raw(App\Models\User::class);
return array_merge($user, config('site_default.users.superadmin'));
});
// UserSeeder.php file
factory('App\User', 'superadmin')->create(); // <---- I forget change this. should : App\Models\User
$this->command->comment(PHP_EOL .'User superadmin was generated...');
from testdummy.
@antoniputra
Unfortunately that is not a case for me, since everything is working in my local installation.
This happens only in remote server.
from testdummy.
oh, are you sure with your remote server environment set up ?
you are using external package, I don't familiar with this Exception. [Laracasts\TestDummy\TestDummyException]
can you show me your ModelFactories and WishTableSeeder code ?
from testdummy.
@antoniputra I am using Laracast/Testdummy, the very same package in which git repo we talk right now.
Yes, I'm positive this only happens in remote server. Not sure what can cause this. I'm trying to track this down right now.
One interesting thing I did not notice before is the fact that my whole factories.php file gets printed to stdout.
from testdummy.
I found it. It was PHP environment problem.
I have shortcode php start tag in factories.php and even though I do have short_open_tag = On in remote php, I did not have it On in php cli.
So it was PHP environment problem.
from testdummy.
glad hear it. :D
from testdummy.
Related Issues (20)
- `$faker->optional()` is not getting called foreach transaction HOT 3
- Issue with using strings as primary id HOT 1
- Create Models from json/array
- Call to undefined method User::fill() HOT 2
- Factory::build should take times() into account HOT 2
- Create factory extending/overriding an existing factory's attributes HOT 1
- More then one row beeing adding to relational models
- factory:App\Album syntax doesn't work. it said 'Integrity Constrain Violation' message. HOT 6
- Getting faker not found error running through behat
- Problem with attribute casting
- Use factories for not Eloquent model HOT 8
- Can't use array attributes
- fakerphp/faker downgraded when installing laracasts/testdummy
- Is unique() supported? HOT 7
- Object of class Closure could not be converted to string HOT 2
- unique() in user Closures
- Relationship attributes not being added to model instance before saving? HOT 5
- Ability to specify relation create new or use existing HOT 8
- Faker Localization HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testdummy.