Loz Calver
bbb208e1dd
Merge pull request #8499 from sminnee/fix-1489
...
FIX: CheckboxSetField can now save into DBMultiEnum
2018-11-09 10:40:55 +01:00
Robbie Averill
24d6527845
Merge branch '4.3' into 4
2018-11-09 11:39:27 +02:00
Robbie Averill
10f502f0c7
Merge branch '4.2' into 4.3
2018-11-09 11:39:05 +02:00
Robbie Averill
5b7723df7f
Merge branch '4.1' into 4.2
...
# Conflicts:
# lang/fi.yml
# lang/nl.yml
2018-11-09 11:38:04 +02:00
Robbie Averill
df4d2bd838
Merge branch '4.0' into 4.1
...
# Conflicts:
# lang/da.yml
# lang/eo.yml
# lang/fi.yml
# lang/it.yml
# lang/nl.yml
# lang/sv.yml
2018-11-09 11:36:34 +02:00
Sam Minnee
5531baa87f
FIX: Introduce readonly transaction test to all database.
...
This should work on MySQL and PDO; let’s test this.
2018-11-09 10:57:26 +13:00
Sam Minnee
2615399535
FIX: Use PDO’s built-in transaction support in MySQLDatabase.
2018-11-09 10:31:19 +13:00
Sam Minnee
0111b98b18
FIX: Ensure that types are preserved fetching from database
...
This ensures that numeric fields appear in PHP as int/float values
rather than strings, which allows the development of more type-safe PHP
code.
This doesn’t work on the legacy mysql driver and this will now throw
a notice-level error. It requires mysqlnd.
2018-11-09 10:31:19 +13:00
Werner M. Krauß
bc0f17fb09
Cleanup Convert
...
* remove unneeded parenthesis and double quotes
* simplify flow / remove unneeded else
2018-11-07 17:45:01 +01:00
Werner M. Krauß
3f321f935a
Convert::memstring2bytes should return integer value
...
bytes are by nature an integer
fixes #8572
2018-11-07 17:01:36 +01:00
Aaron Carlino
76936d863d
Merge branch '4.3' into 4
2018-11-07 23:20:44 +13:00
Loz Calver
11fe5b3adf
Implement ConfirmationTokenChain to handle multiple tokens at once
2018-11-07 11:33:24 +13:00
Loz Calver
8d7c2dafab
[SS-2018-019] Add confirmation token to dev/build
2018-11-07 11:33:24 +13:00
Loz Calver
02ad0f44aa
Implement ConfirmationTokenChain to handle multiple tokens at once
2018-11-07 11:32:55 +13:00
Loz Calver
af000bea9b
[SS-2018-019] Add confirmation token to dev/build
2018-11-07 11:32:55 +13:00
Loz Calver
5563537cc8
Implement ConfirmationTokenChain to handle multiple tokens at once
2018-11-07 11:31:33 +13:00
Loz Calver
0610f76da0
[SS-2018-019] Add confirmation token to dev/build
2018-11-07 11:31:33 +13:00
Loz Calver
0877442c64
Implement ConfirmationTokenChain to handle multiple tokens at once
2018-11-07 11:24:51 +13:00
Loz Calver
3dbb10625c
[SS-2018-019] Add confirmation token to dev/build
2018-11-07 11:24:51 +13:00
Robbie Averill
64c2938c96
Merge branch '4.3' into 4
2018-11-06 11:05:22 +01:00
Robbie Averill
3c58ae009e
Merge branch '4.2' into 4.3
2018-11-06 11:05:08 +01:00
Robbie Averill
22c7fa2bc9
Merge branch '4.1' into 4.2
2018-11-06 11:04:43 +01:00
Robbie Averill
6d2665d687
Merge branch '4.0' into 4.1
2018-11-06 11:04:28 +01:00
Werner M. Krauß
adafd73943
Convert::memstring2bytes should preserve -1
...
fixes #8570
2018-11-06 10:22:13 +01:00
Aaron Carlino
0ba275cb40
Merge branch '4.2' into 4.3
2018-11-06 15:09:01 +13:00
Aaron Carlino
e60cea8561
Merge branch '4.1' into 4.2
2018-11-06 15:08:42 +13:00
Sam Minnee
67fe41d00b
FIX: Ensure that repeated setting/unsetting doesn’t corrode forceChange()
2018-11-05 23:09:24 +13:00
Sam Minnee
5bb2d9484a
FIX: Update “original” DataObject data to be the content of the last write
...
FIX: Compare to original when determining fields changes
This fixes a number of edge-case issues relating to change detection.
Fixes #8443
Fixes #3821
Fixes #4561
2018-11-05 23:09:24 +13:00
Sam Minnee
76255c9fb5
FIX: CheckboxSetField can now save into DBMultiEnum
...
Fixes https://github.com/silverstripe/silverstripe-framework/issues/1489
2018-11-05 17:40:28 +13:00
Sam Minnee
78ceca6934
MINOR: Add test for defaults on subclasses
...
This was raised in https://github.com/silverstripe/silverstripe-framework/issues/8567
and wasn’t covered by a test.
2018-11-05 16:09:49 +13:00
Luke Edwards
8866e7674a
BUG: Fix duplicate plugins on HTML editor fields ( #8559 )
...
* BUG: Fix duplicate plugins on HTML editor fields
* Add new test
2018-11-02 12:26:53 +13:00
Michael Strong
55f95b7bc8
BUGFIX many many through not sorting by join table ( #8534 )
...
* BUGFIX many many through not sorting by join table
* #8534 added docs to support many many sorting fix
* #8534 added test cases for many_many default sorting
2018-11-01 14:17:15 +13:00
Michael Strong
7086f2ea3a
BUGFIX many many through not sorting by join table ( #8534 )
...
* BUGFIX many many through not sorting by join table
* #8534 added docs to support many many sorting fix
* #8534 added test cases for many_many default sorting
2018-11-01 13:42:27 +13:00
Robbie Averill
b02a6fa02d
FIX Replace usage of Convert JSON methods with json_encode
2018-10-28 21:15:29 +00:00
Sam Minnée
e72fc9e3d0
FIX DataObject singleton creation ( #8516 )
...
Ensure DataObject instances are aware they are singletons so functions like populateDefaults() can be skipped. (fixes #4878 )
Correctly applies https://github.com/silverstripe/silverstripe-framework/pull/7850 to the 4.x line
This has already been fixed in 3.x
2018-10-25 11:42:45 +13:00
Robbie Averill
bea4101e21
Add tests for DisabledTransformation, PrintableTransformation and PrintableTransformation_TabSet
2018-10-20 20:06:02 +02:00
Robbie Averill
449b2cf291
Add tests for DefaultFormFactory
2018-10-20 19:47:11 +02:00
Robbie Averill
fd50ce6295
Add more edge case tests for disabled DateFields and DatetimeField
2018-10-20 18:29:07 +02:00
Robbie Averill
97209bc919
Add edge case unit tests for DateField
2018-10-20 18:15:42 +02:00
Robbie Averill
0e2847e289
Add tests for DatalessField
2018-10-20 17:59:55 +02:00
Robbie Averill
c06cf4820e
BUG Readonly and disabled CurrencyFields no longer always returns dollar currency sign, now respect config
2018-10-20 17:47:16 +02:00
Robbie Averill
d56bad7568
Add tests for edge cases in CurrencyField
2018-10-20 17:33:59 +02:00
Robbie Averill
8929b8204f
More validation tests for ConfirmedPasswordField
2018-10-20 17:21:25 +02:00
Robbie Averill
c418ee2915
NEW Add getters and setters for public properties in ConfirmPasswordField, add tests
...
Some of the validation parts of ConfirmPasswordField are previously untested, this adds tests
2018-10-20 16:43:49 +02:00
Robbie Averill
60b375d995
Add more tests for CheckboxField_Readonly and CompositeField, improve PHPDocs
2018-10-20 15:44:23 +02:00
Robbie Averill
3cdb73bd44
NEW Add getLogger() to MonologErrorHandler and add test for exception without one
2018-10-20 15:00:08 +02:00
Robbie Averill
5bd05a2deb
Reduce setUp visibility and remove check for CLI - tests always run on CLI now
2018-10-20 14:51:53 +02:00
Robbie Averill
2694a47c45
Add more tests for DetailedErrorFormatter
2018-10-20 14:41:45 +02:00
Robbie Averill
e211e27470
Add more unit tests for DebugViewFriendlyErrorFormatter, tidy up Director::is_ajax() return
2018-10-20 14:27:57 +02:00
Robbie Averill
c18e9b1298
Merge pull request #8439 from sminnee/consistent-limit
...
FIX: Make ArrayList::limit() consistent with DataList::limit()
2018-10-16 12:05:11 +02:00
Aaron Carlino
7d201309ad
Merge branch '4.2' into 4
2018-10-15 13:42:55 +13:00
Robbie Averill
7215637673
Merge pull request #8460 from open-sausages/pulls/4/lazy-loadable-gidfield
...
API Add a new GridFieldLazyLoader component
2018-10-11 13:43:10 +02:00
Robbie Averill
46c50577a4
Expect BEM class names in tests, fix PSR-2 line lengths, add ArrayList import
2018-10-11 12:04:23 +02:00
Sam Minnee
4740346ed8
FIX: Make ArrayList::limit() consistent with DataList::limit()
...
This makes it easier to swap one fo the other without code breaking.
Since it’s strictly a removed API, I’ve opted to throw a deprecation
note in SS4 rather than throwing an InvalidArgumentException.
Fixes #2949
2018-10-11 21:05:20 +13:00
Maxime Rainville
250d925810
MINOR Update CompositeField::__construct to call setChildren #8460
2018-10-11 15:25:34 +13:00
Maxime Rainville
2e2ca5a4a7
Make sure LazyLoader still woks after a readonly transofrmation ( #8460 )
2018-10-11 11:56:39 +13:00
Robbie Averill
56d5621934
FIX Flush extra_methods statics between test runs
2018-10-09 13:22:54 +02:00
Robbie Averill
55e79ffdfd
Add failing test to show that overloaded extensions are broken in Extensible
2018-10-09 12:35:32 +02:00
Maxime Rainville
fdb53311ba
Fix linting issue.
2018-10-09 17:32:42 +13:00
Maxime Rainville
a13a2cdd40
Add unit test for FieldList::getContainerField()
2018-10-09 17:32:42 +13:00
Maxime Rainville
51ba787ffb
Finish writting unit test for GridFieldLazyLoader.
2018-10-09 17:32:42 +13:00
Loz Calver
e829ad78b1
Merge pull request #8429 from sminnee/fix-2950
...
FIX: Throw deprecation on limit=0
2018-10-08 15:11:52 +02:00
Maxime Rainville
36b1066413
Merge pull request #8451 from creative-commoners/pulls/4.3/memory-cache-findtemplate
...
NEW Add memory cache to ThemeResourceLoader::findTemplate()
2018-10-08 10:38:07 +13:00
Sam Minnee
8c7459a708
FIX: Fix CompositeField test that relied on a DropdownField bug
...
A DropdownField without a source no longer returns a validation
error.
2018-10-06 19:14:34 +13:00
Sam Minnee
e5d3b28a4d
FIX: Don’t break validation on selects without a source.
...
Fixes cases where there are no valid values or an empty-string
value is manually added rather than using setEmptyString()
Fixes #4849
Fixes #7159
2018-10-06 11:53:17 +13:00
Sam Minnée
7915fe0c0f
Merge pull request #8303 from hchokshi/pulls/4.2/viewable-data-customised-isset
...
Implement __isset for ViewableData_Customised
2018-10-06 09:37:19 +13:00
Robbie Averill
98568262f2
Fixed phpcs violations
2018-10-05 16:07:33 +02:00
Robbie Averill
da9301f241
Use SilverStripe cache API instead of memory cache, add tests and fix cache config indentation
2018-10-05 14:58:48 +02:00
Robbie Averill
172d8915b7
Clear cache between ThemeResourceLoader tests
2018-10-05 14:12:26 +02:00
Sam Minnee
0fc06e51e5
FIX: Drop seconds from DBDatetime::Nice() to restore SS3 behaviour.
...
Note that the medium date format depends on locale, with en_NZ being
resolutely numeric. I’ve updated the test to verify a couple of locales
to make this more obvious.
Fixes #8121
2018-10-04 14:51:24 +13:00
Sam Minnee
638e6ec281
FIX: Throw deprecation notice on limit=0
...
The SS4 behaviour of limit=0 is unlikely to be the SS5 behaviour.
To clear the limit limit=null is recommended.
In addition, there’s a bit tighter type maintenance in the internal
limit data (ensure things are int).
Fixes #2950 .
2018-10-04 10:38:15 +13:00
Robbie Averill
ee24413c30
Merge branch '4.2' into 4
2018-10-03 15:28:05 +02:00
Robbie Averill
b0871ebd75
Merge pull request #8417 from creative-commoners/pulls/4.3/many-many-through-sorting-tests
...
Add more list sorting tests and fix many many through sorting
2018-10-03 13:30:20 +02:00
Robbie Averill
d1f30a20c2
Merge pull request #8408 from dhensby/pulls/4/test-cleanup
...
Test cleanup
2018-10-03 13:28:59 +02:00
Robbie Averill
d74fed554a
Merge pull request #8427 from sminnee/fix-1397
...
FIX: Append any fields that don’t match name in insertBefore/insertAfter
2018-10-03 13:22:23 +02:00
Guy Marriott
5970fc2417
FIX Moving test to correct director
2018-10-03 10:47:17 +13:00
Robbie Averill
c8e7672ede
Merge pull request #8414 from creative-commoners/pulls/4/searching-for-a-name-conflict
...
FIX Avoid having search fields with the same names as form elements
2018-10-02 13:43:59 +02:00
Sam Minnee
71dad5f685
FIX: Append any fields that don’t match name in insertBefore/insertAfter
...
Previous behaviour was to return false, which has been described as
a confusing bug on https://github.com/silverstripe/silverstripe-framework/issues/1397
where the issue was identified.
2018-10-02 10:39:48 +13:00
Robbie Averill
bfe2a7b7e6
Update testSearchFieldSchema to expect namespaced search fields
2018-10-01 12:44:19 +02:00
Harsh Chokshi
60dd5f288b
Implement __isset for ViewableData_Customised
...
Resolves #8302 .
2018-10-01 09:40:12 +13:00
Dan Hensby
3584598d7a
Minor improvements
2018-09-29 22:51:26 +01:00
Dan Hensby
b0e0566c93
Formatting
2018-09-29 22:51:26 +01:00
Dan Hensby
5a3cc9503b
Formatting
2018-09-29 22:51:26 +01:00
Dan Hensby
2ef63ddbc1
Remove unused function args
2018-09-29 22:51:26 +01:00
Dan Hensby
7a18cd98e0
Improve assertion type
2018-09-29 22:51:26 +01:00
Dan Hensby
90e74a608e
Throwing and catcing an error in tests is mad
2018-09-29 22:51:26 +01:00
Dan Hensby
3c532cea0c
Minor cleanup of DirectorTest
2018-09-29 22:51:26 +01:00
Dan Hensby
3a007d52e6
Code formatting
2018-09-29 22:51:18 +01:00
Robbie Averill
231d6d9a9f
FIX New members now receive the configured default locale, not the current locale
2018-09-28 16:25:10 +02:00
Robbie Averill
d18b8eb9fb
Add more tests for descending sort orders
2018-09-28 15:42:45 +02:00
Robbie Averill
4aa7fb70ee
Add tests that show that joinClass default_sort is not used and order is honoured
2018-09-28 15:38:37 +02:00
Robbie Averill
f842ee2eec
Update deprecation PHPDocs to be PSR-5 compliant
...
See: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#55-deprecated
2018-09-28 10:49:14 +02:00
Robbie Averill
0c7ced1513
Refactor sorting tests to use a dataprovider
2018-09-27 17:18:19 +02:00
Robbie Averill
c7d522ff6d
Add tests for sorting HasManyList
2018-09-27 17:09:24 +02:00
Robbie Averill
3321c6b39d
Add tests for sorting many many through list without a table alias
2018-09-27 14:34:37 +02:00
Dan Hensby
b3d2d4c1b1
Remove redundant code
2018-09-26 10:11:28 +01:00
Dan Hensby
db43d57618
Remove commented out test
2018-09-26 10:11:28 +01:00
Dan Hensby
fe5b431200
Use Member::actAs rather than setting and unsetting member
2018-09-26 10:11:20 +01:00
Dan Hensby
6b618b44c9
Remove regex in favour of simple assertContains
2018-09-26 00:36:58 +01:00
Dan Hensby
cb361e8caf
Remove unused code from ControllerTest
2018-09-26 00:30:20 +01:00