summaryrefslogtreecommitdiff
path: root/scripts/create-random-projects.php
blob: 5cab1a25e648d8aadc71f6376e4d3ae7f49f8ba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
}