|
@@ 23-28 (lines=6) @@
|
| 20 |
|
/** |
| 21 |
|
* |
| 22 |
|
*/ |
| 23 |
|
public function testOnBeforeWriteShouldNotCreateCapFolder() { |
| 24 |
|
$this->assertTrue(file_exists($this->envPath)); |
| 25 |
|
$this->assertFalse(file_exists($this->envPath.'/testproject')); |
| 26 |
|
$this->project->onBeforeWrite(); |
| 27 |
|
$this->assertFalse(file_exists($this->envPath.'/testproject'), 'Folder should not have been created'); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function testOnBeforeWriteShouldCreateCapFolder() { |
| 31 |
|
$this->assertTrue(file_exists($this->envPath)); |
|
@@ 30-36 (lines=7) @@
|
| 27 |
|
$this->assertFalse(file_exists($this->envPath.'/testproject'), 'Folder should not have been created'); |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function testOnBeforeWriteShouldCreateCapFolder() { |
| 31 |
|
$this->assertTrue(file_exists($this->envPath)); |
| 32 |
|
$this->assertFalse(file_exists($this->envPath.'/testproject')); |
| 33 |
|
$this->project->CreateEnvFolder = true; |
| 34 |
|
$this->project->onBeforeWrite(); |
| 35 |
|
$this->assertTrue(file_exists($this->envPath.'/testproject'), 'Folder should have been created'); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
public function testSetCreateProjectFolderFieldNoFolderExists() { |
| 39 |
|
$fields = new FieldList(); |