Skip to content

Commit

Permalink
[1.x] feat: TableKey takes into account the class name (#29)
Browse files Browse the repository at this point in the history
Take fixture name into account for table key hash

---------

Co-authored-by: german.krutov <[email protected]>
Co-authored-by: Marc Würth <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2024
1 parent af11866 commit 7ba14c8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/TestSuite/Fixture/ChecksumTestFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,15 @@ protected function _hash(ConnectionInterface $db)
/**
* Get the key for table hashes
*
* @return string key for specify connection and table
* The key contains:
* - The table name
* - The connection name to prevent collisions across connections
* - The fixture class name to prevent collisions when loading multiple fixtures for the same table throughout a test run
*
* @return string key based on connection, table and fixture's class
*/
protected function _getTableKey ()
protected function _getTableKey()
{
return $this->connection() . '-' . $this->table;
return $this->connection() . '-' . $this->table . '-' . static::class;
}
}

0 comments on commit 7ba14c8

Please sign in to comment.