Commit Graph

3336 Commits

Author SHA1 Message Date
Damian Mooyman
7a8dfd2785 Add lint-clean and cleanup code linting 2017-05-16 05:01:51 +12:00
Daniel Hensby
e741af9127
Merge branch 'pull/6905' 2017-05-12 12:21:02 +01:00
Damian Mooyman
0b70b008b3 API Implement InheritedPermission calculator (#6877)
* API Implement InheritedPermission calculator

* API Rename RootPermissions to DefaultPermissionChecker
API Refactor inherited permission fields into InheritedPermissionExtension
API Introduce PermissionChecker interface
2017-05-11 21:07:27 +12:00
Ingo Schommer
36214343f0 Merge pull request #6902 from open-sausages/pulls/4/remove-jsmin
Pulls/4/remove jsmin
2017-05-11 11:54:14 +12:00
Aaron Carlino
5b46461879 Remove JSMinifier implementation 2017-05-11 10:40:00 +12:00
Aaron Carlino
7fa47e234f New API for minified files using injectable service 2017-05-11 10:14:16 +12:00
Christopher Joe
17ddfab877 Fix Test form factories use the new interface 2017-05-11 09:57:55 +12:00
Aaron Carlino
4af71b9ed7 Pulls/4/remove reliance on admin dir (#6876)
* Stop relying on external constants

* Revise getTinyMCEPath method to throw exception when no path can be computed

* Throw exception on no gzip, better admin module check
2017-05-10 13:18:44 +12:00
Saophalkun Ponlu
fd51f35bc2 Update tests 2017-05-09 16:52:32 +12:00
Damian Mooyman
a136b8ad44 Merge pull request #6885 from open-sausages/pulls/4.0/fix-intl-test-consistency
Fix intl ICU inconsistencies
2017-05-09 15:52:22 +12:00
Ingo Schommer
0d9b383631 API Removed legacy form fields (fixes #6099) 2017-05-09 11:16:41 +12:00
Aaron Carlino
afd1575267 ENHANCEMENT GridField passes in context for canCreate 2017-05-09 09:15:09 +12:00
Ingo Schommer
493556e497 More robust datetime ICU tests
Some ICU versions (e.g. on CentOS 7.2 with PHP 5.6)
use lowercase rather than uppercase AM/PM indicators
2017-05-08 21:34:56 +12:00
Ingo Schommer
20c6066391 Remove flakey swedish intl test
The intl extension relies on system ICU libraries.
Which seems to behave differently on CentOS 7.2 with PHP 5.6 (returns as '53.292:18 US$').
See http://stackoverflow.com/questions/3991814/php-pecl-extension-intl-giving-garbled-results-for-swedish-ordinal-numbers/8691743#8691743

It's a redundant test, let's just avoid this noise.
2017-05-08 21:31:14 +12:00
Damian Mooyman
d2c6c539d2 Merge pull request #6872 from sminnee/fixture-by-table
NEW: Allow SapphireTest::objFromFixture() to accept either table or class
2017-05-05 15:14:01 +12:00
Sam Minnee
a05958b3ea FIX: i18n test fixtures stricter for Symfony3 2017-05-05 14:32:07 +12:00
Damian Mooyman
942c0257b7 API Upgrade to behat 3 2017-05-05 14:32:07 +12:00
Sam Minnee
1691e90fbd NEW: Allow SapphireTest::objFromFixture() to accept either table or class
Right now SapphireTest::objFromFixture() requires a class as the first
argument. This is fine when your fixture file uses classes as the keys,
but if populating a fixture via tables, objFromFixture() won’t work.

This patch lets you specify either the table name or the class name as
the key.

The benefit here is that you can build fixtures as raw inserts, which is
substantially quicker, and is likely to be a useful tool in building
more efficient test suites.
2017-05-05 10:53:49 +12:00
Damian Mooyman
1f8de20ce7
Fix FormSchemaTest.php linting issues 2017-05-04 13:56:54 +12:00
Damian Mooyman
8b9f41d4f4 BUG Fix ApcuCache and MemCache namespace 2017-05-04 12:17:33 +12:00
Damian Mooyman
0c52ea067c BUG Fix incorrect text collection of __CLASS__ following an Name::class constant (#6868) 2017-05-04 10:19:05 +12:00
Damian Mooyman
12fc690d80 Merge pull request #6850 from robbieaverill/bugfix/i18n-lang-region-same
FIX IntlLocales::validate when lang and region are the same e.g. de_DE
2017-05-01 08:41:44 +12:00
Robbie Averill
3a372a1f41 FIX IntlLocales::validate when lang and region are the same e.g. de_DE 2017-04-28 17:19:27 +12:00
Damian Mooyman
699d5d6a42 Fix i18nTextCollector handling of special string characters 2017-04-28 14:59:42 +12:00
Damian Mooyman
2ae8fde2d3 Fix tests 2017-04-28 14:59:42 +12:00
Uncle Cheese
d51c4891e2 New namespaced i18n keys 2017-04-28 14:59:42 +12:00
Uncle Cheese
494cbd1875 Ran upgrader for lang files 2017-04-28 14:59:42 +12:00
Ingo Schommer
daed727acc Fixed form schema validation 2017-04-28 08:30:59 +12:00
Ingo Schommer
a2ee6a76a0 Fixed formschematest 2017-04-27 21:44:28 +12:00
Ingo Schommer
60706c8efd Store $value in ISO and server timezone consistently, fix min/max timezone handling 2017-04-27 14:59:11 +12:00
Ingo Schommer
de8abe1167 API rename 2017-04-27 11:53:43 +12:00
Ingo Schommer
9b41350f64 More min/max setter tests 2017-04-27 11:53:34 +12:00
Ingo Schommer
958736502a Removed “T” str_replace, more comments 2017-04-27 10:32:22 +12:00
Ingo Schommer
a73abbfcb8 unit test cleanup 2017-04-27 09:18:38 +12:00
Ingo Schommer
1ec2abe75f Fixed timezone and normalised ISO handling
A few observations:
- ISO says “T” is optional (https://en.wikipedia.org/wiki/ISO_8601#cite_note-21),
- WHATWG says in the HTML5 spec that it’s optional (https://html.spec.whatwg.org/multipage/infrastructure.html#local-dates-and-times)
- W3C says it’s reqiured in 1997 (https://www.w3.org/TR/NOTE-datetime), but then later says it’s optional in its HTML5 spec (https://www.w3.org/TR/html5/infrastructure.html#floating-dates-and-times).
- Chrome doesn’t parse values with whitespace separators (requires "T")
- DataObject DBDatetime values and database columns use whitespace separators (and will have many devs relying on this format)
- MySQL only supports whitespace separators (https://dev.mysql.com/doc/refman/5.7/en/datetime.html)
- SQLite can parse both ways (https://sqlite.org/lang_datefunc.html)

So the goal here is to retain ORM/database compatibility with 3.x (whitespace separator),
while exposing "T" separators to the browser in HTML5 mode.

Regarding timezones, this fixes a regression where setValue() would not actually
apply the timezone (last $value assignment is ineffective now that sub fields are removed).
2017-04-26 22:55:29 +12:00
Ingo Schommer
a279d00e81 Min/max validations 2017-04-26 22:45:12 +12:00
Ingo Schommer
e97783b057 Better second handling 2017-04-26 22:45:08 +12:00
Saophalkun Ponlu
dba1f61f13 Fix tests related to date time 2017-04-26 22:45:07 +12:00
Christopher Joe
1f74221c2d Fix unit tests 2017-04-26 16:03:52 +12:00
Simon Erkelens
ff3ad6eb6b Use Config for authenticator settings 2017-04-22 14:48:56 +12:00
Damian Mooyman
2548bfba1e API Replace SS_HOST with SS_BASE_URL
API Remove Director::$test_servers / $dev_servers
API Remove MODULES_PATH / MODULES_DIR constants
ENHANCEMENT Injector backtick syntax now supports environment variables as well as constants
Fixes #6588
2017-04-20 22:28:57 +12:00
Damian Mooyman
136b67f597
API Major refactor of Hierarchy into MarkedSet 2017-04-13 16:27:13 +12:00
Damian Mooyman
7bc447eea8 Merge pull request #6795 from robbieaverill/bugfix/phpunit-config-bug-with-constants
FIX Ensure that mysite test boostrap configuration is loaded after core and before the database connection
2017-04-12 12:57:22 +12:00
Damian Mooyman
f2768c85b1 API Enable namespaced-localisation keys in templates
BUG Fix whitespaces in SSTemplateParser.peg
2017-04-11 18:07:53 +12:00
Robbie Averill
1ca51eb57a FIX Ensure that mysite test boostrap configuration is loaded after core and before the database connection 2017-04-11 14:32:53 +12:00
Damian Mooyman
e61257c27b API Update embed/embed to 3.0
API Better shortcode generation for embed shortcodes
2017-04-04 10:20:08 +12:00
Damian Mooyman
9be22701fd API exists() no longer true for nullifyIfEmpty if empty string
Optimise DBString::exists() to skip shortcodes
2017-04-04 10:20:08 +12:00
Ingo Schommer
e3fbd1dcac Fixed coding conventions 2017-04-03 20:54:25 +12:00
Ingo Schommer
e9693467bf Fixed tests 2017-04-03 20:04:37 +12:00
Ingo Schommer
a70de91b33 Fix DatetimeFieldTest 2017-04-03 19:35:40 +12:00