added tests
This commit is contained in:
20
phpunit.php
20
phpunit.php
@@ -1,5 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Glmdev\Meta\Meta;
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
/*
|
||||
* Prepare the db connection (spoofing that shit)
|
||||
*/
|
||||
$capsule = new Capsule;
|
||||
$capsule->addConnection([
|
||||
'driver' => 'sqlite',
|
||||
'database' => ':memory:',
|
||||
]);
|
||||
$capsule->setAsGlobal();
|
||||
$capsule->bootEloquent();
|
||||
$capsule->schema()->dropIfExists('metas');
|
||||
$capsule->schema()->create('metas', function (Blueprint $table) {
|
||||
$table->timestamps();
|
||||
Meta::formTable($table);
|
||||
});
|
||||
Reference in New Issue
Block a user