本文整理汇总了PHP中Logging::failureMessaging方法的典型用法代码示例。如果您正苦于以下问题:PHP Logging::failureMessaging方法的具体用法?PHP Logging::failureMessaging怎么用?PHP Logging::failureMessaging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logging
的用法示例。
在下文中一共展示了Logging::failureMessaging方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testExport
public function testExport()
{
if (self::$response0->getStatus() == 201) {
self::$client->resetParameters();
//self::$client->setUri(BASE_URI_ . '/public/api/find-concepts?q=prefLabel:' . self::$prefLabel);
//$response = self::$client->request(Zend_Http_Client::GET);
//!!! it used to be self::$uuid!!!
$response = RequestResponse::ExportRequest(self::$client, self::$about, dirname(__DIR__) . '/OpenSkos2/ExportTest.xml');
if ($response->getStatus() != 200) {
Logging::failureMessaging($response, "export concept");
}
$this->AssertEquals(200, $response->getStatus());
var_dump($response->GetBody());
$this->assertions($response);
} else {
Logging::failureMessaging(self::$response0, "create test concept");
}
}
示例2: testDeleteCandidate
public function testDeleteCandidate()
{
print "\n deleting concept with candidate status ...";
if (self::$response0C->getStatus() === 201) {
$response = RequestResponse::DeleteRequest(self::$client, self::$aboutC);
if ($response->getStatus() !== 202) {
Logging::failureMessaging($response, "delete candidate concept");
}
$this->AssertEquals(202, $response->getStatus());
self::$client->setUri(BASE_URI_ . '/public/api/concept?id=' . self::$uuidC);
$responseCheck = self::$client->request('GET');
if ($responseCheck->getStatus() !== 410) {
print "\n getting deleted concept has status " . $responseCheck->getStatus();
print "\n with the message " . $responseCheck->getMessage();
}
$this->AssertEquals(410, $responseCheck->getStatus());
}
}
示例3: deleteConcepts
public static function deleteConcepts($abouts, $client)
{
foreach ($abouts as $about) {
if ($about != null) {
$response = RequestResponse::DeleteRequest($client, $about);
if ($response->getStatus() !== 202 && $response->getStatus() !== 200) {
Logging::failureMessaging($response, 'deleting test concept ' . $about);
}
}
}
}
示例4: resultMessaging
private function resultMessaging($response)
{
if ($response->getStatus() == 201) {
print "\n Hosanna: a concept is created! \n";
print "\n HTTPResponseHeader-Location: " . $response->getHeader('Location') . "\n";
} else {
Logging::failureMessaging($response, 'create concept');
}
}
示例5: testAutocompleteFormatHTML
public function testAutocompleteFormatHTML()
{
print "\n testAutocomplete search pref Label";
if (self::$success) {
$word = self::$labelMap[PREF_LABEL] . self::$prefs[1];
// prefLabel<someuuid>a.
$response = RequestResponse::AutocomleteRequest(self::$client, $word, "?format=html");
if ($response->getStatus() != 200) {
Logging::failureMessaging($response, 'autocomplete on word ' . $word . "?format=html");
}
$this->AssertEquals(200, $response->getStatus());
// todo: add some chek when it becomes clear how the output looks like
} else {
print "\n Cannot perform the test because something is wrong with creating test concepts, see above. \n ";
}
}