Derive mode from DSN function
- Add headers in all files - Minor field name changes
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
||||
* @license MIT
|
||||
* @see https://github.com/Zaid-Ajaj/ThrowawayDb The origin concept
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Test\Integration\SQLite;
|
||||
|
||||
use BitBadger\PDODocument\{AutoId, Configuration, Definition, Document, DocumentException, Mode};
|
||||
use BitBadger\PDODocument\{AutoId, Configuration, Definition, Document, DocumentException};
|
||||
use Random\RandomException;
|
||||
use Test\Integration\{SubDocument, TestDocument};
|
||||
|
||||
@@ -12,7 +19,7 @@ use Test\Integration\{SubDocument, TestDocument};
|
||||
class ThrowawayDb
|
||||
{
|
||||
/** @var string The table used for document manipulation */
|
||||
public const TABLE = "test_table";
|
||||
public const TABLE = 'test_table';
|
||||
|
||||
/**
|
||||
* Create a throwaway SQLite database
|
||||
@@ -24,8 +31,7 @@ class ThrowawayDb
|
||||
public static function create(bool $withData = true): string
|
||||
{
|
||||
$fileName = sprintf('throwaway-%s.db', AutoId::generateRandom(10));
|
||||
Configuration::$pdoDSN = "sqlite:./$fileName";
|
||||
Configuration::$mode = Mode::SQLite;
|
||||
Configuration::useDSN("sqlite:./$fileName");
|
||||
Configuration::resetPDO();
|
||||
|
||||
if ($withData) {
|
||||
|
||||
Reference in New Issue
Block a user