Fix Api and BaseObject tests
This commit is contained in:
parent
41f781c52a
commit
ba3cd1334a
|
@ -610,8 +610,8 @@ class ApiTest extends DatabaseTest
|
||||||
public function testApiErrorWithJson()
|
public function testApiErrorWithJson()
|
||||||
{
|
{
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'{"status":{"error":"error_message","code":"200 Friendica\\\\Network\\\\HTTP","request":""}}',
|
'{"status":{"error":"error_message","code":"200 OK","request":""}}',
|
||||||
api_error('json', new HTTPException('error_message'))
|
api_error('json', new HTTPException\OKException('error_message'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,10 +628,10 @@ class ApiTest extends DatabaseTest
|
||||||
'xmlns:friendica="http://friendi.ca/schema/api/1/" '.
|
'xmlns:friendica="http://friendi.ca/schema/api/1/" '.
|
||||||
'xmlns:georss="http://www.georss.org/georss">'."\n".
|
'xmlns:georss="http://www.georss.org/georss">'."\n".
|
||||||
' <error>error_message</error>'."\n".
|
' <error>error_message</error>'."\n".
|
||||||
' <code>200 Friendica\Network\HTTP</code>'."\n".
|
' <code>200 OK</code>'."\n".
|
||||||
' <request/>'."\n".
|
' <request/>'."\n".
|
||||||
'</status>'."\n",
|
'</status>'."\n",
|
||||||
api_error('xml', new HTTPException('error_message'))
|
api_error('xml', new HTTPException\OKException('error_message'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,10 +648,10 @@ class ApiTest extends DatabaseTest
|
||||||
'xmlns:friendica="http://friendi.ca/schema/api/1/" '.
|
'xmlns:friendica="http://friendi.ca/schema/api/1/" '.
|
||||||
'xmlns:georss="http://www.georss.org/georss">'."\n".
|
'xmlns:georss="http://www.georss.org/georss">'."\n".
|
||||||
' <error>error_message</error>'."\n".
|
' <error>error_message</error>'."\n".
|
||||||
' <code>200 Friendica\Network\HTTP</code>'."\n".
|
' <code>200 OK</code>'."\n".
|
||||||
' <request/>'."\n".
|
' <request/>'."\n".
|
||||||
'</status>'."\n",
|
'</status>'."\n",
|
||||||
api_error('rss', new HTTPException('error_message'))
|
api_error('rss', new HTTPException\OKException('error_message'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,10 +668,10 @@ class ApiTest extends DatabaseTest
|
||||||
'xmlns:friendica="http://friendi.ca/schema/api/1/" '.
|
'xmlns:friendica="http://friendi.ca/schema/api/1/" '.
|
||||||
'xmlns:georss="http://www.georss.org/georss">'."\n".
|
'xmlns:georss="http://www.georss.org/georss">'."\n".
|
||||||
' <error>error_message</error>'."\n".
|
' <error>error_message</error>'."\n".
|
||||||
' <code>200 Friendica\Network\HTTP</code>'."\n".
|
' <code>200 OK</code>'."\n".
|
||||||
' <request/>'."\n".
|
' <request/>'."\n".
|
||||||
'</status>'."\n",
|
'</status>'."\n",
|
||||||
api_error('atom', new HTTPException('error_message'))
|
api_error('atom', new HTTPException\OKException('error_message'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class BaseObjectTest extends TestCase
|
||||||
$this->setUpVfsDir();
|
$this->setUpVfsDir();
|
||||||
$this->mockApp($this->root);
|
$this->mockApp($this->root);
|
||||||
|
|
||||||
$this->assertNull($baseObject->setApp($this->app));
|
$baseObject->setApp($this->app);
|
||||||
$this->assertEquals($this->app, $baseObject->getApp());
|
$this->assertEquals($this->app, $baseObject->getApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ class BaseObjectTest extends TestCase
|
||||||
*/
|
*/
|
||||||
public function testGetAppFailed()
|
public function testGetAppFailed()
|
||||||
{
|
{
|
||||||
$baseObject = new BaseObject();
|
BaseObject::getApp();
|
||||||
$baseObject->getApp();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue