3 # FILE: MetadataSchema--Test.php
5 # Part of the Collection Workflow Integration System (CWIS)
6 # Copyright 2002-2013 Edward Almasy and Internet Scout Research Group
7 # http://scout.wisc.edu/cwis
10 PageTitle(
"Metadata Schema Unit Test");
13 # ----- EXPORTED FUNCTIONS ---------------------------------------------------
15 # ----- LOCAL FUNCTIONS ------------------------------------------------------
19 $Fields = $Schema->GetFields();
20 foreach ($Fields as $Field)
22 printf(
"Id: %d<br>\n", $Field->Id());
23 printf(
"Name: %s<br>\n", $Field->Name());
24 printf(
"Type: %s<br>\n", $Field->Type());
30 print(
"<br>Creating schema...<br>");
33 print(
"<br>Listing fields...<br>");
36 print(
"<br>Adding field...<br>");
40 print(
"<br>Listing fields...<br>");
43 print(
"<br>Dropping field...<br>");
44 $Field = $Schema->GetFieldByName(
"TestFieldOne");
45 $Schema->DropField($Field->Id());
46 $Field = $Schema->GetFieldByName(
"TestFieldTwo");
47 $Schema->DropField($Field->Id());
49 print(
"<br>Listing fields...<br>");
54 # ----- MAIN -----------------------------------------------------------------