Skip to content

Instantly share code, notes, and snippets.

View gmx's full-sized avatar

Graham Max gmx

  • Rangoon
View GitHub Profile
@gmx
gmx / BaseModel.php
Created December 16, 2017 12:36 — forked from JeffreyWay/BaseModel.php
To make for clean and readable tests, do your mocking in a base model that your Eloquent models extend.
<?php
class BaseModel extends Eloquent {
public static function shouldReceive()
{
$repo = get_called_class() . 'RepositoryInterface';
$mock = Mockery::mock($repo);
App::instance($repo, $mock);
@gmx
gmx / README.md
Created February 13, 2017 04:09 — forked from rrag/README.md
An attempt at FRP using Ramda.js and Bacon.js