mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
formatting
This commit is contained in:
parent
e4f9bb4cc3
commit
59feb76a49
@ -44,15 +44,15 @@ class FTPageTypeCreatorTask extends BuildTask
|
|||||||
$count = $request->getVar('count') ?: 20;
|
$count = $request->getVar('count') ?: 20;
|
||||||
$module = ModuleLoader::getModule('silverstripe/frameworktest');
|
$module = ModuleLoader::getModule('silverstripe/frameworktest');
|
||||||
$testPageDir = $module->getPath() . '/code/test-pages';
|
$testPageDir = $module->getPath() . '/code/test-pages';
|
||||||
if(!$this->fs->exists($testPageDir)) {
|
if (!$this->fs->exists($testPageDir)) {
|
||||||
throw new RuntimeException("Test page directory $testPageDir does not exist!");
|
throw new RuntimeException("Test page directory $testPageDir does not exist!");
|
||||||
}
|
}
|
||||||
|
|
||||||
$pageTypes = $this->getExistingClassNames($testPageDir);
|
$pageTypes = $this->getExistingClassNames($testPageDir);
|
||||||
$created = 0;
|
$created = 0;
|
||||||
while($created < $count) {
|
while ($created < $count) {
|
||||||
$className = null;
|
$className = null;
|
||||||
while(
|
while (
|
||||||
!$className ||
|
!$className ||
|
||||||
in_array($className, $pageTypes) ||
|
in_array($className, $pageTypes) ||
|
||||||
class_exists(basename($className, 'php'))
|
class_exists(basename($className, 'php'))
|
||||||
|
Loading…
Reference in New Issue
Block a user