예제 #1
0
 public function setUp()
 {
     $this->_introspector = new SkylarK\Fizz\Util\Introspect();
     // 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("Example");
 }
예제 #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);
     }
     // Create a new table for each test
     $object = new SkylarK\Fizz\Util\FizzMigrate("Example");
     $object->addField("key", "int(11)");
     $object->commit();
 }
예제 #3
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());
 }