File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -423,6 +423,18 @@ public function _testSelectExecute($di)
423
423
$ this ->assertEquals (2 , $ result [0 ]->{"0 " });
424
424
$ this ->assertInstanceOf ('Phalcon\Mvc\Model\Row ' , $ result [0 ]);
425
425
426
+ $ result = $ manager ->executeQuery ('SELECT CASE 1 WHEN 1 THEN 2 END FROM Robots ' );
427
+ $ this ->assertInstanceOf ('Phalcon\Mvc\Model\Resultset\Complex ' , $ result );
428
+ $ this ->assertEquals (2 , $ result [0 ]->{"0 " });
429
+
430
+ $ result = $ manager ->executeQuery ('SELECT CASE 2 WHEN 1 THEN 2 WHEN 2 THEN 3 END FROM Robots ' );
431
+ $ this ->assertInstanceOf ('Phalcon\Mvc\Model\Resultset\Complex ' , $ result );
432
+ $ this ->assertEquals (3 , $ result [0 ]->{"0 " });
433
+
434
+ $ result = $ manager ->executeQuery ('SELECT CASE 2 WHEN 1 THEN 2 ELSE 3 END FROM Robots ' );
435
+ $ this ->assertInstanceOf ('Phalcon\Mvc\Model\Resultset\Complex ' , $ result );
436
+ $ this ->assertEquals (3 , $ result [0 ]->{"0 " });
437
+
426
438
// Issue 1011
427
439
/*$result = $manager->executeQuery('SELECT r.name le_name FROM Robots r ORDER BY r.name ASC LIMIT ?1,?2',
428
440
array(1 => 1, 2 => 2),
You can’t perform that action at this time.
0 commit comments