|
@@ 1098-1107 (lines=10) @@
|
| 1095 |
|
|
| 1096 |
|
EOT; |
| 1097 |
|
|
| 1098 |
|
public function testGetUpdatedItemSourceContentForClassManager() |
| 1099 |
|
{ |
| 1100 |
|
$classManager = $this->prepareClassManager(); |
| 1101 |
|
$existingClassReflection = $this->getReflectionClass($classManager); |
| 1102 |
|
$existingFileContent = $this->getContentFile($existingClassReflection->getFileName()); |
| 1103 |
|
|
| 1104 |
|
$this->assertEquals($this->classContentBeforeUpdate, $existingFileContent); |
| 1105 |
|
$updatedContent = $this->getStructureResolver()->getUpdatedItemSourceContent($existingFileContent, $classManager, $existingClassReflection); |
| 1106 |
|
$this->assertEquals($this->classContentAfterUpdate, $updatedContent); |
| 1107 |
|
} |
| 1108 |
|
|
| 1109 |
|
public function testGetUpdatedItemSourceContentForInterfaceManager() |
| 1110 |
|
{ |
|
@@ 1109-1119 (lines=11) @@
|
| 1106 |
|
$this->assertEquals($this->classContentAfterUpdate, $updatedContent); |
| 1107 |
|
} |
| 1108 |
|
|
| 1109 |
|
public function testGetUpdatedItemSourceContentForInterfaceManager() |
| 1110 |
|
{ |
| 1111 |
|
$classManager = $this->prepareClassManager(); |
| 1112 |
|
$interfaceManager = $classManager->getInterface(); |
| 1113 |
|
$existingClassReflection = $this->getReflectionClass($interfaceManager); |
| 1114 |
|
$existingFileContent = $this->getContentFile($existingClassReflection->getFileName()); |
| 1115 |
|
|
| 1116 |
|
$this->assertEquals($this->interfaceContentBeforeUpdate, $existingFileContent); |
| 1117 |
|
$updatedContent = $this->getStructureResolver()->getUpdatedItemSourceContent($existingFileContent, $interfaceManager, $existingClassReflection); |
| 1118 |
|
$this->assertEquals($this->interfaceContentAfterUpdate, $updatedContent); |
| 1119 |
|
} |
| 1120 |
|
|
| 1121 |
|
public function testGetUpdatedItemSourceContentForTestClassManager() |
| 1122 |
|
{ |
|
@@ 1121-1132 (lines=12) @@
|
| 1118 |
|
$this->assertEquals($this->interfaceContentAfterUpdate, $updatedContent); |
| 1119 |
|
} |
| 1120 |
|
|
| 1121 |
|
public function testGetUpdatedItemSourceContentForTestClassManager() |
| 1122 |
|
{ |
| 1123 |
|
$classManager = $this->prepareClassManager(); |
| 1124 |
|
$testClassManager = $classManager->getTestClass(); |
| 1125 |
|
|
| 1126 |
|
$existingClassReflection = $this->getReflectionClass(UserTestDummy::class); |
| 1127 |
|
$existingFileContent = $this->getContentFile($existingClassReflection->getFileName()); |
| 1128 |
|
|
| 1129 |
|
$this->assertEquals($this->testClassContentBeforeUpdate, $existingFileContent); |
| 1130 |
|
$updatedContent = $this->getStructureResolver()->getUpdatedItemSourceContent($existingFileContent, $testClassManager, $existingClassReflection); |
| 1131 |
|
$this->assertEquals($this->testClassContentAfterUpdate, $updatedContent); |
| 1132 |
|
} |
| 1133 |
|
|
| 1134 |
|
/** |
| 1135 |
|
* Prepare correct ClassManager |