Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

RELEASE_1_4_16 => v1.4.16 commit

  • Loading branch information...
commit 09ad32171c4bce9b8f904772b3e75213f90fdf65 1 parent c932b32
Pierre-Yves LEBECQ pylebecq authored

Showing 484 changed files with 12,116 additions and 14 deletions. Show diff stats Hide diff stats

  1. +10 0 CHANGELOG
  2. +1 1  lib/autoload/sfCoreAutoload.class.php
  3. +3 3 lib/config/sfApplicationConfiguration.class.php
  4. +2 2 lib/config/sfFactoryConfigHandler.class.php
  5. +4 2 lib/exception/sfException.class.php
  6. +2 2 lib/form/addon/sfFormObject.class.php
  7. +2 2 lib/i18n/sfChoiceFormat.class.php
  8. +5 2 lib/i18n/sfMessageSource_Aggregate.class.php
  9. +1 0  lib/plugins/sfDoctrinePlugin/test/functional/fixtures/config/doctrine/linked_schema.yml
  10. +102 0 package.xml.tmpl
  11. +35 0 test/bin/coverage.php
  12. +45 0 test/bin/loc.php
  13. +73 0 test/bootstrap/functional.php
  14. +22 0 test/bootstrap/task.php
  15. +68 0 test/bootstrap/unit.php
  16. +67 0 test/functional/authTest.php
  17. +40 0 test/functional/autoloadTest.php
  18. +513 0 test/functional/cacheTest.php
  19. +50 0 test/functional/escapingTest.php
  20. +45 0 test/functional/filterTest.php
  21. +2 0  test/functional/fixtures/apps/cache/config/app.yml
  22. +4 0 test/functional/fixtures/apps/cache/config/cache.yml
  23. +8 0 test/functional/fixtures/apps/cache/config/cacheConfiguration.class.php
  24. +17 0 test/functional/fixtures/apps/cache/config/factories.yml
  25. +9 0 test/functional/fixtures/apps/cache/config/filters.yml
  26. +15 0 test/functional/fixtures/apps/cache/config/routing.yml
  27. +2 0  test/functional/fixtures/apps/cache/config/security.yml
  28. +22 0 test/functional/fixtures/apps/cache/config/settings.yml
  29. +17 0 test/functional/fixtures/apps/cache/config/view.yml
  30. +5 0 test/functional/fixtures/apps/cache/lib/myUser.class.php
  31. +104 0 test/functional/fixtures/apps/cache/modules/cache/actions/actions.class.php
  32. +36 0 test/functional/fixtures/apps/cache/modules/cache/actions/components.class.php
  33. +62 0 test/functional/fixtures/apps/cache/modules/cache/config/cache.yml
  34. BIN  test/functional/fixtures/apps/cache/modules/cache/data/ok48.png
  35. +10 0 test/functional/fixtures/apps/cache/modules/cache/templates/_anotherCacheablePartial.php
  36. +6 0 test/functional/fixtures/apps/cache/modules/cache/templates/_cacheableComponent.php
  37. +8 0 test/functional/fixtures/apps/cache/modules/cache/templates/_cacheablePartial.php
  38. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/_component.php
  39. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/_contextualCacheableComponent.php
  40. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/_contextualCacheablePartial.php
  41. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/_contextualComponent.php
  42. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/_contextualPartial.php
  43. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/_partial.php
  44. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/actionSuccess.php
  45. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/anotherPartialSuccess.php
  46. +2 0  test/functional/fixtures/apps/cache/modules/cache/templates/componentSuccess.php
  47. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/imageSuccess.php
  48. +3 0  test/functional/fixtures/apps/cache/modules/cache/templates/indexSuccess.php
  49. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/listSuccess.php
  50. +10 0 test/functional/fixtures/apps/cache/modules/cache/templates/multiBisSuccess.php
  51. +30 0 test/functional/fixtures/apps/cache/modules/cache/templates/multiSuccess.php
  52. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/pageSuccess.php
  53. +1 0  test/functional/fixtures/apps/cache/modules/cache/templates/partialSuccess.php
  54. +5 0 test/functional/fixtures/apps/cache/modules/cache/templates/specificCacheKeySuccess.php
  55. +28 0 test/functional/fixtures/apps/cache/modules/httpcache/actions/actions.class.php
  56. +11 0 test/functional/fixtures/apps/cache/modules/httpcache/config/cache.yml
  57. +1 0  test/functional/fixtures/apps/cache/modules/httpcache/templates/indexSuccess.php
  58. +20 0 test/functional/fixtures/apps/cache/modules/nocache/actions/actions.class.php
  59. +2 0  test/functional/fixtures/apps/cache/modules/nocache/config/cache.yml
  60. +3 0  test/functional/fixtures/apps/cache/modules/nocache/templates/indexSuccess.php
  61. +1 0  test/functional/fixtures/apps/cache/templates/image.php
  62. +25 0 test/functional/fixtures/apps/cache/templates/layout.php
  63. +2 0  test/functional/fixtures/apps/frontend/config/app.yml
  64. +4 0 test/functional/fixtures/apps/frontend/config/cache.yml
  65. 0  test/functional/fixtures/apps/frontend/config/dirmyconfig/myconfig.yml
  66. +17 0 test/functional/fixtures/apps/frontend/config/factories.yml
  67. +11 0 test/functional/fixtures/apps/frontend/config/filters.yml
  68. +42 0 test/functional/fixtures/apps/frontend/config/frontendConfiguration.class.php
  69. +19 0 test/functional/fixtures/apps/frontend/config/routing.yml
  70. +2 0  test/functional/fixtures/apps/frontend/config/security.yml
  71. +25 0 test/functional/fixtures/apps/frontend/config/settings.yml
  72. +21 0 test/functional/fixtures/apps/frontend/config/view.yml
  73. +9 0 test/functional/fixtures/apps/frontend/lib/myAppsFrontendLibClass.class.php
  74. +16 0 test/functional/fixtures/apps/frontend/lib/myAutoload.class.php
  75. +9 0 test/functional/fixtures/apps/frontend/lib/myAutoloadedClass.class.php
  76. +22 0 test/functional/fixtures/apps/frontend/lib/myFilter.class.php
  77. +5 0 test/functional/fixtures/apps/frontend/lib/myUser.class.php
  78. +16 0 test/functional/fixtures/apps/frontend/modules/assetInclusion/actions/actions.class.php
  79. +7 0 test/functional/fixtures/apps/frontend/modules/assetInclusion/config/view.yml
  80. +1 0  test/functional/fixtures/apps/frontend/modules/assetInclusion/templates/indexSuccess.php
  81. +33 0 test/functional/fixtures/apps/frontend/modules/auth/actions/actions.class.php
  82. +3 0  test/functional/fixtures/apps/frontend/modules/auth/templates/basicSuccess.php
  83. +25 0 test/functional/fixtures/apps/frontend/modules/autoload/actions/actions.class.php
  84. +9 0 test/functional/fixtures/apps/frontend/modules/autoload/lib/myAppsFrontendModulesAutoloadLib.class.php
  85. +4 0 test/functional/fixtures/apps/frontend/modules/autoload/templates/indexSuccess.php
  86. +1 0  test/functional/fixtures/apps/frontend/modules/autoload/templates/myAutoloadSuccess.php
  87. +62 0 test/functional/fixtures/apps/frontend/modules/browser/actions/actions.class.php
  88. +1 0  test/functional/fixtures/apps/frontend/modules/browser/templates/redirectTarget1Success.php
  89. +1 0  test/functional/fixtures/apps/frontend/modules/browser/templates/templateCustomCustomSuccess.php
  90. +1 0  test/functional/fixtures/apps/frontend/modules/browser/templates/templateCustomSuccess.php
  91. +16 0 test/functional/fixtures/apps/frontend/modules/configFiltersSimpleFilter/actions/actions.class.php
  92. +14 0 test/functional/fixtures/apps/frontend/modules/configFiltersSimpleFilter/config/filters.yml
  93. +12 0 ...onal/fixtures/apps/frontend/modules/configFiltersSimpleFilter/lib/configFiltersSimpleFilterFilter.class.php
  94. +1 0  test/functional/fixtures/apps/frontend/modules/configFiltersSimpleFilter/templates/indexSuccess.php
  95. +16 0 test/functional/fixtures/apps/frontend/modules/configModuleDisabled/actions/actions.class.php
  96. +2 0  test/functional/fixtures/apps/frontend/modules/configModuleDisabled/config/module.yml
  97. 0  test/functional/fixtures/apps/frontend/modules/configModuleDisabled/templates/indexSuccess.php
  98. +16 0 test/functional/fixtures/apps/frontend/modules/configSecurityIsSecure/actions/actions.class.php
  99. +3 0  test/functional/fixtures/apps/frontend/modules/configSecurityIsSecure/config/security.yml
  100. 0  test/functional/fixtures/apps/frontend/modules/configSecurityIsSecure/templates/indexSuccess.php
  101. +16 0 test/functional/fixtures/apps/frontend/modules/configSecurityIsSecureAction/actions/actions.class.php
  102. +3 0  test/functional/fixtures/apps/frontend/modules/configSecurityIsSecureAction/config/security.yml
  103. 0  test/functional/fixtures/apps/frontend/modules/configSecurityIsSecureAction/templates/indexSuccess.php
  104. +17 0 test/functional/fixtures/apps/frontend/modules/configSettingsMaxForwards/actions/actions.class.php
  105. 0  test/functional/fixtures/apps/frontend/modules/configSettingsMaxForwards/templates/indexSuccess.php
  106. +16 0 test/functional/fixtures/apps/frontend/modules/configViewHasLayout/actions/actions.class.php
  107. +2 0  test/functional/fixtures/apps/frontend/modules/configViewHasLayout/config/view.yml
  108. +1 0  test/functional/fixtures/apps/frontend/modules/configViewHasLayout/templates/withoutLayoutSuccess.php
  109. +31 0 test/functional/fixtures/apps/frontend/modules/cookie/actions/actions.class.php
  110. +29 0 test/functional/fixtures/apps/frontend/modules/escaping/actions/actions.class.php
  111. +6 0 test/functional/fixtures/apps/frontend/modules/escaping/templates/_partial1.php
  112. +4 0 test/functional/fixtures/apps/frontend/modules/escaping/templates/_partial2.php
  113. +4 0 test/functional/fixtures/apps/frontend/modules/escaping/templates/indexSuccess.php
  114. +27 0 test/functional/fixtures/apps/frontend/modules/exception/actions/actions.class.php
  115. +22 0 test/functional/fixtures/apps/frontend/modules/filter/actions/actions.class.php
  116. +46 0 test/functional/fixtures/apps/frontend/modules/format/actions/actions.class.php
  117. +1 0  test/functional/fixtures/apps/frontend/modules/format/templates/_js_header.js.php
  118. +1 0  test/functional/fixtures/apps/frontend/modules/format/templates/indexSuccess.css.php
  119. +1 0  test/functional/fixtures/apps/frontend/modules/format/templates/indexSuccess.iphone.php
  120. +3 0  test/functional/fixtures/apps/frontend/modules/format/templates/indexSuccess.js.php
  121. +1 0  test/functional/fixtures/apps/frontend/modules/format/templates/indexSuccess.php
  122. +1 0  test/functional/fixtures/apps/frontend/modules/format/templates/indexSuccess.xml.php
  123. +1 0  test/functional/fixtures/apps/frontend/modules/format/templates/jsSuccess.js.php
  124. +19 0 test/functional/fixtures/apps/frontend/modules/notfound/actions/actions.class.php
  125. +22 0 test/functional/fixtures/apps/frontend/modules/presentation/actions/actions.class.php
  126. +1 0  test/functional/fixtures/apps/frontend/modules/presentation/templates/fooSuccess.php
  127. +2 0  test/functional/fixtures/apps/frontend/modules/presentation/templates/indexSuccess.php
  128. +17 0 test/functional/fixtures/apps/frontend/modules/renderText/actions/actions.class.php
  129. 0  test/functional/fixtures/apps/frontend/modules/sfConfigPlugin/config/dirmyconfig/myconfig.yml
  130. 0  test/functional/fixtures/apps/frontend/modules/sfConfigPlugin/config/filters.yml
  131. 0  test/functional/fixtures/apps/frontend/modules/sfConfigPlugin/config/view.yml
  132. +25 0 test/functional/fixtures/apps/frontend/modules/view/actions/actions.class.php
  133. +16 0 test/functional/fixtures/apps/frontend/modules/view/config/view.yml
  134. +1 0  test/functional/fixtures/apps/frontend/modules/view/templates/fooSuccess.php
  135. +1 0  test/functional/fixtures/apps/frontend/modules/view/templates/imageSuccess.php
  136. +1 0  test/functional/fixtures/apps/frontend/modules/view/templates/plainSuccess.php
  137. +21 0 test/functional/fixtures/apps/frontend/templates/layout.iphone.php
  138. +21 0 test/functional/fixtures/apps/frontend/templates/layout.php
  139. +3 0  test/functional/fixtures/apps/frontend/templates/layout.xml.php
  140. +2 0  test/functional/fixtures/apps/i18n/config/app.yml
  141. +4 0 test/functional/fixtures/apps/i18n/config/cache.yml
  142. +17 0 test/functional/fixtures/apps/i18n/config/factories.yml
  143. +8 0 test/functional/fixtures/apps/i18n/config/filters.yml
  144. +10 0 test/functional/fixtures/apps/i18n/config/i18nConfiguration.class.php
  145. +7 0 test/functional/fixtures/apps/i18n/config/routing.yml
  146. +2 0  test/functional/fixtures/apps/i18n/config/security.yml
  147. +25 0 test/functional/fixtures/apps/i18n/config/settings.yml
  148. +17 0 test/functional/fixtures/apps/i18n/config/view.yml
  149. +15 0 test/functional/fixtures/apps/i18n/i18n/messages.fr.xml
  150. +11 0 test/functional/fixtures/apps/i18n/i18n/other.fr.xml
  151. +5 0 test/functional/fixtures/apps/i18n/lib/myUser.class.php
  152. +47 0 test/functional/fixtures/apps/i18n/modules/i18n/actions/actions.class.php
  153. +19 0 test/functional/fixtures/apps/i18n/modules/i18n/i18n/custom.fr.xml
  154. +35 0 test/functional/fixtures/apps/i18n/modules/i18n/i18n/messages.fr.xml
  155. +11 0 test/functional/fixtures/apps/i18n/modules/i18n/i18n/other.fr.xml
  156. +9 0 test/functional/fixtures/apps/i18n/modules/i18n/lib/I18nCustomCatalogueForm.class.php
  157. +24 0 test/functional/fixtures/apps/i18n/modules/i18n/lib/I18nForm.class.php
  158. +8 0 test/functional/fixtures/apps/i18n/modules/i18n/templates/i18nFormSuccess.php
  159. +13 0 test/functional/fixtures/apps/i18n/modules/i18n/templates/indexSuccess.php
  160. +11 0 test/functional/fixtures/apps/i18n/modules/sfI18NPlugin/i18n/messages.fr.xml
  161. +21 0 test/functional/fixtures/apps/i18n/templates/layout.php
  162. +13 0 test/functional/fixtures/config/ProjectConfiguration.class.php
  163. +6 0 test/functional/fixtures/config/databases.yml
  164. 0  test/functional/fixtures/config/dirmyconfig/myconfig.yml
  165. +8 0 test/functional/fixtures/config/filters.yml
  166. +48 0 test/functional/fixtures/config/propel.ini
  167. +3 0  test/functional/fixtures/config/properties.ini
  168. 0  test/functional/fixtures/config/view.yml
  169. 0  test/functional/fixtures/data/environment.migrated
  170. +5 0 test/functional/fixtures/lib/ExtendMe.class.php
  171. +13 0 test/functional/fixtures/lib/form/BaseForm.class.php
  172. +9 0 test/functional/fixtures/lib/myLibClass.class.php
  173. +5 0 test/functional/fixtures/plugins/sfAutoloadPlugin/config/NotInLib.class.php
  174. +11 0 test/functional/fixtures/plugins/sfAutoloadPlugin/config/autoload.yml
  175. +5 0 test/functional/fixtures/plugins/sfAutoloadPlugin/config/sfAutoloadPluginConfiguration.class.php
  176. +5 0 test/functional/fixtures/plugins/sfAutoloadPlugin/lib/BaseExtendMe.class.php
  177. +5 0 test/functional/fixtures/plugins/sfAutoloadPlugin/lib/ExtendMe.class.php
  178. +5 0 test/functional/fixtures/plugins/sfAutoloadPlugin/lib/vendor/ExcludedFromAutoload.class.php
  179. +11 0 test/functional/fixtures/plugins/sfAutoloadPlugin/modules/autoloadPlugin/actions/actions.class.php
  180. +9 0 ...ins/sfAutoloadPlugin/modules/autoloadPlugin/lib/myPluginsSfAutoloadPluginModulesAutoloadPluginLib.class.php
  181. +3 0  test/functional/fixtures/plugins/sfAutoloadPlugin/modules/autoloadPlugin/templates/indexSuccess.php
  182. 0  test/functional/fixtures/plugins/sfAutoloadPlugin/test/functional/BarFunctionalTest.php
  183. 0  test/functional/fixtures/plugins/sfAutoloadPlugin/test/functional/FooFunctionalTest.php
  184. 0  test/functional/fixtures/plugins/sfAutoloadPlugin/test/functional/nested/NestedFunctionalTest.php
  185. 0  test/functional/fixtures/plugins/sfAutoloadPlugin/test/unit/BarUnitTest.php
  186. 0  test/functional/fixtures/plugins/sfAutoloadPlugin/test/unit/FooUnitTest.php
  187. 0  test/functional/fixtures/plugins/sfAutoloadPlugin/test/unit/nested/NestedUnitTest.php
  188. 0  test/functional/fixtures/plugins/sfConfigPlugin/config/dirmyconfig/myconfig.yml
  189. +7 0 test/functional/fixtures/plugins/sfConfigPlugin/config/filters.yml
  190. 0  test/functional/fixtures/plugins/sfConfigPlugin/config/view.yml
  191. 0  test/functional/fixtures/plugins/sfConfigPlugin/modules/sfConfigPlugin/config/dirmyconfig/myconfig.yml
  192. 0  test/functional/fixtures/plugins/sfConfigPlugin/modules/sfConfigPlugin/config/filters.yml
  193. 0  test/functional/fixtures/plugins/sfConfigPlugin/modules/sfConfigPlugin/config/view.yml
  194. +11 0 test/functional/fixtures/plugins/sfI18NPlugin/i18n/messages.fr.xml
  195. +24 0 test/functional/fixtures/plugins/sfI18NPlugin/modules/sfI18NPlugin/actions/actions.class.php
  196. +23 0 test/functional/fixtures/plugins/sfI18NPlugin/modules/sfI18NPlugin/i18n/messages.fr.xml
  197. +16 0 test/functional/fixtures/plugins/sfI18NPlugin/modules/sfI18NPlugin/templates/indexSuccess.php
  198. +15 0 test/functional/fixtures/symfony
  199. +125 0 test/functional/formatTest.php
  200. +235 0 test/functional/genericTest.php
  201. +61 0 test/functional/httpcacheTest.php
  202. +79 0 test/functional/i18nFormTest.php
  203. +104 0 test/functional/i18nTest.php
  204. +82 0 test/functional/prodTest.php
  205. +263 0 test/functional/sfTestBrowserTest.php
  206. +27 0 test/other/fixtures/factories.yml
  207. +9 0 test/other/fixtures/propel/Category.php
  208. +5 0 test/other/fixtures/propel/databases.yml
  209. +40 0 test/other/fixtures/propel/propel.ini
  210. +11 0 test/other/fixtures/propel/schema.yml
  211. +12 0 test/other/fixtures/task/aTask.class.php
  212. +12 0 test/other/fixtures/task/myPluginTask.class.php
  213. +12 0 test/other/fixtures/task/zTask.class.php
  214. +8 0 test/other/fixtures/test/functional/result-harness.txt
  215. +7 0 test/other/fixtures/test/functional/result.txt
  216. +9 0 test/other/fixtures/test/result-harness.txt
  217. +3 0  test/other/fixtures/test/unit/result-harness.txt
  218. +3 0  test/other/fixtures/test/unit/result.txt
  219. +7 0 test/other/fixtures/test/unit/testTest.php
  220. +170 0 test/other/tasksTest.php
  221. +58 0 test/unit/action/sfComponentTest.php
  222. +43 0 test/unit/addon/sfPagerTest.php
  223. +16 0 test/unit/autoload/sfCoreAutoloadTest.php
  224. +19 0 test/unit/autoload/sfSimpleAutoloadTest.php
  225. +42 0 test/unit/cache/sfAPCCacheTest.php
  226. +181 0 test/unit/cache/sfCacheDriverTests.class.php
  227. +35 0 test/unit/cache/sfCacheTest.php
  228. +36 0 test/unit/cache/sfEAcceleratorCacheTest.php
  229. +40 0 test/unit/cache/sfFileCacheTest.php
  230. +109 0 test/unit/cache/sfFunctionCacheTest.php
  231. +69 0 test/unit/cache/sfMemcacheCacheTest.php
  232. +28 0 test/unit/cache/sfNoCacheTest.php
  233. +55 0 test/unit/cache/sfSQLiteCacheTest.php
  234. +36 0 test/unit/cache/sfXCacheCacheTest.php
  235. +142 0 test/unit/command/sfCommandArgumentSetTest.php
  236. +94 0 test/unit/command/sfCommandArgumentTest.php
  237. +166 0 test/unit/command/sfCommandManagerTest.php
  238. +144 0 test/unit/command/sfCommandOptionSetTest.php
  239. +127 0 test/unit/command/sfCommandOptionTest.php
  240. +15 0 test/unit/config/fixtures/sfDefineEnvironmentConfigHandler/prefix_all.yml
  241. +11 0 test/unit/config/fixtures/sfDefineEnvironmentConfigHandler/prefix_default.yml
  242. +13 0 test/unit/config/fixtures/sfDefineEnvironmentConfigHandler/prefix_result.php
  243. +14 0 test/unit/config/fixtures/sfFilterConfigHandler/condition.yml
  244. +12 0 test/unit/config/fixtures/sfFilterConfigHandler/default_filters.yml
  245. +13 0 test/unit/config/fixtures/sfFilterConfigHandler/disable.yml
  246. +11 0 test/unit/config/fixtures/sfFilterConfigHandler/filters.yml
  247. +5 0 test/unit/config/fixtures/sfFilterConfigHandler/no_class.yml
  248. +7 0 test/unit/config/fixtures/sfFilterConfigHandler/no_execution.yml
  249. +7 0 test/unit/config/fixtures/sfFilterConfigHandler/no_rendering.yml
  250. +2 0  test/unit/config/fixtures/sfFilterConfigHandler/not_disabled.yml
  251. +25 0 test/unit/config/fixtures/sfFilterConfigHandler/result.php
  252. 0  test/unit/config/fixtures/sfGeneratorConfigHandler/empty.yml
  253. +4 0 test/unit/config/fixtures/sfGeneratorConfigHandler/no_generator_class.yml
  254. +2 0  test/unit/config/fixtures/sfGeneratorConfigHandler/no_generator_section.yml
  255. +7 0 test/unit/config/fixtures/sfGeneratorConfigHandler/root_edit_section.yml
  256. +7 0 test/unit/config/fixtures/sfGeneratorConfigHandler/root_fields_section.yml
  257. +7 0 test/unit/config/fixtures/sfGeneratorConfigHandler/root_list_section.yml
  258. +3 0  test/unit/config/fixtures/sfSimpleYamlConfigHandler/config.yml
  259. +3 0  test/unit/config/fixtures/sfSimpleYamlConfigHandler/config_bis.yml
  260. +54 0 test/unit/config/sfConfigHandlerTest.php
  261. +53 0 test/unit/config/sfConfigTest.php
  262. +33 0 test/unit/config/sfDefineEnvironmentConfigHandlerTest.php
  263. +100 0 test/unit/config/sfFilterConfigHandlerTest.php
  264. +96 0 test/unit/config/sfGeneratorConfigHandlerTest.php
  265. +76 0 test/unit/config/sfPluginConfigurationTest.php
  266. +72 0 test/unit/config/sfProjectConfigurationTest.php
  267. +33 0 test/unit/config/sfSimpleYamlConfigHandlerTest.php
  268. +351 0 test/unit/config/sfViewConfigHandlerTest.php
  269. +85 0 test/unit/config/sfYamlConfigHandlerTest.php
  270. +28 0 test/unit/controller/sfControllerTest.php
  271. +214 0 test/unit/controller/sfWebControllerTest.php
  272. +30 0 test/unit/database/sfDatabaseTest.php
  273. +19 0 test/unit/debug/sfDebugTest.php
  274. +31 0 test/unit/debug/sfTimerTest.php
  275. +58 0 test/unit/debug/sfWebDebugTest.php
  276. +91 0 test/unit/escaper/sfOutputEscaperArrayDecoratorTest.php
  277. +98 0 test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php
  278. +92 0 test/unit/escaper/sfOutputEscaperSafeTest.php
  279. +158 0 test/unit/escaper/sfOutputEscaperTest.php
  280. +44 0 test/unit/exception/sfExceptionsTest.php
  281. +52 0 test/unit/filter/sfFilterTest.php
  282. +85 0 test/unit/form/addon/sfFormSymfonyTest.php
  283. +105 0 test/unit/form/sfFormFieldSchemaTest.php
  284. +233 0 test/unit/form/sfFormFieldTest.php
  285. +981 0 test/unit/form/sfFormTest.php
  286. +25 0 test/unit/generator/sfGeneratorTest.php
  287. +36 0 test/unit/generator/sfModelGeneratorConfigurationFieldTest.php
  288. +280 0 test/unit/helper/AssetHelperTest.php
  289. +108 0 test/unit/helper/DateHelperTest.php
  290. +44 0 test/unit/helper/EscapingHelperTest.php
  291. +44 0 test/unit/helper/JavascriptBaseHelperTest.php
  292. +37 0 test/unit/helper/NumberHelperTest.php
  293. +64 0 test/unit/helper/PartialHelperTest.php
  294. +65 0 test/unit/helper/TagHelperTest.php
  295. +45 0 test/unit/helper/TestObject.php
  296. +138 0 test/unit/helper/TextHelperTest.php
  297. +149 0 test/unit/helper/UrlHelperTest.php
  298. 0  test/unit/helper/fixtures/tiny_mce.js
  299. +112 0 test/unit/i18n/dataTest.php
  300. +56 0 test/unit/i18n/extract/sfI18nExtractTest.php
  301. +83 0 test/unit/i18n/extract/sfI18nPhpExtractorTest.php
  302. +63 0 test/unit/i18n/extract/sfI18nYamlGeneratorExtractorTest.php
  303. +44 0 test/unit/i18n/extract/sfI18nYamlValidateExtractorTest.php
  304. +23 0 test/unit/i18n/fixtures/messages.fr.xml
  305. +15 0 test/unit/i18n/fixtures/messages.fr_BE.xml
  306. +11 0 test/unit/i18n/fixtures/messages_bis.fr.xml
  307. +163 0 test/unit/i18n/sfChoiceFormatTest.php
  308. +281 0 test/unit/i18n/sfCultureInfoTest.php
  309. +133 0 test/unit/i18n/sfI18NTest.php
  310. +35 0 test/unit/i18n/sfMessageSourceTest.php
  311. +82 0 test/unit/i18n/sfMessageSource_AggregateTest.php
  312. +52 0 test/unit/i18n/sfMessageSource_FileTest.php
  313. +99 0 test/unit/i18n/sfMessageSource_SQLiteTest.php
  314. +74 0 test/unit/i18n/sfMessageSource_XLIFFTest.php
  315. +135 0 test/unit/i18n/sfNumberFormatInfoTest.php
  316. +57 0 test/unit/log/sfAggregateLoggerTest.php
  317. +20 0 test/unit/log/sfConsoleLoggerTest.php
  318. +89 0 test/unit/log/sfFileLoggerTest.php
  319. +105 0 test/unit/log/sfLoggerTest.php
  320. +43 0 test/unit/log/sfLoggerWrapperTest.php
  321. +22 0 test/unit/log/sfStreamLoggerTest.php
  322. +34 0 test/unit/log/sfVarLoggerTest.php
  323. +25 0 test/unit/log/sfWebDebugLoggerTest.php
  324. +19 0 test/unit/mailer/fixtures/TestMailMessage.class.php
  325. +60 0 test/unit/mailer/fixtures/TestMailerTransport.class.php
Sorry, we could not display the entire diff because too many files (484) changed.
10 CHANGELOG
... ... @@ -1,6 +1,16 @@
1 1 CHANGELOG
2 2 =========
3 3
  4 +12/13/12: Version 1.4.16
  5 +------------------------
  6 +
  7 + * [33251] fixed sfChoiceFormat when a string to translate contains a valid range (closes #9973)
  8 + * [33250] fixed saving i18n fields in subforms (closes #7626, patch from yoshy71)
  9 + * [33249] fixed last modified date calculation in sfMessageSource_Aggregate (closes #9981, patch from jamiel)
  10 + * [33226] fixed merging problem for the routing configuration (closes #8348)
  11 + * [33214] fixed ob_start() behavior on CLI (closes #9970)
  12 + * [33208] fixed ob_start usage (to avoid warning in PHP 5.4, closes #9970)
  13 +
4 14 10/27/11: Version 1.4.15
5 15 ------------------------
6 16
2  lib/autoload/sfCoreAutoload.class.php
@@ -11,7 +11,7 @@
11 11 /**
12 12 * The current symfony version.
13 13 */
14   -define('SYMFONY_VERSION', '1.4.15');
  14 +define('SYMFONY_VERSION', '1.4.16');
15 15
16 16 /**
17 17 * sfCoreAutoload class.
6 lib/config/sfApplicationConfiguration.class.php
@@ -14,7 +14,7 @@
14 14 * @package symfony
15 15 * @subpackage config
16 16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17   - * @version SVN: $Id: sfApplicationConfiguration.class.php 29526 2010-05-19 13:06:40Z fabien $
  17 + * @version SVN: $Id: sfApplicationConfiguration.class.php 33214 2011-11-19 13:47:24Z fabien $
18 18 */
19 19 abstract class sfApplicationConfiguration extends ProjectConfiguration
20 20 {
@@ -150,9 +150,9 @@ public function initConfiguration()
150 150 $this->initializePlugins();
151 151
152 152 // compress output
153   - if (!self::$coreLoaded)
  153 + if (!self::$coreLoaded && sfConfig::get('sf_compressed'))
154 154 {
155   - ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : '');
  155 + ob_start('ob_gzhandler');
156 156 }
157 157
158 158 self::$coreLoaded = true;
4 lib/config/sfFactoryConfigHandler.class.php
@@ -17,7 +17,7 @@
17 17 * @subpackage config
18 18 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
19 19 * @author Sean Kerr <sean@code-box.org>
20   - * @version SVN: $Id: sfFactoryConfigHandler.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
  20 + * @version SVN: $Id: sfFactoryConfigHandler.class.php 33226 2011-11-23 17:29:18Z fabien $
21 21 */
22 22 class sfFactoryConfigHandler extends sfYamlConfigHandler
23 23 {
@@ -163,7 +163,7 @@ public function execute($configFiles)
163 163
164 164 $instances[] = sprintf(" \$class = sfConfig::get('sf_factory_routing', '%s');\n".
165 165 " %s\n".
166   - "\$this->factories['routing'] = new \$class(\$this->dispatcher, \$cache, array_merge(array('auto_shutdown' => false, 'context' => \$this->factories['request']->getRequestContext()), sfConfig::get('sf_factory_routing_parameters', %s)));\n".
  166 + "\$this->factories['routing'] = new \$class(\$this->dispatcher, \$cache, sfToolkit::arrayDeepMerge(array('auto_shutdown' => false, 'context' => \$this->factories['request']->getRequestContext()), sfConfig::get('sf_factory_routing_parameters', %s)));\n".
167 167 "if (\$parameters = \$this->factories['routing']->parse(\$this->factories['request']->getPathInfo()))\n".
168 168 "{\n".
169 169 " \$this->factories['request']->addRequestParameters(\$parameters);\n".
6 lib/exception/sfException.class.php
@@ -18,7 +18,7 @@
18 18 * @subpackage exception
19 19 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
20 20 * @author Sean Kerr <sean@code-box.org>
21   - * @version SVN: $Id: sfException.class.php 32641 2011-06-11 13:39:35Z fabien $
  21 + * @version SVN: $Id: sfException.class.php 33214 2011-11-19 13:47:24Z fabien $
22 22 */
23 23 class sfException extends Exception
24 24 {
@@ -100,7 +100,9 @@ public function printStackTrace()
100 100 }
101 101 }
102 102
103   - ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : '');
  103 + if (sfConfig::get('sf_compressed')) {
  104 + ob_start('ob_gzhandler');
  105 + }
104 106
105 107 header('HTTP/1.0 500 Internal Server Error');
106 108 }
4 lib/form/addon/sfFormObject.class.php
@@ -14,7 +14,7 @@
14 14 * @package symfony
15 15 * @subpackage form
16 16 * @author Kris Wallsmith <kris.wallsmith@symfony-project.com>
17   - * @version SVN: $Id: sfFormObject.class.php 22917 2009-10-10 13:44:53Z Kris.Wallsmith $
  17 + * @version SVN: $Id: sfFormObject.class.php 33250 2011-12-12 16:02:15Z fabien $
18 18 */
19 19 abstract class sfFormObject extends BaseForm
20 20 {
@@ -241,8 +241,8 @@ public function saveEmbeddedForms($con = null, $forms = null)
241 241 {
242 242 if ($form instanceof sfFormObject)
243 243 {
244   - $form->saveEmbeddedForms($con);
245 244 $form->getObject()->save($con);
  245 + $form->saveEmbeddedForms($con);
246 246 }
247 247 else
248 248 {
4 lib/i18n/sfChoiceFormat.class.php
@@ -13,7 +13,7 @@
13 13 * {@link http://prado.sourceforge.net/}
14 14 *
15 15 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
16   - * @version $Id: sfChoiceFormat.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
  16 + * @version $Id: sfChoiceFormat.class.php 33251 2011-12-12 16:30:59Z fabien $
17 17 * @package symfony
18 18 * @subpackage i18n
19 19 */
@@ -65,7 +65,7 @@ class sfChoiceFormat
65 65 /**
66 66 * The pattern to parse the formatting string.
67 67 */
68   - protected $parse = '/\s*\|?([\(\[\{]([-Inf\d:\s]+,?[\+Inf\d\s:\?\-=!><%\|&\(\)]*)+[\)\]\}])\s*/';
  68 + protected $parse = '/(?:^\s*|\s*\|)([\(\[\{]([-Inf\d:\s]+,?[\+Inf\d\s:\?\-=!><%\|&\(\)]*)+[\)\]\}])\s*/';
69 69
70 70 /**
71 71 * The value for positive infinity.
7 lib/i18n/sfMessageSource_Aggregate.class.php
@@ -14,7 +14,7 @@
14 14 * @package symfony
15 15 * @subpackage i18n
16 16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17   - * @version SVN: $Id: sfMessageSource_Aggregate.class.php 13401 2008-11-27 11:18:39Z fabien $
  17 + * @version SVN: $Id: sfMessageSource_Aggregate.class.php 33249 2011-12-12 15:50:45Z fabien $
18 18 */
19 19 class sfMessageSource_Aggregate extends sfMessageSource
20 20 {
@@ -51,7 +51,10 @@ protected function getLastModified($sources)
51 51 $lastModified = time();
52 52 foreach ($sources as $source)
53 53 {
54   - $lastModified = min($lastModified, $source[0]->getLastModified($source[1]));
  54 + if (0 !== $sourceLastModified = $source[0]->getLastModified($source[1]))
  55 + {
  56 + $lastModified = min($lastModified, $sourceLastModified);
  57 + }
55 58 }
56 59
57 60 return $lastModified;
1  lib/plugins/sfDoctrinePlugin/test/functional/fixtures/config/doctrine/linked_schema.yml
102 package.xml.tmpl
... ... @@ -0,0 +1,102 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<package packagerversion="1.4.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
  3 + <name>symfony</name>
  4 + <channel>pear.symfony-project.com</channel>
  5 + <summary>Symfony is a complete framework designed to optimize the development of web applications.</summary>
  6 + <description>
  7 + Symfony is a complete framework designed to optimize the development of web applications by way of several key features.
  8 + For starters, it separates a web application's business rules, server logic, and presentation views.
  9 + It contains numerous tools and classes aimed at shortening the development time of a complex web application.
  10 + Additionally, it automates common tasks so that the developer can focus entirely on the specifics of an application.
  11 + The end result of these advantages means there is no need to reinvent the wheel every time a new web application is built!
  12 + </description>
  13 + <lead>
  14 + <name>Fabien POTENCIER</name>
  15 + <user>fabpot</user>
  16 + <email>fabien.potencier@symfony-project.com</email>
  17 + <active>yes</active>
  18 + </lead>
  19 + <date>##CURRENT_DATE##</date>
  20 + <version>
  21 + <release>##SYMFONY_VERSION##</release>
  22 + <api>1.4.0</api>
  23 + </version>
  24 + <stability>
  25 + <release>##STABILITY##</release>
  26 + <api>##STABILITY##</api>
  27 + </stability>
  28 + <license uri="http://www.symfony-project.org/license">MIT license</license>
  29 + <notes>-</notes>
  30 +
  31 + <contents>
  32 + <dir name="/">
  33 +
  34 + ##CLASS_FILES##
  35 +
  36 + <file role="script" baseinstalldir="/" install-as="symfony" name="data/bin/symfony">
  37 + <tasks:replace type="pear-config" from="@DATA-DIR@" to="data_dir" />
  38 + <tasks:replace type="pear-config" from="@PEAR-DIR@" to="php_dir" />
  39 + </file>
  40 +
  41 + <file role="script" baseinstalldir="/" name="data/bin/symfony.bat" />
  42 +
  43 + <file role="doc" baseinstalldir="symfony" name="CHANGELOG" />
  44 + <file role="doc" baseinstalldir="symfony" name="COPYRIGHT" />
  45 + <file role="doc" baseinstalldir="symfony" name="LICENSE" />
  46 + <file role="doc" baseinstalldir="symfony" name="README" />
  47 + <file role="doc" baseinstalldir="symfony" name="licenses/LICENSE.ICU" />
  48 + <file role="doc" baseinstalldir="symfony" name="licenses/LICENSE.lime" />
  49 + <file role="doc" baseinstalldir="symfony" name="licenses/LICENSE.prado" />
  50 + <file role="doc" baseinstalldir="symfony" name="licenses/LICENSE.swiftmailer" />
  51 + </dir>
  52 + </contents>
  53 +
  54 + <dependencies>
  55 + <required>
  56 + <php>
  57 + <min>5.2.4</min>
  58 + </php>
  59 + <pearinstaller>
  60 + <min>1.4.1</min>
  61 + </pearinstaller>
  62 + <extension>
  63 + <name>reflection</name>
  64 + </extension>
  65 + <extension>
  66 + <name>ctype</name>
  67 + </extension>
  68 + <extension>
  69 + <name>pcre</name>
  70 + </extension>
  71 + <extension>
  72 + <name>simplexml</name>
  73 + </extension>
  74 + <extension>
  75 + <name>xml</name>
  76 + </extension>
  77 + <extension>
  78 + <name>dom</name>
  79 + </extension>
  80 + </required>
  81 + </dependencies>
  82 +
  83 + <phprelease>
  84 + <installconditions>
  85 + <os>
  86 + <name>windows</name>
  87 + </os>
  88 + </installconditions>
  89 + <filelist>
  90 + <install as="symfony.bat" name="data/bin/symfony.bat" />
  91 + </filelist>
  92 + </phprelease>
  93 +
  94 + <phprelease>
  95 + <filelist>
  96 + <ignore name="data/bin/symfony.bat" />
  97 + </filelist>
  98 + </phprelease>
  99 +
  100 + <changelog>
  101 + </changelog>
  102 +</package>
35 test/bin/coverage.php
... ... @@ -0,0 +1,35 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the symfony package.
  5 + * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  6 + *
  7 + * For the full copyright and license information, please view the LICENSE
  8 + * file that was distributed with this source code.
  9 + */
  10 +
  11 +require_once(dirname(__FILE__).'/../../lib/vendor/lime/lime.php');
  12 +require_once(dirname(__FILE__).'/../../lib/util/sfFinder.class.php');
  13 +
  14 +$h = new lime_harness();
  15 +$h->base_dir = realpath(dirname(__FILE__).'/..');
  16 +
  17 +// unit tests
  18 +$h->register_glob($h->base_dir.'/unit/*/*Test.php');
  19 +$h->register_glob($h->base_dir.'/unit/*/*/*Test.php');
  20 +$h->register_glob($h->base_dir.'/../lib/plugins/*/unit/*Test.php');
  21 +$h->register_glob($h->base_dir.'/../lib/plugins/*/unit/*/*Test.php');
  22 +
  23 +// functional tests
  24 +$h->register_glob($h->base_dir.'/functional/*Test.php');
  25 +$h->register_glob($h->base_dir.'/functional/*/*Test.php');
  26 +$h->register_glob($h->base_dir.'/../lib/plugins/*/functional/*Test.php');
  27 +
  28 +$c = new lime_coverage($h);
  29 +$c->extension = '.class.php';
  30 +$c->verbose = false;
  31 +$c->base_dir = realpath(dirname(__FILE__).'/../../lib');
  32 +
  33 +$finder = sfFinder::type('file')->name('*.php')->prune('vendor')->prune('test')->prune('data');
  34 +$c->register($finder->in($c->base_dir));
  35 +$c->run();
45 test/bin/loc.php
... ... @@ -0,0 +1,45 @@
  1 +<?php
  2 +
  3 +$root_dir = realpath(dirname(__FILE__).'/../..');
  4 +require_once($root_dir.'/lib/vendor/lime/lime.php');
  5 +require_once($root_dir.'/lib/util/sfFinder.class.php');
  6 +
  7 +require_once($root_dir.'/lib/autoload/sfCoreAutoload.class.php');
  8 +$version = SYMFONY_VERSION;
  9 +
  10 +printf("symfony LOC (%s)\n", $version);
  11 +printf("==============%s\n\n", str_repeat('=', strlen($version)));
  12 +
  13 +// symfony core LOC
  14 +$total_loc = 0;
  15 +$files = sfFinder::type('file')->name('*.php')->prune('vendor', 'plugins')->in($root_dir.'/lib');
  16 +foreach ($files as $file)
  17 +{
  18 + $total_loc += count(lime_coverage::get_php_lines($file));
  19 +}
  20 +$files = sfFinder::type('file')->name('*.php')->prune('vendor')->in($root_dir.'/lib/plugins/*/lib');
  21 +foreach ($files as $file)
  22 +{
  23 + $total_loc += count(lime_coverage::get_php_lines($file));
  24 +}
  25 +
  26 +// symfony tests LOC
  27 +$total_tests_loc = 0;
  28 +$files = sfFinder::type('file')->name('*Test.php')->in(array(
  29 + $root_dir.'/lib/plugins/sfPropelPlugin/test/unit',
  30 + $root_dir.'/lib/plugins/sfPropelPlugin/test/functional',
  31 + $root_dir.'/lib/plugins/sfDoctrinePlugin/test/unit',
  32 + $root_dir.'/lib/plugins/sfDoctrinePlugin/test/functional',
  33 + $root_dir.'/test/unit',
  34 + $root_dir.'/test/functional',
  35 + $root_dir.'/test/other',
  36 +));
  37 +foreach ($files as $file)
  38 +{
  39 + $total_tests_loc += count(lime_coverage::get_php_lines($file));
  40 +}
  41 +
  42 +printf("core librairies: %6d\n", $total_loc);
  43 +printf("unit and functional tests: %6d\n", $total_tests_loc);
  44 +echo "---------------------------------\n";
  45 +printf("ratio tests/librairies: %5d%%\n", $total_tests_loc / $total_loc * 100);
73 test/bootstrap/functional.php
... ... @@ -0,0 +1,73 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the symfony package.
  5 + * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  6 + *
  7 + * For the full copyright and license information, please view the LICENSE
  8 + * file that was distributed with this source code.
  9 + */
  10 +
  11 +// setup expected test environment (per check_configuration.php)
  12 +ini_set('magic_quotes_runtime', 'off');
  13 +ini_set('session.auto_start', 'off');
  14 +ini_set('arg_separator.output', '&amp;');
  15 +ini_set('allow_url_fopen', 'on');
  16 +
  17 +if (!isset($root_dir))
  18 +{
  19 + $root_dir = realpath(dirname(__FILE__).sprintf('/../%s/fixtures', isset($type) ? $type : 'functional'));
  20 +}
  21 +
  22 +require_once $root_dir.'/config/ProjectConfiguration.class.php';
  23 +$configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true);
  24 +
  25 +// remove all cache
  26 +sf_functional_test_shutdown();
  27 +register_shutdown_function('sf_functional_test_shutdown');
  28 +
  29 +sfContext::createInstance($configuration);
  30 +
  31 +function sf_functional_test_shutdown_cleanup()
  32 +{
  33 + sfToolkit::clearDirectory(sfConfig::get('sf_cache_dir'));
  34 + sfToolkit::clearDirectory(sfConfig::get('sf_log_dir'));
  35 +
  36 + $sf_root_dir = sys_get_temp_dir().'/sf_test_project';
  37 + if (is_dir($sf_root_dir))
  38 + {
  39 + sfToolkit::clearDirectory($sf_root_dir);
  40 + @rmdir($sf_root_dir);
  41 + }
  42 +
  43 + $sessions = glob(sys_get_temp_dir().'/sessions*');
  44 + $tmp_files = glob(sys_get_temp_dir().'/sf*');
  45 + $files = array_merge(empty($sessions) ? array() : $sessions, empty($tmp_files) ? array() : $tmp_files);
  46 + foreach ($files as $file)
  47 + {
  48 + if (is_dir($file))
  49 + {
  50 + sfToolkit::clearDirectory($file);
  51 + @rmdir($file);
  52 + }
  53 + else
  54 + {
  55 + @unlink($file);
  56 + }
  57 + }
  58 +}
  59 +
  60 +function sf_functional_test_shutdown()
  61 +{
  62 + // try/catch needed due to http://bugs.php.net/bug.php?id=33598
  63 + try
  64 + {
  65 + sf_functional_test_shutdown_cleanup();
  66 + }
  67 + catch (Exception $e)
  68 + {
  69 + echo $e.PHP_EOL;
  70 + }
  71 +}
  72 +
  73 +return true;
22 test/bootstrap/task.php
... ... @@ -0,0 +1,22 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the symfony package.
  5 + * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  6 + *
  7 + * For the full copyright and license information, please view the LICENSE
  8 + * file that was distributed with this source code.
  9 + */
  10 +
  11 +require_once(dirname(__FILE__).'/unit.php');
  12 +
  13 +require_once(sfConfig::get('sf_symfony_lib_dir').'/command/sfCommandApplication.class.php');
  14 +require_once(sfConfig::get('sf_symfony_lib_dir').'/command/sfSymfonyCommandApplication.class.php');
  15 +
  16 +$tmpDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.'sf_'.rand(11111, 99999);
  17 +mkdir($tmpDir, 0777, true);
  18 +chdir($tmpDir);
  19 +
  20 +$application = new sfSymfonyCommandApplication(new sfEventDispatcher(), new sfFormatter(), array(
  21 + 'symfony_lib_dir' => sfConfig::get('sf_symfony_lib_dir'),
  22 +));
68 test/bootstrap/unit.php
... ... @@ -0,0 +1,68 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the symfony package.
  5 + * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  6 + *
  7 + * For the full copyright and license information, please view the LICENSE
  8 + * file that was distributed with this source code.
  9 + */
  10 +
  11 +// setup expected test environment (per check_configuration.php)
  12 +ini_set('magic_quotes_runtime', 'off');
  13 +ini_set('session.auto_start', 'off');
  14 +ini_set('arg_separator.output', '&amp;');
  15 +ini_set('allow_url_fopen', 'on');
  16 +
  17 +$_test_dir = realpath(dirname(__FILE__).'/..');
  18 +require_once($_test_dir.'/../lib/vendor/lime/lime.php');
  19 +require_once($_test_dir.'/../lib/config/sfConfig.class.php');
  20 +sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir.'/../lib'));
  21 +
  22 +require_once(dirname(__FILE__).'/../../lib/autoload/sfCoreAutoload.class.php');
  23 +sfCoreAutoload::register();
  24 +
  25 +require_once(dirname(__FILE__).'/../../lib/util/sfToolkit.class.php');
  26 +sfConfig::set('sf_test_cache_dir', sys_get_temp_dir().'/sf_test_project');
  27 +
  28 +// remove all test cache
  29 +sf_unit_test_shutdown();
  30 +
  31 +// create test cache dir
  32 +$sf_root_dir = sys_get_temp_dir().'/sf_test_project';
  33 +@mkdir($sf_root_dir, 0777, true);
  34 +
  35 +register_shutdown_function('sf_unit_test_shutdown');
  36 +
  37 +function sf_unit_test_shutdown()
  38 +{
  39 + $sf_root_dir = sys_get_temp_dir().'/sf_test_project';
  40 + if(is_dir($sf_root_dir))
  41 + {
  42 + sfToolkit::clearDirectory($sf_root_dir);
  43 + @rmdir($sf_root_dir);
  44 + }
  45 +
  46 + $sessions = glob(sys_get_temp_dir().'/sessions*');
  47 + $tmp_files = glob(sys_get_temp_dir().'/sf*');
  48 +
  49 + $files = array_merge((empty($sessions) ? array() : $sessions), (empty($tmp_files) ? array() : $tmp_files));
  50 + foreach ($files as $file)
  51 + {
  52 + if(is_dir($file))
  53 + {
  54 + sfToolkit::clearDirectory($file);
  55 + @rmdir($file);
  56 + }
  57 + else
  58 + {
  59 + @unlink($file);
  60 + }
  61 + }
  62 +}
  63 +
  64 +// Helper for cross platform testcases that validate output
  65 +function fix_linebreaks($content)
  66 +{
  67 + return str_replace(array("\r\n", "\n", "\r"), "\n", $content);
  68 +}
67 test/functional/authTest.php
... ... @@ -0,0 +1,67 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the symfony package.
  5 + * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  6 + *
  7 + * For the full copyright and license information, please view the LICENSE
  8 + * file that was distributed with this source code.
  9 + */
  10 +
  11 +$app = 'frontend';
  12 +if (!include(dirname(__FILE__).'/../bootstrap/functional.php'))
  13 +{
  14 + return;
  15 +}
  16 +
  17 +class sfAuthTestBrowser extends sfTestBrowser
  18 +{
  19 + public function checkNonAuth()
  20 + {
  21 + return $this->
  22 + get('/auth/basic')->
  23 + with('request')->begin()->
  24 + isParameter('module', 'auth')->
  25 + isParameter('action', 'basic')->
  26 + end()->
  27 + with('response')->begin()->
  28 + isStatusCode(401)->
  29 + checkElement('#user', '')->
  30 + checkElement('#password', '')->
  31 + checkElement('#msg', 'KO')->
  32 + end()
  33 + ;
  34 + }
  35 +
  36 + public function checkAuth()
  37 + {
  38 + return $this->
  39 + get('/auth/basic')->
  40 + with('request')->begin()->
  41 + isParameter('module', 'auth')->
  42 + isParameter('action', 'basic')->
  43 + end()->
  44 + with('response')->begin()->
  45 + isStatusCode(200)->
  46 + checkElement('#user', 'foo')->
  47 + checkElement('#password', 'bar')->
  48 + checkElement('#msg', 'OK')->
  49 + end()
  50 + ;
  51 + }
  52 +}
  53 +
  54 +$b = new sfAuthTestBrowser();
  55 +
  56 +// default main page
  57 +$b->
  58 + checkNonAuth()->
  59 +
  60 + setAuth('foo', 'bar')->
  61 +
  62 + checkAuth()->
  63 +
  64 + restart()->
  65 +
  66 + checkNonAuth()
  67 +;
40 test/functional/autoloadTest.php
... ... @@ -0,0 +1,40 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the symfony package.
  5 + * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  6 + *
  7 + * For the full copyright and license information, please view the LICENSE
  8 + * file that was distributed with this source code.
  9 + */
  10 +
  11 +$app = 'frontend';
  12 +if (!include(dirname(__FILE__).'/../bootstrap/functional.php'))
  13 +{
  14 + return;
  15 +}
  16 +
  17 +$b = new sfTestBrowser();
  18 +
  19 +$b->
  20 + get('/autoload/myAutoload')->
  21 + with('request')->begin()->
  22 + isParameter('module', 'autoload')->
  23 + isParameter('action', 'myAutoload')->
  24 + end()->
  25 + with('response')->begin()->
  26 + isStatusCode(200)->
  27 + checkElement('body div', 'foo')->
  28 + end()
  29 +;
  30 +
  31 +$t = $b->test();
  32 +
  33 +$autoload = sfAutoload::getInstance();
  34 +$t->ok(@file_get_contents($autoload->getClassPath('sfpropel'), FILE_USE_INCLUDE_PATH), '"sfAutoload" is case insensitive');
  35 +
  36 +$t->ok(class_exists('BaseExtendMe'), 'plugin lib directory added to autoload');
  37 +$r = new ReflectionClass('ExtendMe');
  38 +$t->like(str_replace(DIRECTORY_SEPARATOR, '/', $r->getFilename()), '~fixtures/lib/ExtendMe~', 'plugin class can be replaced by project');
  39 +$t->ok(class_exists('NotInLib'), 'plugin autoload sets class paths');
  40 +$t->ok(!class_exists('ExcludedFromAutoload'), 'plugin autoload excludes directories');
513 test/functional/cacheTest.php
... ... @@ -0,0 +1,513 @@
  1 +<?php
  2 +
  3 +/*
  4 + * This file is part of the symfony package.
  5 + * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  6 + *
  7 + * For the full copyright and license information, please view the LICENSE
  8 + * file that was distributed with this source code.
  9 + */
  10 +
  11 +$app = 'cache';
  12 +if (!include(dirname(__FILE__).'/../bootstrap/functional.php'))
  13 +{
  14 + return;
  15 +}
  16 +
  17 +class myTestBrowser extends sfTestBrowser
  18 +{
  19 + function checkResponseContent($content, $message)
  20 + {
  21 + $this->test()->ok($this->getResponse()->getContent() == $content, $message);
  22 +
  23 + return $this;
  24 + }
  25 +
  26 + function getMultiAction($parameter = null)
  27 + {
  28 + return $this->
  29 + get('/cache/multi'.(null !== $parameter ? '/param/'.$parameter : ''))->
  30 + with('request')->begin()->
  31 + isParameter('module', 'cache')->
  32 + isParameter('action', 'multi')->
  33 + end()->
  34 +
  35 + with('response')->begin()->
  36 + isStatusCode(200)->
  37 +
  38 + // partials
  39 + checkElement('#partial .partial')->
  40 +
  41 + // contextual partials
  42 + checkElement('#contextualPartial .contextualPartial')->
  43 + checkElement('#contextualCacheablePartial .contextualCacheablePartial__'.$parameter, 'Param: '.$parameter)->
  44 + checkElement('#contextualCacheablePartialVarParam .contextualCacheablePartial_varParam_'.$parameter, 'Param: '.$parameter)->
  45 +
  46 + // components
  47 + checkElement('#component .component__componentParam_'.$parameter)->
  48 + checkElement('#componentVarParam .component_varParam_componentParam_'.$parameter)->
  49 +
  50 + // contextual components
  51 + checkElement('#contextualComponent .contextualComponent__componentParam_'.$parameter)->
  52 + checkElement('#contextualComponentVarParam .contextualComponent_varParam_componentParam_'.$parameter)->
  53 + checkElement('#contextualCacheableComponent .contextualCacheableComponent__componentParam_'.$parameter, 'Param: '.$parameter)->
  54 + checkElement('#contextualCacheableComponentVarParam .contextualCacheableComponent_varParam_componentParam_'.$parameter, 'Param: '.$parameter)->
  55 + end()->
  56 +
  57 + with('view_cache')->begin()->
  58 + isCached(false)->
  59 +
  60 + // partial cache
  61 + isUriCached('@sf_cache_partial?module=cache&action=_partial&sf_cache_key='.md5(serialize(array())), false)->
  62 + isUriCached('@sf_cache_partial?module=cache&action=_partial&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), false)->
  63 +
  64 + isUriCached('@sf_cache_partial?module=cache&action=_cacheablePartial&sf_cache_key='.md5(serialize(array())), true)->
  65 + isUriCached('@sf_cache_partial?module=cache&action=_cacheablePartial&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), true)->
  66 +
  67 + isUriCached('@sf_cache_partial?module=cache&action=_cacheablePartial&sf_cache_key='.md5(serialize(array('varParam' => 'another'))), false)->
  68 +
  69 + // contextual partial cache
  70 + isUriCached('@sf_cache_partial?module=cache&action=_contextualPartial&sf_cache_key='.md5(serialize(array())), false)->
  71 + isUriCached('@sf_cache_partial?module=cache&action=_contextualPartial&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), false)->
  72 +
  73 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheablePartial&sf_cache_key='.md5(serialize(array())), true)->
  74 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheablePartial&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), true)->
  75 +
  76 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheablePartial&sf_cache_key='.md5(serialize(array('varParam' => 'another'))), false)->
  77 +
  78 + // component cache
  79 + isUriCached('@sf_cache_partial?module=cache&action=_component&sf_cache_key='.md5(serialize(array())), false)->
  80 + isUriCached('@sf_cache_partial?module=cache&action=_component&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), false)->
  81 +
  82 + isUriCached('@sf_cache_partial?module=cache&action=_cacheableComponent&sf_cache_key='.md5(serialize(array())), true)->
  83 + isUriCached('@sf_cache_partial?module=cache&action=_cacheableComponent&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), true)->
  84 +
  85 + isUriCached('@sf_cache_partial?module=cache&action=_cacheableComponent&sf_cache_key='.md5(serialize(array('varParam' => 'another'))), false)->
  86 +
  87 + // contextual component cache
  88 + isUriCached('@sf_cache_partial?module=cache&action=_contextualComponent&sf_cache_key='.md5(serialize(array())), false)->
  89 + isUriCached('@sf_cache_partial?module=cache&action=_contextualComponent&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), false)->
  90 +
  91 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheableComponent&sf_cache_key='.md5(serialize(array())), true)->
  92 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheableComponent&sf_cache_key='.md5(serialize(array('varParam' => 'varParam'))), true)->
  93 +
  94 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheableComponent&sf_cache_key='.md5(serialize(array('varParam' => 'another'))), false)->
  95 + end()
  96 + ;
  97 + }
  98 +
  99 + public function launch()
  100 + {
  101 + $b = $this;
  102 +
  103 + // default page is in cache (without layout)
  104 + $b->
  105 + get('/')->
  106 + with('request')->begin()->
  107 + isParameter('module', 'default')->
  108 + isParameter('action', 'index')->
  109 + end()->
  110 +
  111 + with('response')->begin()->
  112 + isStatusCode(200)->
  113 + checkElement('body', '/congratulations/i')->
  114 + end()->
  115 +
  116 + with('view_cache')->isCached(true)
  117 + ;
  118 +
  119 + $b->
  120 + get('/nocache')->
  121 + with('request')->begin()->
  122 + isParameter('module', 'nocache')->
  123 + isParameter('action', 'index')->
  124 + end()->
  125 + with('response')->begin()->
  126 + isStatusCode(200)->
  127 + checkElement('body', '/nocache/i')->
  128 + end()->
  129 + with('view_cache')->isCached(false)
  130 + ;
  131 +
  132 + $b->
  133 + get('/cache/page')->
  134 + with('request')->begin()->
  135 + isParameter('module', 'cache')->
  136 + isParameter('action', 'page')->
  137 + end()->
  138 + with('response')->begin()->
  139 + isStatusCode(200)->
  140 + checkElement('body', '/page in cache/')->
  141 + end()->
  142 + with('view_cache')->isCached(true, true)
  143 + ;
  144 +
  145 + $b->
  146 + get('/cache/forward')->
  147 + with('request')->begin()->
  148 + isParameter('module', 'cache')->
  149 + isParameter('action', 'forward')->
  150 + end()->
  151 + with('response')->begin()->
  152 + isStatusCode(200)->
  153 + checkElement('body', '/page in cache/')->
  154 + end()->
  155 + with('view_cache')->isCached(true)
  156 + ;
  157 +
  158 + // remove all cache
  159 + sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));
  160 +
  161 + $b->
  162 + getMultiAction()->
  163 +
  164 + getMultiAction('requestParam')->
  165 +
  166 + // component already in cache and not contextual, so request parameter is not there
  167 + with('response')->begin()->
  168 + checkElement('#cacheableComponent .cacheableComponent__componentParam_')->
  169 + checkElement('#cacheableComponentVarParam .cacheableComponent_varParam_componentParam_')->
  170 + checkElement('#cacheablePartial .cacheablePartial__')->
  171 + checkElement('#cacheablePartialVarParam .cacheablePartial_varParam_')->
  172 + end()
  173 + ;
  174 +
  175 + // remove all cache
  176 + sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));
  177 +
  178 + $b->
  179 + getMultiAction('requestParam')->
  180 +
  181 + with('response')->begin()->
  182 + checkElement('#cacheableComponent .cacheableComponent__componentParam_requestParam')->
  183 + checkElement('#cacheableComponentVarParam .cacheableComponent_varParam_componentParam_requestParam')->
  184 + checkElement('#cacheablePartial .cacheablePartial__requestParam')->
  185 + checkElement('#cacheablePartialVarParam .cacheablePartial_varParam_requestParam')->
  186 + end()->
  187 +
  188 + getMultiAction()->
  189 +
  190 + with('response')->begin()->
  191 + checkElement('#cacheableComponent .cacheableComponent__componentParam_requestParam')->
  192 + checkElement('#cacheableComponentVarParam .cacheableComponent_varParam_componentParam_requestParam')->
  193 + checkElement('#cacheablePartial .cacheablePartial__requestParam')->
  194 + checkElement('#cacheablePartialVarParam .cacheablePartial_varParam_requestParam')->
  195 + end()->
  196 +
  197 + getMultiAction('anotherRequestParam')->
  198 +
  199 + with('response')->begin()->
  200 + checkElement('#cacheableComponent .cacheableComponent__componentParam_requestParam')->
  201 + checkElement('#cacheableComponentVarParam .cacheableComponent_varParam_componentParam_requestParam')->
  202 + checkElement('#cacheablePartial .cacheablePartial__requestParam')->
  203 + checkElement('#cacheablePartialVarParam .cacheablePartial_varParam_requestParam')->
  204 + end()
  205 + ;
  206 +
  207 + // check contextual cache with another action
  208 + $b->
  209 + get('/cache/multiBis')->
  210 + with('request')->begin()->
  211 + isParameter('module', 'cache')->
  212 + isParameter('action', 'multiBis')->
  213 + end()->
  214 +
  215 + with('response')->begin()->
  216 + isStatusCode(200)->
  217 +
  218 + // partials
  219 + checkElement('#cacheablePartial .cacheablePartial__requestParam')->
  220 +
  221 + // contextual partials
  222 + checkElement('#contextualCacheablePartial .contextualCacheablePartial__')->
  223 +
  224 + // components
  225 + checkElement('#cacheableComponent .cacheableComponent__componentParam_requestParam')->
  226 +
  227 + // contextual components
  228 + checkElement('#contextualCacheableComponent .contextualCacheableComponent__componentParam_')->
  229 + end()->
  230 +
  231 + with('view_cache')->begin()->
  232 + isCached(false)->
  233 + // partial cache
  234 + isUriCached('@sf_cache_partial?module=cache&action=_cacheablePartial&sf_cache_key='.md5(serialize(array())), true)->
  235 +
  236 + // contextual partial cache
  237 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheableComponent&sf_cache_key='.md5(serialize(array())), true)->
  238 +
  239 + // component cache
  240 + isUriCached('@sf_cache_partial?module=cache&action=_cacheableComponent&sf_cache_key='.md5(serialize(array())), true)->
  241 +
  242 + // contextual component cache
  243 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheableComponent&sf_cache_key='.md5(serialize(array())), true)->
  244 + end()
  245 + ;
  246 +
  247 + // remove all cache
  248 + sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));
  249 +
  250 + // check user supplied cache key for partials and components
  251 + $b->
  252 + get('/cache/specificCacheKey')->
  253 + with('request')->begin()->
  254 + isParameter('module', 'cache')->
  255 + isParameter('action', 'specificCacheKey')->
  256 + end()->
  257 +
  258 + with('response')->isStatusCode(200)->
  259 + with('view_cache')->begin(200)->
  260 + isCached(false)->
  261 +
  262 + // partial cache
  263 + isUriCached('@sf_cache_partial?module=cache&action=_cacheablePartial&sf_cache_key=cacheablePartial', true)->
  264 +
  265 + // contextual partial cache
  266 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheableComponent&sf_cache_key=contextualCacheableComponent', true)->
  267 +
  268 + // component cache
  269 + isUriCached('@sf_cache_partial?module=cache&action=_cacheableComponent&sf_cache_key=cacheableComponent', true)->
  270 +
  271 + // contextual component cache
  272 + isUriCached('@sf_cache_partial?module=cache&action=_contextualCacheableComponent&sf_cache_key=contextualCacheableComponent', true)->
  273 + end()
  274 + ;
  275 +
  276 + // check cache content for actions
  277 +
  278 + // remove all cache
  279 + sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));
  280 +
  281 + $b->
  282 + get('/cache/action')->
  283 + with('request')->begin()->
  284 + isParameter('module', 'cache')->
  285 + isParameter('action', 'action')->
  286 + end()->
  287 + with('response')->isStatusCode(200)->
  288 + with('view_cache')->isCached(true)
  289 + ;
  290 +
  291 + $b->test()->is(sfConfig::get('ACTION_EXECUTED', false), true, 'action is executed when not in cache');
  292 + sfConfig::set('ACTION_EXECUTED', false);