Commit Graph

794 Commits

Author SHA1 Message Date
Sean Harvey
1544d55890 MINOR Fixed php tag in SecurityTokenTest, should be "<?php" not "<?"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114016 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:02 +13:00
Andreas Piening
d01db84336 MINOR: don't trigger notice but Debug::show it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113937 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Andreas Piening
fdebd72e97 MINOR: don't trigger notice but Debug::show it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113936 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Andreas Piening
1fb51c6c5d MINOR: test doesn't fail anymore due to time differences between db and php. The test now issues notices, warnings and errors depending on the severity of the offset
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113933 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Ingo Schommer
a9e611d721 ENHANCEMENT Allowing i18nTextCollector to discover entities in templates stored in themes/ directory (thanks nlou) (from r113918)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Sean Harvey
9bae66760a MINOR Fixed RSSFeedTest which should put test configuration code into setUp() and tearDown() methods. If the test fails halfway through, these will get called to clean up the state
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113430 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Jean-Fabien Barrios
1050c7ee4e ENHANCEMENT Validation for uploaded files
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113420 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Ingo Schommer
294f99d767 ENHANCEMENT Added Form->enableSecurityToken() as a counterpart to the existing disableSecurityToken()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113284 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Ingo Schommer
e4d3584805 ENHANCEMENT Added SecurityToken to wrap CSRF protection via "SecurityID" request parameter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:58 +13:00
Ingo Schommer
ac21b75449 BUGFIX Fixed month conversion in DateField_View_JQuery::convert_iso_to_jquery_format() (fixes #6124, thanks mbren and natmchugh)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113247 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:58 +13:00
Sean Harvey
1a9b527053 BUGFIX Ensure that \r carriage return characters get stripped out before setting content in HTMLValue::setContent(). DOMDocument will transform these into &#13 entities, which is apparently XML spec, but not necessary for us as we're using HTML
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111949 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:57 +13:00
Sean Harvey
f410e092d4 MINOR #6083 FileTest doesn't remove test folders and files created during test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111903 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:57 +13:00
Ingo Schommer
d45b8cce8b BUGFIX Ensure that windows-style newlines ("\r\n") don't get converted to their XML entity representation through DOMDocument in SS_HTMLValue->setContent()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111878 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Ingo Schommer
dfb9c71342 MINOR Fixed regression from r111843 (i18nText, MemberDatetimeFieldTest, MemberTest)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111844 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Sean Harvey
0b2e932e10 MINOR Change matchesRoughly threshold slightly in DbDatetimeTest to allow for slower database server connections
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Ingo Schommer
feefb11dae MINOR Added FulltextSearchable::get_searchable_classes() in order to introspect currently searchable classes, added FulltextSearchableTest, added documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:54 +13:00
Sean Harvey
a9d752b344 MINOR CoreTest::testGetTempPathInProject() will try to create a temp dirs when running. CoreTest::tearDown() will now remove these temp dirs when the test finishes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111748 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:54 +13:00
Mark Stephens
e2064090fe MINOR: Unit test breaks if another module or project extends Folder
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111669 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:54 +13:00
Ingo Schommer
b1bdbdb8f1 MINOR Fixed SQL quoting bug in FolderTest (caused by r111493)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111496 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:54 +13:00
Ingo Schommer
47fd9be0e0 BUGFIX Moving folder after executing Folder::findOrMake will not set the Filenames properly. Invoking updateFilesystem() in File->onAfterWrite() instead of onBeforeWrite(), and avoid caching in FIle->getRelativePath() (fixes #5994 and #5937, thanks muzdowski)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Ingo Schommer
98e8dd035c ENHANCEMENT Added "module=" argument to FullTestSuite (to support comma-separated module lists)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111489 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Saophalkun Ponlu
4965cb0f69 BUGFIX: Search didn't respect searchableClasses passed to FulltextSearchable::enable()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111464 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Ingo Schommer
1ce7e08933 MINOR Code formatting in FullTestSuite
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111133 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Ingo Schommer
8a592a1b86 MINOR PHPUnit annotations for PhpSyntaxTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111116 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
8c5270372c BUGFIX Fixed PhpSyntaxTest not to rely on relative folder references (broken due to chdir() changes in cli-script.php and bootstrap.php)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
02c1b56c01 MINOR Don't use chdir(), it confuses the hell out of phpunit (e.g. directory_exists() and realpath() no longer work as expected)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111051 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
628a39cac7 ENHANCEMENT Allowing to run single tests via phpunit through new test bootstrap XML file (e.g. "phpunit sapphire/tests/api/RestfulServerTest.php" or "phpunit sapphire/tests/api")
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111048 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
ae6c40148b MINOR Fixed SSViewerTest to initialize controller properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111047 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
1aebd6dd76 MINOR Remove all session data in TestSession that might've been set by the test harness (necessary for test runs through the phpunit binary)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111046 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:51 +13:00
Ingo Schommer
5073266b11 ENHANCEMENT: Added FullTestSuite.php, so that you can test by running "phpunit sapphire/tests/FullTestSuite".
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111045 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:51 +13:00
Sean Harvey
ae89969321 BUGFIX Fixed column names that were not quoted that broke PostgreSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110944 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Will Rossiter
f9a84974b6 BUGFIX: delete orphaned records from versioned tables when updating. #5936
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110901 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Ingo Schommer
139ab46240 BUGFIX Protect MemberTest from side effects caused by auth_openid and forum modules
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110894 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Ingo Schommer
31e9726ace BUGFIX Enforcing canEdit() checks in ComplexTableField_Popup - making form readonly if the current user can't edit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110857 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Ingo Schommer
486091e4ec API CHANGE Member->canEdit() returns false if the editing member has lower permissions than the edited member, for example if a member with CMS_ACCESS_SecurityAdmin permissions tries to edit an ADMIN (fixes #5651)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110856 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Will Rossiter
1f0d664150 BUGFIX: ensure that pages can only be requested from staging and live
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110759 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:49 +13:00
Mateusz Uzdowski
2a708d9afa BUGFIX: fix TranslatableSearchFormText by supporting fulltext search for MSSQL and using extendedSQL function call that augments queries properly (previously it was using DB::query which does not augment). Added wait to TranslatableSearchFormText so the test actually passes.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110262 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:49 +13:00
Mateusz Uzdowski
8b5ab77f42 BUGFIX: force the test to wait until indexing completes. Do not use stop words ('me')
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110130 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:48 +13:00
Hamish Friedlander
deae822827 BUGFIX: BasicAuthTests fail when Member's unique_identifier_field is anything except the default of Email
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109834 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:48 +13:00
Mateusz Uzdowski
e9fad58efc BUGFIX: disable basic auth for the restful controller test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109714 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:48 +13:00
Andreas Piening
801e3c958c MINOR: return a fail instead of an error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109382 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:47 +13:00
Sean Harvey
6f9b33e022 MINOR Tests for Member::getName() and Member::setName()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109333 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:47 +13:00
Luke Hudson
4311966880 Revert "MINOR: Applied patch from walec51 for <% control %> on empty set (#5579) Also added unit tests by ischommer"
This was not supposed to be pushed out yet.

This reverts commit 9c2aafa414948314236674e31fd756797d695139.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109177 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:47 +13:00
Sean Harvey
0cbde73445 API CHANGE #5873 DataObjectSet::shift() now performs a proper shift instead of unshift (wrong). Please use DataObjectSet::unshift($item) if unshifting was intended!
API CHANGE Added DataObjectSet::pop()
MINOR Unit tests for DataObjectSet::shift(), DataObjectSet::unshift() and DataObjectSet::pop()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Luke Hudson
dce50511d3 BUGFIX: Remove () that was breaking coverage report
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109128 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Luke Hudson
0e3bea57ce MINOR: Applied patch from walec51 for <% control %> on empty set (#5579) Also added unit tests by ischommer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Sam Minnee
f94564f98c MINOR: Clear out the test database in between each salad scenario.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109100 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Sean Harvey
a699ff1a75 MINOR Added tests for File::getURL() and File::getAbsoluteURL()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109066 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Mateusz Uzdowski
b6aef41d1c ENHANCEMENT: make RestfulService support PUT method.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:44 +13:00
Sean Harvey
11e9e2a348 MINOR Fixed DirectorTest to restore it's REQUEST_URI state to the original one after each test method is run
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108665 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:44 +13:00