Skip to content

Releases: erikgall/eloquent-phpunit

v1.0.7

08 Nov 22:04
Compare
Choose a tag to compare

Changes

  • Add hasOne relationship test method

v1.0.6

21 Sep 06:26
Compare
Choose a tag to compare

Code Refactoring

  • src/Database/Column.php now uses magic methods
  • Removed methods from Column class (integer, string, text,

Column Increments method

You now do not have to call the integer method when testing if a column increments. The integer method is called for you (see example).

// Old way that still works
$this->table->column('id')->integer()->increments();
// New shortcut
$this->table->column('id')->increments();

Testing Nullable

// The first two examples are the old way this still works.
$this->table->column('name')->string()->nullable();
$this->table->column('name')->string()->notNullable();

// New shortcut to test if a column is nullable
$this->table->column('name')->string()->null();
$this->table->column('name')->string()->notNull();

Column defaults

// Old way that still works
$this->table->column('name')->string()->defaults('User Name');

// New shortcut to testing a columns default
$this->table->column('name')->string()->default('User Name');

v1.0.5

15 Aug 17:19
Compare
Choose a tag to compare

Minor Changes

  • Model test helper trait refactor
  • Docblock cleanup

v1.0.4

12 Aug 17:29
Compare
Choose a tag to compare

Database Test Helper

You can now use the database test helper outside of the eloquent test case.

use EGALL\EloquentPHPUnit\DatabaseTestHelper;

class LoginTest extends TestCase {

use DatabaseTestHelper;

// Set the default database seeder class
protected $defaultSeeder = 'DatabaseSeeder';

// Set multiple seeders to be called instead of just the default
protected $seeders = ['UsersTableSeeder', 'PostsTableSeeder'];

// Turn off database seeding (on by default)
protected $seedDatabase = false;

}

Bug Fixes

  • Fixed the call to the default seeder method (was calling property).

v1.0.3

09 Aug 15:58
Compare
Choose a tag to compare

SQLite Database Issue

There seems to be an issue if you use a SQLite database for testing and testing foreign keys.

Breaking Changes

  • The database column assertion method for default values was updated from default($val) to defaults($val)

This was due to the word default being a reserved word in PHP 5 (not originally supported by package) and not in PHP 7.

v1.0.2

09 Aug 07:01
Compare
Choose a tag to compare

Remove PHP 7 requirement

v1.0.1

05 Aug 18:07
Compare
Choose a tag to compare
Fix require path for app bootstrap file

v1.0.0

05 Aug 18:02
Compare
Choose a tag to compare

Initial Release