コード例 #1
0
 /** @test */
 public function it_can_save_entities()
 {
     $entity = new EntityStub();
     $entity->getConnection()->shouldReceive('transaction')->once();
     $entity->getConnection()->shouldReceive('rollBack')->once();
     $entity->getConnection()->shouldReceive('commit')->once();
     $entity->getConnection()->getQueryGrammar()->shouldReceive('getDateFormat')->once();
     $entity->getConnection()->getQueryGrammar()->shouldReceive('compileInsertGetId')->once();
     $entity->getConnection()->getPostProcessor()->shouldReceive('processInsertGetId')->once();
     $entity->save();
 }