Giter Site home page Giter Site logo

project8_phpunit's Introduction

Project8_PhpUnit

Openclasrooms PHP/Symfony project 8 : PhpUnit

Developper : AureDev

Developped with : PHPStorm, WAMP64, PHPUnit, BlackFire

Languages : html, css, javascript, Symfony, Doctrine, Twig

Codacy badge : Codacy Badge

Installation guide :

Clone the github project
Create a mysql database and name it "project8_db" (php bin/console doctrine:database:create)
Update the DATABASE_URL in your .env file
Run a Doctrine migration to create the tables (php bin/console make:migration and php bin/console doctrine:migrations:migrate)
Load a couple of fake tasks with the fixtures load (php bin/console doctrine:fixtures:load)
Run the app on your localhost with the Symfony developpement server ! (cd project -> php bin/console server:run)

Good Practices for contributions :

Controllers :

  1. All Controllers belong to themes. UserController belong to User functions, TaskController belong to Task functions, etc.
  2. Clean the controllers. A function must be clean and therefor you can make a service callable for a function, DO IT ! (like forms)

Security :

  1. Login is secured with Symfony Guard
  2. Some functions are secured with Voters to check user permissions

Tests :

  1. There are no UserFixtures. So if you want to load the successfull tests you need to adapt the tests or create 3 user profiles.

CODE FUN !

project8_phpunit's People

Contributors

beskargam avatar

Stargazers

ckanza avatar

Watchers

James Cloos avatar

Forkers

codacy-badger

project8_phpunit's Issues

User : user creation

Roles can be choosen when new user is created.

  • ROLE_USER : user
  • ROLE_ADMIN : admin

Task : task edition

Author of the task cannot be changed when a task is edited

work time : 0.25 day

Test : Blackfire

Analyze the project with Blackfire

Improve composer with the help of blackfire

work time : 1 day

Task : task creation

When a Task is created, the authentified user must be attached to the created task.

time work : 1 day

Test : Functional test (PHPUnit)

Create functional test :

  • DOM for all pages
  • Login
  • logout
  • add task
  • authorization
  • edit user
  • add user

number of tests : 15
tests tested : 11
test cover : 73%

work time : 3 day

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.