Giter Site home page Giter Site logo

test_pser_refactoring's Introduction

PHP - Refactoring - Pser

Getting Started

Before start

I've tried not to use any third-party libraries or frameworks at all, except PSR contracts.

The code has been refactored to incorporate OOP principles, making it more organized and maintainable. Some code snippets have been wrapped in functions for better structure and development speed improvement.

Acceptance tests have been included to ensure that the core functionality of the application works as expected. These tests provide end-to-end verification of the application's behavior.

Additionally, API client tests have been implemented to demonstrate how to use mocks for testing interactions with external services.

Please note that more tests could be added for comprehensive coverage, but the focus here is on demonstrating the testing approach within a limited timeframe.

To improve

  • as docker don\t have access to files from host machina need to use some mechanism to force this. For. ex - external linked storages
  • move functions to classes
  • I dont like entry point. some kind of microframeworks can be used here.
  • Calculations tests must be added

Requirements

Check provided gist file to see full task requirements

Installation

Clone repository to the common place:

git clone [email protected]:ValentinNikolaev/test_pser_refactoring.git ~/workspace/test_pser_refactoring

Build application image

Basic php:7.4-fpm-alpine & composer:latest are used to assemble the service image.

build image as follows:

make build

Start application

Then start project using command as follows:

make up

Usage

Commands

Usage: make [target] [ENV_VARIABLE=ENV_VALUE ...]

Available targets:

### App ###
  test           Full tests run.
  calculation    Run calculation.

### Docker ###
  build         Build or rebuild services
  down          Stop, kill and purge project containers.
  up            Starts and attaches to containers for a service
  reset         down + up alias
  start         Start containers.
  stop          Stop containers.

### Bash ###
  bash          Go to the application container (if any)

test_pser_refactoring's People

Contributors

valentinnikolaev avatar

Watchers

 avatar  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.