Giter Site home page Giter Site logo

just-run-phpunit's Introduction

Just Run PHPUnit

The goal of this project is to allow PHP developers to just type naked phpunit wherever they are but actually executing vendor/bin/phpunit for projects that have PHPUnit required via Composer and falling back to a globally installed version of PHPUnit if not.

So the goal is literally to allow developers to "just run phpunit." No more having to decided if you need to run vendor/bin/phpunit, bin/phpunit, or phpunit, just run phpunit and this utility takes care of the rest.

Usage

Include the appropriate just-run-phpunit script from one of the shell subdirectories. This file will likely need to be sourced in such a way that the functions or aliases become available when your user logs in. This differs from shell to shell.

In all cases, this utility relies on the PHPUNIT_PATH environment variable. It contains a list of : separated paths similar to the PATH environment variable. Each path will be checked for an executable file called phpunit. The first time this file is found it will be executed and the return value of the execution is returned.

The PATH is queried last to determine if a globaly installed version of PHPUnit is available.

If you need to extend the search path (say you regularly have Composer's vendor bin redirected somewhere non-standard like vendor-bins) you can prepend or append it to PHPUNIT_PATH. For example:

export PHPUNIT_PATH="${PHPUNIT_PATH}:vendor-bins"

This will ensure that vendor-bins will be checked after the other default paths have been checked.

just-run-phpunit's People

Contributors

simensen avatar

Stargazers

 avatar

Watchers

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