DocumentsFixture.php 3.02 KB
<?php
namespace App\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

/**
 * DocumentsFixture
 *
 */
class DocumentsFixture extends TestFixture
{

    public $import = ['model' => 'Documents'];
    /**
     * Fields
     *
     * @var array
     */
    /*
    // @codingStandardsIgnoreStart
    public $fields = [
        'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
        'type_doc' => ['type' => 'string', 'length' => 20, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'materiel_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'suivi_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'nom' => ['type' => 'string', 'length' => 100, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'type_document_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => '1', 'comment' => '', 'precision' => null, 'autoIncrement' => null],
    	'photo' => ['type' => 'boolean', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
    	'_indexes' => [
            'fk_documents_materiel_id' => ['type' => 'index', 'columns' => ['materiel_id'], 'length' => []],
            'fk_documents_suivi_id' => ['type' => 'index', 'columns' => ['suivi_id'], 'length' => []],
            'fk_documents_type_documents_id' => ['type' => 'index', 'columns' => ['type_document_id'], 'length' => []],
        ],
        '_constraints' => [
            'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
            'fk_documents_type_documents_id' => ['type' => 'foreign', 'columns' => ['type_document_id'], 'references' => ['type_documents', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_documents_materiel_id' => ['type' => 'foreign', 'columns' => ['materiel_id'], 'references' => ['materiels', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_documents_suivi_id' => ['type' => 'foreign', 'columns' => ['suivi_id'], 'references' => ['suivis', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
        ],
        '_options' => [
            'engine' => 'InnoDB',
            'collation' => 'latin1_swedish_ci'
        ],
    ];
    // @codingStandardsIgnoreEnd
    */

    /**
     * Records
     *
     * @var array
     */
    public $records = [
        [
            //'id' => 1,
            'nom' => 'Lorem ipsum dolor sit amet',
            'type_doc' => 'Lorem ipsum dolor ',
            //'type_document_id' => 1
            'type_document_id' => null,
            'materiel_id' => 3,
            'suivi_id' => 1,
        ],
    ];
}