aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text_reparser/base_test.php
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2017-11-23 16:25:48 +0100
committerJoshyPHP <s9e.dev@gmail.com>2017-11-23 16:25:48 +0100
commita7664811dd3696e17a78fd98fec49f9beaf4579d (patch)
tree85fac45e7205bba7e3b40a648cfd9fc5d74382df /tests/text_reparser/base_test.php
parent0517e43dff37fdc64167d0853cfc7ee0b77007b5 (diff)
downloadforums-a7664811dd3696e17a78fd98fec49f9beaf4579d.tar
forums-a7664811dd3696e17a78fd98fec49f9beaf4579d.tar.gz
forums-a7664811dd3696e17a78fd98fec49f9beaf4579d.tar.bz2
forums-a7664811dd3696e17a78fd98fec49f9beaf4579d.tar.xz
forums-a7664811dd3696e17a78fd98fec49f9beaf4579d.zip
[ticket/15464] Detect BBCodes in uppercase when reparsing
PHPBB3-15464
Diffstat (limited to 'tests/text_reparser/base_test.php')
-rw-r--r--tests/text_reparser/base_test.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/text_reparser/base_test.php b/tests/text_reparser/base_test.php
index af2d56ea51..2c6844b063 100644
--- a/tests/text_reparser/base_test.php
+++ b/tests/text_reparser/base_test.php
@@ -66,4 +66,19 @@ class phpbb_textreparser_base_test extends phpbb_database_test_case
$this->get_rows(array(1))
);
}
+
+ public function test_reparse_case_insensitive()
+ {
+ $this->get_reparser()->reparse_range(2, 2);
+
+ $this->assertEquals(
+ [
+ [
+ 'id' => '2',
+ 'text' => '<r><IMG src="img.png"><s>[IMG]</s>img.png<e>[/IMG]</e></IMG></r>'
+ ]
+ ],
+ $this->get_rows([2])
+ );
+ }
}
n> media_type { CDROM, DISK, FLOPPY, TAPE, UNKNOWN_MEDIA }; enum driver_type { SCSI_ADAPTERS, NETWORK_DEVICES, USB_CONTROLLERS, ANY_DRIVER_TYPE }; enum media_bus { BUS_IDE, BUS_SCSI, BUS_USB, BUS_PCMCIA, BUS_ANY }; void find_media(enum media_bus bus); void get_medias(enum media_type media, char *** names, char *** models, enum media_bus bus); char ** get_net_devices(void); void net_discovered_interface(char * intf_name); char * get_net_intf_description(char * intf_name); void prepare_intf_descr(const char * intf_descr); void probe_that_type(enum driver_type type, enum media_bus bus); /* Make sure the MATCH_ALL value is greater than all possible values for subvendor & subdevice: this simplifies the orderer */ #define PCITABLE_MATCH_ALL 0x10000 struct pcitable_entry { /* some bits stolen from pci-resource/pci-ids.h * FIXME: split pci-ids.h into pci-ids.c and pci-ids.h so that the header can be re-used */ unsigned short vendor; /* PCI vendor id */ unsigned short device; /* PCI device id */ unsigned int subvendor; /* PCI subvendor id */ unsigned int subdevice; /* PCI subdevice id */ char module[20]; /* module to load */ char description[100]; /* PCI human readable description */ }; extern struct pcitable_entry *detected_devices; extern int detected_devices_len; void probing_detect_devices(); void probing_destroy(void); #endif