File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
lib/internal/Magento/Framework/Lock Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ public function isLocked(string $name): bool
167
167
*/
168
168
private function addPrefix (string $ name ): string
169
169
{
170
- $ prefix = $ this ->getPrefix () . '| ' ;
170
+ $ prefix = $ this ->getPrefix () ? $ this -> getPrefix () . '| ' : ' ' ;
171
171
$ name = ExpressionConverter::shortenEntityName ($ prefix . $ name , $ prefix );
172
172
173
173
if (strlen ($ name ) > 64 ) {
Original file line number Diff line number Diff line change @@ -106,15 +106,18 @@ public function testLock()
106
106
* @throws \Magento\Framework\Exception\AlreadyExistsException
107
107
* @throws \Magento\Framework\Exception\InputException
108
108
* @throws \Zend_Db_Statement_Exception
109
- * @expectedException \Magento\Framework\Exception\InputException
110
109
*/
111
110
public function testlockWithTooLongName ()
112
111
{
113
112
$ this ->deploymentConfig
114
113
->method ('isDbAvailable ' )
115
114
->with ()
116
115
->willReturn (true );
117
- $ this ->database ->lock ('BbXbyf9rIY5xuAVdviQJmh76FyoeeVHTDpcjmcImNtgpO4Hnz4xk76ZGEyYALvrQu ' );
116
+ $ this ->statement ->expects ($ this ->once ())
117
+ ->method ('fetchColumn ' )
118
+ ->willReturn (true );
119
+
120
+ $ this ->assertTrue ($ this ->database ->lock ('BbXbyf9rIY5xuAVdviQJmh76FyoeeVHTDpcjmcImNtgpO4Hnz4xk76ZGEyYALvrQu ' ));
118
121
}
119
122
120
123
/**
You can’t perform that action at this time.
0 commit comments