Skip to content

Commit

Permalink
Merge pull request #167 from magento-troll/MAGETWO-55449
Browse files Browse the repository at this point in the history
[Troll] MAGETWO-55449 - Cannot switch indexers to Update on Schedule mode if using table prefixes
  • Loading branch information
balex13 authored Jul 22, 2016
2 parents 2db9e0f + 9a8c1fd commit 211c668
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/DB/Ddl/Trigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function setTable($name)
(string)new \Magento\Framework\Phrase('Trigger table name should be a string')
);
}
$this->tableName = strtolower($name);
$this->tableName = $name;
return $this;
}

Expand Down
12 changes: 12 additions & 0 deletions lib/internal/Magento/Framework/DB/Test/Unit/Ddl/TriggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ public function testSetTableWithException()
$this->_object->setTable($tableName);
}

/**
* Test for table name setter
*/
public function testSetTableName()
{
$names = ['PREFIX_table', 'prefix_table'];
foreach ($names as $name) {
$this->_object->setTable($name);
$this->assertEquals($name, $this->_object->getTable());
}
}

/**
* Test case for getName()
*
Expand Down

0 comments on commit 211c668

Please sign in to comment.