Ejemplo n.º 1
0
 public function testSaveUsersVardefs()
 {
     global $dictionary;
     $dynamicField = new DynamicField('Users');
     VardefManager::loadVardef('Users', 'User');
     $dynamicField->saveToVardef('Users', $dictionary['User']['fields']);
     //Test that we have refreshed the Employees vardef
     $this->assertTrue(file_exists('cache/modules/Employees/Employeevardefs.php'), 'cache/modules/Employees/Emloyeevardefs.php file not created');
     //Test that status is not set to be required
     $this->assertFalse($dictionary['Employee']['fields']['status']['required'], 'status field set to required');
     //Test that the studio attribute is set to false for status field
     $this->assertFalse($dictionary['Employee']['fields']['status']['studio'], 'status field studio not set to false');
 }