2017 © Pedro Peláez
 

library phpunit-expect-syntax

Expect syntax for PHPUnit assertions

image

danrspencer/phpunit-expect-syntax

Expect syntax for PHPUnit assertions

  • Wednesday, May 30, 2018
  • by danrspencer
  • Repository
  • 2 Watchers
  • 1 Stars
  • 2,782 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

phpunit-expect-syntax

A wrapper for PHPUnit which allows expect assertion syntax inspired by JavaScript's Jasmine., (*1)

Note: currently incomplete - if I'm missing a matcher you need create an issue or pull request, (*2)

Installation

Step 1. Install via Composer

The preferred way to install this bundle is via Composer. Just add it to your composer.json:, (*3)

``` js { "require": { // ... "danrspencer/phpunit-expect-syntax": "2.0.0" } }, (*4)


### Step 2. Include the expect-syntax.php file To begin using the syntax you'll need to include the expect-syntax.php file. This can be done in your PHPUnit bootstrap (recommended) or in invididual tests. e.g. ``` php require_once '../vendor/danrspencer/phpunit-expect-syntax/ExpectSyntax.php';

Example usage

php /** @test */ function it_tests_something() { expect($this)->toEqual($that); }, (*5)

The Versions

30/05 2018

dev-master

9999999-dev https://github.com/danrspencer/phpunit-expect-syntax

Expect syntax for PHPUnit assertions

  Sources   Download

MIT

The Requires

 

phpunit testing expect

29/05 2018

2.0.0

2.0.0.0 https://github.com/danrspencer/phpunit-expect-syntax

Expect syntax for PHPUnit assertions

  Sources   Download

MIT

The Requires

 

phpunit testing expect

17/11 2015

1.0.0

1.0.0.0 https://github.com/danrspencer/phpunit-expect-syntax

Expect syntax for PHPUnit assertions

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

phpunit testing expect