public function testAddingTimeStamps() { $blueprint = new Blueprint('users'); $blueprint->timestamps(); $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); $this->assertEquals(1, count($statements)); $this->assertEquals('alter table "users" add "created_at" datetime not null, "updated_at" datetime not null', $statements[0]); }
public function testAddingTimeStamps() { $blueprint = new Blueprint('users'); $blueprint->timestamps(); $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); $this->assertEquals(2, count($statements)); $expected = array('alter table "users" add column "created_at" datetime null', 'alter table "users" add column "updated_at" datetime null'); $this->assertEquals($expected, $statements); }