• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ApiTester类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ApiTester的典型用法代码示例。如果您正苦于以下问题:PHP ApiTester类的具体用法?PHP ApiTester怎么用?PHP ApiTester使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ApiTester类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: deletePost

 public function deletePost(ApiTester $I)
 {
     $id = $I->haveRecord('posts', $this->getPostAttributes(['title' => 'Game of Thrones']));
     $I->sendDELETE($this->endpoint . "/{$id}");
     $I->seeResponseCodeIs(200);
     $I->dontSeeRecord('posts', ['id' => $id]);
 }
开发者ID:resulaslan,项目名称:sample-l4-app,代码行数:7,代码来源:PostsResourceCest.php


示例2: read

 /**
  * Preberem zapis
  * 
  * @param ApiTester $I
  * @depends create
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj['id']);
     $I->assertEquals($ent['sifra'], 'ZZ');
     $I->assertEquals($ent['naziv'], 'uu');
     $I->assertEquals($ent['opis'], 'zz');
 }
开发者ID:ifigenija,项目名称:server,代码行数:13,代码来源:ZvrstUprizoritveCest.php


示例3: getMeta

 /**
  * get meta
  * 
  * @param ApiTester $I
  */
 public function getMeta(\ApiTester $I)
 {
     $controller = "drzava";
     $view = "";
     $expected = "";
     $I->testFormMeta('drzava', '');
 }
开发者ID:ifigenija,项目名称:server,代码行数:12,代码来源:DrzavaCest.php


示例4: readDatum

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function readDatum(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj3['id']);
     codecept_debug($ent);
     $I->assertEquals($ent['zacetek'], '2009-09-14T00:00:00+0200');
     //konec spremenjen v +0200
     $ent = $I->successfullyGet($this->restUrl, $this->obj2['id']);
     $I->assertEquals($ent['zacetek'], '2003-02-01T00:00:00+0100');
 }
开发者ID:ifigenija,项目名称:server,代码行数:15,代码来源:TimeZoneCest.php


示例5: read

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     $I->assertGuid($ent['id']);
     $I->assertEquals($ent['oznaka'], 'AA');
     $I->assertEquals($ent['naziv'], 'uu');
     $I->assertEquals($ent['aktiven'], TRUE);
     $I->assertEquals($ent['znacka'], TRUE);
     $I->assertEquals($ent['ikona'], 'AA');
 }
开发者ID:ifigenija,项目名称:server,代码行数:16,代码来源:VrstaZapisaCest.php


示例6: delete

 /**
  * @depends update
  */
 public function delete(ApiTester $I)
 {
     $I->wantTo('Delete a new Contact in com_contacts using DELETE');
     $I->amHttpAuthenticated('admin', 'admin');
     $I->sendDELETE('index.php' . '?option=contact' . '&api=Hal' . '&webserviceClient=administrator' . '&webserviceVersion=1.0.0' . "&id={$this->id}");
     $I->seeResponseCodeIs(200);
     $I->sendGET('index.php' . '?option=contact' . '&api=Hal' . '&webserviceClient=administrator' . '&webserviceVersion=1.0.0' . "&id={$this->id}");
     $I->seeResponseCodeIs(404);
     $I->seeResponseIsJson();
     $I->seeResponseContains('"message":"Item not found with given key.","code":404,"type":"Exception"');
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:14,代码来源:administrator.contact.1.0.0.Cest.php


示例7: deleteUser

 public function deleteUser(ApiTester $I, \Codeception\Scenario $scenario)
 {
     //$scenario->skip('ownCloud master is broken');
     $I->wantTo('delete the user');
     $I->amHttpAuthenticated('admin', 'admin');
     $I->haveHttpHeader('Content-Type', 'application/x-www-form-urlencoded');
     $I->sendDELETE($this->apiUrl . '/users/' . $this->userId);
     $I->seeResponseCodeIs(200);
     $I->seeResponseIsXml();
     $I->seeXmlResponseIncludes(XmlUtils::toXml(['status' => 'ok']));
 }
开发者ID:enoch85,项目名称:owncloud-testserver,代码行数:11,代码来源:OcsCreateUserCest.php


示例8: read

 /**
  * Preberem abonma
  * 
  * @param ApiTester $I
  * @depends create
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     codecept_debug($ent);
     $I->assertEquals($ent['stPredstav'], 5);
     $I->assertEquals($ent['stKuponov'], 55);
     $I->assertEquals($ent['ime'], 'zz');
     $I->assertEquals($ent['opis'], 'zz');
     $I->assertEquals($ent['kapaciteta'], 444);
     $I->assertEquals($ent['barva'], '#123456');
 }
开发者ID:ifigenija,项目名称:server,代码行数:17,代码来源:AbonmaCest.php


示例9: delete

 public function delete(ApiTester $I)
 {
     $I->wantTo('delete 1 contact in Joomla using SOAP');
     $I->amHttpAuthenticated('admin', 'admin');
     $I->sendSoapRequest('delete', ['id' => $this->id]);
     $I->seeSoapResponseIncludes("<result>true</result>");
     $I->sendSoapRequest('readItem', ['id' => $this->id]);
     $I->dontSeeSoapResponseIncludes("<name>{$this->name}</name>");
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:9,代码来源:administrator.contact.1.0.0.soap.Cest.php


示例10: deleteDiscussion

 public function deleteDiscussion(ApiTester $I)
 {
     $I->wantTo('delete a discussion via API');
     $user = $I->amAuthenticated();
     $user->groups()->attach(4);
     // Make the user a moderator
     $discussion = Factory::create('Flarum\\Core\\Models\\Discussion', ['start_user_id' => $user->id]);
     $I->sendDELETE($this->endpoint . '/' . $discussion->id);
     $I->seeResponseCodeIs(204);
     $I->seeResponseEquals('');
     $I->expect('the discussion was deleted in the database');
     $I->dontSeeRecord('discussions', ['id' => $discussion->id]);
 }
开发者ID:Qiang1234,项目名称:core,代码行数:13,代码来源:DiscussionsResourceCest.php


示例11: unknownDeviceSystemMessage

 public function unknownDeviceSystemMessage(ApiTester $I)
 {
     $I->am('sending a valid system message');
     $I->wantTo('confirm it is received and handled correctly');
     //Post the keyfob to the endpoint
     $I->sendPOST('/access-control/main-door', ['data' => ':unknown|unknown']);
     //The endpoint always returns 200
     $I->seeResponseCodeIs(200);
     //Confirm an access log record was created
     //$I->seeInDatabase('access_log', ['user_id'=>$user->id, 'key_fob_id'=>$keyFob->id, 'response'=>200, 'service'=>'main-door']);
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:11,代码来源:AccessControlCest.php


示例12: invalidTime

 public function invalidTime(ApiTester $I)
 {
     $I->am('an invalid device');
     $I->wantTo('verify the endpoint returns validation failures - invalid time');
     //Send a bad code to the endpoint
     $I->haveHttpHeader('Content-Type', 'application/json');
     $I->haveHttpHeader('Accept', 'application/json');
     $I->sendPOST('/acs', ['device' => 'main-door', 'tag' => 'ABCDEF123456', 'message' => 'boot', 'service' => 'entry', 'time' => 'abcdefgh']);
     $I->canSeeResponseCodeIs(422);
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:10,代码来源:ACSCest.php


示例13: read

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     codecept_debug($ent);
     $I->assertGuid($ent['id']);
     $I->assertEquals($ent['name'], 'TESTA');
     $I->assertEquals($ent['description'], 'to je A');
     $I->assertEquals($ent['builtIn'], false);
     //sam določi
 }
开发者ID:ifigenija,项目名称:server,代码行数:16,代码来源:PermissionCest.php


示例14: read

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     $I->assertNotEmpty($ent['id']);
     $I->assertEquals($ent['uprizoritev']['id'], $this->lookUprizoritev['id']);
     $I->assertEquals($ent['krajGostovanja'], 'zz');
     $I->assertEquals($ent['drzavaGostovanja'], $this->objDrzava1['id']);
     $I->assertEquals($ent['ustanova'], 'zz');
     $I->assertEquals($ent['datumGostovanja'], '2011-02-01T00:00:00+0100');
     $I->assertEquals($ent['ponoviInt'], 9);
     $I->assertEquals($ent['ponoviKoprInt'], 9);
     $I->assertEquals($ent['obiskInt'], 9);
     $I->assertEquals($ent['obiskKoprInt'], 9);
     $I->assertEquals($ent['zaproseno'], 9.119999999999999, "izračunano zaprošeno");
     $I->assertEquals($ent['celotnaVrednost'], 45.6);
     $I->assertEquals($ent['nasDelez'], 45.6);
     $I->assertEquals($ent['transportniStroski'], 9.119999999999999);
     $I->assertEquals($ent['dnevPrvZad'], 9.119999999999999);
     $I->assertEquals($ent['tantieme'], 9.119999999999999);
     $I->assertEquals($ent['materialni'], 9.119999999999999);
     $I->assertEquals($ent['avtorskePravice'], 0);
     $I->assertEquals($ent['avtorskiHonorarji'], 9.119999999999999);
     $I->assertEquals($ent['avtorskiHonorarjiSamoz'], 9.119999999999999);
     $I->assertEquals($ent['vlozekGostitelja'], 2.34);
     $I->assertEquals($ent['lastnaSredstva'], $ent['nasDelez'] - $ent['zaproseno'] - $ent['drugiJavni'] - $ent['vlozekGostitelja'], "lastna sredstva");
     $I->assertEquals($ent['celotnaVrednostMat'], 0);
     //        $I->assertEquals($ent['drugiViri'], 9.12);
     $I->assertEquals($ent['drugiJavni'], 9.119999999999999);
     $I->assertEquals($ent['dokument'], NULL);
     $I->assertEquals($ent['gostitelj']['id'], $this->lookPopa1['id']);
     $I->assertEquals($ent['sort'], 1);
     $I->assertEquals($ent['imaKoprodukcije'], TRUE);
 }
开发者ID:ifigenija,项目名称:server,代码行数:39,代码来源:ProgramGostovanjeCest.php


示例15: ApiTester

<?php

include 'version.php';
$I = new ApiTester($scenario);
$I->wantTo('fetch the version information for the web app');
$I->sendGET('version');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(["api_version" => $api_version, "app_version" => $app_version, "webapp_version" => $webapp_version]);
开发者ID:tom2320x,项目名称:list,代码行数:9,代码来源:GetVersionCept.php


示例16: read

 /**
  * Preberem zapis in preverim vsa polja
  * 
  * @depends create
  * @param ApiTester $I
  */
 public function read(\ApiTester $I)
 {
     $ent = $I->successfullyGet($this->restUrl, $this->obj1['id']);
     codecept_debug($ent);
     $I->assertGuid($ent['id']);
     $I->assertEquals($ent['celotnaVrednost'], 4.94, "celotna vrednost");
     $I->assertEquals($ent['nasDelez'], 4.94, "naš delež");
     $I->assertEquals($ent['zaproseno'], 0.66, "zaprošeno");
     $I->assertEquals($ent['avtorskiHonorarji'], 1.24);
     $I->assertEquals($ent['avtorskiHonorarjiSamoz'], 1.24);
     $I->assertEquals($ent['tantieme'], 1.22, "tantieme");
     $I->assertEquals($ent['materialni'], 1.24, "materialni");
     $I->assertEquals($ent['avtorskePravice'], 1.24);
     $I->assertEquals($ent['drugiJavni'], 1.24);
     $I->assertEquals($ent['vlozekGostitelja'], 0);
     $I->assertEquals($ent['lastnaSredstva'], $ent['nasDelez'] - $ent['zaproseno'] - $ent['drugiJavni'] - $ent['vlozekGostitelja'], " lastna sredstva (ni nejavnih virov)");
     //        $I->assertEquals($ent['vlozekGostitelja'],1.24);
     $I->assertEquals($ent['obiskDoma'], 1);
     $I->assertEquals($ent['obiskKopr'], 0);
     //        $I->assertEquals($ent['obiskGost'          ],1 );
     //        $I->assertEquals($ent['obiskZamejo'        ],1 );
     //        $I->assertEquals($ent['obiskInt'           ],1 );
     //        $I->assertEquals($ent['ponoviDoma'         ],1 );
     //        $I->assertEquals($ent['ponoviZamejo'       ],1 );
     //        $I->assertEquals($ent['ponoviGost'         ],1 );
     //        $I->assertEquals($ent['ponoviInt'          ],1 );
     $I->assertEquals($ent['uprizoritev']['id'], $this->lookUprizoritev['id']);
     $I->assertEquals($ent['tipProgramskeEnote'], $this->lookTipProgramskeEnote1['id']);
     $I->assertEquals($ent['kpe'], 0.4);
     $I->assertEquals($ent['dokument'], null);
     $I->assertEquals($ent['sort'], 1, "sort");
     $I->assertEquals($ent['stZaposUmet'], 1);
     $I->assertEquals($ent['stZaposDrug'], 1);
     $I->assertEquals($ent['stHonorarnihZun'], 1);
     $I->assertEquals($ent['stHonorarnihZunIgr'], 1);
     $I->assertEquals($ent['stHonorarnihZunIgrTujJZ'], 1, "honor. igralec tuj JZ");
     $I->assertEquals($ent['stHonorarnihZunSamoz'], 1, "samozaposlen igralec");
     // še pri koproducentu
     $ent = $I->successfullyGet($this->restUrl, $this->obj4['id']);
     codecept_debug($ent);
     $I->assertGuid($ent['id']);
     $I->assertEquals($ent['priKoproducentu'], true);
     $I->assertEquals($ent['obiskDoma'], 0);
     // ali forsiral na 0
     $I->assertEquals($ent['obiskKopr'], 123);
 }
开发者ID:ifigenija,项目名称:server,代码行数:52,代码来源:ProgramPremieraCest.php


示例17: ApiTester

<?php

$I = new ApiTester($scenario);
$I->wantTo('Test the database/export endpoint via GET');
$I->haveHttpHeader('X-PublicKey', '248512b6a66f365a4e42f10ed0c854844767b8ca8eb0f74589953991e9f233b6');
$I->haveHttpHeader('X-Hash', 'e651e0f6450f89d82ab0a34c1d421097a635897f5e719179e49263ff145e6ed9');
$I->sendGET('database/export');
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContainsJson(array('assets' => array(0 => array('AssetID' => '4b67517f4462a', 'GenericAssetID' => '12636', 'UMDNS' => '12636', 'AssetFullName' => 'Dash', 'ManufacturerID' => '4c44276c3c2c0', 'Model' => '4000 ', 'SerialNumber' => 'SD008484463GA', 'InternalIventoryNumber' => '01382928', 'LocationID' => '4b6b4f5120321', 'ResponsiblePers' => NULL, 'AssetStatusID' => '1', 'AssetUtilizationID' => '1', 'PurchaseDate' => NULL, 'InstallationDate' => NULL, 'Lifetime' => '10', 'PurchasePrice' => '131174', 'CurrentValue' => '104939', 'WarrantyContractID' => '1', 'AgentID' => '4c90677ca7db7', 'WarrantyContractExp' => NULL, 'WarrantyContractNotes' => NULL, 'EmployeeID' => '4cb6b8bbb9df6', 'SupplierID' => '4b595a7124c8b', 'DonorID' => '4c9066fc81b53', 'Notes' => NULL, 'Picture' => 'gen_images/12636.jpg', 'lastmodified' => '2010-02-05 01:47:18', 'by_user' => 'demo', 'URL_Manual' => NULL, 'MetrologyDocument' => NULL, 'MetrologyDate' => NULL, 'Metrology' => '0'))));
$I->seeResponseContainsJson(array('location' => array(0 => array('LocationID' => '4b6b4f5120321', 'FacilityID' => '11', 'DeptID' => '2', 'Roomnb' => '', 'Floor' => '', 'Building' => '', 'NotetoTech' => '-'))));
$I->seeResponseContainsJson(array('facilities' => array(0 => array('FacilityID' => '11', 'DistrictID' => '10001', 'FacilityName' => 'Central Hosptial'))));
$I->seeResponseContainsJson(array('facilities' => array(0 => array('FacilityID' => '11', 'DistrictID' => '10001', 'FacilityName' => 'Central Hosptial'))));
$I->seeResponseContainsJson(array('contacttype' => array(0 => array('ContactTypeID' => '1', 'ContactTypeName' => 'Manufacturer'))));
$I->seeResponseContainsJson(array('contact' => array(0 => array('ContactID' => '4ac3718e8d251', 'ContactTypeID' => '3', 'ContactName' => 'Nespecificat', 'ContactPersonName' => NULL, 'ContactTitle' => NULL, 'Address' => NULL, 'City' => NULL, 'PostalCode' => NULL, 'CountryID' => '99999', 'PhoneNumber' => NULL, 'FaxNumber' => NULL, 'Website' => '', 'Services' => NULL))));
$I->seeResponseContainsJson(array('donors' => array(0 => array('DonorID' => '0', 'ContactID' => '4ac3718e8d251'))));
$I->seeResponseContainsJson(array('agents' => array(0 => array('AgentID' => '0', 'ContactID' => '4ac3718e8d251'))));
$I->seeResponseContainsJson(array('suppliers' => array(0 => array('SupplierID' => '4b59581a8bb8f', 'ContactID' => '4b59581a8abf1'))));
$I->seeResponseContainsJson(array('manufactures' => array(0 => array('ManufacturerID' => '4b0be58d2806b', 'ContactID' => '4b0be58d2612c'))));
$I->seeResponseContainsJson(array('consumables' => array(0 => array('ConsumableID' => '1', 'Name' => 'Sensor debit', 'ManufacturerID' => '4c62506a58149', 'PartNumber' => '121', 'PackageQty' => '1', 'SupplierID' => '4c36d8223e3cf', 'UnitPrice' => '1', 'Notes' => '1', 'lastmodified' => '2012-01-17 14:15:11', 'by_user' => 'demo', 'TypeCons' => NULL))));
$I->seeResponseContainsJson(array('consumables_linked' => array(0 => array('Consumable_linkedID' => '1', 'ConsumableID' => '1', 'AssetID' => '4f154ff62df0e', 'AnnualConsumption' => '100', 'Notes' => 'Order 2 month before'))));
$I->seeResponseContainsJson(array('employees' => array(0 => array('EmployeeID' => '0', 'LoginID' => '3', 'FirstName' => 'admin', 'LastName' => 'admin', 'Position' => NULL, 'TechnicianYN' => '1', 'LocationID' => '4b0be83d5d1d7', 'WorkPhone' => NULL, 'HandPhone' => NULL, 'Email' => NULL, 'Fax' => NULL, 'Accesslevel' => ' AND (facilities.FacilityID=12)'))));
$I->seeResponseContainsJson(array('department' => array(3 => array('DeptID' => '4', 'DepartmentDesc' => 'Allergology'))));
$I->seeResponseContainsJson(array('essential_equipment' => array(0 => array('EssentialEquipmentID' => '1', 'FacilityID' => '11', 'GenericAssetID' => '10134', 'MinimalQuantity' => '2', 'Notes' => NULL))));
$I->seeResponseContainsJson(array('assetgenericname' => array(0 => array('GenericAssetID' => '10134', 'GenericAssetCode' => '10134', 'GenericAssetName' => 'Anaesthesia Units', 'AssetCategoryID' => '5', 'GenericPicture' => 'gen_images/10134.jpg'))));
$I->seeResponseContainsJson(array('assetutilization' => array(0 => array('AssetUtilizationID' => '1', 'AssetUtilizationDesc' => 'Normal'))));
$I->seeResponseContainsJson(array('assetstatus' => array(0 => array('AssetStatusID' => '1', 'AssetStatusDesc' => 'Fully functional'))));
$I->seeResponseContainsJson(array('assetcategory' => array(0 => array('AssetCategoryID' => '1', 'AssetCategoryNr' => '1', 'AssetCategoryName' => 'Dental'))));
$I->seeResponseContainsJson(array('intervention' => array(0 => array('IntervID' => '532c5b53aab95', 'Date' => '2014-03-21', 'EmployeeID' => '4d64045c4a525', 'AssetStatusID' => '1', 'AssetID_Visit' => '4b67517f4462a', 'Request_id' => '52fddba460044', 'FaildPart' => 'Cable', 'FailurCategID' => '2', 'FailureCauseID' => '0', 'Interv_desc' => 'Description Intervention', 'Interv_desc_eg' => '', 'Comments' => 'Comments', 'RespEng' => '4c8fcac9f06fa', 'TotalWork' => '0', 'TotalCosts' => '0', 'lastmodified' => '2014-03-21 16:59:22', 'by_user' => 'demo'))));
$I->seeResponseContainsJson(array('request' => array(0 => array('Request_id' => '52fddba460044', 'Request_date' => '2014-02-14', 'Request_desc' => 'Repair', 'Request_desc_eg' => 'Repair', 'AssetID' => '4b67517f4462a', 'Request_st_id' => '1', 'Request_contact_name' => 'Agata Correia', 'Request_note' => 'Notes', 'lastmodified' => '2014-02-14 10:02:53', 'by_user' => 'demo', 'VisiTpID' => '1'))));
$I->seeResponseContainsJson(array('request_st' => array(0 => array('Request_st_id' => '1', 'Request_st_desc' => 'Open'))));
开发者ID:Rudianasaja,项目名称:openMEDIS-Slim-PHP-REST-API,代码行数:31,代码来源:DatabaseExportCept.php


示例18: str_repeat

<?php

Yii::$app->redis->executeCommand('FLUSHDB');
use Codeception\Util\Debug;
$model = new \app\models\Message();
$model->author_email = '[email protected]';
$model->author_name = 'test';
$model->message = str_repeat('A', 140);
$model->save();
$I = new ApiTester($scenario);
$I->wantTo('Ver a lista de mensagens');
$I->sendGET('messages', []);
$I->seeResponseIsJson();
$I->seeResponseJsonMatchesJsonPath('$[0].author_name');
$I->seeResponseJsonMatchesJsonPath('$[0].author_email');
$I->seeResponseJsonMatchesJsonPath('$[0].message');
$I->seeResponseJsonMatchesJsonPath('$[0].id');
$I->seeResponseJsonMatchesJsonPath('$[0].creation_time');
开发者ID:jsopra,项目名称:lepetitmessager,代码行数:18,代码来源:ListCept.php


示例19: testTestUsersCreation

 public function testTestUsersCreation(ApiTester $I)
 {
     $I->wantTo('make sure my test users have been created');
     $I->amHttpAuthenticated('admin', 'admin');
     $I->sendGET($this->baseUrl . '/users/' . $this->userId);
     $I->seeResponseCodeIs(200);
     $I->seeResponseIsXml();
     $I->seeXmlResponseIncludes(XmlUtils::toXml(['status' => 'ok']));
     $I->sendGET($this->baseUrl . '/users/' . $this->sharerUserId);
     $I->seeResponseCodeIs(200);
     $I->seeResponseIsXml();
     $I->seeXmlResponseIncludes(XmlUtils::toXml(['status' => 'ok']));
 }
开发者ID:patman15,项目名称:galleryplus,代码行数:13,代码来源:CheckTestUsersCest.php


示例20: ApiTester

<?php

$I = new ApiTester($scenario);
$I->wantTo('Get user with not exists id');
$I->sendGET('users/500000000');
$I->seeResponseCodeIs(404);
$I->seeResponseIsJson();
$I->haveHttpHeader('Content-Type', 'application/json');
开发者ID:noikiy,项目名称:owl,代码行数:8,代码来源:UsersGetNotFoundCept.php



注:本文中的ApiTester类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Api_Object_Core类代码示例发布时间:2022-05-23
下一篇:
PHP ApiTestCase类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap