HEX
Server: LiteSpeed
System: Linux premium260.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: aliazzsr (627)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/aliazzsr/api.crm.vqode.com/tests/api/InfluencerCreateCept.php
<?php 
$I = new ApiTester($scenario);

$I->wantTo('create new influencer type');

$I->login();

$I->comment('creating a new influencer successfully');
$faker = \Faker\Factory::create();
$influencerData = [
    'name' => $faker->text,
    'description' => $faker->text,
];
$I->sendPOST('influencers', $influencerData);
$I->seeResponseCodeIs(\Codeception\Util\HttpCode::CREATED);
$I->seeResponseIsJson();
$I->seeResponseContainsJson($influencerData);
$I->seeResponseJsonMatchesJsonPath('$.id');
$I->seeInDatabase('influencer', $influencerData);