TestClass
class TestClass extends Producer
Testklasse
Mit Hilfe dieser Klasse lässt sich das Template für einen UnitTest erstellen, der bereits alle Methoden und auch einige Funktionen enthält.
$source = new \Alvine\Development\Upkeep\Source $source;
$testclass = new \Alvine\Development\Upkeep\Producer\TestClass($source);
echo (string)$testclass;
Properties
protected ClassStructure | $structure | from Producer | |
protected string | $description | from Producer | |
protected MailAddress | $author | from Producer | |
protected string | $license | from Producer | |
protected string | $category | from Producer | |
protected string | $className | ||
protected Array | $classProperty | ||
protected string | $getterTemplate | ||
protected string | $setterTemplate | ||
protected string | $namespace | ||
protected ClassStructure | $testStructure |
Methods
Namensraum
Klassenname
Setup-Methode in die Struktur einhängen
Test erstellen
Quelltext als Zeichenkette
Details
at line 86
__construct(Source $source)
Neue Klasse anlegen
in Producer at line 88
protected Producer
initDefaultTags()
Standardwerte für die Tags
Diese Methode kann von abgeleiteten Klassen überschrieben werden.
in Producer at line 103
Producer
initStructure(Source $source)
Initialisierung der Struktur
Initialisiert die Klasse mit Werten aus einer Quelldatei
in Producer at line 114
setDescription(string $description)
Beschreibung
in Producer at line 124
setAuthor(MailAddress $author)
Autor
in Producer at line 134
setLicense(string $license)
Lizenz
in Producer at line 144
setCategory(string $category)
Kategory
at line 112
string
getNamespace()
Namensraum
at line 121
string
getClassName()
Klassenname
at line 130
protected TestClass
createSetup()
Setup-Methode in die Struktur einhängen
at line 158
protected string
getCodeForSetMethod(Method $method)
Quelltext
Liefert Quelltext für Setter
at line 171
protected string
getCodeForGetMethod(Method $method)
Quelltext
Liefert Quelltext für Getter
at line 184
protected string
getCodeForIsMethod(Method $method)
Quelltext
Liefert Quelltext für Boolean-Methoden
at line 202
protected string
getCodeForDefaultMethod(Method $method)
Quelltext
Liefert Quelltext für Standardtests
at line 286
protected TestClass
createTests()
Test erstellen
at line 304
TestClass
initDefaultTest(Source $source)
Test initialisieren
Initialisierung eines Tests mit einer bestehenden Version des Tests.
at line 316
Source
getSource()
Quelltext erstellen
at line 337
string
__toString()
Quelltext als Zeichenkette