1313use PHPUnit \Framework \TestCase ;
1414use ReflectionProperty ;
1515
16+ /**
17+ * Tests for the \PHP_CodeSniffer\Config reportWidth value.
18+ *
19+ * @covers \PHP_CodeSniffer\Config::__get
20+ */
1621class ReportWidthTest extends TestCase
1722{
1823
@@ -76,6 +81,9 @@ public static function resetConfigToDefaults()
7681 /**
7782 * Test that report width without overrules will always be set to a non-0 positive integer.
7883 *
84+ * @covers \PHP_CodeSniffer\Config::__set
85+ * @covers \PHP_CodeSniffer\Config::restoreDefaults
86+ *
7987 * @return void
8088 */
8189 public function testReportWidthDefault ()
@@ -92,6 +100,9 @@ public function testReportWidthDefault()
92100 /**
93101 * Test that the report width will be set to a non-0 positive integer when not found in the CodeSniffer.conf file.
94102 *
103+ * @covers \PHP_CodeSniffer\Config::__set
104+ * @covers \PHP_CodeSniffer\Config::restoreDefaults
105+ *
95106 * @return void
96107 */
97108 public function testReportWidthWillBeSetFromAutoWhenNotFoundInConfFile ()
@@ -115,6 +126,10 @@ public function testReportWidthWillBeSetFromAutoWhenNotFoundInConfFile()
115126 /**
116127 * Test that the report width will be set correctly when found in the CodeSniffer.conf file.
117128 *
129+ * @covers \PHP_CodeSniffer\Config::__set
130+ * @covers \PHP_CodeSniffer\Config::getConfigData
131+ * @covers \PHP_CodeSniffer\Config::restoreDefaults
132+ *
118133 * @return void
119134 */
120135 public function testReportWidthCanBeSetFromConfFile ()
@@ -135,6 +150,9 @@ public function testReportWidthCanBeSetFromConfFile()
135150 /**
136151 * Test that the report width will be set correctly when passed as a CLI argument.
137152 *
153+ * @covers \PHP_CodeSniffer\Config::__set
154+ * @covers \PHP_CodeSniffer\Config::processLongArgument
155+ *
138156 * @return void
139157 */
140158 public function testReportWidthCanBeSetFromCLI ()
@@ -153,6 +171,9 @@ public function testReportWidthCanBeSetFromCLI()
153171 /**
154172 * Test that the report width will be set correctly when multiple report widths are passed on the CLI.
155173 *
174+ * @covers \PHP_CodeSniffer\Config::__set
175+ * @covers \PHP_CodeSniffer\Config::processLongArgument
176+ *
156177 * @return void
157178 */
158179 public function testReportWidthWhenSetFromCLIFirstValuePrevails ()
@@ -172,6 +193,10 @@ public function testReportWidthWhenSetFromCLIFirstValuePrevails()
172193 /**
173194 * Test that a report width passed as a CLI argument will overrule a report width set in a CodeSniffer.conf file.
174195 *
196+ * @covers \PHP_CodeSniffer\Config::__set
197+ * @covers \PHP_CodeSniffer\Config::processLongArgument
198+ * @covers \PHP_CodeSniffer\Config::getConfigData
199+ *
175200 * @return void
176201 */
177202 public function testReportWidthSetFromCLIOverrulesConfFile ()
@@ -200,6 +225,8 @@ public function testReportWidthSetFromCLIOverrulesConfFile()
200225 /**
201226 * Test that the report width will be set to a non-0 positive integer when set to "auto".
202227 *
228+ * @covers \PHP_CodeSniffer\Config::__set
229+ *
203230 * @return void
204231 */
205232 public function testReportWidthInputHandlingForAuto ()
@@ -221,6 +248,7 @@ public function testReportWidthInputHandlingForAuto()
221248 * @param int $expected Expected report width.
222249 *
223250 * @dataProvider dataReportWidthInputHandling
251+ * @covers \PHP_CodeSniffer\Config::__set
224252 *
225253 * @return void
226254 */
0 commit comments