/** * @covers ::submitForm */ function testSubmitForm() { $this->logger->expects($this->atLeastOnce())->method('info'); $url = new Url($this->randomMachineName()); $this->paymentMethodConfiguration->expects($this->once())->method('delete'); $this->paymentMethodConfiguration->expects($this->atLeastOnce())->method('urlinfo')->with('collection')->willReturn($url); $form = []; $form_state = $this->getMock(FormStateInterface::class); $form_state->expects($this->once())->method('setRedirectUrl')->with($url); $this->sut->submitForm($form, $form_state); }