However, when it comes to unit testing, most libraries demand you to have either
PHPUnit or Behat installed globally.

A change to composer that was merged yesterday
makes testing now as easy as running composer test.

The scripts field

The scripts field in the composer.json was reserved for certain events until
now, such as pre-package-install or post-update-cmd which made it possible
to hook into these events and run additional scripts.

Additionally to this you can now define your own custom scripts and run them
with composer run-script or simply with composer run. Composer will also map
the vendor/.bin to the $PATH meaning that you can define phpunit or your
unit test framework of choice as a
development dependency:

Additional tasks

Instead of make or phing you can define additional tasks directly in
your composer.json file now. So for example, if you need to provide a phar for
your app you could have a composer.json that looks like this:

Then you could package you app by running composer run-script build. This
would work because the box dependency provides an executable in the
vendor/.bin folder which is being mapped directly to the $PATH.