@@ -47,12 +47,18 @@ public function testComment(): void
4747 self ::assertNull ($ constant ->getComment ());
4848
4949 $ constant ->setComment (['/** Line one */ ' , '/** Line two */ ' ]);
50- self ::assertSame (\preg_replace ('/\s+/ ' , '' , '/** Line one *//** Line two */ ' ), \preg_replace ('/\s+/ ' , '' , $ constant ->getComment ()));
50+ self ::assertSame (
51+ \preg_replace ('/\s+/ ' , '' , '/** Line one *//** Line two */ ' ),
52+ \preg_replace ('/\s+/ ' , '' , $ constant ->getComment ()),
53+ );
5154
5255 $ constant ->setComment (null );
5356 $ constant ->addComment ('/** Line one */ ' );
5457 $ constant ->addComment ('/** Line two */ ' );
55- self ::assertSame (\preg_replace ('/\s+/ ' , '' , '/** Line one *//** Line two */ ' ), \preg_replace ('/\s+/ ' , '' , $ constant ->getComment ()));
58+ self ::assertSame (
59+ \preg_replace ('/\s+/ ' , '' , '/** Line one *//** Line two */ ' ),
60+ \preg_replace ('/\s+/ ' , '' , $ constant ->getComment ()),
61+ );
5662 }
5763
5864 public function testValue (): void
@@ -81,6 +87,16 @@ public function testFinal(): void
8187 self ::assertTrue ($ constant ->isFinal ());
8288 }
8389
90+ public function testType (): void
91+ {
92+ $ constant = new Constant ('TEST ' );
93+
94+ self ::assertNull ($ constant ->getType ());
95+
96+ $ constant ->setType ('null ' );
97+ self ::assertSame ('null ' , $ constant ->getType ());
98+ }
99+
84100 public function testFromElement (): void
85101 {
86102 $ constant = Constant::fromElement (new NetteConstant ('TEST ' ));
0 commit comments