Ejemplo n.º 1
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $tableRows = TableRowsProvider::provideTableRows();
     $rm = self::createDefaultRecordManager();
     self::$recordGenerator = self::saveTableRows($rm, $tableRows);
 }
Ejemplo n.º 2
0
 protected function setUp()
 {
     parent::setUp();
     $tableRows = TableRowsProvider::provideTableRows();
     $rm = self::createDefaultRecordManager();
     $this->recordGenerator = self::saveTableRows($rm, $tableRows);
 }
Ejemplo n.º 3
0
 protected function setUp()
 {
     parent::setUp();
     $this->schemaDefinition = (include FIXTURE_DIR . '/schema.php');
     $this->schema = new Schema($this->schemaDefinition);
     $this->schema->setValidationEnabled(true);
 }
Ejemplo n.º 4
0
 protected function setUp()
 {
     parent::setUp();
     $this->rm = self::createDefaultRecordManager();
     $table = $this->rm->getTable('user');
     $coll = new RecordCollection($table);
     $this->userColl = $coll;
 }
Ejemplo n.º 5
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     $databases = self::getDatabases();
     foreach ($databases as $database) {
         $rm = self::createRecordManager($database);
         $userIds = self::saveUserRecords($rm);
         self::$userIds[$rm->getConnection()->getDsn()] = $userIds;
     }
 }
Ejemplo n.º 6
0
 public function setUp()
 {
     $tableName = 'user';
     parent::setUp();
     // table instance is always the same
     $this->table = self::createDefaultRecordManager()->getTable($tableName);
     // repository instance is always the same, too, and therefore is must be cleared in setUp()
     $this->repository = $this->table->getRepository();
     $this->repository->clear();
     $this->assertEquals($tableName, $this->repository->getTable()->getTableName());
 }
 protected function tearDown()
 {
     if ($this->storedRecord) {
         $this->rm->scheduleDelete($this->storedRecord);
     }
     if ($this->relatedRecord) {
         $this->rm->scheduleDelete($this->relatedRecord);
     }
     $this->rm->commit();
     parent::tearDown();
 }
Ejemplo n.º 8
0
 protected function tearDown()
 {
     parent::tearDown();
     foreach ($this->revertTableForDbSchemas as $table => $conn) {
         $driver = $conn->getDriver();
         $dropMigration = $driver->createSchemaMigration($conn, $table, Migration::DROP_TABLE);
         $dropMigration->execute();
         $createMigration = $driver->createSchemaMigration($conn, $table, Migration::CREATE_TABLE);
         $createMigration->importFromSchema(self::getSchema());
         $createMigration->execute();
     }
 }
Ejemplo n.º 9
0
 protected function setUp()
 {
     parent::setUp();
     $this->rm = self::createDefaultRecordManager();
 }
Ejemplo n.º 10
0
 protected function setUp()
 {
     parent::setUp();
     self::$rm->clearTables();
 }
Ejemplo n.º 11
0
 protected function tearDown()
 {
     parent::tearDown();
     $this->rm->clearTables();
 }
Ejemplo n.º 12
0
 protected function setUp()
 {
     parent::setUp();
     $this->generator = new FieldValuesGenerator();
 }
Ejemplo n.º 13
0
 protected function setUp()
 {
     parent::setUp();
     $this->rm = self::createDefaultRecordManager();
     $this->table = $this->rm->getTable('user');
 }
Ejemplo n.º 14
0
 protected function setUp()
 {
     parent::setUp();
     $this->logger = new SqlLogger();
 }
Ejemplo n.º 15
0
 protected function setUp()
 {
     parent::setUp();
     $this->timestampable = new TimestampableBehavior();
 }
Ejemplo n.º 16
0
 protected function setUp()
 {
     parent::setUp();
     $this->modelGenerator = $this->createModelGenerator();
 }
Ejemplo n.º 17
0
 public function setUp()
 {
     parent::setUp();
     $this->rm = self::createDefaultRecordManager(self::$schemaDefinition);
 }
Ejemplo n.º 18
0
<?php

/** @var $loader \Composer\Autoload\ClassLoader */
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/TestSuite/ClassLoader.php';
define('FIXTURE_DIR', __DIR__ . '/fixtures');
use Dive\TestSuite\TestCase;
echo 'PHP.version=' . PHP_VERSION . "\n";
$classLoader = new Dive\TestSuite\ClassLoader();
$classLoader->setNamespace('Dive\\TestSuite', __DIR__ . '/TestSuite');
$classLoader->setNamespaceOmission('Dive\\TestSuite');
$classLoader->register();
$databases = TestCase::getDatabases();
foreach ($databases as $database) {
    $conn = TestCase::createDatabaseConnection($database);
    $platform = $conn->getDriver()->getPlatform();
    echo get_class($platform) . '.version=' . $conn->querySingleScalar($platform->getVersionSql()) . "\n";
    $conn->disconnect();
}