예제 #1
0
 public function testTable()
 {
     AetherORM::$_config = $this->config;
     $scheme = new AetherORMScheme('foo', $this->schemeResult);
     $resource = $scheme->getObject();
     $db = 'd';
     $tbl = 'foo';
     $table = new AetherORMTable($resource, $db, $tbl);
     // Forced count, fails because loaded without configinfo
     $cnt = $table->count();
     $this->assertGreaterThan(1, $cnt);
 }
예제 #2
0
 public function testLoadWithoutConfig()
 {
     $worked = true;
     // Need to force it to be false
     AetherORM::$_config = false;
     try {
         $db = AetherORM::init();
     } catch (Exception $e) {
         $worked = false;
     }
     if ($worked) {
         $this->fail("Load without config file did not throw exception");
     }
 }
예제 #3
0
 public function setUp()
 {
     $basePath = preg_replace('/aether-orm\\/tests([\\/a-z]*)/', 'aether-orm/', dirname(__FILE__));
     $this->config = $basePath . "config.php";
     AetherORM::$_config = $this->config;
 }