fixing some more tests
This commit is contained in:
parent
55679a6021
commit
51dcfe134e
|
@ -52,7 +52,7 @@ class Activity extends BaseApi
|
||||||
$res = Item::performActivity($request['id'], $this->parameters['verb'], $uid);
|
$res = Item::performActivity($request['id'], $this->parameters['verb'], $uid);
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
if ($this->parameters['extension'] ?? '' == 'xml') {
|
if (($this->parameters['extension'] ?? '') == 'xml') {
|
||||||
$ok = 'true';
|
$ok = 'true';
|
||||||
} else {
|
} else {
|
||||||
$ok = 'ok';
|
$ok = 'ok';
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Notification extends BaseApi
|
||||||
$notifications[] = new ApiNotification($Notify);
|
$notifications[] = new ApiNotification($Notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->parameters['extension'] ?? '' == 'xml') {
|
if (($this->parameters['extension'] ?? '') == 'xml') {
|
||||||
$xmlnotes = [];
|
$xmlnotes = [];
|
||||||
foreach ($notifications as $notification) {
|
foreach ($notifications as $notification) {
|
||||||
$xmlnotes[] = ['@attributes' => $notification->toArray()];
|
$xmlnotes[] = ['@attributes' => $notification->toArray()];
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Show extends BaseApi
|
||||||
$profile = self::formatProfile($profile, $profileFields);
|
$profile = self::formatProfile($profile, $profileFields);
|
||||||
|
|
||||||
$profiles = [];
|
$profiles = [];
|
||||||
if ($this->parameters['extension'] ?? '' == 'xml') {
|
if (($this->parameters['extension'] ?? '') == 'xml') {
|
||||||
$profiles['0:profile'] = $profile;
|
$profiles['0:profile'] = $profile;
|
||||||
} else {
|
} else {
|
||||||
$profiles[] = $profile;
|
$profiles[] = $profile;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Test extends BaseApi
|
||||||
{
|
{
|
||||||
protected function rawContent(array $request = [])
|
protected function rawContent(array $request = [])
|
||||||
{
|
{
|
||||||
if ($this->parameters['extension'] ?? '' == 'xml') {
|
if (($this->parameters['extension'] ?? '') == 'xml') {
|
||||||
$ok = 'true';
|
$ok = 'true';
|
||||||
} else {
|
} else {
|
||||||
$ok = 'ok';
|
$ok = 'ok';
|
||||||
|
|
|
@ -31,7 +31,7 @@ class RateLimitStatus extends BaseApi
|
||||||
{
|
{
|
||||||
protected function rawContent(array $request = [])
|
protected function rawContent(array $request = [])
|
||||||
{
|
{
|
||||||
if ($this->parameters['extension'] ?? '' == 'xml') {
|
if (($this->parameters['extension'] ?? '') == 'xml') {
|
||||||
$hash = [
|
$hash = [
|
||||||
'remaining-hits' => '150',
|
'remaining-hits' => '150',
|
||||||
'@attributes' => ["type" => "integer"],
|
'@attributes' => ["type" => "integer"],
|
||||||
|
|
|
@ -51,6 +51,6 @@ class TestTest extends ApiTest
|
||||||
'Content-type' => ['text/xml'],
|
'Content-type' => ['text/xml'],
|
||||||
ICanCreateResponses::X_HEADER => ['xml']
|
ICanCreateResponses::X_HEADER => ['xml']
|
||||||
], $response->getHeaders());
|
], $response->getHeaders());
|
||||||
self::assertxml($response->getBody(), 'true');
|
self::assertxml($response->getBody(), 'ok');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user