Laravel-Test-Helpers icon indicating copy to clipboard operation
Laravel-Test-Helpers copied to clipboard

Easier testing in Laravel.

Results 35 Laravel-Test-Helpers issues
Sort by recently updated
recently updated
newest added

I'm trying to write a test for this: ``` public function follows() { return $this->morphedByMany('User', 'followable', 'follows', 'user_id', 'followable_id')->withTimestamps(); } ``` But when trying to use assertRelationship(): ``` public function...

Factory.php was not taking into account fields that have `{$class}_id` as their primary key instead of `id` eg `user_id` as the primary key for the `users` table. - fixed and...

Added assertion-failed messages to assertValid and assertNotValid as an optional second argument, making the current messages the the default message.

Using fix suggested by sorora in issue #6 thread as it worked for me. NOT authored by myself, pulled from this commit here https://github.com/sorora/Laravel-Test-Helpers/commit/4658c228959f03ca46a4c8c5bdfdfb2f34fe65b4 reduced switch to 2 cases as...

All parameters for the 4 standard eloquent relationship methods are supported. Added 13 tests for the relationship assertion methods. Update: I added the ability to use the QueryBuilder methods. Example:...

Using sqlite3 with Laravel's default settings, the Factory::create method fails with the example code on page 102 of Laravel Testing Decoded. ``` CREATE TABLE "authors" ( "author_id" integer not null...

I see that Factory::getColumns() is using the enum workaround for Doctrine and is also using listTableColumns(). listTableColumns will quote reserved words, so that the column name for 'primary' will come...

Why is the Factory::fire() method trying to build its own table name using `$this->parseTableName()` instead of using the one defined in the Model itself? Seems like this: ``` $this->tableName =...

I have deleted my models folder and creating the proper folder that would hold my Eloquent Models (or business logic), along with editing my composer file, I got everything working...