diff --git a/lib/internal/Magento/Framework/DB/Ddl/Trigger.php b/lib/internal/Magento/Framework/DB/Ddl/Trigger.php index d6e7da6291335..83b778a2cfe99 100644 --- a/lib/internal/Magento/Framework/DB/Ddl/Trigger.php +++ b/lib/internal/Magento/Framework/DB/Ddl/Trigger.php @@ -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; } diff --git a/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/TriggerTest.php b/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/TriggerTest.php index adcf5d7060b1c..152760c7cb151 100644 --- a/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/TriggerTest.php +++ b/lib/internal/Magento/Framework/DB/Test/Unit/Ddl/TriggerTest.php @@ -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() *