Autocomplete functionallity for PHPUnit assertions.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

PHPUNIT COMPLETIONS

Provides decent PHPUnit completions for Sublime Text.

Overview

Features

  • PHPUnit ~5.4
  • DbUnit ~2.0
  • PSR compliant
  • Scoped to minimise auto-complete noise
  • Test case type hints e.g. begin typing at class Name extends | and any other context where a type hint is valid.
  • Assertions e.g. begin typing assert| or $this->assert|
  • Test case helpers e.g. begin typing getMockBuilder| or $this->getMockBuilder|
  • Annotations e.g. begin typing (any valid doc block scope) /* @covers| */ or without the @ symbol /* covers| */

Key Bindings

OS X Windows Linux Description
Ctrl+Space Ctrl+Space Alt+/ Activate completions

To enable tab-completions set "tab_completion": true in Preferences > Settings - User.

Installation

Package Control installation

The preferred method of installation is via Package Control.

  1. Install Package Control.
  2. From inside Sublime Text, open Package Control's Command Pallet: Ctrl+Shift+P (Windows, Linux) or Cmd+Shift+P on Mac.
  3. Type install package and hit Return. A list of available packages will be displayed.
  4. Type phpunit-sublime-completions and hit Return. The package will be downloaded to the appropriate directory.
  5. Restart Sublime Text to complete ins,rtallation. The features listed above should now be available.

Manual installation

  1. Close Sublime Text.
  2. Download or clone this repository to a directory named php-completions in the Sublime Text Packages directory for your platform:
    • Sublime Text 3
      • Linux: git clone https://github.com/tkowalewski/phpunit-sublime-completions.git ~/.config/sublime-text-3/Packages/phpunit-sublime-completions
      • OS X: git clone https://github.com/tkowalewski/phpunit-sublime-completions.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/phpunit-sublime-completions
      • Windows: git clone https://github.com/tkowalewski/phpunit-sublime-completions.git %APPDATA%\Sublime/ Text/ 3/Packages/phpunit-sublime-completions
    • Sublime Text 2
      • Linux: git clone https://github.com/tkowalewski/phpunit-sublime-completions.git ~/.config/sublime-text-2/Packages/phpunit-sublime-completions
      • OS X: git clone https://github.com/tkowalewski/phpunit-sublime-completions.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/phpunit-sublime-completions
      • Windows: git clone https://github.com/tkowalewski/phpunit-sublime-completions.git %APPDATA%\Sublime/ Text/ 2/Packages/phpunit-sublime-completions
  3. Restart Sublime Text to complete installation. The features listed above should now be available.

Contributing

Your issue reports and pull requests are always welcome.

Changelog

See CHANGELOG.md.

License

Released under the [???][LICENSE].