Creation of test task practice for CB.
-
Project
Open Terminal on ~/var/www/ folder and clone the project with the following commandgit clone [email protected]:inEdgar/TestTask.git
-
Database
Import thetest_db.sql
file to MySql.
-
Open a browser and go to
localhost/TestTask
will be show the Home page.
-
To add a new interval, select the date range in the two inputs and enter the price of that range, then click on Add Interval button.
-
To add another interval, follow the same steps on #2 and the new interval will be added with some validations.
-
To Delete an interval, just click on the Delete link in the row of the interval.
-
To Update an interval, just click on the Update link in the row of the interval and will be show a form with the current range and price, update the data then click on the Update Interval button.
-
Using with Postman software, you can install it in the following link Postman.
-
To Create a new interval enter the following url
http://localhost/TestTask/API/interval/create.php
and send some array like so
{
"date_start" : "2019-04-25",
"date_end" : "2019-04-26",
"price" : "7"
}
- To Update an interval, enter the following url
http://localhost/testTask/API/interval/update.php
and send array with the new data like so
{
"id" : "5",
"date_start" : "2019-04-27",
"date_end" : "2019-04-29",
"price" : "7"
}
- To Delete an interval, just enter the following url
http://localhost/testTask/API/interval/delete.php
and send array with the interval's id to delete.
{
"id" : "5"
}
Also you can use Test Task online on the following url Test Task Online and API url's
To Create Interval https://psdadev.com/TestTask/API/interval/create.php
To Delete Interval https://psdadev.com/TestTask/API/interval/delete.php
To Update Interval https://psdadev.com/TestTask/API/interval/update.php
Thank you for following my work and I really appreciate any suggestion.