I hereby claim:
- I am MatissJanis on github.
- I am mja (https://keybase.io/mja) on keybase.
- I have a public key whose fingerprint is BD9C AC67 7471 0129 0FF6 43B3 5D1A 9122 328E 8B2D
To claim this, I am signing this object:
interface EntityStateModel<T> { | |
entities: Record<string, T>; | |
ids: string[]; | |
} |
import { mount } from 'enzyme'; | |
import MyComponent from './MyComponent'; | |
describe('MyComponent', () => { | |
/** | |
* Important: notice how integration tests use `mount` to mount not | |
* just this component, but it's children as well. Hence we can test | |
* full customer journeys here (with external systems - APIs - still | |
* being mocked). |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* Email an administrator if an error occured | |
*/ | |
Event::listen('illuminate.log', function($level, $message, $context) { | |
if (in_array($level, ['error', 'critical', 'emergency', 'alert']) == false) | |
return; | |
Mail::raw((string) $message, function($mail) use ($level, $message) { | |
$mail->to('foo@bar.com', 'Admin'); | |
$mail->subject(sprintf('[%s] Error: %s', $level, $message->getMessage())); |
<?php | |
// Listen for page titles and parse them through the translate plugin | |
Event::listen('cms.page.init', function($controller, $page) { | |
$messageIds = [$page->title, $page->seo_title]; | |
if (isset($page->apiBag['staticPage'])) | |
{ | |
$vars = $page->apiBag['staticPage']->getViewBag(); | |
$messageIds[] = $vars->property('seo_title'); | |
$vars->setProperty('seo_title', Message::get($vars->property('seo_title'))); |