Hi,
Eloquent is just an alias provided by the configuration of Laravel. You need to directly extend the Model class.
To test your model, I have the same question here : https://laracasts.com/discuss/channels/testing/phpspec-package-developpment
Hi guys, I want to update my Laravel 4 packages to Laravel 5 for all you guys. I would like deliver the updated package with unit and integration tests running on Trevis CI I just need some of your precious suggests.
Laravel 5 has removed the workbench feature (no problem), so for create a new package just create a new folder and init composer installing the dependencies.
As I know when developing packages we have to pull in the "illuminate/support": "~5.0". Taking a look his components they are useful Contracts and Helpers.
Question
My current package use Eloquent in it's features, illuminate/support doesn't provider it. Should i pull in the "laravel/framework": "5.0.*" component to be able to use it?
How I said my package use Eloquent so it means run queries for you, I want to be able to set up my integration tests with sqlite in memory.
My previous experience in L4 this process was a bit tricky even if pulling the Orchestra\TestCase package was helping us to set environment to testing and other useful stuff.
Question
I feel forced to pull in the "laravel/framework": "5.0.*" in this case, otherwise how can I bootstrap the application for run my integration tests in memory? am I right?
If you have experience with the "new system" of packages development please do light on this questions. Thank you!
@max23 i solved the problem, as for laravel 4, I used Orchestra\TestBench package in it version 3.0.*.
It has all the boilerplate to bootstrap the framework and run our integration tests during the package development.
Please or to participate in this conversation.