Polyglot\Dummies\ArticleLang::whereLang PHP Метод

whereLang() публичный Метод

public whereLang ( $lang )
    public function whereLang($lang)
    {
        $relation = Mockery::mock('Illuminate\\Database\\Eloquent\\Relations\\Relation');
        $relation->shouldReceive('getResults')->andReturnUsing(function () use($relation) {
            return $relation;
        });
        $relation->name = $lang == 'en' ? 'Name' : 'Nom';
        return $relation;
    }
ArticleLang