File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
packages/php-wasm/node/src/test Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1512,6 +1512,27 @@ bar1
15121512 } ) ;
15131513 } ) ;
15141514
1515+ /**
1516+ * mbregex support
1517+ */
1518+ describe ( 'mbregex extension support' , ( ) => {
1519+ it ( 'Should be able to use mb_regex_encoding functions' , async ( ) => {
1520+ const response = await php . run ( {
1521+ code : `<?php
1522+ mb_regex_encoding('UTF-8');
1523+ ?>` ,
1524+ } ) ;
1525+ // We don't support mbregex in PHP 7.0
1526+ if ( phpVersion === '7.0' ) {
1527+ expect ( response . errors ) . toContain (
1528+ 'Call to undefined function mb_regex_encoding'
1529+ ) ;
1530+ } else {
1531+ expect ( response . errors ) . toBe ( '' ) ;
1532+ }
1533+ } ) ;
1534+ } ) ;
1535+
15151536 describe ( 'onMessage' , ( ) => {
15161537 it ( 'should pass messages to JS' , async ( ) => {
15171538 let messageReceived = '' ;
You can’t perform that action at this time.
0 commit comments