From 117c8ea9b606897b96afbd7374c906a35c191407 Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Sat, 21 Oct 2023 21:22:09 -0700 Subject: [PATCH] Eliminate Coverage Upload --- .github/workflows/ci.yml | 2 -- tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed494fda68..21ba881cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,5 +115,3 @@ jobs: - name: Coverage run: | ./vendor/bin/phpunit --coverage-clover coverage-clover.xml - curl -LO https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover coverage-clover.xml diff --git a/tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php index 98449f3b6d..36b5547e7a 100644 --- a/tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php @@ -408,7 +408,13 @@ public function testWriteImage(): void // behind $element = $doc->getElement('/w:document/w:body/w:p[2]/w:r/w:pict/v:shape'); $style = $element->getAttribute('style'); - self::assertRegExp('/z\-index:\-[0-9]*/', $style); + if (method_exists(self::class, 'assertMatchesRegularExpression')) { + self::assertMatchesRegularExpression('/z\-index:\-[0-9]*/', $style); + } elseif (method_exists(self::class, 'assertRegExp')) { + self::assertRegExp('/z\-index:\-[0-9]*/', $style); + } else { + self::fail('Unsure how to test regexp'); + } // square $element = $doc->getElement('/w:document/w:body/w:p[4]/w:r/w:pict/v:shape/w10:wrap');