Ejemplo n.º 1
0
 public function setUp()
 {
     // Although it seems horribly inefficient, it ensures each test is clean
     // and fresh. It's for tests, so accuracy > efficiency
     try {
         SkylarK\Fizz\FizzConfig::setDB("mysql:dbname=testdb;host=127.0.0.1", "travis", "");
     } catch (PDOException $e) {
         die($e->getMessage());
         exit(0);
     }
     // Create a new table for each test
     $object = new SkylarK\Fizz\Util\FizzMigrate("Example");
     $object->addField("key", "int(11)");
     $object->commit();
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     // Although it seems horribly inefficient, it ensures each test is clean
     // and fresh. It's for tests, so accuracy > efficiency
     try {
         SkylarK\Fizz\FizzConfig::setDB("mysql:dbname=testdb;host=127.0.0.1", "travis", "");
     } catch (PDOException $e) {
         die($e->getMessage());
         exit(0);
     }
     // Drop each test's table
     SkylarK\Fizz\Util\FizzOps::drop("Demo");
     // Create table
     $object = new SkylarK\Fizz\Util\FizzMigrate("Demo");
     $object->addField("key", "varchar(125)");
     $object->addField("value", "text");
     $this->assertTrue($object->commit());
 }
Ejemplo n.º 3
0
 public function __construct($tableName, $errorMode = 0)
 {
     parent::__construct($tableName, self::$ERROR_MODE_PRINT);
 }