expectNotToPerformAssertions(); Schema::create('table', function (Blueprint $table) { $table->increments('id'); }); Schema::dropAllTables(); $this->artisan('migrate:install'); Schema::create('table', function (Blueprint $table) { $table->increments('id'); }); } public function testDropAllViews() { $this->expectNotToPerformAssertions(); DB::statement('create view foo (id) as select 1'); Schema::dropAllViews(); DB::statement('create view foo (id) as select 1'); } public function testRegisterCustomDoctrineType() { if ($this->driver !== 'sqlite') { $this->markTestSkipped('Test requires a SQLite connection.'); } Schema::registerCustomDoctrineType(TinyInteger::class, TinyInteger::NAME, 'TINYINT'); Schema::create('test', function (Blueprint $table) { $table->string('test_column'); }); $blueprint = new Blueprint('test', function (Blueprint $table) { $table->tinyInteger('test_column')->change(); }); $blueprint->build($this->getConnection(), new SQLiteGrammar); $this->assertArrayHasKey(TinyInteger::NAME, Type::getTypesMap()); $this->assertSame('tinyinteger', Schema::getColumnType('test', 'test_column')); } public function testRegisterCustomDoctrineTypeASecondTime() { if ($this->driver !== 'sqlite') { $this->markTestSkipped('Test requires a SQLite connection.'); } Schema::registerCustomDoctrineType(TinyInteger::class, TinyInteger::NAME, 'TINYINT'); Schema::create('test', function (Blueprint $table) { $table->string('test_column'); }); $blueprint = new Blueprint('test', function (Blueprint $table) { $table->tinyInteger('test_column')->change(); }); $blueprint->build($this->getConnection(), new SQLiteGrammar); $this->assertArrayHasKey(TinyInteger::NAME, Type::getTypesMap()); $this->assertSame('tinyinteger', Schema::getColumnType('test', 'test_column')); } }