From 2ffb5a4d73a2b72a4a4b1ee3fc171aa719a79ff3 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Fri, 9 Aug 2019 23:10:04 +0200 Subject: [PATCH] add phpunit configuration for coverage report, mark uncovered lines --- src/Application/Controller/d3totplogin.php | 2 ++ src/Modules/Core/d3_totp_utils.php | 2 ++ src/tests/phpunit.xml | 30 ++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 src/tests/phpunit.xml diff --git a/src/Application/Controller/d3totplogin.php b/src/Application/Controller/d3totplogin.php index 25a7c0b..6fd9b3c 100644 --- a/src/Application/Controller/d3totplogin.php +++ b/src/Application/Controller/d3totplogin.php @@ -33,7 +33,9 @@ class d3totplogin extends FrontendController ) { $this->getUtils()->redirect('index.php?cl=start', true, 302); if (false == defined('OXID_PHP_UNIT')) { + // @codeCoverageIgnoreStart exit; + // @codeCoverageIgnoreEnd } } diff --git a/src/Modules/Core/d3_totp_utils.php b/src/Modules/Core/d3_totp_utils.php index d6f2640..7266357 100644 --- a/src/Modules/Core/d3_totp_utils.php +++ b/src/Modules/Core/d3_totp_utils.php @@ -41,7 +41,9 @@ class d3_totp_utils extends d3_totp_utils_parent if ($blAuth && $totp->isActive() && false === $totpAuth) { $this->redirect('index.php?cl=login', true, 302); if (false == defined('OXID_PHP_UNIT')) { + // @codeCoverageIgnoreStart exit; + // @codeCoverageIgnoreEnd } } diff --git a/src/tests/phpunit.xml b/src/tests/phpunit.xml new file mode 100644 index 0000000..4f113cf --- /dev/null +++ b/src/tests/phpunit.xml @@ -0,0 +1,30 @@ + + + + ../Application + ../Modules + ../Setup + + ../Application/views + ../Application/translations + + + + + + +