diff options
Diffstat (limited to 'scripts/create-random-projects.php')
-rwxr-xr-x | scripts/create-random-projects.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/create-random-projects.php b/scripts/create-random-projects.php new file mode 100755 index 00000000..5cab1a25 --- /dev/null +++ b/scripts/create-random-projects.php @@ -0,0 +1,18 @@ +#!/usr/bin/env php +<?php + +require __DIR__.'/../app/common.php'; + +use Model\Project; +use Model\ProjectPermission; + +$projectModel = new Project($container); +$permissionModel = new ProjectPermission($container); + +for ($i = 0; $i < 100; $i++) { + $id = $projectModel->create(array( + 'name' => 'Project #'.$i + )); + + $permissionModel->allowUser($id, 1); +} |