
Hi, please have a look at https://github.com/phpmyadmin/phpmyadmin/commit/993134cacd61add9f049eee96a53... Can we have a validation when a template is rendered, to ensure we don't forget passing some of the parameters? Probably too late for 4.5, but at least for 4.6? -- Marc Delisle | phpMyAdmin

Le dim. 30 août 2015 à 15:11, Marc Delisle <marc@infomarc.info> a écrit :
Hi, please have a look at
https://github.com/phpmyadmin/phpmyadmin/commit/993134cacd61add9f049eee96a53...
Can we have a validation when a template is rendered, to ensure we don't forget passing some of the parameters?
Probably too late for 4.5, but at least for 4.6?
-- Marc Delisle | phpMyAdmin
Hi, What do you mean by "validation"? Is it a code review or a message by Template class that tells you that a variable / parameter is missing? H.

Le 2015-08-30 09:45, Hugues Peccatte a écrit :
Le dim. 30 août 2015 à 15:11, Marc Delisle <marc@infomarc.info <mailto:marc@infomarc.info>> a écrit :
Hi, please have a look at https://github.com/phpmyadmin/phpmyadmin/commit/993134cacd61add9f049eee96a53...
Can we have a validation when a template is rendered, to ensure we don't forget passing some of the parameters?
Probably too late for 4.5, but at least for 4.6?
-- Marc Delisle | phpMyAdmin
Hi,
What do you mean by "validation"? Is it a code review or a message by Template class that tells you that a variable / parameter is missing?
H.
A message. -- Marc Delisle | phpMyAdmin

Dne Sun, 30 Aug 2015 13:45:14 +0000 Hugues Peccatte <hugues.peccatte@gmail.com> napsal(a):
Le dim. 30 août 2015 à 15:11, Marc Delisle <marc@infomarc.info> a écrit :
Hi, please have a look at
https://github.com/phpmyadmin/phpmyadmin/commit/993134cacd61add9f049eee96a53...
Can we have a validation when a template is rendered, to ensure we don't forget passing some of the parameters?
Probably too late for 4.5, but at least for 4.6?
-- Marc Delisle | phpMyAdmin
Hi,
What do you mean by "validation"? Is it a code review or a message by Template class that tells you that a variable / parameter is missing?
The best would be if we can make the template layer fail on missing variable and test all templates in testsuite. -- Michal Čihař | http://cihar.com | http://phpmyadmin.net

Le lun. 31 août 2015 à 10:06, Michal Čihař <michal@cihar.com> a écrit :
Dne Sun, 30 Aug 2015 13:45:14 +0000 Hugues Peccatte <hugues.peccatte@gmail.com> napsal(a):
Le dim. 30 août 2015 à 15:11, Marc Delisle <marc@infomarc.info> a écrit :
Hi, please have a look at
https://github.com/phpmyadmin/phpmyadmin/commit/993134cacd61add9f049eee96a53...
Can we have a validation when a template is rendered, to ensure we
don't
forget passing some of the parameters?
Probably too late for 4.5, but at least for 4.6?
-- Marc Delisle | phpMyAdmin
Hi,
What do you mean by "validation"? Is it a code review or a message by Template class that tells you that a variable / parameter is missing?
The best would be if we can make the template layer fail on missing variable and test all templates in testsuite.
-- Michal Čihař | http://cihar.com | http://phpmyadmin.net
_______________________________________________ Developers mailing list Developers@phpmyadmin.net https://lists.phpmyadmin.net/mailman/listinfo/developers
Hi, I agree with this last comment. Should we review our position regarding template unit tests? H.

Le 2015-09-05 15:38, Hugues Peccatte a écrit :
Le lun. 31 août 2015 à 10:06, Michal Čihař <michal@cihar.com <mailto:michal@cihar.com>> a écrit :
Dne Sun, 30 Aug 2015 13:45:14 +0000 Hugues Peccatte <hugues.peccatte@gmail.com <mailto:hugues.peccatte@gmail.com>> napsal(a):
> Le dim. 30 août 2015 à 15:11, Marc Delisle <marc@infomarc.info <mailto:marc@infomarc.info>> a écrit : > > > Hi, > > please have a look at > > > > https://github.com/phpmyadmin/phpmyadmin/commit/993134cacd61add9f049eee96a53... > > > > Can we have a validation when a template is rendered, to ensure we don't > > forget passing some of the parameters? > > > > Probably too late for 4.5, but at least for 4.6? > > > > -- > > Marc Delisle | phpMyAdmin > > > > Hi, > > What do you mean by "validation"? Is it a code review or a message by > Template class that tells you that a variable / parameter is missing?
The best would be if we can make the template layer fail on missing variable and test all templates in testsuite.
Hi,
I agree with this last comment. Should we review our position regarding template unit tests?
As a reminder, here it is: https://wiki.phpmyadmin.net/pma/2015-06_Meeting#Unit_tests_on_HTML But failing on a missing variable does not necessarily mean that we have to test in the testsuite. -- Marc Delisle | phpMyAdmin

Hi Dne Sat, 05 Sep 2015 19:38:12 +0000 Hugues Peccatte <hugues.peccatte@gmail.com> napsal(a):
I agree with this last comment. Should we review our position regarding template unit tests?
Asserting that template does properly render without error is quite different to checking HTML content (what was the problem with tests we have so far). -- Michal Čihař | http://cihar.com | http://blog.cihar.com
participants (3)
-
Hugues Peccatte
-
Marc Delisle
-
Michal Čihař