configMock = $this->createMock(Config::class); $this->availabilityChecker = new AvailabilityChecker($this->configMock); } /** * Test isAvailable method * * @dataProvider isAvailableDataProvider * * @param bool $isVerify3DSecure * @param bool $expected * * @return void */ public function testIsAvailable(bool $isVerify3DSecure, bool $expected) { $this->configMock->expects($this->once())->method('isVerify3DSecure')->willReturn($isVerify3DSecure); $actual = $this->availabilityChecker->isAvailable(); self::assertEquals($expected, $actual); } /** * Data provider for isAvailable method test * * @return array */ public function isAvailableDataProvider() { return [ [true, false], [false, true], ]; } }