1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Mon, 17 Feb 2025 16:38:49 +0100
Subject: Modernize PHPUnit syntax
---
tests/Css/ProcessorTest.php | 2 ++
tests/Css/Property/ProcessorTest.php | 2 ++
tests/Css/Rule/ProcessorTest.php | 2 ++
tests/CssToInlineStylesTest.php | 2 ++
4 files changed, 8 insertions(+)
diff --git a/tests/Css/ProcessorTest.php b/tests/Css/ProcessorTest.php
index fec088e..ed2b0ad 100644
--- a/tests/Css/ProcessorTest.php
+++ b/tests/Css/ProcessorTest.php
@@ -3,6 +3,7 @@
namespace TijsVerkoyen\CssToInlineStyles\Tests\Css;
use TijsVerkoyen\CssToInlineStyles\Css\Processor;
+use PHPUnit\Framework\Attributes\Before;
use PHPUnit\Framework\TestCase;
class ProcessorTest extends TestCase
@@ -15,6 +16,7 @@ class ProcessorTest extends TestCase
/**
* @before
*/
+ #[Before()]
protected function prepare(): void
{
$this->processor = new Processor();
diff --git a/tests/Css/Property/ProcessorTest.php b/tests/Css/Property/ProcessorTest.php
index d6e816f..b6ed077 100644
--- a/tests/Css/Property/ProcessorTest.php
+++ b/tests/Css/Property/ProcessorTest.php
@@ -4,6 +4,7 @@ namespace TijsVerkoyen\CssToInlineStyles\Tests\Css\Property;
use TijsVerkoyen\CssToInlineStyles\Css\Property\Processor;
use TijsVerkoyen\CssToInlineStyles\Css\Property\Property;
+use PHPUnit\Framework\Attributes\Before;
use PHPUnit\Framework\TestCase;
class ProcessorTest extends TestCase
@@ -16,6 +17,7 @@ class ProcessorTest extends TestCase
/**
* @before
*/
+ #[Before()]
protected function prepare(): void
{
$this->processor = new Processor();
diff --git a/tests/Css/Rule/ProcessorTest.php b/tests/Css/Rule/ProcessorTest.php
index 617ceea..cc90256 100644
--- a/tests/Css/Rule/ProcessorTest.php
+++ b/tests/Css/Rule/ProcessorTest.php
@@ -4,6 +4,7 @@ namespace TijsVerkoyen\CssToInlineStyles\Tests\Css\Rule;
use Symfony\Component\CssSelector\Node\Specificity;
use TijsVerkoyen\CssToInlineStyles\Css\Rule\Processor;
+use PHPUnit\Framework\Attributes\Before;
use PHPUnit\Framework\TestCase;
class ProcessorTest extends TestCase
@@ -16,6 +17,7 @@ class ProcessorTest extends TestCase
/**
* @before
*/
+ #[Before()]
protected function prepare(): void
{
$this->processor = new Processor();
diff --git a/tests/CssToInlineStylesTest.php b/tests/CssToInlineStylesTest.php
index b539bdf..afc0a0d 100644
--- a/tests/CssToInlineStylesTest.php
+++ b/tests/CssToInlineStylesTest.php
@@ -4,6 +4,7 @@ namespace TijsVerkoyen\CssToInlineStyles\Tests;
use TijsVerkoyen\CssToInlineStyles\Css\Property\Property;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;
+use PHPUnit\Framework\Attributes\Before;
use PHPUnit\Framework\TestCase;
class CssToInlineStylesTest extends TestCase
@@ -16,6 +17,7 @@ class CssToInlineStylesTest extends TestCase
/**
* @before
*/
+ #[Before()]
protected function prepare(): void
{
$this->cssToInlineStyles = new CssToInlineStyles();
|