public function boot()
 {
     if (!Type::hasType('branch_logo')) {
         Type::addType('branch_logo', 'Diamante\\DeskBundle\\Infrastructure\\Persistence\\Doctrine\\DBAL\\Types\\BranchLogoType');
     }
     if (!Type::hasType('priority')) {
         Type::addType('priority', 'Diamante\\DeskBundle\\Infrastructure\\Persistence\\Doctrine\\DBAL\\Types\\TicketPriorityType');
     }
     if (!Type::hasType('file')) {
         Type::addType('file', 'Diamante\\DeskBundle\\Infrastructure\\Persistence\\Doctrine\\DBAL\\Types\\AttachmentFileType');
     }
     if (!Type::hasType('status')) {
         Type::addType('status', 'Diamante\\DeskBundle\\Infrastructure\\Persistence\\Doctrine\\DBAL\\Types\\TicketStatusType');
     }
     if (!Type::hasType('source')) {
         Type::addType('source', 'Diamante\\DeskBundle\\Infrastructure\\Persistence\\Doctrine\\DBAL\\Types\\TicketSourceType');
     }
     if (!Type::hasType('ticket_sequence_number')) {
         Type::addType('ticket_sequence_number', 'Diamante\\DeskBundle\\Infrastructure\\Persistence\\Doctrine\\DBAL\\Types\\TicketSequenceNumberType');
     }
     if (!Type::hasType('ticket_unique_id')) {
         Type::addType('ticket_unique_id', 'Diamante\\DeskBundle\\Infrastructure\\Persistence\\Doctrine\\DBAL\\Types\\TicketUniqueIdType');
     }
     foreach ($this->dataAuditTypes as $type) {
         if (!AuditFieldTypeRegistry::hasType($type)) {
             AuditFieldTypeRegistry::addType($type, $type);
         }
     }
     $em = $this->container->get('doctrine.orm.default_entity_manager');
     $conn = $em->getConnection();
     $conn->getDatabasePlatform()->registerDoctrineTypeMapping('FILE', 'string');
 }
 public function testAuditFieldTypeRegistry()
 {
     $this->assertFalse(AuditFieldTypeRegistry::hasType('newtype'));
     AuditFieldTypeRegistry::addType('newtype', 'newtype_');
     $this->assertTrue(AuditFieldTypeRegistry::hasType('newtype'));
     $this->assertEquals('newtype_', AuditFieldTypeRegistry::getAuditType('newtype'));
     AuditFieldTypeRegistry::overrideType('newtype', 'overridentype');
     $this->assertEquals('overridentype', AuditFieldTypeRegistry::getAuditType('newtype'));
     AuditFieldTypeRegistry::removeType('newtype');
     $this->assertFalse(AuditFieldTypeRegistry::hasType('newtype'));
 }
 public function setUp()
 {
     AuditFieldTypeRegistry::addType('testingtype', 'testingtype');
 }