From f914b7c4d6bee57b47cf749ebc064b7d91c86c18 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 19 Jun 2019 07:28:12 +0000 Subject: [PATCH] Add the add battery to the test API command. #225 --- catalyst/api-bundle/Command/TestAPICommand.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/catalyst/api-bundle/Command/TestAPICommand.php b/catalyst/api-bundle/Command/TestAPICommand.php index b7c12755..680b2dd8 100644 --- a/catalyst/api-bundle/Command/TestAPICommand.php +++ b/catalyst/api-bundle/Command/TestAPICommand.php @@ -81,6 +81,18 @@ class TestAPICommand extends Command $api->get('/capi/battery_sizes'); $api->get('/capi/batteries'); + // add battery + $sku = 'WZMB31QT-CPP01-S'; + $brand_id = '4'; + $size_id = '1'; + $params = [ + 'sku' => $sku, + 'brand_id' => $brand_id, + 'size_id' => $size_id, + ]; + $api->post('/capi/batteries', $params); + + // vehicle $api->get('/capi/vehicle_manufacturers'); $api->get('/capi/vehicles');