@@ -91,6 +91,26 @@ public function testGetNameWithCustom() {
9191 $ this ->assertEquals ('MyCustomCloud ' , $ this ->template ->getName ());
9292 }
9393
94+ public function testGetHTMLNameWithDefault () {
95+ $ this ->config
96+ ->expects ($ this ->once ())
97+ ->method ('getAppValue ' )
98+ ->with ('theming ' , 'name ' , 'Nextcloud ' )
99+ ->willReturn ('Nextcloud ' );
100+
101+ $ this ->assertEquals ('Nextcloud ' , $ this ->template ->getHTMLName ());
102+ }
103+
104+ public function testGetHTMLNameWithCustom () {
105+ $ this ->config
106+ ->expects ($ this ->once ())
107+ ->method ('getAppValue ' )
108+ ->with ('theming ' , 'name ' , 'Nextcloud ' )
109+ ->willReturn ('MyCustomCloud ' );
110+
111+ $ this ->assertEquals ('MyCustomCloud ' , $ this ->template ->getHTMLName ());
112+ }
113+
94114 public function testGetTitleWithDefault () {
95115 $ this ->config
96116 ->expects ($ this ->once ())
@@ -172,6 +192,32 @@ public function testGetSloganWithCustom() {
172192 $ this ->assertEquals ('My custom Slogan ' , $ this ->template ->getSlogan ());
173193 }
174194
195+ public function testGetShortFooter () {
196+ $ this ->config
197+ ->expects ($ this ->exactly (3 ))
198+ ->method ('getAppValue ' )
199+ ->willReturnMap ([
200+ ['theming ' , 'url ' , 'https://nextcloud.com/ ' , 'url ' ],
201+ ['theming ' , 'name ' , 'Nextcloud ' , 'Name ' ],
202+ ['theming ' , 'slogan ' , 'Safe Data ' , 'Slogan ' ],
203+ ]);
204+
205+ $ this ->assertEquals ('<a href="url" target="_blank" rel="noreferrer">Name</a> – Slogan ' , $ this ->template ->getShortFooter ());
206+ }
207+
208+ public function testGetShortFooterEmptySlogan () {
209+ $ this ->config
210+ ->expects ($ this ->exactly (3 ))
211+ ->method ('getAppValue ' )
212+ ->willReturnMap ([
213+ ['theming ' , 'url ' , 'https://nextcloud.com/ ' , 'url ' ],
214+ ['theming ' , 'name ' , 'Nextcloud ' , 'Name ' ],
215+ ['theming ' , 'slogan ' , 'Safe Data ' , '' ],
216+ ]);
217+
218+ $ this ->assertEquals ('<a href="url" target="_blank" rel="noreferrer">Name</a> ' , $ this ->template ->getShortFooter ());
219+ }
220+
175221 public function testGetMailHeaderColorWithDefault () {
176222 $ this ->config
177223 ->expects ($ this ->once ())
0 commit comments