-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.php
More file actions
27 lines (23 loc) · 798 Bytes
/
Copy pathtest.php
File metadata and controls
27 lines (23 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
// Just a test file. Uses the TestObjects defined in base.
require_once('framework/common.php');
$testControl = Factory::getTestControl();
$testGroupControl = Factory::getTestGroupControl();
$testGroup = $testGroupControl->makeNew();
$testGroup->TestGroupName = 'Group #' . rand(0, 65535);
$testGroup->DateCreated = time();
$id = $testGroup->save();
for ($i = 0; $i < rand(1, 20); $i++) {
$test = $testControl->makeNew();
$test->TestGroupID = $id;
$test->TestName = 'Test #' . rand(0, 65535);
$test->save();
}
$testControl->retrieve();
while ($test = $testControl->getNext()) {
$testGroup = $test->getRelation("TestGroupID");
echo "{$test->TestName} ({$testGroup->TestGroupName})<br>";
}
$errors = &CoreFactory::getErrorControl();
echo $errors->getErrorHtml(0);
?>