|
11 | 11 | use Sabberworm\CSS\Renderable; |
12 | 12 |
|
13 | 13 | /** |
| 14 | + * @covers \Sabberworm\CSS\CSSList\CSSList |
14 | 15 | * @covers \Sabberworm\CSS\CSSList\KeyFrame |
15 | 16 | */ |
16 | 17 | final class KeyFrameTest extends TestCase |
17 | 18 | { |
18 | 19 | /** |
19 | | - * @var KeyFrame |
| 20 | + * @test |
20 | 21 | */ |
21 | | - private $subject; |
| 22 | + public function implementsAtRule(): void |
| 23 | + { |
| 24 | + $subject = new KeyFrame(); |
| 25 | + |
| 26 | + self::assertInstanceOf(AtRule::class, $subject); |
| 27 | + } |
22 | 28 |
|
23 | | - protected function setUp(): void |
| 29 | + /** |
| 30 | + * @test |
| 31 | + */ |
| 32 | + public function implementsRenderable(): void |
24 | 33 | { |
25 | | - $this->subject = new KeyFrame(); |
| 34 | + $subject = new KeyFrame(); |
| 35 | + |
| 36 | + self::assertInstanceOf(Renderable::class, $subject); |
26 | 37 | } |
27 | 38 |
|
28 | 39 | /** |
29 | 40 | * @test |
30 | 41 | */ |
31 | | - public function implementsAtRule(): void |
| 42 | + public function implementsCommentable(): void |
32 | 43 | { |
33 | | - self::assertInstanceOf(AtRule::class, $this->subject); |
| 44 | + $subject = new KeyFrame(); |
| 45 | + |
| 46 | + self::assertInstanceOf(Commentable::class, $subject); |
34 | 47 | } |
35 | 48 |
|
36 | 49 | /** |
37 | 50 | * @test |
38 | 51 | */ |
39 | | - public function implementsRenderable(): void |
| 52 | + public function getLineNoByDefaultReturnsZero(): void |
40 | 53 | { |
41 | | - self::assertInstanceOf(Renderable::class, $this->subject); |
| 54 | + $subject = new KeyFrame(); |
| 55 | + |
| 56 | + self::assertSame(0, $subject->getLineNo()); |
42 | 57 | } |
43 | 58 |
|
44 | 59 | /** |
45 | 60 | * @test |
46 | 61 | */ |
47 | | - public function implementsCommentable(): void |
| 62 | + public function getLineNoReturnsLineNumberProvidedToConstructor(): void |
48 | 63 | { |
49 | | - self::assertInstanceOf(Commentable::class, $this->subject); |
| 64 | + $lineNumber = 42; |
| 65 | + |
| 66 | + $subject = new KeyFrame($lineNumber); |
| 67 | + |
| 68 | + self::assertSame($lineNumber, $subject->getLineNo()); |
50 | 69 | } |
51 | 70 | } |
0 commit comments