Skip to content

Instantly share code, notes, and snippets.

@half2me
Created April 4, 2016 11:06
Show Gist options
  • Save half2me/1e7e25c6d720db7f5e87b72ad249b58a to your computer and use it in GitHub Desktop.
Save half2me/1e7e25c6d720db7f5e87b72ad249b58a to your computer and use it in GitHub Desktop.
<?php
namespace App\Test\Fixture;
use Cake\TestSuite\Fixture\TestFixture;
/**
* ReservationsFixture
*
*/
class ReservationsFixture extends TestFixture
{
/**
* Fields
*
* @var array
*/
// @codingStandardsIgnoreStart
public $fields = [
'id' => ['type' => 'biginteger', 'length' => 20, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
'cart_number' => ['type' => 'biginteger', 'length' => 20, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'website_id' => ['type' => 'biginteger', 'length' => 20, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'payment_type' => ['type' => 'string', 'length' => 20, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'shipping_address' => ['type' => 'string', 'length' => 255, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'billing_address' => ['type' => 'string', 'length' => 255, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'shipping_fee' => ['type' => 'decimal', 'length' => 10, 'precision' => 2, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => ''],
'currency' => ['type' => 'string', 'length' => 10, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'timestamp' => ['type' => 'timestamp', 'length' => null, 'null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '', 'precision' => null],
'status' => ['type' => 'string', 'length' => 20, 'null' => false, 'default' => 'OPEN', 'comment' => '', 'precision' => null, 'fixed' => null],
'_indexes' => [
'reservation_website_key_idx' => ['type' => 'index', 'columns' => ['website_id'], 'length' => []],
'cart_name' => ['type' => 'index', 'columns' => ['cart_number'], 'length' => []],
],
'_constraints' => [
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
'reservation_website_key' => ['type' => 'foreign', 'columns' => ['website_id'], 'references' => ['websites', 'id'], 'update' => 'cascade', 'delete' => 'restrict', 'length' => []],
],
'_options' => [
'engine' => 'InnoDB',
'collation' => 'utf8_general_ci'
],
];
// @codingStandardsIgnoreEnd
/**
* Records
*
* @var array
*/
public $records = [
[
'id' => 1,
'cart_number' => 1,
'website_id' => 1,
'payment_type' => 'Lorem ipsum dolor ',
'shipping_address' => 'Lorem ipsum dolor sit amet',
'billing_address' => 'Lorem ipsum dolor sit amet',
'shipping_fee' => 15.5,
'currency' => 'EUR',
'timestamp' => 1454670777,
'status' => 'CLOSED',
],
[
'id' => 2,
'cart_number' => 2,
'website_id' => 1,
'payment_type' => null,
'shipping_address' => null,
'billing_address' => null,
'shipping_fee' => null,
'currency' => null,
'timestamp' => 1454670777,
'status' => 'OPEN',
],
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment