FakeldapusersFixture.php 4.27 KB
<?php
namespace App\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

/**
 * UsersFixture
 *
 */
class FakeldapusersFixture extends TestFixture
{

    public $import = ['model' => 'Fakeldapusers'];
    /**
     * Fields
     *
     * @var array
     */
    /*
    // @codingStandardsIgnoreStart
    public $fields = [
        'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
        'sn' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'givenname' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'uid' => ['type' => 'string', 'length' => 26, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'userpassword' => ['type' => 'string', 'length' => 255, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'mail' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        '_constraints' => [
            'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
            'login_UNIQUE' => ['type' => 'unique', 'columns' => ['uid'], 'length' => []],
		],
        '_options' => [
            'engine' => 'InnoDB',
            'collation' => 'latin1_swedish_ci'
        ],
    ];
    // @codingStandardsIgnoreEnd
    */

    /**
     * Records
     *
     * @var array
     */
    public $records = [
        
        // Superadmin
        [
            //'id' => 1,
            //'sn' => 'test1 test2',
            //'sn' => 'user1 SUPER',
            /*
            'sn' => 'user1',
            'givenname' => 'SUPER',
            */
            'sn' => 'SUPER',
            'givenname' => 'user1',
            //'username' => 'testa',
            ////'uid' => 'user1_SUPER',
            'uid' => 'u1SUPER',
            'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
            //'email' => 'testa@test.fr',
            /////'mail' => 'user1_SUPER@test.fr',
            'mail' => 'user1.SUPER@test.fr',
        ],
        
        // Adminplus
		[
    		//'id' => 2,
    		//'sn' => 'test3 test4',
		    //'sn' => 'user2 ADMINP',
		    /*
		    'sn' => 'user2',
    		'givenname' => 'ADMINP',
    		*/
		    'sn' => 'ADMINP',
		    'givenname' => 'user2',
		    //'uid' => 'testz',
    		////'uid' => 'user2_ADMINPLUS',
		    'uid' => 'u2ADMINP',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
    		/////'mail' => 'testz@test.fr',
		    'mail' => 'user2.ADMINP@test.fr',
		],
        
        // Admin
		[
    		//'id' => 3,
    		//'sn' => 'test5 test6',
		    //'sn' => 'user3 ADMIN',
		    /*
		    'sn' => 'user3',
		    'givenname' => 'ADMIN',
		    */
		    'sn' => 'ADMIN',
		    'givenname' => 'user3',
		    //'uid' => 'teste',
    		////'uid' => 'user3_ADMIN',
		    'uid' => 'u3ADMIN',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
		    ////'mail' => 'teste@test.fr',
		    'mail' => 'user3.ADMIN@test.fr',
		],
        
        // Responsable
		[
    		//'id' => 4,
	        //'sn' => 'test7 test8',
		    //'sn' => 'user4 RESP',
		    /*
		    'sn' => 'user4',
		    'givenname' => 'RESP',
    		*/
		    'sn' => 'RESP',
		    'givenname' => 'user4',
		    //'uid' => 'testr',
    		/////'uid' => 'user4_RESP',
		    'uid' => 'u4RESP',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
		    ////'mail' => 'testr@test.fr',
		    'mail' => 'user4.RESP@test.fr',
		],
        
        // User (simple user, authentified, but no priviledge)
		[
    		//'id' => 5,
    		//'sn' => 'test9 test0',
		    //'sn' => 'user5 USER',
		    /*
		    'sn' => 'user5',
		    'givenname' => 'USER',
		    */
		    'sn' => 'USER',
    	    'givenname' => 'user5',
		    //'uid' => 'testt',
    		////'uid' => 'user5_USER',
		    'uid' => 'u5USER',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
		    /////'mail' => 'testt@test.fr',
		    'mail' => 'user5.USER@test.fr',
		],
    ];
}