onBeforeWrite() public method

public onBeforeWrite ( )
コード例 #1
0
 public function testSetCreateProjectFolderFieldFolderExists()
 {
     $this->assertFalse(file_exists($this->envPath . '/' . $this->project->Name), 'project folder shouldnt exist prior to save');
     $this->project->CreateEnvFolder = true;
     $this->project->onBeforeWrite();
     $fields = new FieldList();
     $fields->push(new TextField('Name'));
     $this->project->setCreateProjectFolderField($fields);
     $this->assertNull($fields->fieldByName('CreateEnvFolderNotice'));
     $this->assertNull($fields->fieldByName('CreateEnvFolder'));
 }