public function testInitToken() { $this->initGetMethodInstance(); $this->paymentMethodInstanceMock->expects($this->once())->method('initBillingAgreementToken')->with($this->model)->willReturn($this->model); $url = 'http://dddd'; $this->model->setRedirectUrl($url); $this->assertEquals($url, $this->model->initToken()); }