diff --git a/tests/OutputFormatTest.php b/tests/OutputFormatTest.php index 4da2ff2d..9e0d4c4e 100644 --- a/tests/OutputFormatTest.php +++ b/tests/OutputFormatTest.php @@ -3,6 +3,7 @@ namespace Sabberworm\CSS\Tests; use PHPUnit\Framework\TestCase; +use Sabberworm\CSS\CSSList\Document; use Sabberworm\CSS\OutputFormat; use Sabberworm\CSS\Parser; @@ -31,8 +32,14 @@ class OutputFormatTest extends TestCase EOT; + /** + * @var Parser + */ private $oParser; + /** + * @var Document + */ private $oDocument; protected function setUp() diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 27b4cfda..7f624ba9 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -931,12 +931,12 @@ public function missingPropertyValueLenient() } /** - * Parse structure for file. + * Parses structure for file. * - * @param string $sFileName Filename. - * @param Settings|null $oSettings Settings. + * @param string $sFileName + * @param Settings|null $oSettings * - * @return Document Parsed document. + * @return Document parsed document */ private function parsedStructureForFile($sFileName, $oSettings = null) { @@ -1005,8 +1005,6 @@ public function lineNumbersParsing() /** * @expectedException \Sabberworm\CSS\Parsing\UnexpectedTokenException - * Credit: This test by @sabberworm (from - * https://github.com/sabberworm/PHP-CSS-Parser/pull/105#issuecomment-229643910 ) * * @test */ diff --git a/tests/RuleSet/DeclarationBlockTest.php b/tests/RuleSet/DeclarationBlockTest.php index 0a0e636f..49526952 100644 --- a/tests/RuleSet/DeclarationBlockTest.php +++ b/tests/RuleSet/DeclarationBlockTest.php @@ -13,10 +13,13 @@ class DeclarationBlockTest extends TestCase { /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider expandBorderShorthandProvider * * @test - * */ + */ public function expandBorderShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -27,6 +30,9 @@ public function expandBorderShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function expandBorderShorthandProvider() { return [ @@ -40,10 +46,13 @@ public function expandBorderShorthandProvider() } /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider expandFontShorthandProvider * * @test - * */ + */ public function expandFontShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -54,6 +63,9 @@ public function expandFontShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function expandFontShorthandProvider() { return [ @@ -90,10 +102,13 @@ public function expandFontShorthandProvider() } /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider expandBackgroundShorthandProvider * * @test - * */ + */ public function expandBackgroundShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -104,6 +119,9 @@ public function expandBackgroundShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function expandBackgroundShorthandProvider() { return [ @@ -137,10 +155,13 @@ public function expandBackgroundShorthandProvider() } /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider expandDimensionsShorthandProvider * * @test - * */ + */ public function expandDimensionsShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -151,6 +172,9 @@ public function expandDimensionsShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function expandDimensionsShorthandProvider() { return [ @@ -169,10 +193,13 @@ public function expandDimensionsShorthandProvider() } /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider createBorderShorthandProvider * * @test - * */ + */ public function createBorderShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -183,6 +210,9 @@ public function createBorderShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function createBorderShorthandProvider() { return [ @@ -194,10 +224,13 @@ public function createBorderShorthandProvider() } /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider createFontShorthandProvider * * @test - * */ + */ public function createFontShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -208,6 +241,9 @@ public function createFontShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function createFontShorthandProvider() { return [ @@ -231,10 +267,13 @@ public function createFontShorthandProvider() } /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider createDimensionsShorthandProvider * * @test - * */ + */ public function createDimensionsShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -245,6 +284,9 @@ public function createDimensionsShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function createDimensionsShorthandProvider() { return [ @@ -263,10 +305,13 @@ public function createDimensionsShorthandProvider() } /** + * @param string $sCss + * @param string $sExpected + * * @dataProvider createBackgroundShorthandProvider * * @test - * */ + */ public function createBackgroundShorthand($sCss, $sExpected) { $oParser = new Parser($sCss); @@ -277,6 +322,9 @@ public function createBackgroundShorthand($sCss, $sExpected) self::assertSame(trim((string)$oDoc), $sExpected); } + /** + * @return array> + */ public function createBackgroundShorthandProvider() { return [