2017 © Pedro PelĂĄez
 

library test-util

Provides utilities for tests.

image

localheinz/test-util

Provides utilities for tests.

  • Sunday, July 15, 2018
  • by localheinz
  • Repository
  • 1 Watchers
  • 5 Stars
  • 13,262 Installations
  • PHP
  • 14 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 18 Versions
  • 27 % Grown

The README.md

test-util

Integrate Prune Release Renew, (*1)

Code Coverage Type Coverage, (*2)

Latest Stable Version Total Downloads, (*3)

Provides a helper trait for tests., (*4)

Installation

Run, (*5)

$ composer require --dev ergebnis/test-util

Usage

Helper

Import the Ergebnis\Test\Util\Helper trait into your test class:, (*6)

<?php

declare(strict_types=1);

namespace Foo\Bar\Test\Unit;

use Ergebnis\Test\Util;
use PHPUnit\Framework;

final class BazTest extends Framework\TestCase
{
    use Util\Helper;
}

Easy access to localized instances of Faker\Generator

The Helper trait provides a method to fetch a localized instance of Faker\Generator:, (*7)

  • faker(string $locale = 'en_US') : \Faker\Generator
<?php

declare(strict_types=1);

namespace Example\Test\Unit;

use Ergebnis\Test\Util;
use Example\Player;
use PHPUnit\Framework;

final class PlayerTest extends Framework\TestCase
{
    use Util\Helper;

    public function testConstructorSetsValues(): void
    {
        $name = self::faker()->firstName;

        $player = new Player($name);

        $this->assertSame($name, $player->firstName());
    }
}

For reference, see fzaninotto/faker., (*8)

Changelog

Please have a look at CHANGELOG.md., (*9)

Contributing

Please have a look at CONTRIBUTING.md., (*10)

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md., (*11)

License

This package is licensed using the MIT License., (*12)

Please have a look at LICENSE.md., (*13)

Curious what I am building?

:mailbox_with_mail: Subscribe to my list, and I will occasionally send you an email to let you know what I am working on., (*14)

The Versions

24/03 2018

dev-feature/phpstan

dev-feature/phpstan https://github.com/localheinz/test-util

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

24/03 2018

dev-fix/explicit

dev-fix/explicit https://github.com/localheinz/test-util

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

28/01 2018

dev-fix/contributing

dev-fix/contributing https://github.com/localheinz/test-util

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

01/01 2018

0.6.1

0.6.1.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

24/12 2017

0.6.0

0.6.0.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

25/11 2017

dev-fix/mixin

dev-fix/mixin

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

04/11 2017

0.5.0

0.5.0.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

27/10 2017

0.4.1

0.4.1.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

22/10 2017

0.4.0

0.4.0.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

10/10 2017

0.3.1

0.3.1.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

05/10 2017

0.3.0

0.3.0.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

02/10 2017

0.2.2

0.2.2.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

19/09 2017

0.2.1

0.2.1.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

16/09 2017

0.2.0

0.2.0.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Möller

test phpunit faker assertion

16/09 2017

0.1.0

0.1.0.0

Provides utilities for tests.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Andreas Möller

test phpunit