Transform ApiResponse::formatData() into dynamic method
This commit is contained in:
parent
f28e64299e
commit
4309f814e0
3 changed files with 55 additions and 55 deletions
|
@ -1142,7 +1142,7 @@ class ApiTest extends FixtureTest
|
|||
public function testApiFormatData()
|
||||
{
|
||||
$data = ['some_data'];
|
||||
self::assertEquals($data, ApiResponse::formatData('root_element', 'json', $data));
|
||||
self::assertEquals($data, DI::apiResponse()->formatData('root_element', 'json', $data));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1159,7 +1159,7 @@ class ApiTest extends FixtureTest
|
|||
'xmlns:georss="http://www.georss.org/georss">' . "\n" .
|
||||
' <data>some_data</data>' . "\n" .
|
||||
'</root_element>' . "\n",
|
||||
ApiResponse::formatData('root_element', 'xml', ['data' => ['some_data']])
|
||||
DI::apiResponse()->formatData('root_element', 'xml', ['data' => ['some_data']])
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue