Esempio n. 1
0
 static function create($levels)
 {
     $schema = new VF_Schema();
     $schema->getReadAdapter()->insert('elite_schema', array('key' => 'levels', 'value' => $levels));
     $schema->setId($schema->getReadAdapter()->lastInsertId());
     $schemaGenerator = new VF_Schema_Generator();
     $schemaGenerator->execute(explode(',', $levels), false, $schema->id());
     return $schema;
 }
 function testShouldDefaultToMasterSchema()
 {
     $this->schemaGenerator()->execute(array('make', 'model', 'year'));
     $schema = new VF_Schema();
     $this->assertEquals(1, $schema->id(), 'schema should default to master schema represented by ID=1');
 }