@@ -412,9 +412,8 @@ public function testBuilderCreateProcedure()
412412 $ stmt ->build ()
413413 );
414414
415- $ this ->assertTrue ($ stmt ->entityOptions ->isEmpty ());
415+ $ this ->assertFalse ($ stmt ->entityOptions ->isEmpty ());
416416 $ this ->assertFalse ($ stmt ->options ->isEmpty ());
417-
418417 $ this ->assertSame (
419418 'DEFINER=`root`@`%` PROCEDURE ' ,
420419 $ stmt ->options ->__toString ()
@@ -431,12 +430,12 @@ public function testBuilderCreateProcedure()
431430 );
432431
433432 $ this ->assertSame (
434- '' ,
433+ 'NOT DETERMINISTIC NO SQL SQL SECURITY INVOKER NO SQL SQL SECURITY INVOKER ' ,
435434 $ stmt ->entityOptions ->__toString ()
436435 );
437436
438437 $ this ->assertSame (
439- 'NOT DETERMINISTIC NO SQL SQL SECURITY INVOKER NO SQL SQL SECURITY INVOKER SELECT _var ' ,
438+ 'SELECT _var ' ,
440439 TokensList::build ($ stmt ->body )
441440 );
442441 }
@@ -446,9 +445,9 @@ public function testBuilderCreateFunction()
446445 $ parser = new Parser (
447446 'CREATE DEFINER=`root`@`localhost` '
448447 . ' FUNCTION `inventory_in_stock`(`p_inventory_id` INT) RETURNS tinyint(1) '
449- . ' READS SQL DATA ' . "\n"
450- . ' COMMENT \'My best function written by a friend \'\'s friend ' . "\n"
451- . 'BEGIN ' . "\n"
448+ . ' READS SQL DATA '
449+ . ' COMMENT \'My best function written by a friend \'\'s friend \''
450+ . ' BEGIN ' . "\n"
452451 . ' DECLARE v_rentals INT; ' . "\n"
453452 . ' DECLARE v_out INT; ' . "\n"
454453 . "\n"
@@ -482,9 +481,9 @@ public function testBuilderCreateFunction()
482481 $ this ->assertSame (
483482 'CREATE DEFINER=`root`@`localhost` '
484483 . ' FUNCTION `inventory_in_stock` (`p_inventory_id` INT) RETURNS TINYINT(1) '
485- . ' READS SQL DATA ' . "\n"
486- . ' COMMENT \'My best function written by a friend \'\'s friend ' . "\n"
487- . 'BEGIN ' . "\n"
484+ . ' READS SQL DATA '
485+ . ' COMMENT \'My best function written by a friend \'\'s friend \''
486+ . ' BEGIN ' . "\n"
488487 . ' DECLARE v_rentals INT; ' . "\n"
489488 . ' DECLARE v_out INT; ' . "\n"
490489 . "\n"
@@ -513,7 +512,7 @@ public function testBuilderCreateFunction()
513512 $ stmt ->build ()
514513 );
515514
516- $ this ->assertTrue ($ stmt ->entityOptions ->isEmpty ());
515+ $ this ->assertFalse ($ stmt ->entityOptions ->isEmpty ());
517516 $ this ->assertFalse ($ stmt ->options ->isEmpty ());
518517
519518 $ this ->assertSame (
@@ -532,14 +531,12 @@ public function testBuilderCreateFunction()
532531 );
533532
534533 $ this ->assertSame (
535- '' ,
534+ 'READS SQL DATA COMMENT \' My best function written by a friend \'\' s friend \' ' ,
536535 $ stmt ->entityOptions ->__toString ()
537536 );
538537
539538 $ this ->assertSame (
540- 'READS SQL DATA ' . "\n"
541- . ' COMMENT \'My best function written by a friend \'\'s friend ' . "\n"
542- . 'BEGIN ' . "\n"
539+ 'BEGIN ' . "\n"
543540 . ' DECLARE v_rentals INT; ' . "\n"
544541 . ' DECLARE v_out INT; ' . "\n"
545542 . "\n"
@@ -600,7 +597,7 @@ public function testBuilderRoutine()
600597
601598 $ this ->assertEquals (
602599 'CREATE FUNCTION test (IN `i` INT) RETURNS VARCHAR ' .
603- 'BEGIN ' .
600+ ' BEGIN ' .
604601 'DECLARE name VARCHAR DEFAULT ""; ' .
605602 'SELECT name INTO name FROM employees WHERE id = i; ' .
606603 'RETURN name; ' .
0 commit comments