From 44a4d8f4b0c0a157402f263d5bf38578e773bda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20T=C3=A4ge?= Date: Fri, 7 Dec 2018 20:23:53 +0100 Subject: [PATCH 1/2] Set popover boundary to viewport --- src/Report/Html/Renderer/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Report/Html/Renderer/File.php b/src/Report/Html/Renderer/File.php index 2e88d198c..0ce9be6b1 100644 --- a/src/Report/Html/Renderer/File.php +++ b/src/Report/Html/Renderer/File.php @@ -339,7 +339,7 @@ protected function renderSource(FileNode $node): string if (!empty($popoverTitle)) { $popover = \sprintf( - ' data-title="%s" data-content="%s" data-placement="bottom" data-html="true"', + ' data-title="%s" data-content="%s" data-placement="bottom" data-html="true" data-boundary="viewport"', $popoverTitle, \htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) ); From 3ebe48bf7af063c7d1c8a5ad2285f7e3e92f5fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20T=C3=A4ge?= Date: Fri, 7 Dec 2018 20:33:26 +0100 Subject: [PATCH 2/2] update tests --- .../CoverageForBankAccount/BankAccount.php.html | 10 +++++----- ...urce_with_class_and_anonymous_function.php.html | 14 +++++++------- .../source_with_ignore.php.html | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html b/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html index 21694c58b..4296e2a71 100644 --- a/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html +++ b/tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html @@ -196,7 +196,7 @@
5
6
    public function getBalance()
7
    { -
8
        return $this->balance; +
8
        return $this->balance;
9
    }
10
11
    protected function setBalance($balance) @@ -210,16 +210,16 @@
19
20
    public function depositMoney($balance)
21
    { -
22
        $this->setBalance($this->getBalance() + $balance); +
22
        $this->setBalance($this->getBalance() + $balance);
23
-
24
        return $this->getBalance(); +
24
        return $this->getBalance();
25
    }
26
27
    public function withdrawMoney($balance)
28
    { -
29
        $this->setBalance($this->getBalance() - $balance); +
29
        $this->setBalance($this->getBalance() - $balance);
30
-
31
        return $this->getBalance(); +
31
        return $this->getBalance();
32
    }
33
} diff --git a/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html b/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html index 433c023a1..a44f5675a 100644 --- a/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html +++ b/tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html @@ -132,18 +132,18 @@
4
{
5
    public static function runAnonymous()
6
    { -
7
        $filter = ['abc124', 'abc123', '123']; +
7
        $filter = ['abc124', 'abc123', '123'];
8
-
9
        array_walk( +
9
        array_walk(
10
            $filter,
11
            function (&$val, $key) { -
12
                $val = preg_replace('|[^0-9]|', '', $val); -
13
            } -
14
        ); +
12
                $val = preg_replace('|[^0-9]|', '', $val); +
13
            } +
14
        );
15
16
        // Should be covered -
17
        $extravar = true; -
18
    } +
17
        $extravar = true; +
18
    }
19
} diff --git a/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html b/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html index a89dea014..8fc6b6972 100644 --- a/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html +++ b/tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html @@ -133,7 +133,7 @@ - +
<?php
if ($neverHappens) {
if ($neverHappens) {
    // @codeCoverageIgnoreStart
    print '*';
    // @codeCoverageIgnoreEnd