Laravel-Test-Helpers
Laravel-Test-Helpers copied to clipboard
Easier testing in Laravel.
The problem I'm having is that if I have a model, say, User which sets protected $softDelete = true. Now when using Factory::create('User'), if I don't specify the override ['deleted_at'...
I'm trying to write a test for this ``` public function challengeoptions() { return $this->belongsToMany('Challengeoptions') ->withPivot('donepct') ->withTimestamps(); } ``` But when trying to use **assertBelongsToMany()** I'm just getting the error:...
When I'm using factory to fill model attribute, i get this error ``` ....PHP Fatal error: Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found in /Users/rahmatawaludin/Sites/stc-idms/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php on line 59 Fatal error: Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not...
I use this code (and I have Kontakan class for model) ``` php public function testBasicExample() { $kontakan = Factory::attributeFor('Kontakan'); } ``` and when I run phpunit, I got this...
There is a large drawback of the facade pattern. As with Laravel in general ide code completition does not work with laravel test helpers. Would you think it would be...
> [#] 1) UsersControllerTest::testLogin > [#] Symfony\Component\CssSelector\Exception\SyntaxErrorException: Unclosed/invalid string at 37. > [#] # /Users/jasonlfunk/Workspace/Work/inventory/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php:55 > [#] # /Users/jasonlfunk/Workspace/Work/inventory/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php:72 > [#] # /Users/jasonlfunk/Workspace/Work/inventory/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php:65 > [#] # /Users/jasonlfunk/Workspace/Work/inventory/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php:49 > [#] #...
I have a model that has a bigint field. Only, my tests fails with: `Exception: Could not calculate correct fixture method` The method he's trying to execute is getBigint, but...
I was trying to use this library and found a (possible?) bug. For various reason I don't have standard table's name and so I used the **$table** property inside each...
Hi, I found a 'bug' in AssertHasMany(), AssertHasOne() etc If I do my relationship like this: ``` public function photos() { $this->hasMany('Photo'); } ``` Then AssertHasMany will pass 'green' on...
When I use ``` php $student = Factory::create('Student'); ``` It always throw Way\Tests\ModelNotFoundException. Here is the full error messages > [#] # /Users/titopandub/Projects/Web/laravel/vendor/way/laravel-test-helpers/src/Way/Tests/Factory.php:164 > [#] # /Users/titopandub/Projects/Web/laravel/vendor/way/laravel-test-helpers/src/Way/Tests/Factory.php:122 > [#] #...