Initial commit: apps.supersam24.ru
This commit is contained in:
commit
e955e1da36
6566 files changed
+1271095
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* Short description for class.
|
||||
*/
|
||||
class BakeArticlesBakeTagsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'bake_article_id' => ['type' => 'integer', 'null' => false],
|
||||
'bake_tag_id' => ['type' => 'integer', 'null' => false],
|
||||
'_constraints' => ['UNIQUE_TAG' => ['type' => 'unique', 'columns' => ['bake_article_id', 'bake_tag_id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [];
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* BakeArticleFixture
|
||||
*/
|
||||
class BakeArticlesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'bake_user_id' => ['type' => 'integer', 'null' => false],
|
||||
'title' => ['type' => 'string', 'length' => 50, 'null' => false],
|
||||
'body' => 'text',
|
||||
'rating' => ['type' => 'float', 'unsigned' => true, 'default' => 0.0, 'null' => false],
|
||||
'score' => ['type' => 'decimal', 'unsigned' => true, 'default' => 0.0, 'null' => false],
|
||||
'published' => ['type' => 'boolean', 'length' => 1, 'default' => false, 'null' => false],
|
||||
'created' => 'datetime',
|
||||
'updated' => 'datetime',
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [];
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* BakeCarFixture
|
||||
*/
|
||||
class BakeCarFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'car';
|
||||
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'bake_user_id' => ['type' => 'integer', 'null' => false],
|
||||
'title' => ['type' => 'string', 'null' => false],
|
||||
'body' => 'text',
|
||||
'published' => ['type' => 'boolean', 'length' => 1, 'default' => false],
|
||||
'created' => 'datetime',
|
||||
'updated' => 'datetime',
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [];
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* BakeCommentFixture fixture for testing bake
|
||||
*/
|
||||
class BakeCommentsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'otherid' => ['type' => 'integer'],
|
||||
'bake_article_id' => ['type' => 'integer', 'null' => false],
|
||||
'bake_user_id' => ['type' => 'integer', 'null' => false],
|
||||
'comment' => 'text',
|
||||
'published' => ['type' => 'string', 'length' => 1, 'default' => 'N'],
|
||||
'created' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'updated' => ['type' => 'datetime', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['otherid']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [];
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* Short description for class.
|
||||
*/
|
||||
class BakeTagsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'tag' => ['type' => 'string', 'null' => false],
|
||||
'created' => 'datetime',
|
||||
'updated' => 'datetime',
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [];
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.2.1
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* BakeAuthors Fixture
|
||||
*/
|
||||
class BakeTemplateAuthorsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Avoid overriding core.authors
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'bake_authors';
|
||||
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'role_id' => ['type' => 'integer', 'null' => false],
|
||||
'name' => ['type' => 'string', 'default' => null],
|
||||
'description' => ['type' => 'text', 'default' => null],
|
||||
'member' => ['type' => 'boolean'],
|
||||
'member_number' => ['type' => 'integer', 'null' => true],
|
||||
'account_balance' => ['type' => 'decimal', 'null' => true, 'precision' => 2, 'length' => 12],
|
||||
'created' => 'datetime',
|
||||
'modified' => 'datetime',
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
['name' => 'mariano', 'role_id' => 1],
|
||||
['name' => 'nate', 'role_id' => 2],
|
||||
['name' => 'larry', 'role_id' => 2],
|
||||
['name' => 'garrett', 'role_id' => 1],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.2.1
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* Fixture used for test bake template task
|
||||
*
|
||||
* @package Bake\Test\Fixture
|
||||
* @see TemplateTaskTest::testBakeTemplate
|
||||
*/
|
||||
class BakeTemplateProfilesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'profiles';
|
||||
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'author_id' => ['type' => 'integer', 'null' => false],
|
||||
'nick' => ['type' => 'string', 'null' => false],
|
||||
'avatar' => ['type' => 'string', 'default' => null],
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
['author_id' => 1, 'nick' => 'The Comedian', 'avatar' => 'smiley.png'],
|
||||
['author_id' => 2, 'nick' => 'Rorschach', 'avatar' => 'stains.png'],
|
||||
['author_id' => 3, 'nick' => 'Ozymandias', 'avatar' => null],
|
||||
['author_id' => 4, 'nick' => 'Dr. Manhattan', 'avatar' => 'blue_lightning.png'],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.2.1
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* Class BakeTemplateRolesFixture
|
||||
*/
|
||||
class BakeTemplateRolesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'roles';
|
||||
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'name' => ['type' => 'string', 'null' => false],
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
['name' => 'admin'],
|
||||
['name' => 'user'],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* Fixture for testing binary columns
|
||||
*/
|
||||
class BinaryTestsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'byte' => ['type' => 'binary', 'length' => 1],
|
||||
'data' => ['type' => 'binary', 'length' => 300],
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [];
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.1.4
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* CategoriesFixture
|
||||
*/
|
||||
class CategoriesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
|
||||
'created' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'modified' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'name' => ['type' => 'string', 'length' => 100, 'null' => false, 'default' => '', 'comment' => '', 'precision' => null, 'fixed' => null],
|
||||
'_constraints' => [
|
||||
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
|
||||
],
|
||||
'_options' => [
|
||||
'engine' => 'InnoDB',
|
||||
'collation' => 'utf8_general_ci'
|
||||
],
|
||||
];
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
[
|
||||
'created' => '2015-12-30 18:11:36',
|
||||
'modified' => '2015-12-30 18:11:36',
|
||||
'name' => 'Lorem ipsum dolor sit amet',
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.1.4
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* CategoriesProductsFixture
|
||||
*/
|
||||
class CategoriesProductsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
public $fields = [
|
||||
'category_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
|
||||
'product_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
|
||||
'_constraints' => [
|
||||
'primary' => ['type' => 'primary', 'columns' => ['category_id', 'product_id'], 'length' => []],
|
||||
],
|
||||
'_options' => [
|
||||
'engine' => 'InnoDB',
|
||||
'collation' => 'utf8_general_ci'
|
||||
],
|
||||
];
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
[
|
||||
'category_id' => 1,
|
||||
'product_id' => 1,
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* Fixture for testing threaded models.
|
||||
*/
|
||||
class CategoryThreadsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'parent_id' => ['type' => 'integer'],
|
||||
'name' => ['type' => 'string', 'null' => false],
|
||||
'lft' => ['type' => 'integer', 'unsigned' => true],
|
||||
'rght' => ['type' => 'integer', 'unsigned' => true],
|
||||
'created' => 'datetime',
|
||||
'updated' => 'datetime',
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
['parent_id' => 0, 'name' => 'Category 1', 'lft' => 1, 'rght' => 14, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'],
|
||||
['parent_id' => 1, 'name' => 'Category 1.1', 'lft' => 2, 'rght' => 9, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'],
|
||||
['parent_id' => 2, 'name' => 'Category 1.1.1', 'lft' => 3, 'rght' => 8, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'],
|
||||
['parent_id' => 3, 'name' => 'Category 1.1.2', 'lft' => 4, 'rght' => 7, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'],
|
||||
['parent_id' => 4, 'name' => 'Category 1.1.1.1', 'lft' => 5, 'rght' => 6, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'],
|
||||
['parent_id' => 5, 'name' => 'Category 2', 'lft' => 10, 'rght' => 13, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'],
|
||||
['parent_id' => 6, 'name' => 'Category 2.1', 'lft' => 11, 'rght' => 12, 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* Test fixture for various data types.
|
||||
*/
|
||||
class DatatypesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer', 'null' => false],
|
||||
'decimal_field' => ['type' => 'decimal', 'length' => '6', 'precision' => 3, 'default' => '0.000'],
|
||||
'float_field' => ['type' => 'float', 'length' => '5,2', 'null' => false, 'default' => null],
|
||||
'huge_int' => ['type' => 'biginteger'],
|
||||
'small_int' => ['type' => 'smallinteger'],
|
||||
'tiny_int' => ['type' => 'tinyinteger'],
|
||||
'bool' => ['type' => 'boolean', 'null' => false, 'default' => false],
|
||||
'uuid' => ['type' => 'uuid'],
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* Records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
['float_field' => 42.23, 'huge_int' => '1234567891234567891', 'small_int' => '1234', 'tiny_int' => '12', 'bool' => 0],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* InvitationsFixture
|
||||
*/
|
||||
class InvitationsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'sender_id' => ['type' => 'integer', 'null' => false],
|
||||
'receiver_id' => ['type' => 'integer', 'null' => false],
|
||||
'body' => 'text',
|
||||
'created' => 'datetime',
|
||||
'updated' => 'datetime',
|
||||
'_constraints' => [
|
||||
'primary' => ['type' => 'primary', 'columns' => ['id']],
|
||||
'sender_idx' => [
|
||||
'type' => 'foreign',
|
||||
'columns' => ['sender_id'],
|
||||
'references' => ['users', 'id'],
|
||||
'update' => 'noAction',
|
||||
'delete' => 'noAction',
|
||||
],
|
||||
'receiver_idx' => [
|
||||
'type' => 'foreign',
|
||||
'columns' => ['receiver_id'],
|
||||
'references' => ['users', 'id'],
|
||||
'update' => 'noAction',
|
||||
'delete' => 'noAction',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* records property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
[
|
||||
'sender_id' => 1,
|
||||
'receiver_id' => 1,
|
||||
'body' => 'Try it out!',
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.2.0
|
||||
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* NumberTreeFixture
|
||||
*
|
||||
* Generates a tree of data for use testing the tree behavior
|
||||
*/
|
||||
class NumberTreesFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* fields property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer'],
|
||||
'name' => ['type' => 'string', 'length' => 50, 'null' => false],
|
||||
'parent_id' => 'integer',
|
||||
'lft' => ['type' => 'integer', 'unsigned' => true],
|
||||
'rght' => ['type' => 'integer', 'unsigned' => true],
|
||||
'depth' => ['type' => 'integer', 'unsigned' => true],
|
||||
'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
|
||||
];
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [];
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.1.4
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* OldProductsFixture
|
||||
*/
|
||||
class OldProductsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
|
||||
'created' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'modified' => ['type' => 'datetime', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'name' => ['type' => 'string', 'length' => 100, 'null' => false, 'default' => '', 'comment' => '', 'precision' => null, 'fixed' => null],
|
||||
'_constraints' => [
|
||||
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
|
||||
],
|
||||
'_options' => [
|
||||
'engine' => 'InnoDB',
|
||||
'collation' => 'utf8_general_ci'
|
||||
],
|
||||
];
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
[
|
||||
'created' => '2015-12-30 18:11:36',
|
||||
'modified' => '2015-12-30 18:11:36',
|
||||
'name' => 'Lorem ipsum dolor sit amet',
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.1.4
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ProductVersionsFixture
|
||||
*/
|
||||
class ProductVersionsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
|
||||
'product_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
|
||||
'version' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'_constraints' => [
|
||||
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
|
||||
],
|
||||
'_options' => [
|
||||
'engine' => 'InnoDB',
|
||||
'collation' => 'utf8_general_ci'
|
||||
],
|
||||
];
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
[
|
||||
'product_id' => 1,
|
||||
'version' => '2015-12-30 18:11:37',
|
||||
],
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.1.4
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
namespace Bake\Test\Fixture;
|
||||
|
||||
use Cake\TestSuite\Fixture\TestFixture;
|
||||
|
||||
/**
|
||||
* ProductsFixture
|
||||
*/
|
||||
class ProductsFixture extends TestFixture
|
||||
{
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
// @codingStandardsIgnoreStart
|
||||
public $fields = [
|
||||
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
|
||||
'created' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'modified' => ['type' => 'datetime', 'length' => null, 'null' => false, 'default' => null, 'comment' => '', 'precision' => null],
|
||||
'name' => ['type' => 'string', 'length' => 100, 'null' => false, 'default' => '', 'comment' => '', 'precision' => null, 'fixed' => null],
|
||||
'_constraints' => [
|
||||
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
|
||||
],
|
||||
'_options' => [
|
||||
'engine' => 'InnoDB',
|
||||
'collation' => 'utf8_general_ci'
|
||||
],
|
||||
];
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = [
|
||||
[
|
||||
'created' => '2015-12-30 18:11:37',
|
||||
'modified' => '2015-12-30 18:11:37',
|
||||
'name' => 'Lorem ipsum dolor sit amet',
|
||||
],
|
||||
];
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since 0.1.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
use Cake\Core\Configure;
|
||||
use Cake\Core\Plugin;
|
||||
use Cake\Datasource\ConnectionManager;
|
||||
|
||||
$findRoot = function ($root) {
|
||||
do {
|
||||
$lastRoot = $root;
|
||||
$root = dirname($root);
|
||||
if (is_dir($root . '/vendor/cakephp/cakephp')) {
|
||||
return $root;
|
||||
}
|
||||
} while ($root !== $lastRoot);
|
||||
throw new Exception('Cannot find the root of the application, unable to run tests');
|
||||
};
|
||||
$root = $findRoot(__FILE__);
|
||||
unset($findRoot);
|
||||
chdir($root);
|
||||
|
||||
require_once 'vendor/cakephp/cakephp/src/basics.php';
|
||||
require_once 'vendor/autoload.php';
|
||||
|
||||
define('ROOT', $root . DS . 'tests' . DS . 'test_app' . DS);
|
||||
define('APP', ROOT . 'App' . DS);
|
||||
define('TMP', sys_get_temp_dir() . DS);
|
||||
define('CACHE', TMP . 'cache' . DS);
|
||||
|
||||
Configure::write('debug', true);
|
||||
Configure::write('App', [
|
||||
'namespace' => 'App',
|
||||
'paths' => [
|
||||
'plugins' => [ROOT . 'Plugin' . DS],
|
||||
'templates' => [ROOT . 'App' . DS . 'Template' . DS]
|
||||
],
|
||||
'encoding' => 'UTF-8'
|
||||
]);
|
||||
|
||||
if (!getenv('db_dsn')) {
|
||||
putenv('db_dsn=sqlite:///:memory:');
|
||||
}
|
||||
ConnectionManager::setConfig('test', ['url' => getenv('db_dsn')]);
|
||||
|
||||
Plugin::getCollection()->add(new \Bake\Plugin());
|
||||
Reference in new issue
Block a user