Ejemplo n.º 1
0
 public function testGetTableName()
 {
     $this->assertEquals('extended_data_objects', ExtendedDataObject::getTableName());
 }
Ejemplo n.º 2
0
 public function testDeleteAllSoft()
 {
     $objects = [];
     $object = new ExtendedDataObject();
     $objects[] = $object->setId('123');
     $object = new ExtendedDataObject();
     $objects[] = $object->setId('234');
     $this->queryHelper->expects($this->any())->method('getDbColumns')->willReturn(['isDeleted' => false]);
     $this->queryHelper->expects($this->once())->method('massUpdate')->with($object->getTableName(), ['isDeleted' => 1], ['id' => ['123', '234']]);
     $repo = $this->getRepository();
     $repo->deleteAll($objects);
     $this->assertTrue($object->isDeleted());
 }