Compare commits

..

289 Commits

Author SHA1 Message Date
Simon Wisselink a3b5e4eaf9 fix php7.4 deprecation and remove php7.4 from travis allow_failures since php7.4 is current stable 2020-04-13 00:47:34 +02:00
Simon Wisselink cf8b820f2c synced unit tests with master codebase, noted TODO's, fixed phpunit scripts and travis config 2020-04-13 00:38:03 +02:00
Simon Wisselink 5db1746129 Removed unneeded files and replace dummy.txt with .gitignore files 2020-04-13 00:03:57 +02:00
Simon Wisselink 57d797fa1d Merge branch 'master' of smarty-php/smarty-phpunit into feature/merge_smarty-phpunit_into_tests_subfolder 2020-04-12 23:15:47 +02:00
Simon Wisselink 2142913e3b Add additional unit tests for several isset issues 2020-01-28 11:42:40 +01:00
Simon Wisselink e1ebc2ac8e Added test for foreachelse on arrayiterators and such https://github.com/smarty-php/smarty/issues/506 2020-01-27 16:01:22 +01:00
uwetews cd4fd962dc Merge pull request #3 from smarty-php/revert-1-fix-composer-deps
Revert "Reinstitute the phpunit/phpunit dependency the right way."
2018-12-09 04:53:14 +01:00
uwetews 7ff8bdb173 Revert "Reinstitute the phpunit/phpunit dependency the right way." 2018-12-09 04:51:05 +01:00
uwetews 9ec3d2d67b Merge pull request #1 from AnrDaemon/fix-composer-deps
Reinstitute the phpunit/phpunit dependency the right way.
2018-12-09 02:35:07 +01:00
AnrDaemon 317f05e348 Reinstitute the phpunit/phpunit dependency the right way. 2018-12-06 20:15:37 +03:00
uwetews 06c4eac7c0 fix {insert} test 2018-11-11 18:35:00 +01:00
uwetews adbcf8a014 Update insert tag tests https://github.com/smarty-php/smarty/issues/496 2018-10-09 06:27:32 +02:00
uwetews 578503c474 Update modifier test https://github.com/smarty-php/smarty/issues/491 2018-10-09 03:28:42 +02:00
uwetews e250f28db7 added test - bugfix some custom left and right delimiters like '{^' '^}' did not work
https://github.com/smarty-php/smarty/issues/450 https://github.com/smarty-php/smarty/pull/482
2018-08-31 17:29:59 +02:00
Uwe Tews 5359963c27 Disable test for now 2018-05-17 04:56:43 +02:00
Uwe Tews 05ce67754a added security test case 2018-04-26 21:37:38 +02:00
Uwe Tews 18d15d7669 add enableSecurity() 2018-04-26 18:00:17 +02:00
Uwe Tews 2f87c74cba update securitytests 2018-04-26 13:33:21 +02:00
Uwe Tews d59e6804fc Update for {fetch} plugin 2018-04-26 12:59:14 +02:00
Uwe Tews c4f3d4fb98 Update for {fetch} plugin 2018-04-25 15:40:25 +02:00
Uwe Tews ced3bf86d8 Update template function tests 2018-03-28 07:02:18 +02:00
Uwe Tews 8f8030805a fix @runInSeparateProcess 2018-03-28 00:55:14 +02:00
Uwe Tews 12b7512311 update new plugin handling 2018-03-27 02:03:37 +02:00
Uwe Tews a341b00676 new feature {parent} = {$smarty.block.parent} {child} = {$smarty.block.child} 2018-03-26 22:26:49 +02:00
Uwe Tews 5fb73cd3c1 short form of {section} attributes did not work https://github.com/smarty-php/smarty/issues/428 2018-03-21 15:17:56 +01:00
Uwe Tews dfdf343b2d https://github.com/smarty-php/smarty/issues/422 2018-03-21 07:35:25 +01:00
Uwe Tews a364e82c6b Test for issue 419 2018-03-16 18:28:49 +01:00
Uwe Tews cbf7e15e2a Update readme.md 2017-11-22 05:21:44 +01:00
Uwe Tews 1a11b61b73 Extend setfilter tag test 2017-11-20 11:26:25 +01:00
Uwe Tews 9d52ba99f7 Extend setfilter tag test 2017-11-20 11:10:45 +01:00
Uwe Tews 1e48db70cf Disable mysql tests 2017-11-20 04:14:57 +01:00
Uwe Tews afd68d7104 Update 2017-11-20 02:17:35 +01:00
Uwe Tews b3a64efa14 Update mysql tests 2017-11-20 00:55:43 +01:00
Uwe Tews ccefb46c30 Update msql resource test 2017-11-19 19:52:31 +01:00
Uwe Tews 0d8ddddc1b Update spacing tests 2017-11-19 10:50:49 +01:00
Uwe Tews bea59cdec4 add and rework tests
add spacing tests for newlines between tags and text
3.1.32-dev-36
2017-11-17 10:41:04 +01:00
Uwe Tews eabde8aaef remove redundant test 2017-11-11 16:19:10 +01:00
Uwe Tews ab726e92df add spacing tests 2017-11-11 14:52:51 +01:00
Uwe Tews ae900c9ebe Disable tests which do not run on PHP 5.4 and below 2017-11-06 04:32:19 +01:00
Uwe Tews 8a6f2493c6 Update exception messages 3.1.32-dev-33 2017-11-05 20:40:46 +01:00
Uwe Tews 51c813556c modified tests for custom delimiters 2017-10-21 12:35:08 +02:00
Uwe Tews 507b96a571 remove E_DEPRECATED for PHP 5.2 compatibility
restore @runTestsInSeparateProcess
2017-10-18 12:59:55 +02:00
Uwe Tews 37288b44e0 update tests to cover
https://github.com/smarty-php/smarty/issues/396 https://github.com/smarty-php/smarty/issues/397
    https://github.com/smarty-php/smarty/issues/391 https://github.com/smarty-php/smarty/issues/392
2017-10-18 09:12:59 +02:00
Uwe Tews fd1846a286 Update double qouted string test 2017-10-12 20:03:28 +02:00
Uwe Tews f41afe355f Update block extends tests https://github.com/smarty-php/smarty/issues/393 2017-10-12 08:11:30 +02:00
Uwe Tews df97b8a14d do not ignore vendor folder because of travis tests 2017-10-09 19:11:35 +02:00
Uwe Tews 3c7f0826d3 Update error_reporting setting 2017-10-09 10:21:16 +02:00
Uwe Tews 462efddfdf Update for 3.1.32-dev-23 2017-10-07 08:22:00 +02:00
Uwe Tews e3e8088029 Add test for boolean and null 2017-09-03 04:49:33 +02:00
Uwe Tews a202d5b464 add test for issue 327 2017-08-26 11:46:33 +02:00
Uwe Tews 661ffe75ef update for 3.1.32-dev 2017-08-09 12:50:32 +02:00
Uwe Tews 2302db0b78 revert last change 2017-07-30 05:07:27 +02:00
Uwe Tews 3c0cc4da1c Update because of https://github.com/smarty-php/smarty/pull/377 2017-07-21 07:00:28 +02:00
uwetews 5c4871a842 Update tests 2017-05-27 12:33:02 +02:00
uwetews 3db8beb54a Update tests 2017-05-27 12:17:09 +02:00
uwetews 889fd2debf Update tests 2017-05-27 11:27:50 +02:00
uwetews 52f84dc39d PHP 5.2 compatibility 2017-05-21 19:14:39 +02:00
uwetews ae311ee2e8 disable closure for PHP 5.2 2017-05-21 18:57:16 +02:00
uwetews 6fcb23196a disable closure for PHP 5.2 2017-05-21 18:54:13 +02:00
uwetews 03900cec3a disable closure for PHP 5.2 2017-05-21 18:41:44 +02:00
uwetews 4f41768ef7 disable closure for PHP 5.2 2017-05-21 18:32:19 +02:00
uwetews 99b782b257 add PHP function tests 2017-04-17 04:20:34 +02:00
uwetews 5fe8455e87 remove coverage from phpunit.xml 2017-04-14 13:08:10 +02:00
uwetews c3afe0bc9d Update for PHPunit >= 5 2017-04-14 12:16:33 +02:00
uwetews 2652c5ef26 reomove require for phpunit 2017-04-14 05:37:17 +02:00
uwetews 62cc0c0e2a Update for PHPunit >= 5 2017-04-14 02:25:56 +02:00
uwetews 279240f76d Delete composer.lock 2017-04-13 19:42:55 +02:00
uwetews 31a515470d Update for PHPunit 5.7 2017-04-13 19:32:44 +02:00
uwetews 7645ae0512 remove version check code 2016-11-19 18:02:13 +01:00
uwetews 5f92ee4ea0 delete wrong test 2016-11-19 07:50:24 +01:00
uwetews eea6256875 gh312 bug test 2016-11-12 09:31:48 +01:00
uwetews f026729c5c gh312 bug test 2016-11-12 09:31:20 +01:00
uwetews 43eb0f3986 update 2016-11-12 01:32:26 +01:00
uwetews b7f845f5a9 test will run sinc php 5.6 2016-11-11 23:03:46 +01:00
uwetews 9bfc85b045 test requires php 5.5 2016-11-11 21:54:08 +01:00
uwetews c0110c1051 add tests for issuse 312 2016-11-11 20:10:23 +01:00
uwetews 6c5e729c9c add test for config variable overloading 2016-10-27 05:28:23 +02:00
uwetews 8e42150426 Test template function call in fetched template 2016-10-27 05:24:08 +02:00
uwetews bfb502b633 {make_nocache} add space test 2016-10-19 20:40:41 +02:00
uwetews 411390b579 update {make_nocache} tests 2016-10-19 19:35:05 +02:00
uwetews 48a954e2e5 Add test for Smarty::$extends_recursion property 2016-09-29 03:44:49 +02:00
uwetews e1ad0ece66 Test <?xml ?> tags in subtemplate 2016-09-28 23:32:01 +02:00
uwetews 81852c085f Test isset() 0n $smarty.foreache special variables 2016-09-20 14:17:17 +02:00
uwetews 75432afb05 Update clear compiled tests 2016-09-20 10:18:08 +02:00
uwetews eebbecf603 Update clear compiled tests 2016-09-19 22:25:57 +02:00
uwetews da69e4d7af Updates because new release update checks 2016-09-19 08:02:34 +02:00
uwetews 268368f2a4 Updates because new release update checks 2016-09-19 07:36:20 +02:00
uwetews 30f7c15d01 update string resource test 2016-09-15 09:25:11 +02:00
uwetews 998b28dcc8 update resource tests 2016-09-15 09:09:00 +02:00
uwetews 0d5dab3b66 Extended {foreach} tests 2016-09-09 22:41:25 +02:00
uwetews 2e9ee3b2a0 add test for getConfigVariable() 2016-09-08 22:19:07 +02:00
uwetews be86d1eb6d replace constant DS with DIRECTORY_SEPARATOR 2016-08-23 07:56:09 +02:00
uwetews 490fb5eaa5 upate unit test 2016-08-14 11:24:22 +02:00
uwetews 1d76572e9a update scope with test for {assign.. noscope} 2016-08-14 03:11:10 +02:00
uwetews e3f5e325ab disable mysql because msql setup problems under HHVM 2016-08-07 20:09:46 +02:00
uwetews 0aab6c9ff6 enable mysql 2016-08-07 19:35:17 +02:00
uwetews fd8f010b05 update config tests 2016-08-07 12:57:48 +02:00
uwetews f8420363b8 Update default handler teste 2016-08-05 21:22:23 +02:00
uwetews 3155e9ce8e Update compiler error 2016-07-25 20:36:36 +02:00
uwetews 419bfe2bc2 update resource tests 2016-07-25 20:32:58 +02:00
uwetews 4354315bb2 add plugins_dir and template_dir normalization test 2016-07-25 20:27:26 +02:00
uwetews e494f65a77 Extend default handler 2016-07-12 23:37:51 +02:00
uwetews bfca72e71b update compiler plugin test 2016-07-12 23:01:29 +02:00
uwetews 93bc56e14f Update security test 2016-07-12 02:28:56 +02:00
uwetews 688151e06f Update capture test 2016-07-12 00:25:14 +02:00
uwetews b823237d67 update unit teste 2016-05-15 11:12:04 +02:00
uwetews 8a8c0cd081 Update inheritance tests 2016-05-01 23:49:04 +02:00
uwetews ec1caa0905 Update strip tests 2016-04-29 00:14:59 +02:00
uwetews 6245f65402 Update capture test 2016-04-14 21:06:51 +02:00
uwetews 66f6c54281 Update {extends} test 2016-04-13 03:30:32 +02:00
uwetews b08b8f1d3a Update capture test 2016-03-27 18:34:13 +02:00
uwetews f6a0749845 revert 2016-03-11 05:57:58 +01:00
uwetews 9802c9291d disable msql 2016-03-11 05:54:32 +01:00
uwetews c6a60a82ca enable memcache amd msql 2016-03-11 05:49:03 +01:00
uwetews 9a291b8da4 add clearCompiledTemplate() tests 2016-03-11 03:29:57 +01:00
uwetews d744c408fe update php resource tests 2016-03-10 20:56:33 +01:00
uwetews 531df47a97 Update scope tests 2016-03-09 00:29:15 +01:00
uwetews d717439a6b Update path normalization test 2016-02-25 23:30:32 +01:00
uwetews 788aa58632 Update strip text 2016-02-20 17:17:21 +01:00
uwetews 13c7a912d9 clear static tag compiler object cache 2016-02-15 14:19:01 +01:00
uwetews 3dcb718b5d update attribute test 2016-02-14 19:46:11 +01:00
uwetews a073234fe3 Add test for new {make_nocache} tag 2016-02-14 03:04:50 +01:00
uwetews 0bcf2127d1 Add test for new {make_nocache} tag 2016-02-14 02:49:22 +01:00
uwetews 2dba744fcb Update function plugin teste 2016-02-10 21:06:19 +01:00
uwetews 90a4a5c28e add more tests for strip 2016-02-10 21:05:36 +01:00
uwetews db8553be32 update test 2016-02-10 03:16:12 +01:00
uwetews 150d24822d update strip test 2016-02-10 01:08:01 +01:00
uwetews 2f7c0f0a99 update if test 2016-02-09 04:18:30 +01:00
uwetews ac5070ea87 update scope tests 2016-02-09 01:40:34 +01:00
uwetews e0d4e4b1fa new core functions 2016-02-09 01:32:50 +01:00
uwetews c48e16c5fe add {break} test 2016-02-01 20:23:25 +01:00
uwetews 33bdb44723 add {break} and {continue} tests 2016-01-29 02:33:40 +01:00
uwetews 39631cce4b add test for block plugin tag stack 2016-01-29 01:08:54 +01:00
uwetews dcb0d4be63 add {extends} tests with relative path 2016-01-27 04:44:05 +01:00
uwetews dd935863bd add output filter tests for caching and nocache code 2016-01-27 00:28:36 +01:00
uwetews 2b7615e23d add nocache teste 2016-01-03 08:18:52 +01:00
uwetews 7bfe828d70 add block plugin caching test 2016-01-02 21:27:37 +01:00
uwetews 7611bedfb5 dummy 2016-01-02 16:59:37 +01:00
uwetews 9307076ffa update block plugin tests 2016-01-02 16:59:02 +01:00
uwetews 42b864b707 update block plugin tests 2016-01-02 11:48:31 +01:00
uwetews 5f7417d495 update block plugin tests 2016-01-02 11:39:16 +01:00
uwetews a56e36c811 update block plugin tests 2016-01-02 11:33:29 +01:00
uwetews a194dd0950 update block plugin tests 2016-01-02 11:17:12 +01:00
uwetews 585850230c update block plugin tests 2016-01-02 04:56:22 +01:00
uwetews fb7908d710 add missing plugin 2016-01-02 02:53:18 +01:00
uwetews c26d0ed365 update scope tests for {config_load} 2016-01-02 02:37:14 +01:00
uwetews 978d7c88c5 update scope tests for {include} 2016-01-02 02:12:31 +01:00
uwetews bac6e3c069 remove old scope tests 2016-01-02 01:33:52 +01:00
uwetews 7caf793eeb add scope tests for {assign} 2016-01-02 00:48:20 +01:00
uwetews eee2bc3a77 add prefilter 2016-01-02 00:43:44 +01:00
uwetews cc68ce89ec disable memcache 2016-01-01 18:51:57 +01:00
uwetews 3b5ff51e0e test if class exists 2015-12-31 06:32:20 +01:00
uwetews ffe0095b80 enable memcache test 2015-12-31 06:30:16 +01:00
uwetews 622bea89f9 PHP 5.2 compatibility 2015-12-31 06:03:21 +01:00
uwetews e363a78e28 replace __DIR__ 2015-12-31 05:38:36 +01:00
uwetews 83e7c90c20 replace __DIR__ 2015-12-31 05:36:00 +01:00
uwetews 66fa8ce092 remove closure test 2015-12-31 05:26:58 +01:00
uwetews 9a61f1511c skip closure on php 5.2 2015-12-31 05:20:00 +01:00
uwetews 1981dd8016 replace __DIR__ 2015-12-31 05:04:07 +01:00
uwetews db914a947d disable mysql for travis because problems under hhvm 2015-12-31 04:06:44 +01:00
uwetews 06b37842dd disable memcached for travis 2015-12-31 03:48:06 +01:00
uwetews 039f1f72f6 enable memcached for travis 2015-12-31 03:43:55 +01:00
uwetews 9b87168a14 disable memcached for travis 2015-12-31 03:34:32 +01:00
uwetews 5c6b9dd186 set time zone 2015-12-31 03:30:14 +01:00
uwetews bf93a7b356 Update 2015-12-31 03:20:56 +01:00
uwetews 3086b4e53d Fix msql test 2015-12-31 03:02:34 +01:00
uwetews ac996820cc enable mysql and memcached tests for travis 2015-12-31 02:48:20 +01:00
uwetews 97b02e9a2e Update {assign] tests 2015-12-31 02:06:18 +01:00
uwetews e390da71e2 https://github.com/smarty-php/smarty/issues/147 2015-12-30 22:27:16 +01:00
uwetews d0f29ae730 add {$smarty.template} and {$smarty.current_dir} tests 2015-12-30 21:24:31 +01:00
uwetews b887f18acf update configuration of disabled resource tests 2015-12-30 21:14:22 +01:00
uwetews 1800432c4c Test E_NOTICE suppression on undefined variables https://github.com/smarty-php/smarty/issues/145 2015-12-30 18:23:46 +01:00
uwetews 7ce2a7dd41 Add SmartyBC tests 2015-12-30 17:45:11 +01:00
uwetews 43237f1526 Add SmartyBC tests 2015-12-30 01:08:02 +01:00
uwetews 25108d3636 Add SmartyBC tests 2015-12-30 00:54:20 +01:00
uwetews e506550ef2 Add SmartyBC tests 2015-12-30 00:46:09 +01:00
uwetews d72ced4e70 Smarty2 wrapper tests 2015-12-30 00:28:27 +01:00
uwetews 9ffad00177 Smarty2 wrapper tests 2015-12-29 21:14:32 +01:00
uwetews 3229f0563b Smarty2 wrapper tests 2015-12-29 20:51:56 +01:00
uwetews 1d1c9bc59e Smarty2 wrapper tests 2015-12-29 19:24:15 +01:00
uwetews 381556a290 Update {foreach} tests 2015-12-28 00:51:28 +01:00
uwetews a4e6d6d609 Update {block} {extends} test 2015-12-27 05:05:54 +01:00
uwetews 3c4361c1c4 Update test 2015-12-25 09:58:40 +01:00
uwetews 3d4fbb88c6 Update extends test 2015-12-25 08:48:25 +01:00
uwetews 6b9648a1dc add post filter test https://github.com/smarty-php/smarty/issues/144 2015-12-24 06:27:11 +01:00
uwetews b4613146b4 Update 2015-12-24 01:56:38 +01:00
uwetews 09d29deeea Add tests for changed template_dir settings 2015-12-24 01:54:50 +01:00
uwetews 007de1fefa Update for file uid changes of 3.1.30 2015-12-24 01:52:30 +01:00
uwetews 1723095862 caching observes now template_dir setting 2015-12-23 04:27:56 +01:00
uwetews 954ea7d963 add test for direct access of protected xxx_dir properties 2015-12-22 01:14:00 +01:00
uwetews 5f9e853035 update strip test 2015-12-21 23:33:41 +01:00
uwetews 5af36fa255 add filepath normalization tests 2015-12-21 22:45:49 +01:00
uwetews cd1d7c4d6a add test where extendsall is default resource 2015-12-21 02:13:46 +01:00
uwetews b1bd7dd347 extend runtime parameter because timing problem on travis 2015-12-20 15:36:57 +01:00
uwetews 781a355436 fix test class name 2015-12-20 14:52:23 +01:00
uwetews 77149f22f6 add Smarty special variable teste 2015-12-20 14:45:25 +01:00
uwetews b4cf3c3d5c insert dummy.txt 2015-12-20 11:25:37 +01:00
uwetews 669bf0ddcd delet dummy.txt (reverted from commit 8c9fe47fa36702daf3c7acb255b442c7c04f685b) (reverted from commit f66230d6df15615e9b33b54f2a97ca7c46be474d) 2015-12-20 11:02:44 +01:00
uwetews 90564a8fb0 delet dummy.txt (reverted from commit 8c9fe47fa36702daf3c7acb255b442c7c04f685b) 2015-12-20 11:00:35 +01:00
uwetews cd5cc546a9 delet dummy.txt 2015-12-20 10:55:45 +01:00
uwetews e9e473da65 add test for chained prepend 2015-12-18 03:58:53 +01:00
uwetews 3d7a1d57dc update strip test 2015-12-09 01:31:15 +01:00
uwetews cee9d19fba Update test for 3.1.28 master 2015-10-24 04:12:28 +02:00
uwetews e4ed69f174 fix test 2015-10-20 01:28:39 +02:00
uwetews 4c24ec6e20 split tests because of hhvm 2015-10-20 01:21:37 +02:00
uwetews 03daa2880c run all test in separate process 2015-10-20 00:50:22 +02:00
uwetews 3975172178 config change 2015-10-18 20:53:31 +02:00
uwetews d44e283eb7 add dummy 2015-10-18 20:43:38 +02:00
uwetews dde9a906b0 add dummies 2015-10-18 20:33:53 +02:00
uwetews 749eaad939 run some tests in separate process for HHVM compatibillity 2015-10-18 20:23:49 +02:00
uwetews 75663948f2 move configuration constants in PHP file that they are seen also in isolated tests 2015-10-18 20:22:11 +02:00
uwetews 48676467ce no log file 2015-10-18 07:21:06 +02:00
uwetews 48b7147869 some test must run in separate process under because of HHVM 2015-10-18 05:41:46 +02:00
uwetews 538ffd3af2 Update forr 3.1.28 2015-10-18 03:33:17 +02:00
uwetews 60f73dfcb7 Extend tests 2015-09-01 02:47:13 +02:00
uwetews d5c9859241 Update tests 2015-08-29 14:23:14 +02:00
uwetews 4645b78e8b add dummy files to keep folder in reprository 2015-08-23 18:32:10 +02:00
uwetews 5c416f2f0f Update for 3.1.28 2015-08-23 15:04:21 +02:00
Uwe Tews 75adb86450 fix timestamp 2015-08-06 21:11:41 +02:00
Uwe Tews 1a5654040f fix exception results 2015-08-02 21:02:56 +02:00
Uwe Tews 621d99643c remove check of uid from exception result 2015-08-01 14:10:37 +02:00
Uwe Tews b829b94df8 Update 2015-07-30 02:02:53 +02:00
Uwe Tews a6f6f6fd6d update 2015-07-30 01:50:45 +02:00
Uwe Tews 5f0c8fd58a disable test7 2015-07-30 00:00:56 +02:00
Uwe Tews cf2b0c8aed Update section tests 2015-07-29 23:28:57 +02:00
Uwe Tews 63b3f4c522 remove PHP_ALLOW test for <script language='php'> for PHP 7 as it is not supported 2015-07-28 01:47:08 +02:00
Uwe Tews b4dc05df12 remove PHP_ALLOW test for <script language='php'> for PHP 7 as it is not supported 2015-07-28 01:35:24 +02:00
Uwe Tews 84dbaa901b Fix tests for HHVM 2015-07-28 00:50:27 +02:00
Uwe Tews b1ffb59c3c Update 2015-07-07 18:35:49 +02:00
Uwe Tews 62d0c170a0 Update file resource tests 2015-07-07 17:11:05 +02:00
Uwe Tews a0f18578e2 Update file resource tests 2015-07-07 00:49:20 +02:00
Uwe Tews cb70b219ad update $source->getContent() 2015-07-01 16:57:50 +02:00
Uwe Tews 5f8f92d75b Update 2015-07-01 03:13:32 +02:00
Uwe Tews 441ac8e100 Add closure test 2015-06-19 03:00:20 +02:00
Uwe Tews 9400c6307f Delete 2015-06-18 03:26:46 +02:00
Uwe Tews 77abff1e53 normalize path 2015-06-18 03:07:19 +02:00
Uwe Tews cbeede4f8c update 2015-06-18 02:04:13 +02:00
Uwe Tews c34c178053 check plugin loading 2015-06-18 01:45:13 +02:00
Uwe Tews e5b3da5b38 Update path normalization 2015-06-18 00:17:57 +02:00
Uwe Tews c1d6ae68f4 Test simplw plugin nocache 2015-06-17 20:59:56 +02:00
Uwe Tews 609ae0d708 Update for 3.1.25 2015-06-14 02:56:18 +02:00
Uwe Tews 1500b2e655 update for <?xml tags including template variables 2015-06-01 22:14:41 +02:00
Uwe Tews b55f4cf551 New PHP tests 2015-05-23 18:53:25 +02:00
Uwe Tews 66f127cab1 New PHP tests 2015-05-23 18:49:46 +02:00
Uwe Tews cb31ef2df1 New PHP tests 2015-05-23 18:49:27 +02:00
Uwe Tews e3c82a8f06 Test long comment 2015-05-23 18:48:27 +02:00
Uwe Tews 15abaf4842 Test long comment 2015-05-23 18:48:04 +02:00
Uwe Tews 5bb2c5c26f Update bootstrap 2015-05-21 00:53:04 +02:00
Uwe Tews 47b6fab3d9 fix result 2015-05-20 05:05:28 +02:00
Uwe Tews 2614b1aacb fix true 2015-05-18 08:11:50 +02:00
Uwe Tews 37d327ce12 Update 2015-05-18 05:36:37 +02:00
Uwe Tews 9cd0734f70 Modified Php tag tests to multiple php lines. 2015-05-16 14:57:14 +02:00
Uwe Tews f6b369263e Modified Php tag tests to multiple php lines. 2015-05-16 14:48:38 +02:00
Uwe Tews e1a34fbc87 added recursive template function tests 2015-05-14 15:03:55 +02:00
Uwe Tews 59de25809e added recursive template function tests 2015-05-14 15:02:52 +02:00
Uwe Tews 5bef25a262 Added unit test for issue 28 and 29 2015-05-12 20:44:52 +02:00
Uwe Tews 4a09745c41 Update for Linux results 2015-05-12 03:50:24 +02:00
Uwe Tews eed5b1ddf3 add lockfile for phpunit 2015-05-12 02:36:43 +02:00
Uwe Tews 78e0072c15 Delete 2015-05-10 23:05:55 +02:00
Uwe Tews a451662760 update 2015-05-10 22:59:33 +02:00
Uwe Tews 8d75f927aa add travis.yml 2015-05-10 22:57:17 +02:00
Uwe Tews 79f1d70d97 added tests for cache locking 2015-05-10 12:52:00 +02:00
Uwe Tews 41c4c598af add tests for cache locking 2015-05-06 22:54:41 +02:00
Uwe Tews ce756af4ca Update tests 2015-05-05 23:45:28 +02:00
Uwe Tews bca7eaeba5 test 2015-05-05 04:18:56 +02:00
Uwe Tews a97f68068d test 2015-05-05 04:15:20 +02:00
Uwe Tews 6fa1f3c6a4 test 2015-05-05 04:13:18 +02:00
Uwe Tews 0a1d2c20c7 test 2015-05-05 04:11:44 +02:00
Uwe Tews e9b9ba2d40 test 2015-05-05 04:03:41 +02:00
Uwe Tews 619c1d2830 try to catch excluded files right 2015-05-05 01:06:43 +02:00
Uwe Tews ef317b50ae try to catch excluded files right 2015-05-05 01:05:27 +02:00
Uwe Tews 81aae13e55 Smarty 3.1.22 code change
- improvement use is_file() checks to avoid errors suppressed by @ which could still cause problems (https://github.com/smarty-php/smarty/issues/24)
2015-05-05 01:03:12 +02:00
Uwe Tews 8056c27602 3.1.21 2015-05-04 04:08:56 +02:00
Uwe Tews cf11a8a4b9 3.1.20 2015-05-04 04:06:29 +02:00
Uwe Tews 69b2f86d91 3.1.20 2015-05-04 04:03:09 +02:00
Uwe Tews 26146a67a6 3.1.19 2015-05-04 04:01:13 +02:00
Uwe Tews 0566d8a657 3.1.18 2015-05-04 03:58:51 +02:00
Uwe Tews 94545f2d4e 3.1.17 2015-05-04 03:56:51 +02:00
Uwe Tews 4cc66c650a 3.1.16 2015-05-04 03:54:54 +02:00
Uwe Tews 819b852809 3.1.15 2015-05-04 03:52:20 +02:00
Uwe Tews d3e78d81bc 3.1.14 2015-05-04 03:12:52 +02:00
Uwe Tews 7ad54c9887 3.1.13 2015-05-04 03:10:52 +02:00
Uwe Tews fe8598515f 3.1.12 2015-05-04 03:07:10 +02:00
Uwe Tews 0dea9f271c 3.1.11 2015-05-04 03:00:52 +02:00
Uwe Tews 1834622d94 Revert "3.1.11"
This reverts commit d3af847798ed757770a5a0d336fa04780a7ec2cd.
2015-05-04 02:23:23 +02:00
Uwe Tews 429229d6b6 3.1.11 2015-05-04 02:22:20 +02:00
Uwe Tews 5feb5b44dd Update 2015-05-04 02:21:34 +02:00
Uwe Tews 27addcf628 init 2015-05-04 02:17:48 +02:00
uwetews 6eedb590e1 Initial commit 2015-05-04 02:14:20 +02:00
3 changed files with 13 additions and 25 deletions
-2
View File
@@ -1,6 +1,4 @@
- fix foreachelse on arrayiterators https://github.com/smarty-php/smarty/issues/506
- throw SmartyException when setting caching attributes for cacheable plugin https://github.com/smarty-php/smarty/issues/457
- fix errors that occured where isset was replaced with null check such as https://github.com/smarty-php/smarty/issues/453
===== 3.1.34 release ===== 05.11.2019
13.01.2020
@@ -48,8 +48,6 @@ class Smarty_Internal_Method_RegisterPlugin
throw new SmartyException("Plugin tag '{$name}' already registered");
} elseif (!is_callable($callback)) {
throw new SmartyException("Plugin '{$name}' not callable");
} elseif ($cacheable && $cache_attr) {
throw new SmartyException("Cannot set caching attributes for plugin '{$name}' when it is cacheable.");
} else {
$smarty->registered_plugins[ $type ][ $name ] = array($callback, (bool)$cacheable, (array)$cache_attr);
}
@@ -621,18 +621,22 @@ abstract class Smarty_Internal_TemplateCompilerBase
|| strcasecmp($name, 'array') === 0 || is_callable($name)
) {
$func_name = strtolower($name);
$par = implode(',', $parameter);
$parHasFuction = strpos($par, '(') !== false;
if ($func_name === 'isset') {
if (count($parameter) === 0) {
$this->trigger_template_error('Illegal number of parameter in "isset()"');
}
$pa = array();
foreach ($parameter as $p) {
$pa[] = $this->syntaxMatchesVariable($p) ? 'isset(' . $p . ')' : '(' . $p . ' !== null )';
}
return '(' . implode(' && ', $pa) . ')';
if ($parHasFuction) {
$pa = array();
foreach ($parameter as $p) {
$pa[] = (strpos($p, '(') === false) ? ('isset(' . $p . ')') : ('(' . $p . ' !== null )');
}
return '(' . implode(' && ', $pa) . ')';
} else {
$isset_par = str_replace("')->value", "',null,true,false)->value", $par);
}
return $name . '(' . $isset_par . ')';
} elseif (in_array(
$func_name,
array(
@@ -649,7 +653,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
$this->trigger_template_error("Illegal number of parameter in '{$func_name()}'");
}
if ($func_name === 'empty') {
if (!$this->syntaxMatchesVariable($parameter[0]) && version_compare(PHP_VERSION, '5.5.0', '<')) {
if ($parHasFuction && version_compare(PHP_VERSION, '5.5.0', '<')) {
return '(' . $parameter[ 0 ] . ' === false )';
} else {
return $func_name . '(' .
@@ -667,18 +671,6 @@ abstract class Smarty_Internal_TemplateCompilerBase
}
}
/**
* Determines whether the passed string represents a valid (PHP) variable.
* This is important, because `isset()` only works on variables and `empty()` can only be passed
* a variable prior to php5.5
* @param $string
* @return bool
*/
private function syntaxMatchesVariable($string) {
static $regex_pattern = '/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*((->)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|\[.*]*\])*$/';
return 1 === preg_match($regex_pattern, trim($string));
}
/**
* This method is called from parser to process a text content section
* - remove text from inheritance child templates as they may generate output