Skip to content

Commit e0e598a

Browse files
krugerman007german.krutov
and
german.krutov
authored
[3.x] Take fixture name into account for table key hash (#28)
--------- Co-authored-by: german.krutov <[email protected]>
1 parent 896b79d commit e0e598a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/TestSuite/Fixture/ChecksumTestFixture.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,15 @@ protected function _hash(ConnectionInterface $connection): string
114114
/**
115115
* Get the key for table hashes
116116
*
117-
* @return string key for specify connection and table
117+
* The key contains:
118+
* - The table name
119+
* - The connection name to prevent collisions across connections
120+
* - The fixture class name to prevent collisions when loading multiple fixtures for the same table throughout a test run
121+
*
122+
* @return string Key based on connection, table and fixture class names
118123
*/
119124
protected function _getTableKey(): string
120125
{
121-
return $this->connection() . '-' . $this->table;
126+
return $this->connection() . '-' . $this->table . '-' . static::class;
122127
}
123128
}

0 commit comments

Comments
 (0)