コード例 #1
0
ファイル: ProxyAdapterTest.php プロジェクト: askzap/ultimate
 public function testProxyAdapterCanInvertAddIndex()
 {
     $table = new \Phinx\Db\Table('atable');
     $index = new \Phinx\Db\Table\Index();
     $index->setType(\Phinx\Db\Table\Index::INDEX)->setColumns(array('email'));
     $this->adapter->addIndex($table, $index);
     $commands = $this->adapter->getInvertedCommands();
     $this->assertEquals('dropIndex', $commands[0]['name']);
     $this->assertEquals('atable', $commands[0]['arguments'][0]);
     $this->assertContains('email', $commands[0]['arguments'][1]);
 }
コード例 #2
0
 /**
  * Sets the index dbType.
  *
  * @param string $type
  *
  * @return $this
  */
 public function setType($type)
 {
     $this->index->setType($type);
     return $this;
 }