/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Value is not an instance of ShipmentProvider */ public function testAddInvalidShipmentProviderShouldThrowInvalidArgumentException() { $collection = new ShipmentProviderCollection(); $collection->add(1); }