Giter Site home page Giter Site logo

php_code_challenge's Introduction

PHP code challenge goal

This code is refactored version of SullysMustyRuby/php_code_challenge master branch as of June 27 - 2022. It delivered as as assignment to Hivelocity Inc.

Requirements

  • PHP is installed in your machine.
  • PHP version install should be >= 7.3.
  • Composer(dependency management for PHP) is installed in your machine.

Install Dev dependencies

$ cd /path/to/php_code_challenge
$ composer install

Directory & files structure

├── ...
├── .gitignore                       # Contains list of files to ignore when committing project.
├── src                              # Directory where all logic is written.
│   ├── CommonConst.php              # Common constant varaibles file.
│   ├── FinalResult.php              # Business logic file.
├── tests                            # Directory for tests.
|   ├── support                      # Directory containing files used for testing.
|   |   ├─ data_sample.tmp.csv       # Data sample file used for PHP unit testing of bl.
├── composer.json                    # Common project properties/meta/dependencies. 
├── README.md                        # Essential guide for repo.
└── ...

Test Cases

Before performing test cases, make sure dev dependecies are completely installed.

Test Case Condition Command to Run Expected Response Result
Sample CSV file don't exist composer run-script test-case-sample-file-not-exists File not found 🆗
Sample CSV file don't have read permissions composer run-script test-case-sample-file-permissions-error Read Permission denied to file 🆗
Sample CSV file exist & have read permissions & is Empty composer run-script test-case-sample-file-empty Empty file 🆗
Sample CSV file exist & have read permissions & is NOT Empty composer run-script run-unit-test Ok 🆗

php_code_challenge's People

Watchers

Muhammad Tahir Qaiser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.