PHP code example of visavi / codeception-phpixie

1. Go to this page and download the library: Download visavi/codeception-phpixie library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

visavi / codeception-phpixie example snippets


$user = $I->haveRecord('user', ['name' => 'phpixie']);

$I->seeRecord('user', ['name' => 'phpixie']);

$I->dontSeeRecord('user', ['name' => 'trixie']);

$record = $I->grabRecord('user', ['name' => 'phpixie']);

$I->deleteRecord('user', ['id' => $user->id]);

$I->startTransaction();

$I->stopTransaction();

$data = [
    'login'    => 'phpixie',
    'password' => 'password',
    'name'     => 'trixie',
];

$entity = $I->haveRecord('user', $data);

$I->seeRecord('user', ['id' => $entity->id]);

$I->wantTo('Test user page');
$I->amOnPage('/user/' . $entity->login);
$I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
$I->seeInSource('trixie');

$this->tester->methodName();