1
0
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:
Marco
2016-06-07 19:01:56 +02:00
parent 00dc8c3158
commit bebd3efce2
3 changed files with 28 additions and 2 deletions

5
.gitignore vendored
View File

@@ -1 +1,6 @@
# IntelliJ
.idea/
# Composer
vendor/
composer.phar

21
composer.lock generated Normal file
View 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": []
}

View File

@@ -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);