2017 © Pedro Peláez
 

library testing-helper

Provides test helpers.

image

narrowspark/testing-helper

Provides test helpers.

  • Wednesday, January 24, 2018
  • by dani33
  • Repository
  • 1 Watchers
  • 1 Stars
  • 19,582 Installations
  • PHP
  • 33 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 17 Versions
  • 4 % Grown

The README.md

Narrowspark Testing Helper

, (*1)

Installation

Via Composer, (*2)

``` bash $ composer require narrowspark/testing-helper, (*3)


Usage ------------- ``` php use Narrowspark\TestingHelper\Traits\AssertArrayTrait; class ModelTest extends \PHPUnit_Framework_TestCase { use AssertArrayTrait; // Now you can do something like this. public function testIfArrayContainIrix() { $haystack = ['Mac', 'NT', 'Irix', 'Linux']; self::assertInArray('Irix', $haystack); } // or public function testAssertArraySubsetThrowsExceptionForInvalidSubset(): void { $this->expectException(ExpectationFailedException::class); $this->assertArraySubset([6, 7], [1, 2, 3, 4, 5, 6]); } }

Testing

You need to run: bash $ phpunit, (*4)

Contributing

If you would like to help take a look at the list of issues and check our Contributing guild., (*5)

Note: Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms., (*6)

Credits

License

The MIT License (MIT). Please see License File for more information., (*7)

The Versions