Commit Graph

519 Commits

Author SHA1 Message Date
Jordi Boggiano b2e1675f0c Add is array test 2012-04-13 12:57:54 +02:00
Fabien Potencier 4e28408ce1 fixed a PHP notice when trying to access a key on a non-object/array variable 2012-04-12 14:36:25 +02:00
Tobias Schultze 27064127ad fixed random function when charset is null 2012-04-09 09:26:53 +02:00
Fabien Potencier 1b47b40104 enhanced error reporting when the template file is an instance of SplFileInfo 2012-04-08 14:12:00 +02:00
Fabien Potencier c6bf195e21 added a unit test to demonstrate the need to pass blocks when calling renderBlock|displayBlock 2012-04-07 22:40:59 +02:00
Fabien Potencier f2f1f32b41 added Twig_Environment::mergeGlobals() 2012-04-03 19:13:43 +02:00
Fabien Potencier 3398b38cf0 fixed a regression when a template only extends another one without defining any blocks (closes #683) 2012-04-03 19:13:30 +02:00
Fabien Potencier 8f242ca858 made usage of mergeContextWithGlobals in macros 2012-04-03 09:45:11 +02:00
Fabien Potencier e9c1433a99 renamed a test 2012-04-03 09:07:04 +02:00
Fabien Potencier 1f6e640d96 added compilation checks to avoid misuses of the sandbox tag 2012-04-03 09:03:41 +02:00
Fabien Potencier 2055f567f9 fixed Twig unit tests when a template must throw an exception 2012-04-03 08:59:31 +02:00
Fabien Potencier 3f962ba89e enhance error reporting in Twig unit tests 2012-04-03 08:49:35 +02:00
Fabien Potencier 1e9a1ae0be optimized parent template creation when the template does not use dynamic inheritance 2012-03-31 15:21:57 +02:00
Fabien Potencier 90931b0a27 fixed compilation of numeric values used in templates when using a locale where the decimal separator is not a dot 2012-03-19 00:08:15 +01:00
Fabien Potencier 96632fb481 simplified tests 2012-03-18 03:33:46 +01:00
Fabien Potencier 49ee8d6e41 made the strategy used to guess the real template file name and line number in exception messages much faster and more accurate (refs #647) 2012-03-18 03:33:46 +01:00
Fabien Potencier 50e73b20cb fixed sandbox mode when used with inheritance (closes #656)
The checkSecurity() method must be called by each template as we are not
using inheritance.
2012-03-17 17:11:40 +01:00
Fabien Potencier c0a9c8bb3e added preserveKeys support for the slice filter (closes #669) 2012-03-17 12:42:13 +01:00
Fabien Potencier a3310e75a1 fixed the date filter when a DateTime instance is passed with a specific timezone (closes #660) 2012-03-15 17:24:51 +01:00
Christophe Coevoet d942d11f2f Added a trim filter
Closes #634
2012-03-12 14:56:44 +01:00
Fabien Potencier 9573f2213c added some unit tests 2012-02-28 23:19:50 +01:00
Jordi Boggiano e4590d0cd8 Avoid creating unnecessary Twig_Markup instances, allows testing for falsiness of empty output 2012-02-17 15:56:34 +01:00
Fabien Potencier 4478816e41 removed usage of assertInstanceOf as if is not available when using PHPUnit on PHP 5.2.* 2012-02-06 18:16:12 +01:00
Fabien Potencier 5dd0aaec16 added more safeguards in unit tests to support different configuraitons 2012-02-06 16:21:45 +01:00
Fabien Potencier 3561a45c85 added some unit tests for previous merge 2012-02-06 10:03:50 +01:00
Fabien Potencier 310020ac98 fixed raw blocks when used with the whitespace trim option (closes #617) 2012-01-28 17:45:54 +01:00
Fabien Potencier 0eadacf6ba added some unit tests for the reverse filter when charset is not UTF-8 2012-01-28 17:12:21 +01:00
Fabien Potencier 12042e0880 added some unit tests for random() when charset is not UTF-8 2012-01-28 17:09:25 +01:00
Fabien Potencier bc80f48f6a fixed the random() function on strings when the charset is not UTF-8
(refs #614)
2012-01-27 08:25:05 +01:00
Tobias Schultze 814cefdad7 improve test coverage and support negative int for random function 2012-01-26 14:52:41 +01:00
Tobias Schultze fe663585b7 added tests for random function 2012-01-26 12:19:51 +01:00
Fabien Potencier f958d91e79 add a unit test for previous merge 2012-01-24 19:09:28 +01:00
Fabien Potencier d21592b189 removed duplicated tests 2012-01-24 13:11:53 +01:00
Fabien Potencier 0f9d7ffb4c added the possibility to skip some tests depending on the PHP version 2012-01-24 13:03:09 +01:00
Fabien Potencier 883a93bb4d fixed the attribute function when passing arguments (closes #608) 2012-01-23 08:51:52 +01:00
Fabien Potencier f2195cfe3f added some unit tests for macros 2012-01-21 21:40:17 +01:00
Fabien Potencier d8951853ba added support for optional length in the slice [] notation 2012-01-14 09:27:35 +01:00
Fabien Potencier d9dc813dfd added a slice filter 2012-01-14 08:49:51 +01:00
Fabien Potencier 4578c176e5 added string support for the reverse filter 2012-01-14 08:49:13 +01:00
Fabien Potencier fee85f2f1d fixed charset for previous commit 2012-01-09 20:51:54 +01:00
Fabien Potencier 68fa9c9bb8 fixed the empty test and the length filter for Twig_Markup instances (closes #589) 2012-01-09 20:32:51 +01:00
Grégoire Pineau 6ca2ca6050 [Tests] Removed dead code in core test 2012-01-08 17:27:53 +01:00
Fabien Potencier 764829f55a added a date function to ease date comparison (closes #571) 2012-01-06 20:32:26 +01:00
Fabien Potencier 8fb4172a04 fixed unary operators precedence (closes #583) 2012-01-06 19:47:50 +01:00
Fabien Potencier ee39215cc2 fixed regression in string parsing (closes #580) 2012-01-05 15:29:43 +01:00
Fabien Potencier b44dba5c7c fixed the join filter when several items have the same key 2012-01-02 15:13:27 +01:00
Fabien Potencier c03458483b added a unit test 2012-01-02 13:14:06 +01:00
Fabien Potencier 19ba9c2141 added Traversable objects support for the join filter 2012-01-02 13:10:08 +01:00
Fabien Potencier 736dfa84d0 added a way to set the default global date interval format 2011-12-30 09:15:53 +01:00
Mark Story 0edcfdd28b Add number_format filter.
Refs #417
2011-12-28 10:39:04 -05:00