Git Product home page Git Product logo

phpunit's Introduction

Unit tests

Documentation

Assert PHP-DI Zend Expressive Doctrine PHPUnit Hamcrest Mockery

Project overview

  • Frontend controller: public/index.php
  • Application source files: src/App
  • Application test files: tests/App

Text file enconding

  • UTF-8

Code style formatter

  • PSR-2

Global constants

  • DEV_MODE: boolean - true in dev environment.
  • BE_PATH: string - Full path to backend folder.

Backend structure

  • build: Used by phpunit to deploy logs and html coverage files.
  • cache: Used by some dependencies for cached files
  • config: Contains routes and php-di config definitions.
  • public: Front controller api accessed from outside.
  • script: Useful PHP scripting files.
  • src: Entities, services and middleware classes dispatched into modules eg:
    • Common: Common classes for all modules
    • Entretien: Entretien module:
      • Entity: ORM Entity for each table related to entretien.
      • Middleware: Middleware Actions and pipes.
      • Repository: Sql queries.
      • Service: Specific business classes.
  • tests: Tests classes.
  • vendor: Dependencies classes.
  • cli-config.php: Used in testing and doctrine console.
  • composer.json: Dependencies configuration.
  • phpunit.xml: Phpunit configuration.

cache and build folders

  • Should be writable
  • Must be cleared on each deployment in production

Install dependencies

Run composer install

Launch project

Run composer serve

Project seed

Run git checkout master

Final project

Run git checkout final-project

Doctrine console

Command Overview

Run vendor/bin/doctrine list

Entity creation

Run vendor/bin/doctrine orm:convert-mapping --namespace="App\Demo\Entity\\" --force --from-database annotation ./src/

  • --force to overwrite existing entities

Setter/Getter generation

  • On specific entity, run vendor/bin/doctrine orm:generate-entities --filter=App\Demo\Entity\TCompteurs ./src/
  • For all entities, run vendor/bin/doctrine orm:generate-entities ./src/

phpunit's People

Contributors

elie29 avatar

Watchers

Sylvain FLATTET 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.