SilverStripe\RestfulServer\Tests\RestfulServerTest
Synopsis
class RestfulServerTest
extends SapphireTest
{
- // members
- protected static string $fixture_file = 'RestfulServerTest.yml';
- protected string $baseURI = 'http://www.fakesite.test';
- protected static array $extra_dataobjects = ;
- // methods
- protected void urlSafeClassname()
- protected void setUp()
- public void testApiAccess()
- public void testApiAccessBoolean()
- public void testAuthenticatedGET()
- public void testGETWithFieldAlias()
- public void testAuthenticatedPUT()
- public void testGETRelationshipsXML()
- public void testGETRelationshipsWithAlias()
- public void testGETManyManyRelationshipsXML()
- public void testPUTWithFormEncoded()
- public void testPOSTWithFormEncoded()
- public void testPostWithoutBodyReturnsNoContent()
- public void testPUTwithJSON()
- public void testPUTwithXML()
- public void testHTTPAcceptAndContentType()
- public void testNotFound()
- public void testMethodNotAllowed()
- public void testConflictOnExistingResourceWhenUsingPost()
- public void testUnsupportedMediaType()
- public void testXMLValueFormatting()
- public void testXMLValueFormattingWithFieldAlias()
- public void testApiAccessFieldRestrictions()
- public void testApiAccessRelationRestrictionsInline()
- public void testApiAccessRelationRestrictionsOnEndpoint()
- public void testApiAccessWithPUT()
- public void testFieldAliasWithPUT()
- public void testJSONDataFormatter()
- public void testJSONDataFormatterWithFieldAlias()
- public void testGetWithSortDescending()
- public void testGetWithSortAscending()
- public void testGetSortsByIdWhenInvalidSortColumnIsProvided()
- public void testApiAccessWithPOST()
- public void testFieldAliasWithPOST()
- public void testCanViewRespectedInList()
- public void testValidationErrorWithPOST()
- public void testExceptionThrownWithPOST()
- public void testParseClassName()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Tasks
Line | Task |
---|---|
31+ | Test Relation getters |
31+ | Test filter and limit through GET params |
31+ | Test DELETE verb |
103 | create additional mock object with authenticated VIEW permissions |
159 | should be set up by fixtures, doesn't work for some reason... |
187 | should be set up by fixtures, doesn't work for some reason... |
Members
protected
- $baseURI
- $extra_dataobjects
- $fixture_file
Methods
protected
public
- testApiAccess()
- testApiAccessBoolean()
- testApiAccessFieldRestrictions()
- testApiAccessRelationRestrictionsInline()
- testApiAccessRelationRestrictionsOnEndpoint()
- testApiAccessWithPOST()
- testApiAccessWithPUT()
- testAuthenticatedGET()
- testAuthenticatedPUT()
- testCanViewRespectedInList()
- testConflictOnExistingResourceWhenUsingPost()
- testExceptionThrownWithPOST()
- testFieldAliasWithPOST()
- testFieldAliasWithPUT()
- testGETManyManyRelationshipsXML()
- testGETRelationshipsWithAlias()
- testGETRelationshipsXML()
- testGETWithFieldAlias()
- testGetSortsByIdWhenInvalidSortColumnIsProvided()
- testGetWithSortAscending()
- testGetWithSortDescending()
- testHTTPAcceptAndContentType()
- testJSONDataFormatter()
- testJSONDataFormatterWithFieldAlias()
- testMethodNotAllowed()
- testNotFound()
- testPOSTWithFormEncoded()
- testPUTWithFormEncoded()
- testPUTwithJSON()
- testPUTwithXML()
- testParseClassName()
- testPostWithoutBodyReturnsNoContent()
- testUnsupportedMediaType()
- testValidationErrorWithPOST()
- testXMLValueFormatting()
- testXMLValueFormattingWithFieldAlias()