Commit Graph

37 Commits

Author SHA1 Message Date
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
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
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
Saophalkun Ponlu
1e572ca4e3 ENHANCEMENT: Restful service returns cached response on http and curl errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108437 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:43 +13:00
Luke Hudson
248979b4c5 BUGFIX: Take note of output format when building Location header for RestfulServer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:42 +13:00
Sam Minnee
65c711cfea MINOR: Fix tests to cope with ID type cleanup changed recently
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101970 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:10 +13:00
Sean Harvey
2332128460 ENHANCEMENT #5072 RSSFeed_Entry::rssField() now respects custom getters on the data class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:45 +13:00
Sam Minnee
c212f40bb5 BUGFIX Use BASE_PATH and BASE_URL instead of data from $_SERVER.
API CHANGE: Determine default BASE_PATH/BASE_URL from the __FILE__ content, so that the script that initiated the Sapphire process doesn't matter.  This means that index.php doesn't need to manipulate those variables.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97731 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Sam Minnee
63096cfefb API CHANGE: Don't generate TestOnly DataObjects in the database immediately; instead let test developers specify them in SapphireTest::$extraDataObjects.
API CHANGE: Added SapphireTest::resetDBSchema() (from r90054)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96734 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:04 +13:00
Sean Harvey
d93ee14be1 MINOR Removed calls to ContentNegotiator::disable() since it's disabled by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93682 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:53 +13:00
Sam Minnee
45bbebe19f BUGFIX: Made use of new BasicAuth::protect_entire_site() consistent. (from r91658)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:37 +13:00
Andrew Short
f29eceecff API CHANGE #3724: Unified the Link() method to accept an action parameter.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:16 +00:00
Ingo Schommer
7ab121fcc5 BUGFIX Fixed RestfulServerTest not to assume ID ordering in the assertions, which breaks with databases not ordering by PK automatically (e.g. Postgres)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87922 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 22:07:50 +00:00
Ingo Schommer
2cb99122d3 BUGFIX Fixed content-type for SapphireSoapServer->wsdl() (#4570, thanks Cristian)
MINOR Added documentation for SapphireSoapServer

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86876 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-21 09:55:43 +00:00
Ingo Schommer
e54a2e75e6 BUGFIX Fixed many_many relations querying in RestfulServer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81346 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 08:28:17 +00:00
Sean Harvey
1b1809f1a2 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80873 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-02 07:18:18 +00:00
Ingo Schommer
da1f065cf7 BUGFIX Removing quotes from test data in RestfulServiceTest, it gives different results depending on magic_quotes_gpc setting on PHP configuration
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80132 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-26 03:14:22 +00:00
Ingo Schommer
6b90c02940 ENHANCEMENT Refactored RestfulServiceTest to use a mocked RestfulService with Director::test() instead of curl calls. Simplified test cases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79927 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-24 03:05:33 +00:00
Ingo Schommer
b0798db91e MINOR Removed debug output
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78124 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-29 01:06:23 +00:00
Ingo Schommer
e121c2f8fd BUGFIX Prevent relations without $api_access to be shown through RestfulServer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-29 01:04:40 +00:00
Ingo Schommer
ec42a12162 BUGFIX RestfulServer->permissionFailiure() returns correct HTTP status code if authentication is possible: 401 Unauthrized instead of 403 Forbidden (patch #3803, thanks DoubleClique)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73820 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-30 03:12:58 +00:00
Ingo Schommer
40910f9f71 ENHANCEMENT RestfulServer now accepts form-encoded HTTP requests for PUT and POST with new FormEncodedDataFormatter class (#3792, thanks camspiers)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73747 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-29 00:51:38 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Ingo Schommer
e7e8a1209b BUGFIX #3376 RestfulServiceTest fails with "authorization required" - seems to happen if result cache is not invalidated properly, hence made sure to call ?flush=1 on each URL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70665 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-23 02:08:01 +00:00
Ingo Schommer
085346f0e0 MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-05 06:19:48 +00:00
Sam Minnee
c1d6e82248 API CHANGE: Removed manifest's dependency on database, by removing hastable information [17:47:04]
dquote> API CHANGE: Deprecate ClassInfo::ready() in favour of Security::database_is_ready()
dquote> API CHANGE: Create DataObject::has_own_table() to determine whether a DataObject has a table without looking at it.
dquote> API CHANGE: Exclude /tests/ directories from the manifest entirely except when tests are being run.
dquote> API CHANGE: Added ?usetestmanifest=1 flag to access the test manifest outside of test execution.
dquote> API CHANGE: Simplified Core.php manifest include to just call ManifestBuilder::include_manifest() - manifest takes care of its own cache file

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 04:51:25 +00:00
Sean Harvey
6195772779 ENHANCEMENT Allow use of RestfulService->setQueryString() and test to support it. Patch from ticket #2973. Thanks to simon_w!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64596 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-21 03:45:44 +00:00
Ingo Schommer
68dba3e8af BUGFIX Fixed RestfulServerTest fixture path
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64443 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 18:22:37 +00:00
Ingo Schommer
593e0f1799 MINOR moved RestfulServerTest from cms to sapphire module, same as the actual RestfulServer class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64441 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 17:37:31 +00:00
Ingo Schommer
9b86763720 ENHANCEMENT Re-enabled RSSFeedTest - seems to work now due to Director::baseURL() fixes (#2861)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64041 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 02:19:55 +00:00
Ingo Schommer
b8846a9ab3 MINOR Temporarily disabled RSSFeedTest as its overriding environment variables that should be handled by Director class with Director::setBaseURL() (which is currently not fully working). Added stub-tests for Director.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63155 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-09-27 16:04:01 +00:00
Ingo Schommer
4da0a2c52c removed duplicate RestfulServerTest files, they're already in /cms (merge error)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60236 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 07:12:12 +00:00
Ingo Schommer
60860cc1b9 MINOR Unified @package PHPdoc (added where missing, removed duplicates)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-15 13:33:53 +00:00
Sam Minnee
01b34bdd59 Fixed RSS feed test for environments without base url set-up
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@54899 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-05-21 23:51:17 +00:00
Sam Minnee
29bf71d3d6 MINOR: Disabled UploadTest and RestfulServerTest until we can figure out why they don't run in cli-script
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@54640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-05-15 08:53:58 +00:00
Sam Minnee
e747282dfa Added first cut of RestfulServer - simple get support
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@51861 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-30 23:18:04 +00:00
Sam Minnee
7eea3c091f Added tests for RSSFeed
Don't require  information on objects passed to RSSFeed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@51523 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-21 05:58:50 +00:00