<commit_before><?php
/**
 * File: ticket_test.php
 * Project: zk-smiley
 **/

//Require the main configuration
require_once('inc/config.php');

//Require the FreshDesk API Library
require_once('inc/FreshdeskRest.php');

//Require Smiley Library
require_once('inc/lib.php');

//Connect to MySQL
mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
@mysql_select_db(DB_NAME) or die("Unable to select database");

//Create New FreshDesk API Object
$fd = new FreshdeskRest(FD_URL, FD_API_USER, FD_API_PASS);

if ( $fd->getLastHttpStatus() != 200 ) {
	echo "Unable to connect to FreshDesk";
}

//Check for Rate Limiting
if ( $fd->getLastHttpResponseText() == "You have exceeded the limit of requests per hour" ) {
	echo "*ERROR* API LIMIT REACHED\n";
}

//Returns 300 tickets from Closed View
$tickets = theTickets($fd, CLOSED_VIEW);
print_r($tickets);

//This is a ticket that doesn't exist
echo theLoop($fd, 40000, 10000) . "\n";

//This is a ticket that exists with no Survey
echo theLoop($fd, 32000, 10000) . "\n";

//This is a ticket that exists with a survey
echo theLoop($fd, 23195, 10000) . "\n";

//Test the Lower Limit Ticket
echo lowerLimitTicket() . "\n";

//Test the Lower Limit Survey
echo lowerLimitSurvey() . "\n";

//Test the Upper Limit of Tickets
echo upperLimit($fd, 1) . "\n";<commit_msg>updated tests changes to lib<commit_after><?php
/**
 * File: ticket_test.php
 * Project: zk-smiley
 **/

//Require the main configuration
require_once('inc/config.php');

//Require the FreshDesk API Library
require_once('inc/FreshdeskRest.php');

//Require Smiley Library
require_once('inc/lib.php');

//Connect to MySQL
mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
@mysql_select_db(DB_NAME) or die("Unable to select database");

//Create New FreshDesk API Object
$fd = new FreshdeskRest(FD_URL, FD_API_USER, FD_API_PASS);

if ( $fd->getLastHttpStatus() != 200 ) {
	echo "Unable to connect to FreshDesk";
}

//Check for Rate Limiting
if ( $fd->getLastHttpResponseText() == "You have exceeded the limit of requests per hour" ) {
	echo "*ERROR* API LIMIT REACHED\n";
}

//Returns 300 tickets from Closed View
$tickets = theTickets($fd, CLOSED_VIEW);
print_r($tickets);

//This is a ticket that doesn't exist
echo theLoop($fd, 40000) . "\n";

//This is a ticket that exists with no Survey
echo theLoop($fd, 32000) . "\n";

//This is a ticket that exists with a survey
echo theLoop($fd, 23195) . "\n";
{'fraction_non_alphanumeric': 0.13862212943632568, 'fraction_numerical': 0.024217118997912318, 'mean_word_length': 4.52073732718894, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1304314', 'n_tokens_mistral': 868, 'n_tokens_neox': 803, 'n_words': 268}