2017 © Pedro Peláez
 

library testing

Testing helpers

image

davek1312/testing

Testing helpers

  • Sunday, May 7, 2017
  • by davek1312
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

davek1312/testing

Testing helpers., (*1)

Installation

The package is available on Packagist, you can install it using Composer., (*2)

composer require davek1312/testing

Usage

Your test class should implement our TestClass class:, (*3)

<?php

namespace Davek1312\Testing;

class YourTestCase extends \Davek1312\Testing\TestCase {

}

Database

Resetting The Database After Each Test It is often useful to reset your database after each test so that data from a previous test does not interfere with subsequent tests., (*4)

Using Migrations

One option is to rollback the database after each test and migrate it before the next test:, (*5)

<?php

namespace Davek1312\Testing;

class YourTestCase extends \Davek1312\Testing\TestCase {

    use \Davek1312\Database\Testing\MakesDatabaseMigrations;

}

Using Transactions

Another option is to wrap every test case in a database transaction:, (*6)

<?php

namespace Davek1312\Testing;

class YourTestCase extends \Davek1312\Testing\TestCase {

    use \Davek1312\Database\Testing\MakesDatabaseTransactions;

}

The Versions

07/05 2017

dev-master

9999999-dev https://bitbucket.org/davek1312/testing

Testing helpers

  Sources   Download

MIT

The Requires

 

by David Kelly

database testing

07/05 2017

v0.1.1

0.1.1.0 https://bitbucket.org/davek1312/testing

Testing helpers

  Sources   Download

MIT

The Requires

 

by David Kelly

database testing

07/05 2017

v0.0.2

0.0.2.0 https://bitbucket.org/davek1312/testing

Testing helpers

  Sources   Download

MIT

The Requires

 

by David Kelly

database testing

07/05 2017

v0.0.1

0.0.1.0 https://bitbucket.org/davek1312/testing

Testing helpers

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Kelly

database testing