PHP 클래스 yii\test\InitDbFixture

Its main task is to toggle integrity check of the database during data loading. This is needed by other DB-related fixtures (e.g. ActiveFixture) so that they can populate data into the database without triggering integrity check errors. Besides, DbFixture also attempts to load an [[initScript|initialization script]] if it exists. You should normally use InitDbFixture to prepare a skeleton test database. Other DB fixtures will then add specific tables and data to this database. For more details and usage information on InitDbFixture, see the guide article on fixtures.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends DbFixture
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$initScript the init script file that should be executed when loading this fixture. This should be either a file path or path alias. Note that if the file does not exist, no error will be raised.
$schemas list of database schemas that the test tables may reside in. Defaults to [''], meaning using the default schema (an empty string refers to the default schema). This property is mainly used when turning on and off integrity checks so that fixture data can be populated into the database without causing problem.

공개 메소드들

메소드 설명
afterLoad ( )
afterUnload ( )
beforeLoad ( )
beforeUnload ( )
checkIntegrity ( boolean $check ) Toggles the DB integrity check.
load ( )

메소드 상세

afterLoad() 공개 메소드

public afterLoad ( )

afterUnload() 공개 메소드

public afterUnload ( )

beforeLoad() 공개 메소드

public beforeLoad ( )

beforeUnload() 공개 메소드

public beforeUnload ( )

checkIntegrity() 공개 메소드

Toggles the DB integrity check.
public checkIntegrity ( boolean $check )
$check boolean whether to turn on or off the integrity check.

load() 공개 메소드

public load ( )

프로퍼티 상세

$initScript 공개적으로 프로퍼티

the init script file that should be executed when loading this fixture. This should be either a file path or path alias. Note that if the file does not exist, no error will be raised.
public $initScript

$schemas 공개적으로 프로퍼티

list of database schemas that the test tables may reside in. Defaults to [''], meaning using the default schema (an empty string refers to the default schema). This property is mainly used when turning on and off integrity checks so that fixture data can be populated into the database without causing problem.
public $schemas