Skip to content

Instantly share code, notes, and snippets.

View Magomogo's full-sized avatar
🎯
Focusing

Maxim Gnatenko Magomogo

🎯
Focusing
View GitHub Profile
@Magomogo
Magomogo / SimpleSearch.test.js
Created April 25, 2016 05:19
Shallow + intl
import { shallow } from 'enzyme';
import { SimpleSearch } from '../../src/containers/SimpleSearch';
import { IntlProvider } from 'react-intl';
const intlProvider = new IntlProvider({locale: 'en'}, {});
describe('<SimpleSearch/>', () => {
let wrapper, {intl} = intlProvider.getChildContext();
beforeEach(() => {
@Magomogo
Magomogo / Hotel.js
Last active August 29, 2015 13:56
JS data types
(function () {
'use strict';
module.exports = function () {
var state = arguments[0] || {};
return Object.seal({
id: state.id,
name: state.name
});
[
{
"id": "10001",
"name": "Sorell Hotel Aarauerhof",
"ratingStars": 3,
"geolocation": {
"latitude": "47.391650",
"longitude": "8.051530"
},
"city": [
@Magomogo
Magomogo / Put.php
Last active December 11, 2015 15:28
Put command
<?php
namespace STSShop\Admin\Command\Affiliate;
use STSShop\Admin\Affiliate\JsonContainer;
use STSShop\Admin\Affiliate\Model;
use STSShop\Admin\Affiliate\Properties;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Validator\Validator;
@Magomogo
Magomogo / PutTest.php
Last active December 11, 2015 15:28
Unit test for PutCommand
<?php
namespace STSShop\Admin\Command\Affiliate;
use Symfony\Component\HttpFoundation\Request;
use STSShop\Admin\Affiliate\Properties as AffiliateProperties;
use Mockery as m;
class PutTest extends \PHPUnit_Framework_TestCase
{
@Magomogo
Magomogo / composer.json
Created September 5, 2012 09:13
Hamcrest at google code repository description for composer
{
"repositories": [
{
"type": "package",
"package": {
"name": "hamcrest/hamcrest",
"version": "1.1.0",
"dist": {
"type": "zip",
"url": "https://hamcrest.googlecode.com/files/hamcrest-php-1.1.0.zip"