Beispiel #1
0
 /**
  * Tests static Column::makeList() method.
  * @deprecated - Column::makeList() is deprecated and set to be removed in 1.3
  */
 public function testMakeList()
 {
     $expected = 'Column0, Column1, Column2, Column3, Column4';
     $objArray = array();
     for ($i = 0; $i < 5; $i++) {
         $c = new Column();
         $c->setName("Column" . $i);
         $objArray[] = $c;
     }
     $list = Column::makeList($objArray, new DefaultPlatform());
     $this->assertEquals($expected, $list, sprintf("Expected '%s' match, got '%s' ", var_export($expected, true), var_export($list, true)));
     $strArray = array();
     for ($i = 0; $i < 5; $i++) {
         $strArray[] = "Column" . $i;
     }
     $list = Column::makeList($strArray, new DefaultPlatform());
     $this->assertEquals($expected, $list, sprintf("Expected '%s' match, got '%s' ", var_export($expected, true), var_export($list, true)));
 }
Beispiel #2
0
 /**
  * Return a comma delimited string of the columns which compose this index.
  * @deprecated because Column::makeList() is deprecated; use the array-returning getColumns() instead.
  */
 public function getColumnList()
 {
     return Column::makeList($this->getColumns(), $this->getTable()->getDatabase()->getPlatform());
 }