src/Context/SQLHandler.php
public function sampleData($type)
    {
        switch (strtolower($type)) {
            case 'boolean':
                return 'false';
            case 'integer':
            case 'double':
            case 'int':
                return rand();
            case 'tinyint':
                return rand(0, 9);
            case 'string':
            case 'text':
            case 'varchar':
            case 'character varying':
            case 'tinytext':
            case 'longtext':
                return $this->quoteOrNot(sprintf("behat-test-string-%s", time()));
            case 'char':
                return "'f'";
            case 'timestamp':
            case 'timestamp with time zone':
                return 'NOW()';
            case 'null':
                return null;
            default:
                return $this->quoteOrNot(sprintf("behat-test-string-%s", time()));
        }
    }
public function sampleData($type)
    {
        switch (strtolower($type)) {
            case 'boolean':
                return 'false';
            case 'integer':
            case 'double':
            case 'int':
                return rand();
            case 'tinyint':
                return rand(0, 9);
            case 'string':
            case 'text':
            case 'varchar':
            case 'character varying':
            case 'tinytext':
            case 'longtext':
                return $this->quoteOrNot(sprintf("behat-test-string-%s", time()));
            case 'char':
                return "'f'";
            case 'timestamp':
            case 'timestamp with time zone':
                return 'NOW()';
            case 'null':
                return null;
            default:
                return $this->quoteOrNot(sprintf("behat-test-string-%s", time()));
        }
    }
public function sampleData ( $ type ) { switch ( strtolower ( $ type ) ) { case 'boolean' : return 'false' ; case 'integer' : case 'double' : case 'int' : return rand ( ) ; case 'tinyint' : return rand ( 0 , 9 ) ; case 'string' : case 'text' : case 'varchar' : case 'character varying' : case 'tinytext' : case 'longtext' : return $ this -> quoteOrNot ( sprintf ( "behat-test-string-%s" , time ( ) ) ) ; case 'char' : return "'f'" ; case 'timestamp' : case 'timestamp with time zone' : return 'NOW()' ; case 'null' : return null ; default : return $ this -> quoteOrNot ( sprintf ( "behat-test-string-%s" , time ( ) ) ) ; } }
returns sample data for a data type.
returns sample data for a data type .