Skip to content

Commit

Permalink
Merge pull request #30 from Staubiii/2.x-Fixture-class-name-as-key
Browse files Browse the repository at this point in the history
Take fixture name into account for table key hash
  • Loading branch information
ravage84 committed Aug 9, 2024
2 parents f8dd662 + 3eb35a5 commit a3b5310
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/TestSuite/Fixture/ChecksumTestFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@ protected function _hash(ConnectionInterface $db): string
/**
* 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 class names
*/
protected function _getTableKey(): string
{
return $this->connection() . '-' . $this->table;
return $this->connection() . '-' . $this->table . '-' . static::class;
}
}

0 comments on commit a3b5310

Please sign in to comment.