66
77use PHPUnit \Framework \TestCase ;
88use Sabberworm \CSS \Value \LineName ;
9- use Sabberworm \CSS \Value \Size ;
109
1110/**
1211 * @covers \Sabberworm\CSS\Value\LineName
@@ -30,40 +29,31 @@ public function getArrayRepresentationIncludesClassName(): void
3029 /**
3130 * @test
3231 */
33- public function getArrayRepresentationIncludesStringComponent (): void
32+ public function getArrayRepresentationCanIncludeOneStringComponent (): void
3433 {
35- $ subject = new LineName (['Helvetica ' ]);
34+ $ name = 'main-start ' ;
35+ $ subject = new LineName ([$ name ]);
3636
3737 $ result = $ subject ->getArrayRepresentation ();
3838
39- self ::assertSame (' Helvetica ' , $ result ['components ' ][0 ]['value ' ]);
39+ self ::assertSame ($ name , $ result ['components ' ][0 ]['value ' ]);
4040 }
4141
4242 /**
4343 * @test
4444 */
45- public function getArrayRepresentationIncludesValueComponent (): void
45+ public function getArrayRepresentationCanIncludesMultipleStringComponents (): void
4646 {
47- $ subject = new LineName ([new Size (1 )]);
47+ $ name1 = 'main-start ' ;
48+ $ name2 = 'main-end ' ;
49+ $ subject = new LineName ([$ name1 , $ name2 ]);
4850
4951 $ result = $ subject ->getArrayRepresentation ();
5052
51- self ::assertSame ('Size ' , $ result ['components ' ][0 ]['class ' ]);
53+ self ::assertSame ($ name1 , $ result ['components ' ][0 ]['value ' ]);
54+ self ::assertSame ($ name2 , $ result ['components ' ][1 ]['value ' ]);
5255 }
5356
54- /**
55- * @test
56- */
57- public function getArrayRepresentationIncludesMultipleMixedComponents (): void
58- {
59- $ subject = new LineName ([new Size (1 ), '+ ' , new Size (2 )]);
60-
61- $ result = $ subject ->getArrayRepresentation ();
62-
63- self ::assertSame ('Size ' , $ result ['components ' ][0 ]['class ' ]);
64- self ::assertSame ('+ ' , $ result ['components ' ][1 ]['value ' ]);
65- self ::assertSame ('Size ' , $ result ['components ' ][2 ]['class ' ]);
66- }
6757
6858 /**
6959 * @test
0 commit comments