/** * @param bool $verify * @param float $thresholdAmount * @param string $countryId * @param array $countries * @param array $expected * @covers \Magento\BraintreeTwo\Gateway\Request\ThreeDSecureDataBuilder::build * @dataProvider buildDataProvider */ public function testBuild($verify, $thresholdAmount, $countryId, array $countries, array $expected) { $buildSubject = ['payment' => $this->paymentDO, 'amount' => 25]; $this->configMock->expects(static::once())->method('isVerify3DSecure')->willReturn($verify); $this->configMock->expects(static::any())->method('getThresholdAmount')->willReturn($thresholdAmount); $this->configMock->expects(static::any())->method('get3DSecureSpecificCountries')->willReturn($countries); $this->billingAddress->expects(static::any())->method('getCountryId')->willReturn($countryId); $this->subjectReaderMock->expects(self::once())->method('readPayment')->with($buildSubject)->willReturn($this->paymentDO); $this->subjectReaderMock->expects(self::once())->method('readAmount')->with($buildSubject)->willReturn(25); $result = $this->builder->build($buildSubject); static::assertEquals($expected, $result); }