mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-30 21:00:13 +02:00
Use Composer autoloader for tests as well
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,6 @@
|
||||
# IntelliJ
|
||||
.idea/
|
||||
|
||||
# Composer
|
||||
vendor/
|
||||
composer.phar
|
||||
|
21
composer.lock
generated
Normal file
21
composer.lock
generated
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "839d92eeb39e32dd86e49a1ae7da1028",
|
||||
"content-hash": "470ef7155ec3094dd7625e69e1fc11c4",
|
||||
"packages": [],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.5.0",
|
||||
"ext-openssl": "*"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
@@ -27,11 +27,11 @@ ini_set('assert.exception', 1);
|
||||
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
$db = new PDO('mysql:dbname=php_auth;host=127.0.0.1;charset=utf8mb4', 'root', '');
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
require __DIR__.'/../src/Auth.php';
|
||||
|
||||
$auth = new \Delight\Auth\Auth($db);
|
||||
|
||||
$result = processRequestData($auth);
|
||||
|
Reference in New Issue
Block a user