Skip to content

Commit

Permalink
Fix #18495 - PHP 7.2 lint - doc format
Browse files Browse the repository at this point in the history
Ref: fc98aff

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Nov 16, 2023
1 parent a54e97f commit b2a9856
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions test/classes/Plugins/Export/ExportSqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1634,48 +1634,49 @@ public function testReplaceWithAlias(): void

$table = 'bar';
$sql_query = <<<'SQL'
CREATE FUNCTION `HTML_UnEncode`(`x` TEXT CHARSET utf8) RETURNS text CHARSET utf8
BEGIN
CREATE FUNCTION `HTML_UnEncode`(`x` TEXT CHARSET utf8) RETURNS text CHARSET utf8
BEGIN
DECLARE TextString TEXT ;
SET TextString = x ;
DECLARE TextString TEXT ;
SET TextString = x ;
#quotation mark
IF INSTR( x , '&quot;' )
THEN SET TextString = REPLACE(TextString, '&quot;','"') ;
END IF ;
#quotation mark
IF INSTR( x , '&quot;' )
THEN SET TextString = REPLACE(TextString, '&quot;','"') ;
END IF ;
#apostrophe
IF INSTR( x , '&apos;' )
THEN SET TextString = REPLACE(TextString, '&apos;','"') ;
END IF ;
#apostrophe
IF INSTR( x , '&apos;' )
THEN SET TextString = REPLACE(TextString, '&apos;','"') ;
END IF ;
RETURN TextString ;
RETURN TextString ;
END
SQL;

END
SQL;
$result = $this->object->replaceWithAliases('$$', $sql_query, $aliases, $db, $table);

$expectedQuery = <<<'SQL'
CREATE FUNCTION `HTML_UnEncode` (`x` TEXT CHARSET utf8) RETURNS TEXT CHARSET utf8 BEGIN
CREATE FUNCTION `HTML_UnEncode` (`x` TEXT CHARSET utf8) RETURNS TEXT CHARSET utf8 BEGIN
DECLARE TextString TEXT ;
SET TextString = x ;
DECLARE TextString TEXT ;
SET TextString = x ;
#quotation mark
IF INSTR( x , '&quot;' )
THEN SET TextString = REPLACE(TextString, '&quot;','"') ;
END IF ;
#quotation mark
IF INSTR( x , '&quot;' )
THEN SET TextString = REPLACE(TextString, '&quot;','"') ;
END IF ;
#apostrophe
IF INSTR( x , '&apos;' )
THEN SET TextString = REPLACE(TextString, '&apos;','"') ;
END IF ;
#apostrophe
IF INSTR( x , '&apos;' )
THEN SET TextString = REPLACE(TextString, '&apos;','"') ;
END IF ;
RETURN TextString ;
RETURN TextString ;
END
SQL;
END
SQL;

$this->assertEquals(
$expectedQuery,
Expand Down

0 comments on commit b2a9856

Please sign in to comment.