assertEquals($expected, $deliveryExecutionConfig->isHomeButtonHidden()); } /** * @dataProvider dataProviderForSetHideButtonTest * * @param bool $hide * @param bool $expected */ public function testSetHideHomeButtonMethod(bool $hide, bool $expected): void { $deliveryExecutionConfig = new DeliveryExecutionConfig([]); $this->assertEquals(false, $deliveryExecutionConfig->isHomeButtonHidden()); $deliveryExecutionConfig->setHideHomeButton($hide); $this->assertEquals($expected, $deliveryExecutionConfig->isHomeButtonHidden()); } /** * @dataProvider dataProviderForIsLogoutButtonHiddenTest * * @param array $options * @param bool $expected */ public function testIsLogoutButtonHiddenMethod(array $options, bool $expected): void { $deliveryExecutionConfig = new DeliveryExecutionConfig($options); $this->assertEquals($expected, $deliveryExecutionConfig->isLogoutButtonHidden()); } /** * @dataProvider dataProviderForSetHideButtonTest * * @param bool $hide * @param bool $expected */ public function testSetHideLogoutButtonMethod(bool $hide, bool $expected): void { $deliveryExecutionConfig = new DeliveryExecutionConfig([]); $this->assertEquals(false, $deliveryExecutionConfig->isLogoutButtonHidden()); $deliveryExecutionConfig->setHideLogoutButton($hide); $this->assertEquals($expected, $deliveryExecutionConfig->isLogoutButtonHidden()); } /** * @return array */ public function dataProviderForIsHomeButtonHiddenTest(): array { return [ [ 'options' => [DeliveryExecutionConfig::OPTION_HIDE_HOME_BUTTON => true], 'expected' => true, ], [ 'options' => [DeliveryExecutionConfig::OPTION_HIDE_HOME_BUTTON => false], 'expected' => false, ], [ 'options' => [DeliveryExecutionConfig::OPTION_HIDE_HOME_BUTTON => 'test value'], 'expected' => false, ], [ 'options' => [], 'expected' => false, ], ]; } /** * @return array */ public function dataProviderForIsLogoutButtonHiddenTest(): array { return [ [ 'options' => [DeliveryExecutionConfig::OPTION_HIDE_LOGOUT_BUTTON => true], 'expected' => true, ], [ 'options' => [DeliveryExecutionConfig::OPTION_HIDE_LOGOUT_BUTTON => false], 'expected' => false, ], [ 'options' => [DeliveryExecutionConfig::OPTION_HIDE_LOGOUT_BUTTON => 'test value'], 'expected' => false, ], [ 'options' => [], 'expected' => false, ], ]; } /** * @return array */ public function dataProviderForSetHideButtonTest(): array { return [ [ 'hide' => true, 'expected' => true, ], [ 'hide' => false, 'expected' => false, ], ]; } }