2017 © Pedro Peláez
 

library php-test-helper

Classes helping with unit tests

image

rzajac/php-test-helper

Classes helping with unit tests

  • Monday, March 19, 2018
  • by rzajac
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,953 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 40 Versions
  • 2 % Grown

The README.md

PHP Test helper classes.

Unit testing helper., (*1)

What does it help with?

  • Load database fixtures (sql).
  • Load file fixtures (json, txt, php).
  • Tests where you interact with database.
  • Database helper methods see database interface.

Supported databases.

  • MySQL

Install.

{
    "require": {
        "rzajac/php-test-helper": "^2.0"
    }
}

Run unit tests.

Yes! The package has it's own unit tests., (*2)

$ vendor/bin/phpunit --coverage-html=./coverage 

Setup database for unit tests.

MySQL.

Create test users and database tables:, (*3)

CREATE DATABASE testHelper1 DEFAULT CHARACTER SET = 'utf8' DEFAULT COLLATE = 'utf8_general_ci';
CREATE DATABASE testHelper2 DEFAULT CHARACTER SET = 'utf8' DEFAULT COLLATE = 'utf8_general_ci';

CREATE USER 'testUser'@'localhost' IDENTIFIED BY 'testUserPass';
CREATE USER 'testUser'@'%' IDENTIFIED BY 'testUserPass';
GRANT ALL ON `testHelper1`.* TO 'testUser'@'localhost';
GRANT ALL ON `testHelper2`.* TO 'testUser'@'localhost';
GRANT ALL ON `testHelper1`.* TO 'testUser'@'%';
GRANT ALL ON `testHelper2`.* TO 'testUser'@'%';
FLUSH PRIVILEGES;

Run tests:, (*4)

$ vendor/bin/phpunit

When you have XDebug enabled running unit tests creates coverage report in coverage directory., (*5)

Loading time zone tables.

$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p, (*6)

License.

Apache License Version 2.0, (*7)

The Versions

19/03 2018

dev-master

9999999-dev

Classes helping with unit tests

  Sources   Download

Apache-2.0 Apache License 2.0

The Requires

  • php >=7.0

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

19/03 2018

2.0.3

2.0.3.0

Classes helping with unit tests

  Sources   Download

Apache-2.0

The Requires

  • php >=7.0

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

09/02 2018

2.0.2

2.0.2.0

Classes helping with unit tests

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

09/02 2018

2.0.1

2.0.1.0

Classes helping with unit tests

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

09/02 2018

2.0.0

2.0.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

12/04 2017

1.5.0

1.5.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

14/03 2017

1.4.0

1.4.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

11/03 2017

1.3.0

1.3.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

10/03 2017

1.2.0

1.2.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

07/03 2017

1.1.0

1.1.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

07/03 2017

1.0.0

1.0.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

27/10 2016

0.7.2

0.7.2.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

29/08 2016

0.7.1

0.7.1.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

28/08 2016

0.7.0

0.7.0.0

Classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

by Rafal Zajac

testing unit test

21/08 2016

0.6.0

0.6.0.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ^1.6

testing unit test

18/08 2016

0.5.17

0.5.17.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

07/08 2016

0.5.16

0.5.16.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

31/07 2016

0.5.15

0.5.15.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

29/07 2016

0.5.14

0.5.14.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

19/07 2016

0.5.13

0.5.13.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

19/07 2016

0.5.12

0.5.12.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

10/07 2016

0.5.11

0.5.11.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

09/07 2016

0.5.10

0.5.10.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

09/07 2016

0.5.9

0.5.9.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.8

0.5.8.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.7

0.5.7.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.6

0.5.6.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.5

0.5.5.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.4

0.5.4.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.3

0.5.3.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.2

0.5.2.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.1

0.5.1.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

08/07 2016

0.5.0

0.5.0.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

06/07 2016

0.4.0

0.4.0.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

06/07 2016

0.3.10

0.3.10.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

07/12 2015

0.3.9

0.3.9.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

07/12 2015

0.3.8

0.3.8.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

07/12 2015

0.3.7

0.3.7.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

05/12 2015

0.3.6

0.3.6.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test

30/11 2015

0.3.5

0.3.5.0

Tools and classes helping with unit tests

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

  • mikey179/vfsstream ~1.6

testing unit test