mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-13 01:28:40 +00:00
Better empty test generation
This commit is contained in:
parent
2053c7ba5d
commit
6a90e88727
|
|
@ -59,7 +59,7 @@ foreach ($files as $file) {
|
||||||
if(!file_exists(dirname($testPAth))) {
|
if(!file_exists(dirname($testPAth))) {
|
||||||
mkdir(dirname($testPath), 0777, true);
|
mkdir(dirname($testPath), 0777, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents($testPath,
|
file_put_contents($testPath,
|
||||||
'<?php' . PHP_EOL
|
'<?php' . PHP_EOL
|
||||||
. '/**' . PHP_EOL
|
. '/**' . PHP_EOL
|
||||||
|
|
@ -85,6 +85,10 @@ foreach ($files as $file) {
|
||||||
. '' . PHP_EOL
|
. '' . PHP_EOL
|
||||||
. 'class ' . $classname . ' extends \PHPUnit_Framework_TestCase' . PHP_EOL
|
. 'class ' . $classname . ' extends \PHPUnit_Framework_TestCase' . PHP_EOL
|
||||||
. '{' . PHP_EOL
|
. '{' . PHP_EOL
|
||||||
|
. ' public function testPlaceholder()' . PHP_EOL
|
||||||
|
. ' {' . PHP_EOL
|
||||||
|
. ' self::markTestIncomplete();' . PHP_EOL
|
||||||
|
. ' }' . PHP_EOL
|
||||||
. '}' . PHP_EOL
|
. '}' . PHP_EOL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +120,10 @@ foreach ($files as $file) {
|
||||||
if (!file_exists($testPath)) {
|
if (!file_exists($testPath)) {
|
||||||
$name = explode('/', $split[0]);
|
$name = explode('/', $split[0]);
|
||||||
|
|
||||||
mkdir(dirname($testPath), 0777, true);
|
if(!file_exists(dirname($testPath))) {
|
||||||
|
mkdir(dirname($testPath), 0777, true);
|
||||||
|
}
|
||||||
|
|
||||||
file_put_contents($testPath,
|
file_put_contents($testPath,
|
||||||
'describe(\'' . $name[count($name) - 1] . 'Test\', function ()' . PHP_EOL
|
'describe(\'' . $name[count($name) - 1] . 'Test\', function ()' . PHP_EOL
|
||||||
. '{' . PHP_EOL
|
. '{' . PHP_EOL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user