Skip to content

atoum integration: run your PHP unit tests and get feedback right in VIM editor

License

Notifications You must be signed in to change notification settings

atoum/vim-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VIM plugin

atoum VIM

Install

Clone this repository or download the atoum.vmb file then open in:

vim path/to/atoum.vmb

Now install the plug-in by using the following command in VIM:

:source %

Usage

To use the plug-in, atoum must be installed and you must be editing a file containing a atoum unit test.

Once configured, the following command will launch the execution of tests:

:Atoum

The tests will be executed, and once finished, a report based on the configuration of atoum file located in the directory ftplugin/php/atoum.php in your .vim directory is generated in a new window.

Of course, you are free to bind this command to any keystrokes combination of your choice, for example you can add the following line in your .vimrc file:

nnoremap *.php <F12> :Atoum<CR>

Doing so will make F12 to call the command :Atoum in normal mode will.

Configuration

You can specify another configuration file for atoum by adding the following line to your `.vimrc file:

call atoum#defineConfiguration('/path/to/project/directory', '/path/to/atoum/configuration/file', '.php')

Indeed the function atoum#defineConfiguration lets you configure the file to use, based on the directory where the unit test files are located. It take three arguments:

  • a path to the directory containing the unit tests;
  • a path to the configuration file of atoum to be used;
  • the extension’s file of relevant unit tests.

You can access help about the plug-in in VIM with the following command:

:help atoum

About

atoum integration: run your PHP unit tests and get feedback right in VIM editor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published