PHP 트레잇 Crud\TestSuite\Traits\CrudTestTrait

Licensed under The MIT License For full copyright and license information, please see the LICENSE.txt
파일 보기 프로젝트 열기: friendsofcake/crud

보호된 프로퍼티들

프로퍼티 타입 설명
$_subject Crud\Event\Subject Reference to the final CRUD event subject after full event cycle

공개 메소드들

메소드 설명
_subscribeToEvents ( Controller $controller = null ) : void Subscribe to Crud.beforeRender and Crud.beforeRedirect events
assertEvents ( array $expected, array | null $actual = null ) : void Assert these CRUD events was emitted during the life cycle
getModel ( string $class, mixed $methods, string $alias, string $table ) : Table Get a "model" (Table) instance

메소드 상세

_subscribeToEvents() 공개 메소드

This is the two 'final' emitted events after a CRUD life cycle, and thus will hold the final object It's stored in the $this->_subject property
public _subscribeToEvents ( Controller $controller = null ) : void
$controller Cake\Controller\Controller Controller
리턴 void

assertEvents() 공개 메소드

The $expected list do not need to prefix events with Crud. - this is done automatically before comparison
public assertEvents ( array $expected, array | null $actual = null ) : void
$expected array An array of CRUD events we expected to be fired
$actual array | null Can be an Event class, Crud subject or array with event names
리턴 void

getModel() 공개 메소드

Get a "model" (Table) instance
public getModel ( string $class, mixed $methods, string $alias, string $table ) : Table
$class string Full table class name
$methods mixed Methods to mock
$alias string Table alias / name
$table string Table name in the database
리턴 Cake\ORM\Table

프로퍼티 상세

$_subject 보호되어 있는 프로퍼티

Reference to the final CRUD event subject after full event cycle
protected Subject,Crud\Event $_subject
리턴 Crud\Event\Subject