mirror of
https://github.com/silverstripe/silverstripe-restfulserver
synced 2024-10-22 14:05:58 +02:00
API Use new names for renamed classes (#135)
This commit is contained in:
parent
76268db1d1
commit
62a47ff758
@ -7,7 +7,7 @@ use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Config\Configurable;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\DataObjectInterface;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\Model\List\SS_List;
|
||||
|
||||
/**
|
||||
* A DataFormatter object handles transformation of data from SilverStripe model objects to a particular output
|
||||
|
@ -3,12 +3,12 @@
|
||||
namespace SilverStripe\RestfulServer\DataFormatter;
|
||||
|
||||
use SilverStripe\RestfulServer\RestfulServer;
|
||||
use SilverStripe\View\ArrayData;
|
||||
use SilverStripe\Model\ArrayData;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\RestfulServer\DataFormatter;
|
||||
use SilverStripe\ORM\DataObjectInterface;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\Model\List\SS_List;
|
||||
use SilverStripe\ORM\FieldType;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +10,7 @@ use SilverStripe\RestfulServer\DataFormatter;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\DataObjectInterface;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\Model\List\SS_List;
|
||||
use SilverStripe\RestfulServer\RestfulServer;
|
||||
use InvalidArgumentException;
|
||||
|
||||
|
@ -8,12 +8,12 @@ use SilverStripe\Control\Director;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\Model\List\ArrayList;
|
||||
use SilverStripe\ORM\DataList;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\ORM\ValidationException;
|
||||
use SilverStripe\ORM\ValidationResult;
|
||||
use SilverStripe\Model\List\SS_List;
|
||||
use SilverStripe\Core\Validation\ValidationException;
|
||||
use SilverStripe\Core\Validation\ValidationResult;
|
||||
use SilverStripe\Security\Member;
|
||||
use SilverStripe\Security\Security;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace SilverStripe\RestfulServer;
|
||||
|
||||
use SilverStripe\ORM\SS_List;
|
||||
use SilverStripe\Model\List\SS_List;
|
||||
|
||||
/**
|
||||
* Restful server handler for a single DataObject
|
||||
|
@ -20,6 +20,7 @@ use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\RestfulServer\DataFormatter\JSONDataFormatter;
|
||||
use Page;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Validation\ValidationException;
|
||||
use SilverStripe\RestfulServer\DataFormatter\XMLDataFormatter;
|
||||
|
||||
class RestfulServerTest extends SapphireTest
|
||||
@ -747,7 +748,7 @@ class RestfulServerTest extends SapphireTest
|
||||
// Assumption: XML is default output
|
||||
$formatter = new XMLDataFormatter();
|
||||
$responseArr = $formatter->convertStringToArray($response->getBody());
|
||||
$this->assertEquals('SilverStripe\\ORM\\ValidationException', $responseArr['type']);
|
||||
$this->assertEquals(ValidationException::class, $responseArr['type']);
|
||||
}
|
||||
|
||||
public function testExceptionThrownWithPOST()
|
||||
|
@ -24,7 +24,7 @@ class RestfulServerTestValidationFailure extends DataObject implements TestOnly
|
||||
);
|
||||
|
||||
/**
|
||||
* @return \SilverStripe\ORM\ValidationResult
|
||||
* @return \SilverStripe\Core\Validation\ValidationResult
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user