Skip to content

marydn/basket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Executing tests using Docker

  1. Install Docker
  2. Clone this project: git clone https://github.com/marydn/basket.git
  3. Move to the project folder: cd basket
  4. Install PHP dependencies and bring up the project Docker containers with Docker Compose: make build
  5. Check everything's up using: $ docker-composer ps. It should show php service up.
  6. Execute tests: make test

Note: If you want to bring down Docker service use: make destroy

Executing tests without Docker

  1. Install Composer
  2. Check PHP version. Should be 7.4 at least
  3. Clone this project: git clone https://github.com/marydn/basket.git
  4. Move to the project folder: cd basket
  5. Install dependencies: composer install
  6. Execute tests: make run-tests

Diving project structure:

$ tree -L 4 src
src
├── Basket.php # Collection that holds products to check
├── Exception
│   └── ProductNotFount.php
├── Inventory.php # Collection that holds products available at the store
├── Pricing.php # Sets a price by unit or volume
├── Product.php # Represents a Product
├── ProductPrices.php # Collection of prices per Product
├── Shared
│   └── Collection.php # Holds collections of objects
├── Terminal.php # Main objet to interact with basket, inventory and get Total
└── ValueObject
    └── ProductCode.php

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published