Skip to content

Commit 94097e9

Browse files
author
Ivan Gavryshko
committed
MAGETWO-43906: Long database prefix length breaks setup
- added test-case
1 parent 4d423ca commit 94097e9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

setup/src/Magento/Setup/Test/Unit/Validator/DbValidatorTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ public function testCheckDatabaseTablePrefixWrongFormat()
8787
$this->assertEquals(true, $this->dbValidator->checkDatabaseTablePrefix('_wrong_format'));
8888
}
8989

90+
/**
91+
* @expectedException \InvalidArgumentException
92+
* @expectedExceptionMessage Table prefix length can't be more then
93+
*/
94+
public function testCheckDatabaseTablePrefixWrongLength()
95+
{
96+
$this->assertEquals(
97+
true,
98+
$this->dbValidator->checkDatabaseTablePrefix('mvbXzXzItSIr0wrZW3gqgV2UKrWiK1Mj7bkBlW72rZW3gqgV2UKrWiK1M')
99+
);
100+
}
101+
90102
/**
91103
* @expectedException \Magento\Setup\Exception
92104
* @expectedExceptionMessage Database connection failure.

0 commit comments

Comments
 (0)