File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -41,4 +41,41 @@ public function implementsCSSListItem(): void
4141 {
4242 self ::assertInstanceOf (CSSListItem::class, $ this ->subject );
4343 }
44+
45+ /**
46+ * @test
47+ */
48+ public function getLineNumberByDefaultReturnsNull (): void
49+ {
50+ $ result = $ this ->subject ->getLineNumber ();
51+
52+ self ::assertNull ($ result );
53+ }
54+
55+ /**
56+ * @return array<non-empty-string, array{0: int<1, max>}>
57+ */
58+ public function provideLineNumber (): array
59+ {
60+ return [
61+ 'line 1 ' => [1 ],
62+ 'line 42 ' => [42 ],
63+ ];
64+ }
65+
66+ /**
67+ * @test
68+ *
69+ * @param int<1, max> $lineNumber
70+ *
71+ * @dataProvider provideLineNumber
72+ */
73+ public function getLineNumberReturnsLineNumberPassedToConstructor (int $ lineNumber ): void
74+ {
75+ $ subject = new RuleSet ($ lineNumber );
76+
77+ $ result = $ subject ->getLineNumber ();
78+
79+ self ::assertSame ($ result , $ subject ->getLineNumber ());
80+ }
4481}
You can’t perform that action at this time.
0 commit comments