public static function setUpBeforeClass() { parent::setUpBeforeClass(); $tableRows = TableRowsProvider::provideTableRows(); $rm = self::createDefaultRecordManager(); self::$recordGenerator = self::saveTableRows($rm, $tableRows); }
protected function setUp() { parent::setUp(); $tableRows = TableRowsProvider::provideTableRows(); $rm = self::createDefaultRecordManager(); $this->recordGenerator = self::saveTableRows($rm, $tableRows); }
protected function setUp() { parent::setUp(); $this->schemaDefinition = (include FIXTURE_DIR . '/schema.php'); $this->schema = new Schema($this->schemaDefinition); $this->schema->setValidationEnabled(true); }
protected function setUp() { parent::setUp(); $this->rm = self::createDefaultRecordManager(); $table = $this->rm->getTable('user'); $coll = new RecordCollection($table); $this->userColl = $coll; }
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; } }
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(); }
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(); } }
protected function setUp() { parent::setUp(); $this->rm = self::createDefaultRecordManager(); }
protected function setUp() { parent::setUp(); self::$rm->clearTables(); }
protected function tearDown() { parent::tearDown(); $this->rm->clearTables(); }
protected function setUp() { parent::setUp(); $this->generator = new FieldValuesGenerator(); }
protected function setUp() { parent::setUp(); $this->rm = self::createDefaultRecordManager(); $this->table = $this->rm->getTable('user'); }
protected function setUp() { parent::setUp(); $this->logger = new SqlLogger(); }
protected function setUp() { parent::setUp(); $this->timestampable = new TimestampableBehavior(); }
protected function setUp() { parent::setUp(); $this->modelGenerator = $this->createModelGenerator(); }
public function setUp() { parent::setUp(); $this->rm = self::createDefaultRecordManager(self::$schemaDefinition); }
<?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(); }