A repository to display my skills and understanding of the PHP language so far.
There is no setup required in order to run this project other than cloning the repository and installing dependencies.
~ git clone [email protected]:rafmjr/electronick.git
~ cd electronick
~ composer install
Here is a description of this project structure, hoping to ease the assessment:
Directory Description
├── src
│ ├── Exceptions Domain specific exceptions
│ ├── Models Entities reprenting business logic
│ └── Traits For horizontal composition
├── tests
│ ├── Features Implementations of the scenarios described
│ └── Unit Implementation of subtasks
├── vendor
├── .gitignore
├── composer.json
├── composer.lock
├── LICENSE
└── README.md
In the document provided there were mainly two questions describing scenarios in which the source code in this project should be used. In order to reproduce such scenarios, it was decided to create a Feature Test: ElectronicItemsPurchaseTest.
In the two questions mentioned above, there were other subtasks implied such as the implementation of a method to limit the number of extras for a given ElectronicItem. Those subtasks and any other considerations made by the developer were included in the Unit Tests.
In order to run the tests, execute the following command:
~ vendor/bin/phpunit .
This project is licensed under the terms of the Apache license.