/** * Testing 'EbayEnterprise_Order_Helper_Event_Shipment::_addTrackingToShipment' * method, passing a known array of shipment data as parameter and a known * sales/order_shipment object, then proceed to test data in the collection * of shipment tracking match the expected data. * @param array $dataForShipment * @param array $expected * @dataProvider dataProvider */ public function testAddTrackingToShipment(array $dataForShipment, array $expected) { $shipment = Mage::getModel('sales/order_shipment', $dataForShipment); $this->assertSame($this->_shipmentHelper, EcomDev_Utils_Reflection::invokeRestrictedMethod($this->_shipmentHelper, '_addTrackingToShipment', [$this->_payload->getOrderItems(), $shipment])); $trackData = $shipment->getTracksCollection()->toArray(); $actual = $trackData['items']; $this->assertSame($expected, $actual); }