Пример #1
0
 public static function getDataSet()
 {
     if (self::$dataSet !== null) {
         return self::$dataSet;
     }
     $version = \Fusio\Impl\Database\Installer::getLatestVersion();
     $dataSet = array_merge_recursive($version->getInstallInserts(), self::getTestInserts());
     return self::$dataSet = new \PHPUnit_Extensions_Database_DataSet_ArrayDataSet($dataSet);
 }
Пример #2
0
<?php

require __DIR__ . '/../vendor/autoload.php';
PSX\Framework\Test\Environment::setup(__DIR__ . '/..', function ($fromSchema) {
    $version = \Fusio\Impl\Database\Installer::getLatestVersion();
    $schema = $version->getSchema();
    Fusio\Impl\Tests\TestSchema::appendSchema($schema);
    return $schema;
});