From 6da21bbd2f16509559fbd87fef8900695c31f6c9 Mon Sep 17 00:00:00 2001 From: Christer Edvartsen Date: Tue, 11 Oct 2016 02:02:09 +0200 Subject: [PATCH] Add route that returns an array as specified in issue #13 --- features/bootstrap/index.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/features/bootstrap/index.php b/features/bootstrap/index.php index fc5df97..b2502af 100644 --- a/features/bootstrap/index.php +++ b/features/bootstrap/index.php @@ -118,5 +118,31 @@ ], 500); }); +$app->match('/issue-13', function(Application $app) { + return new JsonResponse([ + 'customer' => [ + 'id' => '12345', + 'name' => 'Behat Testing API', + 'images' => [ + [ + 'id' => '5678', + 'filename_client' => 'tech.ai', + 'filename_preview' => 'testimage-converted.png', + 'filename_print' => 'testimage.ai', + 'url' => '\/media\/testimage-converted.png', + 'created_time' => '2016-10-10 07 => 28 => 42' + ], [ + 'id' => '7890', + 'filename_client' => 'demo.ai', + 'filename_preview' => 'demoimage-converted.png', + 'filename_print' => 'demoimage.ai', + 'url' => '\/media\/demoimage-converted.png', + 'created_time' => '2016-10-10 07 => 38 => 22' + ], + ], + ], + ]); +}); + // Run the application $app->run();