/**
  * @test
  */
 public function shouldCreateModelWithDefaultMapping()
 {
     //when
     $testModel = new TestModel(array('fields' => array('field1')));
     //then
     $this->assertEquals('id', $testModel->getIdName());
     $this->assertEquals('test_models', $testModel->getTableName());
     $this->assertEquals('test_models_id_seq', $testModel->getSequenceName());
 }
Beispiel #2
0
 /**
  * @covers Model::getTableName
  */
 public function testGetTableName()
 {
     $this->assertEquals('test_model', TestModel::getTableName());
 }