2017 © Pedro Peláez
 

library phpunit-methods-trait

Provide PHPUnit method signatures as traits for IDE autocomplete

image

maks3w/phpunit-methods-trait

Provide PHPUnit method signatures as traits for IDE autocomplete

  • Saturday, May 26, 2018
  • by Maks3w
  • Repository
  • 1 Watchers
  • 1 Stars
  • 893 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 7 % Grown

The README.md

PHPUnit methods trait

Provide a PHP Trait with methods present in PHPUnit Test Framework and expected to be implemented by TestCase., (*1)

This is useful when traits are used for test reuse, and it's necessary to access to PHPUnit\Framework\TestCase methods from the trait., (*2)

Installing via Composer

You can use Composer ., (*3)

composer require maks3w/phpunit-methods-trait

Usage

Example of use in a trait, (*4)


use PHPUnit\Framework\Assert; use PHPUnit\Framework\TestCase; trait FooTrait { use \Maks3w\PhpUnitMethodsTrait\Framework\TestCaseTrait; public function testFoo() { $mockFoo = $this->getMock('Foo'); $mockFoo->expects(TestCase::any()) ->method('getFoo') ->willReturn(true) ; Assert::assertTrue($mockFoo->getFoo()); } }

FAQ

Q: Assertion methods are not recognized. Why?
A: Assertion methods like `assertTrue` are static methods present in `PHPUnit\Framework\Assert` just access them using static method call `PHPUnit\Framework\Assert::assertTrue(...)`

License

Code licensed under BSD 2 clauses terms & conditions., (*5)

See LICENSE.txt for more information., (*6)

The Versions

26/05 2018

dev-master

9999999-dev https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 7.1

 

The Development Requires

phpunit autocomplete

26/05 2018

v7.1.0

7.1.0.0 https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 7.1

 

The Development Requires

phpunit autocomplete

18/03 2018

v6.5.0

6.5.0.0 https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 7.0

 

The Development Requires

phpunit autocomplete

18/03 2018

v5.7.0

5.7.0.0 https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 5.6

 

The Development Requires

phpunit autocomplete

27/05 2016

dev-phpunit-v4

dev-phpunit-v4 https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 5.4

 

The Development Requires

phpunit autocomplete

27/05 2016

v4.8.26

4.8.26.0 https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 5.4

 

The Development Requires

phpunit autocomplete

16/04 2016

v5.3.0

5.3.0.0 https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 5.4

 

The Development Requires

phpunit autocomplete

14/06 2015

v4.6.0

4.6.0.0 https://github.com/Maks3w/PhpUnitMethodsTrait

Provide PHPUnit method signatures as traits for IDE autocomplete

  Sources   Download

BSD-2-Clause

The Requires

  • php >= 5.4

 

The Development Requires

phpunit autocomplete