public function getTableContext($tableObject, $table, $name) { $associations = $this->getAssociations($tableObject); $this->applyAssociations($tableObject, $associations); $primaryKey = $this->getPrimaryKey($tableObject); $displayField = $this->getDisplayField($tableObject); $propertySchema = $this->getEntityPropertySchema($tableObject); $fields = $this->getFields(); $validation = $this->getValidation($tableObject, $associations); $rulesChecker = $this->getRules($tableObject, $associations); $behaviors = $this->getBehaviors($tableObject); $connection = $this->connection; $hidden = $this->getHiddenFields($tableObject); return compact('associations', 'primaryKey', 'displayField', 'table', 'propertySchema', 'fields', 'validation', 'rulesChecker', 'behaviors', 'connection', 'hidden'); }
/** * Compare bake table result with static comparison file * * @return void */ protected function _compareBakeTableResult($name, $comparisonFile) { $table = $this->Task->getTable($name); $tableObject = $this->Task->getTableObject($name, $table); $data = $this->Task->getTableContext($tableObject, $table, $name); $result = $this->Task->bakeTable($tableObject, $data); $this->assertSameAsFile($comparisonFile . '.php', $result); }