2017 © Pedro Peláez
 

library phpunit

PHPUnit toolbox with short assert aliases and useful functions

image

jbzoo/phpunit

PHPUnit toolbox with short assert aliases and useful functions

  • PHP
  • 45 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 66 Versions
  • 7 % Grown

The README.md

JBZoo / PHPUnit

CI Coverage Status Psalm Coverage Psalm Level CodeFactor
Stable Version Total Downloads Dependents GitHub License, (*1)

Installation

composer require jbzoo/phpunit --dev

Usage

namespace JBZoo\PHPUnit;

/**
 * Class PackageTest
 * @package JBZoo\PHPUnit
 */
class PackageTest extends PHPUnit
{
    public function testSimple()
    {
        // Boolean
        isTrue(true);
        isFalse(false);

        // null
        isNull(null);

        // Check is variable empty
        isEmpty(0);
        isEmpty('');
        isEmpty(null);
        isEmpty('0');
        isEmpty(.0);
        isEmpty(array());

        // Equals
        is(1, true);
        is(array(1, 2, 3), array(1, 2, 3));
        isSame(array(1, 2, 3), array(1, 2, 3));

        // Array, Object etc
        isKey('test', array('test' => true));
        isNotKey('undef-kest', array('test' => true));

        isAttr('test', (object)array('test' => true));
        isNotAttr('undef-test', (object)array('test' => true));

        // Instance Of ...
        isClass(JBZoo\PHPUnit\PHPUnit::class, $this);

        // Count props
        isCount(0, array());
        isCount(1, array(1));
        isCount(2, array(1, 3));

        // regExp
        isLike('#t.st#i', 'TESTO');
        isNotLike('#teeest#i', 'TESTO');

        // Strings
        isContain('t', 'test');
        isNotContain('x', 'test');

        // Filesystem
        isFileEq(__FILE__, __FILE__);
        isFile(__FILE__);
        isDir(__DIR__);
    }

    public function testSkip()
    {
        skip('Some reason to skip this test');
    }

    public function testFail()
    {
        fail('Some reason to fail this test');
    }
}

License

MIT, (*2)

The Versions

04/08 2016

dev-feature/experimental

dev-feature/experimental

  Sources   Download

The Requires

 

02/03 2016
10/02 2016
22/01 2016
14/01 2016
08/01 2016

1.1.3

1.1.3.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion benchmark performance speed aliases jbzoo short-syntax

06/01 2016

1.1.2

1.1.2.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion benchmark performance speed aliases jbzoo short-syntax

24/12 2015

1.1.1

1.1.1.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion benchmark performance speed aliases jbzoo short-syntax

24/12 2015

1.1.0

1.1.0.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

17/12 2015

1.0.11

1.0.11.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

17/12 2015

1.0.10

1.0.10.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

17/12 2015

1.0.9

1.0.9.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

17/12 2015

1.0.7

1.0.7.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

17/12 2015

1.0.6

1.0.6.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

15/12 2015

1.0.5

1.0.5.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

12/12 2015

1.0.4

1.0.4.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

04/12 2015

1.0.3

1.0.3.0

PHPUnit toolbox with short assert aliases and useful functions

  Sources   Download

MIT

The Requires

 

phpunit testing validation assert assertion aliases jbzoo short-syntax

16/10 2015

1.0.2

1.0.2.0

PHPUnit toolbox with short aliases and useful functions

  Sources   Download

MIT

The Requires

  • php >=5.3.10

 

phpunit testing aliases jbzoo short-syntax

14/10 2015

1.0.1

1.0.1.0

PHPUnit toolbox with short aliases and useful functions

  Sources   Download

MIT

The Requires

  • php >=5.3.10

 

14/10 2015

1.0.0

1.0.0.0

PHPUnit toolbox with short aliases and useful functions

  Sources   Download

MIT

The Requires

  • php >=5.3.10