Search

Phalcon

Installation

If you use Codeception installed using composer, install this module with the following command:

composer require --dev codeception/module-phalcon

Alternatively, you can enable Phalcon module in suite configuration file and run

codecept init upgrade4

This module was bundled with Codeception 2 and 3, but since version 4 it is necessary to install it separately.
Some modules are bundled with PHAR files.
Warning. Using PHAR file and composer in the same project can cause unexpected errors.

Description

This module provides integration with Phalcon framework (3.x). Please try it and leave your feedback.

Demo Project

https://github.com/Codeception/phalcon-demo

Status

Config

The following configurations are required for this module:

  • bootstrap: string, default app/config/bootstrap.php - relative path to app.php config file
  • cleanup: boolean, default true - all database queries will be run in a transaction, which will be rolled back at the end of each test
  • savepoints: boolean, default true - use savepoints to emulate nested transactions

The application bootstrap file must return Application object but not call its handle() method.

API

  • di - Phalcon\Di\Injectable instance
  • client - BrowserKit client

Parts

By default all available methods are loaded, but you can specify parts to select only needed actions and avoid conflicts.

  • orm - include only haveRecord/grabRecord/seeRecord/dontSeeRecord actions.
  • services - allows to use grabServiceFromContainer and addServiceToContainer