it("gets the encoding last insert ID", function () { $schema = new Schema(['connection' => $this->adapter]); $schema->source('gallery'); $schema->column('id', ['type' => 'serial']); $schema->column('name', ['type' => 'string']); $schema->create(); $schema->insert(['name' => 'new gallery']); expect($schema->lastInsertId())->toBe("1"); $schema->drop(); }); it("gets the encoding last insert ID even with an empty record", function () { $schema = new Schema(['connection' => $this->adapter]); $schema->source('gallery'); $schema->column('id', ['type' => 'serial']); $schema->column('name', ['type' => 'string']); $schema->create(); $schema->insert([]); expect($schema->lastInsertId())->toBe("1"); $schema->drop(); }); }); describe("->query()", function () { it("throws an exception when an error occured", function () { $closure = function () { $this->adapter->query('SELECT'); }; expect($closure)->toThrow(); }); }); describe("->encoding()", function () { it("gets/sets the encoding", function () {