assertLessThanOrEqual( 100, strlen( MessageGroupStats::getDatabaseIdForGroupId( $shortId ) ), 'Short id is <= 100 bytes long' ); $this->assertLessThanOrEqual( 100, strlen( MessageGroupStats::getDatabaseIdForGroupId( $longId ) ), 'Long id is <= 100 bytes long' ); $longId1 = str_repeat( 'ab', 100 ) . '1'; $longId2 = str_repeat( 'ab', 100 ) . '2'; $this->assertNotEquals( MessageGroupStats::getDatabaseIdForGroupId( $longId1 ), MessageGroupStats::getDatabaseIdForGroupId( $longId2 ), 'Two long ids with the same prefix do not collide' ); } }