pictcode / lib / Cake / Test / Fixture / TranslateFixture.php @ 0b1b8047
履歴 | 表示 | アノテート | ダウンロード (3.563 KB)
1 | 635eef61 | spyder1211 | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * Short description for file.
|
||
4 | *
|
||
5 | * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
|
||
6 | * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||
7 | *
|
||
8 | * Licensed under The MIT License
|
||
9 | * For full copyright and license information, please see the LICENSE.txt
|
||
10 | * Redistributions of files must retain the above copyright notice
|
||
11 | *
|
||
12 | * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||
13 | * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
|
||
14 | * @package Cake.Test.Fixture
|
||
15 | * @since CakePHP(tm) v 1.2.0.5669
|
||
16 | * @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||
17 | */
|
||
18 | |||
19 | /**
|
||
20 | * Class TranslateFixture
|
||
21 | *
|
||
22 | * @package Cake.Test.Fixture
|
||
23 | */
|
||
24 | class TranslateFixture extends CakeTestFixture { |
||
25 | |||
26 | /**
|
||
27 | * table property
|
||
28 | *
|
||
29 | * @var string
|
||
30 | */
|
||
31 | public $table = 'i18n'; |
||
32 | |||
33 | /**
|
||
34 | * fields property
|
||
35 | *
|
||
36 | * @var array
|
||
37 | */
|
||
38 | public $fields = array( |
||
39 | 'id' => array('type' => 'integer', 'key' => 'primary'), |
||
40 | 'locale' => array('type' => 'string', 'length' => 6, 'null' => false), |
||
41 | 'model' => array('type' => 'string', 'null' => false), |
||
42 | 'foreign_key' => array('type' => 'integer', 'null' => false), |
||
43 | 'field' => array('type' => 'string', 'null' => false), |
||
44 | 'content' => array('type' => 'text') |
||
45 | ); |
||
46 | |||
47 | /**
|
||
48 | * records property
|
||
49 | *
|
||
50 | * @var array
|
||
51 | */
|
||
52 | public $records = array( |
||
53 | array('locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title #1'), |
||
54 | array('locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Content #1'), |
||
55 | array('locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Titel #1'), |
||
56 | array('locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Inhalt #1'), |
||
57 | array('locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Titulek #1'), |
||
58 | array('locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Obsah #1'), |
||
59 | array('locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Title #2'), |
||
60 | array('locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 2, 'field' => 'content', 'content' => 'Content #2'), |
||
61 | array('locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Titel #2'), |
||
62 | array('locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 2, 'field' => 'content', 'content' => 'Inhalt #2'), |
||
63 | array('locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Titulek #2'), |
||
64 | array('locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 2, 'field' => 'content', 'content' => 'Obsah #2'), |
||
65 | array('locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Title #3'), |
||
66 | array('locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 3, 'field' => 'content', 'content' => 'Content #3'), |
||
67 | array('locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Titel #3'), |
||
68 | array('locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 3, 'field' => 'content', 'content' => 'Inhalt #3'), |
||
69 | array('locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Titulek #3'), |
||
70 | array('locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 3, 'field' => 'content', 'content' => 'Obsah #3') |
||
71 | ); |
||
72 | } |