TestHelper

Extends \PHPUnit_Framework_TestCase

Methods

Import all helpers etc.

importAll() : void

getSgqa

getSgqa(string $title, int $surveyId) : array

Arguments

$title

string

$surveyId

int

Response

array

Get survey options for imported survey.

getSurveyOptions(int $surveyId) : array

Arguments

$surveyId

int

Response

array

activateSurvey

activateSurvey(int $surveyId) : void

Arguments

$surveyId

int

deactivateSurvey

deactivateSurvey(int $surveyId) : void

Arguments

$surveyId

int

Overwrite the db component with a new configuration and database.

connectToNewDatabase(string $databaseName) : boolean

Before you run this, you might want to save the old db config in a variable, so you can reconnect to it after you're done with the new database. $config = require(\Yii::app()->getBasePath() . '/config/config.php');

Arguments

$databaseName

string

Response

boolean

True at success.