|
@@ 103-124 (lines=22) @@
|
| 100 |
|
$this->assertCount(0, $errors, 'errori durante la generazione'); |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
public function testGenerateDDDOnVfsBadEventsSpecific() |
| 104 |
|
{ |
| 105 |
|
$directoryOutput = self::$directoryV->url().'/output'; |
| 106 |
|
$directorySrcGen = self::$directoryV->url().'/src-gen-bad-event'; |
| 107 |
|
$resourcesDir = __DIR__.'/../Resources'; |
| 108 |
|
if (!file_exists($directoryOutput)) { |
| 109 |
|
mkdir($directoryOutput, 0700, true); |
| 110 |
|
} |
| 111 |
|
if (!file_exists($directorySrcGen)) { |
| 112 |
|
mkdir($directorySrcGen, 0700, true); |
| 113 |
|
} |
| 114 |
|
$data = file_get_contents($resourcesDir.'/ddd/badEvents.yml'); |
| 115 |
|
file_put_contents($directoryOutput.'/test.yml', $data); |
| 116 |
|
|
| 117 |
|
$dddg = new DDDGenerator(); |
| 118 |
|
$dddg->setLogger($this->logger); |
| 119 |
|
$dddg->analyze($directoryOutput.'/test.yml'); |
| 120 |
|
$dddg->generate(new VfsAdapter($directorySrcGen)); |
| 121 |
|
|
| 122 |
|
$errors = $dddg->getErrors(); |
| 123 |
|
$this->assertCount(1, $errors, 'errori non previsti durante la generazione'); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
public function testGenerateDDDOnVfsBad() |
| 127 |
|
{ |
|
@@ 126-147 (lines=22) @@
|
| 123 |
|
$this->assertCount(1, $errors, 'errori non previsti durante la generazione'); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
public function testGenerateDDDOnVfsBad() |
| 127 |
|
{ |
| 128 |
|
$directoryOutput = self::$directoryV->url().'/output'; |
| 129 |
|
$directorySrcGen = self::$directoryV->url().'/src-gen-bad-event'; |
| 130 |
|
$resourcesDir = __DIR__.'/../Resources'; |
| 131 |
|
if (!file_exists($directoryOutput)) { |
| 132 |
|
mkdir($directoryOutput, 0700, true); |
| 133 |
|
} |
| 134 |
|
if (!file_exists($directorySrcGen)) { |
| 135 |
|
mkdir($directorySrcGen, 0700, true); |
| 136 |
|
} |
| 137 |
|
$data = file_get_contents($resourcesDir.'/ddd/bad.yml'); |
| 138 |
|
file_put_contents($directoryOutput.'/test.yml', $data); |
| 139 |
|
|
| 140 |
|
$dddg = new DDDGenerator(); |
| 141 |
|
$dddg->setLogger($this->logger); |
| 142 |
|
$dddg->analyze($directoryOutput.'/test.yml'); |
| 143 |
|
$dddg->generate(new VfsAdapter($directorySrcGen)); |
| 144 |
|
|
| 145 |
|
$errors = $dddg->getErrors(); |
| 146 |
|
$this->assertCount(1, $errors, 'errori non previsti durante la generazione'); |
| 147 |
|
} |
| 148 |
|
|
| 149 |
|
public function testGenerateDDDOnVfsBadDefinition() |
| 150 |
|
{ |
|
@@ 149-170 (lines=22) @@
|
| 146 |
|
$this->assertCount(1, $errors, 'errori non previsti durante la generazione'); |
| 147 |
|
} |
| 148 |
|
|
| 149 |
|
public function testGenerateDDDOnVfsBadDefinition() |
| 150 |
|
{ |
| 151 |
|
$directoryOutput = self::$directoryV->url().'/output'; |
| 152 |
|
$directorySrcGen = self::$directoryV->url().'/src-gen-bad-event'; |
| 153 |
|
$resourcesDir = __DIR__.'/../Resources'; |
| 154 |
|
if (!file_exists($directoryOutput)) { |
| 155 |
|
mkdir($directoryOutput, 0700, true); |
| 156 |
|
} |
| 157 |
|
if (!file_exists($directorySrcGen)) { |
| 158 |
|
mkdir($directorySrcGen, 0700, true); |
| 159 |
|
} |
| 160 |
|
$data = file_get_contents($resourcesDir.'/ddd/badDefinition.yml'); |
| 161 |
|
file_put_contents($directoryOutput.'/test.yml', $data); |
| 162 |
|
|
| 163 |
|
$dddg = new DDDGenerator(); |
| 164 |
|
$dddg->setLogger($this->logger); |
| 165 |
|
$dddg->analyze($directoryOutput.'/test.yml'); |
| 166 |
|
$dddg->generate(new VfsAdapter($directorySrcGen)); |
| 167 |
|
|
| 168 |
|
$errors = $dddg->getErrors(); |
| 169 |
|
$this->assertCount(1, $errors, 'errori non previsti durante la generazione'); |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
public function testGenerateDDDOnVfsEventsSpecific() |
| 173 |
|
{ |