Skip to content

Commit 64c8117

Browse files
committed
fix(Table): support for index declared with single field as string
1 parent 931eef1 commit 64c8117

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
class Doctrine_Table_IndexesUsingSingleFieldString_TestCase extends Doctrine_UnitTestCase
4+
{
5+
public function prepareTables()
6+
{
7+
$this->tables = array('IndexesUsingSingleFieldStringTestCase');
8+
9+
parent::prepareTables();
10+
}
11+
12+
public function testSupportIndexesUsingSingleFieldString()
13+
{
14+
}
15+
}
16+
17+
class IndexDeclaredWithSingleFieldStringRecord extends Doctrine_Record
18+
{
19+
public function setTableDefinition()
20+
{
21+
$this->hasColumn('some_column_name', 'string', 255);
22+
23+
$this->index('single_field_index_as_string', array(
24+
'fields' => 'some_column_name',
25+
));
26+
}
27+
}

tests/run.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
$core->addTestCase(new Doctrine_Table_TestCase());
141141
$core->addTestCase(new Doctrine_Table_RemoveColumn_TestCase());
142142
$core->addTestCase(new Doctrine_Table_NamedQuery_TestCase());
143+
$core->addTestCase(new Doctrine_Table_IndexesUsingSingleFieldString_TestCase());
143144
$core->addTestCase(new Doctrine_UnitOfWork_TestCase());
144145
$core->addTestCase(new Doctrine_Collection_TestCase());
145146
$core->addTestCase(new Doctrine_Collection_Snapshot_TestCase());

0 commit comments

Comments
 (0)