@@ -408,9 +408,8 @@ public function testBuilderCreateProcedure(): void
408408 $ stmt ->build ()
409409 );
410410
411- $ this ->assertTrue ($ stmt ->entityOptions ->isEmpty ());
411+ $ this ->assertFalse ($ stmt ->entityOptions ->isEmpty ());
412412 $ this ->assertFalse ($ stmt ->options ->isEmpty ());
413-
414413 $ this ->assertSame (
415414 'DEFINER=`root`@`%` PROCEDURE ' ,
416415 $ stmt ->options ->__toString ()
@@ -427,12 +426,12 @@ public function testBuilderCreateProcedure(): void
427426 );
428427
429428 $ this ->assertSame (
430- '' ,
429+ 'NOT DETERMINISTIC NO SQL SQL SECURITY INVOKER NO SQL SQL SECURITY INVOKER ' ,
431430 $ stmt ->entityOptions ->__toString ()
432431 );
433432
434433 $ this ->assertSame (
435- 'NOT DETERMINISTIC NO SQL SQL SECURITY INVOKER NO SQL SQL SECURITY INVOKER SELECT _var ' ,
434+ 'SELECT _var ' ,
436435 TokensList::build ($ stmt ->body )
437436 );
438437 }
@@ -442,9 +441,9 @@ public function testBuilderCreateFunction(): void
442441 $ parser = new Parser (
443442 'CREATE DEFINER=`root`@`localhost` '
444443 . ' FUNCTION `inventory_in_stock`(`p_inventory_id` INT) RETURNS tinyint(1) '
445- . ' READS SQL DATA ' . "\n"
446- . ' COMMENT \'My best function written by a friend \'\'s friend ' . "\n"
447- . 'BEGIN ' . "\n"
444+ . ' READS SQL DATA '
445+ . ' COMMENT \'My best function written by a friend \'\'s friend \''
446+ . ' BEGIN ' . "\n"
448447 . ' DECLARE v_rentals INT; ' . "\n"
449448 . ' DECLARE v_out INT; ' . "\n"
450449 . "\n"
@@ -478,9 +477,9 @@ public function testBuilderCreateFunction(): void
478477 $ this ->assertSame (
479478 'CREATE DEFINER=`root`@`localhost` '
480479 . ' FUNCTION `inventory_in_stock` (`p_inventory_id` INT) RETURNS TINYINT(1) '
481- . ' READS SQL DATA ' . "\n"
482- . ' COMMENT \'My best function written by a friend \'\'s friend ' . "\n"
483- . 'BEGIN ' . "\n"
480+ . ' READS SQL DATA '
481+ . ' COMMENT \'My best function written by a friend \'\'s friend \''
482+ . ' BEGIN ' . "\n"
484483 . ' DECLARE v_rentals INT; ' . "\n"
485484 . ' DECLARE v_out INT; ' . "\n"
486485 . "\n"
@@ -509,7 +508,7 @@ public function testBuilderCreateFunction(): void
509508 $ stmt ->build ()
510509 );
511510
512- $ this ->assertTrue ($ stmt ->entityOptions ->isEmpty ());
511+ $ this ->assertFalse ($ stmt ->entityOptions ->isEmpty ());
513512 $ this ->assertFalse ($ stmt ->options ->isEmpty ());
514513
515514 $ this ->assertSame (
@@ -528,14 +527,12 @@ public function testBuilderCreateFunction(): void
528527 );
529528
530529 $ this ->assertSame (
531- '' ,
530+ 'READS SQL DATA COMMENT \' My best function written by a friend \'\' s friend \' ' ,
532531 $ stmt ->entityOptions ->__toString ()
533532 );
534533
535534 $ this ->assertSame (
536- 'READS SQL DATA ' . "\n"
537- . ' COMMENT \'My best function written by a friend \'\'s friend ' . "\n"
538- . 'BEGIN ' . "\n"
535+ 'BEGIN ' . "\n"
539536 . ' DECLARE v_rentals INT; ' . "\n"
540537 . ' DECLARE v_out INT; ' . "\n"
541538 . "\n"
@@ -596,7 +593,7 @@ public function testBuilderRoutine(): void
596593
597594 $ this ->assertEquals (
598595 'CREATE FUNCTION test (IN `i` INT) RETURNS VARCHAR ' .
599- 'BEGIN ' .
596+ ' BEGIN ' .
600597 'DECLARE name VARCHAR DEFAULT ""; ' .
601598 'SELECT name INTO name FROM employees WHERE id = i; ' .
602599 'RETURN name; ' .
0 commit comments