<?php
namespace ccxt;

// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code

// -----------------------------------------------------------------------------
include_once PATH_TO_CCXT . '/test/exchange/base/test_shared_methods.php';

function test_group_by() {
    $exchange = new \ccxt\Exchange(array(
        'id' => 'sampleexchange',
    ));
    $sample_array = [array(
    'foo' => 'a',
), array(
    'foo' => 'b',
), array(
    'foo' => 'c',
), array(
    'foo' => 'b',
), array(
    'foo' => 'c',
), array(
    'foo' => 'c',
)];
    $current_value = $exchange->group_by($sample_array, 'foo');
    $stored_value = array(
        'a' => [array(
    'foo' => 'a',
)],
        'b' => [array(
    'foo' => 'b',
), array(
    'foo' => 'b',
)],
        'c' => [array(
    'foo' => 'c',
), array(
    'foo' => 'c',
), array(
    'foo' => 'c',
)],
    );
    assert_deep_equal($exchange, null, 'testGroupBy', $current_value, $stored_value);
}
