Example #1
0
 /**
  * tests factory and make methods
  */
 public function testFactoryAndMake()
 {
     $TestFactory = Model::factory(self::$table1);
     foreach (self::$expected_field as $v) {
         $this->assertObjectHasAttribute($v, $TestFactory);
     }
     // test non-existant table
     $NoTable = Model::make('table_does_not_exist');
     $this->assertEquals(null, $NoTable->pk());
 }