eloquent-phpunit icon indicating copy to clipboard operation
eloquent-phpunit copied to clipboard

bigInt type is unknown

Open BodnarAgnes opened this issue 7 years ago • 1 comments
trafficstars

Migration: public function up() { Schema::create('user', function (Blueprint $table) { $table->bigIncrements('id'); }); }

Test: public function testDatabase() { $this->table->column('id')->increments(); }

Result: The id column is not of type Doctrine\DBAL\Types\IntegerType Failed asserting that Doctrine\DBAL\Types\BigIntType Object () is an instance of class "Doctrine\DBAL\Types\IntegerType".

vendor/erikgall/eloquent-phpunit/src/Database/Column.php:188 vendor/erikgall/eloquent-phpunit/src/Database/Column.php:253 vendor/erikgall/eloquent-phpunit/src/Database/Column.php:225 vendor/erikgall/eloquent-phpunit/src/Database/Column.php:159

BodnarAgnes avatar Jun 05 '18 11:06 BodnarAgnes

This should be add: $this->table->column('id')->bigIncrements();

BodnarAgnes avatar Jun 05 '18 11:06 BodnarAgnes