@@ -137,7 +137,6 @@ protected function setUp(): void
137137 $ this ->countryFactory ->method ('create ' )
138138 ->willReturn ($ this ->country );
139139
140- $ xmlFactory = $ this ->getXmlFactory ();
141140 $ httpClientFactory = $ this ->getHttpClientFactory ();
142141
143142 $ this ->logger = $ this ->getMockForAbstractClass (LoggerInterface::class);
@@ -154,7 +153,6 @@ protected function setUp(): void
154153 'rateErrorFactory ' => $ this ->errorFactory ,
155154 'countryFactory ' => $ this ->countryFactory ,
156155 'rateFactory ' => $ rateFactory ,
157- 'xmlElFactory ' => $ xmlFactory ,
158156 'logger ' => $ this ->logger ,
159157 'httpClientFactory ' => $ httpClientFactory ,
160158 'configHelper ' => $ this ->configHelper
@@ -178,11 +176,9 @@ public function scopeConfigGetValue(string $path)
178176 'carriers/ups/title ' => 'ups Title ' ,
179177 'carriers/ups/specificerrmsg ' => 'ups error message ' ,
180178 'carriers/ups/min_package_weight ' => 2 ,
181- 'carriers/ups/type ' => 'UPS ' ,
182179 'carriers/ups/debug ' => 1 ,
183180 'carriers/ups/username ' => 'user ' ,
184- 'carriers/ups/password ' => 'pass ' ,
185- 'carriers/ups/access_license_number ' => 'acn '
181+ 'carriers/ups/password ' => 'pass '
186182 ];
187183
188184 return $ pathMap [$ path ] ?? null ;
@@ -546,7 +542,6 @@ public function getCountryById(?string $id): Country
546542 }
547543
548544 /**
549- * @param string $carrierType
550545 * @param string $methodType
551546 * @param string $methodCode
552547 * @param string $methodTitle
@@ -557,7 +552,6 @@ public function getCountryById(?string $id): Country
557552 * @dataProvider allowedMethodsDataProvider
558553 */
559554 public function testGetAllowedMethods (
560- string $ carrierType ,
561555 string $ methodType ,
562556 string $ methodCode ,
563557 string $ methodTitle ,
@@ -573,12 +567,6 @@ public function testGetAllowedMethods(
573567 null ,
574568 $ allowedMethods
575569 ],
576- [
577- 'carriers/ups/type ' ,
578- ScopeInterface::SCOPE_STORE ,
579- null ,
580- $ carrierType
581- ],
582570 [
583571 'carriers/ups/origin_shipment ' ,
584572 ScopeInterface::SCOPE_STORE ,
@@ -601,23 +589,6 @@ public function allowedMethodsDataProvider(): array
601589 {
602590 return [
603591 [
604- 'UPS ' ,
605- 'method ' ,
606- '1DM ' ,
607- 'Next Day Air Early AM ' ,
608- '' ,
609- []
610- ],
611- [
612- 'UPS ' ,
613- 'method ' ,
614- '1DM ' ,
615- 'Next Day Air Early AM ' ,
616- '1DM,1DML,1DA ' ,
617- ['1DM ' => 'Next Day Air Early AM ' ]
618- ],
619- [
620- 'UPS_XML ' ,
621592 'originShipment ' ,
622593 '01 ' ,
623594 'UPS Next Day Air ' ,
@@ -627,36 +598,6 @@ public function allowedMethodsDataProvider(): array
627598 ];
628599 }
629600
630- /**
631- * Creates mock for XML factory.
632- *
633- * @return ElementFactory|MockObject
634- */
635- private function getXmlFactory (): MockObject
636- {
637- $ xmlElFactory = $ this ->getMockBuilder (ElementFactory::class)
638- ->disableOriginalConstructor ()
639- ->onlyMethods (['create ' ])
640- ->getMock ();
641- $ xmlElFactory ->method ('create ' )
642- ->willReturnCallback (
643- function ($ data ) {
644- $ helper = new ObjectManager ($ this );
645-
646- if (empty ($ data ['data ' ])) {
647- $ data ['data ' ] = '<?xml version = "1.0" ?><ShipmentAcceptRequest/> ' ;
648- }
649-
650- return $ helper ->getObject (
651- Element::class,
652- ['data ' => $ data ['data ' ]]
653- );
654- }
655- );
656-
657- return $ xmlElFactory ;
658- }
659-
660601 /**
661602 * Creates mocks for http client factory and client.
662603 *
0 commit comments