$this->
assertInstanceOf(Envelope::
class,
$envelope->
withoutAll(NonExistentStamp::
class));
} public function testWithoutStampsOfType() { $envelope =
new Envelope(new DummyMessage('dummy'
),
[ new ReceivedStamp('transport1'
),
new DummyExtendsFooBarStamp(),
new DummyImplementsFooBarStamp(),
]);
$envelope2 =
$envelope->
withoutStampsOfType(DummyNothingImplementsMeStampInterface::
class);
$this->
assertEquals($envelope,
$envelope2);
$envelope3 =
$envelope2->
withoutStampsOfType(ReceivedStamp::
class);
$this->
assertEmpty($envelope3->
all(ReceivedStamp::
class));
$envelope4 =
$envelope3->
withoutStampsOfType(DummyImplementsFooBarStamp::
class);
$this->
assertEmpty($envelope4->
all(DummyImplementsFooBarStamp::
class));
$this->
assertEmpty($envelope4->
all(DummyExtendsFooBarStamp::
class));
$envelope5 =
$envelope3->
withoutStampsOfType(DummyFooBarStampInterface::
class);
$this->
assertEmpty($envelope5->
all());
}