Skip to content

Commit

Permalink
Merge pull request #17 from nguyenanhung/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
nguyenanhung authored Nov 7, 2018
2 parents 997ca0e + 9ff405e commit bbde729
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 77 deletions.
4 changes: 2 additions & 2 deletions src/Interfaces/ProjectInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
interface ProjectInterface
{
const VERSION = '0.1.3.11';
const LAST_MODIFIED = '2018-10-18';
const VERSION = '0.1.3.12';
const LAST_MODIFIED = '2018-11-07';
const MIN_PHP_VERSION = '5.3';
const GET = 'GET';
const HEAD = 'HEAD';
Expand Down
36 changes: 18 additions & 18 deletions tests/test_helper_debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@
'email' => '[email protected]'
];
// Call
$debug = new Debug();
$debug->setDebugStatus(TRUE);
$debug->setLoggerPath($logPath);
$debug->setLoggerSubPath($logSubPath);
$debug->setLoggerFilename($logFilename);
$Debug = new Debug();
$Debug->setDebugStatus(TRUE);
$Debug->setLoggerPath($logPath);
$Debug->setLoggerSubPath($logSubPath);
$Debug->setLoggerFilename($logFilename);

echo "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
echo "\n getVersion: " . $debug->getVersion() . "\n";
echo "\n setDebugStatus: " . $debug->getDebugStatus() . "\n";
echo "\n setLoggerPath: " . $debug->getLoggerPath() . "\n";
echo "\n setLoggerSubPath: " . $debug->getLoggerSubPath() . "\n";
echo "\n setLoggerFilename: " . $debug->getLoggerFilename() . "\n";
echo "\n getVersion: " . $Debug->getVersion() . "\n";
echo "\n setDebugStatus: " . $Debug->getDebugStatus() . "\n";
echo "\n setLoggerPath: " . $Debug->getLoggerPath() . "\n";
echo "\n setLoggerSubPath: " . $Debug->getLoggerSubPath() . "\n";
echo "\n setLoggerFilename: " . $Debug->getLoggerFilename() . "\n";
echo "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";

d($debug->debug($name, $msg . ' - DEBUG', $context));
d($debug->info($name, $msg . ' - INFO', $context));
d($debug->notice($name, $msg . ' - NOTICE', $context));
d($debug->warning($name, $msg . ' - WARNING', $context));
d($debug->error($name, $msg . ' - ERROR', $context));
d($debug->critical($name, $msg . ' - CRITICAL', $context));
d($debug->alert($name, $msg . ' - ALERT', $context));
d($debug->emergency($name, $msg . ' - EMERGENCY', $context));
d($Debug->debug($name, $msg . ' - DEBUG', $context));
d($Debug->info($name, $msg . ' - INFO', $context));
d($Debug->notice($name, $msg . ' - NOTICE', $context));
d($Debug->warning($name, $msg . ' - WARNING', $context));
d($Debug->error($name, $msg . ' - ERROR', $context));
d($Debug->critical($name, $msg . ' - CRITICAL', $context));
d($Debug->alert($name, $msg . ' - ALERT', $context));
d($Debug->emergency($name, $msg . ' - EMERGENCY', $context));

38 changes: 0 additions & 38 deletions tests/tests.php

This file was deleted.

16 changes: 8 additions & 8 deletions tests/tests_get_contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
];
$method = 'GET';
// Let's Go
$content = new GetContents();
$content->setURL($url);
$content->setMethod($method);
$content->setData($data);
$content->sendRequest();
$GetContents = new GetContents();
$GetContents->setURL($url);
$GetContents->setMethod($method);
$GetContents->setData($data);
$GetContents->sendRequest();

$response = $content->response();
$getContent = $content->getContent();
$getError = $content->getError();
$response = $GetContents->response();
$getContent = $GetContents->getContent();
$getError = $GetContents->getError();

d($response);
d($getContent);
Expand Down
22 changes: 11 additions & 11 deletions tests/tests_send_requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
$method = 'GET';
$headers = [];
$options = [];
$request = new MyRequests();
$request->debugStatus = TRUE;
$request->debugLoggerPath = testLogPath();
$request->__construct();
$request->setHeader($headers);
$request->setOptions($options);
$MyRequests = new MyRequests();
$MyRequests->debugStatus = TRUE;
$MyRequests->debugLoggerPath = testLogPath();
$MyRequests->__construct();
$MyRequests->setHeader($headers);
$MyRequests->setOptions($options);

$pyRequest = $request->pyRequest($url, $data, $method);
$pyRequest = $MyRequests->pyRequest($url, $data, $method);
d($pyRequest);

$guzzlePhpRequest = $request->guzzlePhpRequest($url, $data, $method);
$guzzlePhpRequest = $MyRequests->guzzlePhpRequest($url, $data, $method);
d($guzzlePhpRequest);

$curlRequest = $request->curlRequest($url, $data, $method);
$curlRequest = $MyRequests->curlRequest($url, $data, $method);
d($curlRequest);

$sendRequest = $request->sendRequest($url, $data, $method);
d($sendRequest);
$sendRequest = $MyRequests->sendRequest($url, $data, $method);
d($sendRequest);

0 comments on commit bbde729

Please sign in to comment.