Skip to content

Instantly share code, notes, and snippets.

Avatar

Donie Leigh xbot

View GitHub Profile
@xbot
xbot / ShortageTest.php
Last active Feb 6, 2020
How to mock laravel DB facade。
View ShortageTest.php
DB::shouldReceive('table')->with('users as u')->once()->andReturnSelf();
DB::shouldReceive('where')->with('u.id', $user->id)->once()->andReturnSelf();
DB::shouldReceive('value')->with('u.favorites_shortages')->once()->andReturn($fakeOldShortages);
@xbot
xbot / gtkrc-2.0.mine
Last active Jun 22, 2017
gtkrc-2.0.mine for vim fixes
View gtkrc-2.0.mine
# fix for gvim border
style "vim-fix" {
bg[NORMAL] = "#002B36" # this matches my gvim theme 'Normal' bg color.
fg[NORMAL] = "#ffffff"
}
style "vim-fix-tabs" {
bg[NORMAL] = shade(1.02, "#656565")
bg[ACTIVE] = shade(1.25, "#878787")
fg[ACTIVE] = "#323232"
You can’t perform that action at this time.