33namespace SystemCtl \Test \Unit \Template \Section ;
44
55use PHPUnit \Framework \TestCase ;
6- use SystemCtl \Exception \PropertyNotSupportedException ;
76use SystemCtl \Template \Section \UnitSection ;
87
8+ /**
9+ * UnitSectionTest
10+ *
11+ * @package SystemCtl\Test\Unit\Template\Section
12+ * @author icanhazstring <[email protected] > 13+ */
914class UnitSectionTest extends TestCase
1015{
11- public function testCreation ()
16+ /**
17+ * @test
18+ */
19+ public function itShouldCreateProperInstance ()
1220 {
1321 $ unitSection = new UnitSection ;
1422 $ this ->assertInstanceOf (UnitSection::class, $ unitSection );
1523 }
1624
17- public function testValidProperties ()
25+ /**
26+ * @test
27+ */
28+ public function itShouldSetPropertiesAndReturnThem ()
1829 {
1930 $ unitSection = (new UnitSection )
2031 ->setDescription ('TestDescription ' )
@@ -32,21 +43,10 @@ public function testValidProperties()
3243 $ this ->assertEquals (['g ' , 'h ' ], $ unitSection ->getConflicts ());
3344 }
3445
35- public function testInvalidPropertyShouldRaiseException ()
36- {
37- $ unitSection = new UnitSection ;
38-
39- $ this ->expectException (PropertyNotSupportedException::class);
40- $ unitSection ->setFubar ('should fail ' );
41- }
42-
43- public function testNonSetPropertyShouldReturnNull ()
44- {
45- $ unitSection = new UnitSection ;
46- $ this ->assertNull ($ unitSection ->getDescription ());
47- }
48-
49- public function testGetPropetiesShouldReturnOnlySetProperties ()
46+ /**
47+ * @test
48+ */
49+ public function itShouldReturnOnlyThosePropertiesPreviouslySet ()
5050 {
5151 $ unitSection = new UnitSection ;
5252
0 commit comments