Skip to content

Commit 416db7e

Browse files
committed
[#143] Move data/test-data.inc.php to a sample location, add it to .gitignore, and update README
1 parent 5de2af9 commit 416db7e

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/data/suppress_uids.txt
1313
/data/hr_tree.xml
1414
/data/faculty_education.csv
15+
/data/test-data.inc.php
1516
/data/unl_sis_bio.txt
1617
/data/unl_sis_prog.txt
1718
/node_modules/

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@ php scripts/import_sis_data.php
7474

7575
Note: this needs to be ran at least once a day to keep the data in the cache
7676

77+
## Sample User (Optional)
78+
79+
The idea is to simulate a person record that doesn't exist in the official identity system.
80+
81+
Reasons to do this:
82+
- So there is a permanent person (that won't quit or retire) for another system to use for testing.
83+
- As a test/development record for possible schema changes or to see how different data affects output.
84+
- As an Easter egg.
85+
86+
To enable and use the sample user:
87+
To use:
88+
1) Copy /data/test-data.inc_sample.php to /data/test-data.inc.php and edit if desired.
89+
2) Make sure the include of /data/test-data.inc.php and the setting of UNL_Peoplefinder::$sampleUID are uncommented in config.inc.php
90+
91+
7792
## INSTALL
7893

7994
1) Run: 'npm install; grunt; composer install'

data/test-data.inc.php data/test-data.inc_sample.php

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
/**
4+
* To use:
5+
* Copy this file to /data/test-data.inc.php
6+
* Make sure the lines related to this file and UNL_Peoplefinder::$sampleUID are uncommented in config.inc.php
7+
*/
8+
39
/**
410
* Sample of the result of the query in UNL_Peoplefinder_Driver_OracleDB->fixLDAPEntries()
511
* Simulates the result for one person: hhusker1

www/config-sample.inc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@
4646
UNL_Peoplefinder::$testDomains = array('directory-test.unl.edu', 'localhost');
4747

4848
// Sample user ID
49-
UNL_Peoplefinder::$sampleUID = 'hhusker1';
50-
include_once __DIR__ . '/../data/test-data.inc.php';
49+
//UNL_Peoplefinder::$sampleUID = 'hhusker1';
50+
//include_once __DIR__ . '/../data/test-data.inc.php';

0 commit comments

Comments
 (0)