PHP Classes

File: TestCases/AuthTests.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid (Sharma)   PHP Microservices Framework   TestCases/AuthTests.php   Download  
File: TestCases/AuthTests.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Microservices Framework
Setup microservices apps with configuration arrays
Author: By
Last change: Parameterized Param
Date: 1 month ago
Size: 4,847 bytes
 

Contents

Class file image Download
<?php

/**
 * TestCases
 * php version 8.3
 *
 * @category TestCases
 * @package Microservices
 * @author Ramesh N Jangid <[email protected]>
 * @copyright 2025 Ramesh N Jangid
 * @license MIT https://opensource.org/license/mit
 * @link https://github.com/polygoncoin/Microservices
 * @since Class available since Release 1.0.0
 */

namespace Microservices\TestCases;

if (!
defined('GET')) {
   
define('GET', __DIR__ . DIRECTORY_SEPARATOR . 'GET');
   
define('POST', __DIR__ . DIRECTORY_SEPARATOR . 'POST');
   
define('PUT', __DIR__ . DIRECTORY_SEPARATOR . 'PUT');
   
define('PATCH', __DIR__ . DIRECTORY_SEPARATOR . 'PATCH');
   
define('DELETE', __DIR__ . DIRECTORY_SEPARATOR . 'DELETE');
}

// $apiVersion = 'X-API-Version: v1.0.0';
$cacheControl = 'Cache-Control: no-cache';
// $contentType = 'Content-Type: application/x-www-form-urlencoded; charset=utf-8';
// $contentType = 'Content-Type: multipart/form-data; charset=utf-8';
$contentType = 'Content-Type: text/plain; charset=utf-8';

$curlFile = __DIR__ . '/category.csv';

$defaultHeaders = [];
// $defaultHeaders[] = $apiVersion;
$defaultHeaders[] = $cacheControl;

$response = [];

$homeURL = 'http://api.client001.localhost/Microservices/public_html/index.php';

$response[] = include GET . DIRECTORY_SEPARATOR . 'Reload.php';

$payload = [
   
'username' => 'client_1_group_1_user_1',
   
'password' => 'shames11'
];
$response[] = include POST . DIRECTORY_SEPARATOR . 'Login.php';

$response[] = include GET . DIRECTORY_SEPARATOR . 'Routes.php';

$response[] = include POST . DIRECTORY_SEPARATOR . 'Config.php';
$response[] = include POST . DIRECTORY_SEPARATOR . 'Category.php';
$response[] = include POST . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include POST . DIRECTORY_SEPARATOR . 'Address.php';
$response[] = include POST . DIRECTORY_SEPARATOR . 'RegistrationWithAddress.php';

$response[] = include GET . DIRECTORY_SEPARATOR . 'Category.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'CategorySingle.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'CategoryOrderBy.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'RegistrationSingle.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'AddressSingle.php';
$response[] = include GET . DIRECTORY_SEPARATOR .
   
'RegistrationWithAddressSingle.php';

$response[] = include PUT . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include PUT . DIRECTORY_SEPARATOR . 'Address.php';

$response[] = include PATCH . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include PATCH . DIRECTORY_SEPARATOR . 'Address.php';

$response[] = include DELETE . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include DELETE . DIRECTORY_SEPARATOR . 'Address.php';

$response[] = include POST . DIRECTORY_SEPARATOR . 'CategoryConfig.php';

// Admin login
$payload = [
   
'username' => 'client_1_admin_1',
   
'password' => 'shames11'
];
$response[] = include POST . DIRECTORY_SEPARATOR . 'Login.php';

$response[] = include GET . DIRECTORY_SEPARATOR . 'Routes.php';

$response[] = include DELETE . DIRECTORY_SEPARATOR . 'CategoryTruncate.php';

$response[] = include POST . DIRECTORY_SEPARATOR . 'Category.php';
$response[] = include POST . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include POST . DIRECTORY_SEPARATOR . 'Address.php';
$response[] = include POST . DIRECTORY_SEPARATOR . 'RegistrationWithAddress.php';

$response[] = include GET . DIRECTORY_SEPARATOR . 'Category.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'CategorySingle.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'CategoryOrderBy.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'RegistrationSingle.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'Address.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'AddressSingle.php';
$response[] = include GET . DIRECTORY_SEPARATOR . 'RegistrationWithAddress.php';
$response[] = include GET . DIRECTORY_SEPARATOR .
   
'RegistrationWithAddressSingle.php';

$response[] = include PUT . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include PUT . DIRECTORY_SEPARATOR . 'Address.php';
$response[] = include PUT . DIRECTORY_SEPARATOR . 'RegistrationWithAddress.php';

$response[] = include PATCH . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include PATCH . DIRECTORY_SEPARATOR . 'Address.php';
$response[] = include PATCH . DIRECTORY_SEPARATOR . 'RegistrationWithAddress.php';

$response[] = include DELETE . DIRECTORY_SEPARATOR . 'Registration.php';
$response[] = include DELETE . DIRECTORY_SEPARATOR . 'Address.php';
$response[] = include DELETE . DIRECTORY_SEPARATOR . 'RegistrationWithAddress.php';

$response[] = include POST . DIRECTORY_SEPARATOR . 'CategoryConfig.php';

return
$response;