You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Collection container class that uses generics:
/** * This class represents a list of models. * * @template M of AbstractModel * @extends \SplObjectStorage<M, int> */class Collection extends \SplObjectStorage
{
…
}
(with AbstractModel being the abstract base class for domain models)
3069 Call to static method PHPUnit\Framework\Assert::assertSame() with
OliverKlee\Oelib\DataStructures\Collection<OliverKlee\Oelib\Model\Abs
tractModel> and
OliverKlee\Oelib\DataStructures\Collection<Tx_Seminars_Model_Organize
r> will always evaluate to false.
(Organizer is a subclass of AbstractModel, as is PaymentMethods used in the example below.)
for code that basically looks like this (simplified):
So either the check for assertSame should completely disregard the contained type within generics, or it should allow contained types that are compatible to each other.
The text was updated successfully, but these errors were encountered:
I have a
Collection
container class that uses generics:(with
AbstractModel
being the abstract base class for domain models)Now I get error messages like this:
(Organizer is a subclass of AbstractModel, as is PaymentMethods used in the example below.)
for code that basically looks like this (simplified):
So either the check for assertSame should completely disregard the contained type within generics, or it should allow contained types that are compatible to each other.
The text was updated successfully, but these errors were encountered: