activitypub-php/test/bootstrap.php

21 lines
506 B
PHP
Raw Normal View History

2019-02-14 03:27:47 +00:00
<?php /** @noinspection PhpUnhandledExceptionInspection */
2018-11-24 03:25:56 +00:00
namespace ActivityPub\Test;
use ActivityPub\ActivityPub;
use ActivityPub\Config\ActivityPubConfig;
$dbPath = dirname( __FILE__ ) . '/../db.sqlite';
if ( file_exists( $dbPath ) ) {
unlink( $dbPath );
}
$config = ActivityPubConfig::createBuilder()
->setDbConnectionParams( array(
'driver' => 'pdo_sqlite',
'path' => $dbPath,
) )
->build();
$activityPub = new ActivityPub( $config );
$activityPub->updateSchema();