/** * Method to test alterColumn(). * * @return void * * @covers Windwalker\Query\Mysql\MysqlQueryBuilder::alterColumn */ public function testAlterColumn() { $expected = "ALTER TABLE {$this->qn('foo')} MODIFY {$this->qn('bar')} int(11) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Test' FIRST"; $actual = MysqlQueryBuilder::alterColumn('MODIFY', 'foo', 'bar', 'int(11)', false, false, '1', 'FIRST', 'Test'); $this->assertEquals($this->format($expected), $this->format($actual)); $expected = "ALTER TABLE {$this->qn('foo')} CHANGE {$this->qn('bar')} {$this->qn('yoo')} text AFTER {$this->qn('id')}"; $actual = MysqlQueryBuilder::alterColumn('CHANGE', 'foo', array('bar', 'yoo'), 'text', true, true, null, 'AFTER id', null); $this->assertEquals($this->format($expected), $this->format($actual)); }