Development

Changeset 6870

You must first sign up to be able to contribute.

Changeset 6870

Show
Ignore:
Timestamp:
01/01/08 03:04:58 (9 months ago)
Author:
dwhittle
Message:

dwhittle: fixed environmental issues in tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/util/sfCore.class.php

    r6868 r6870  
    9999 
    100100    ini_set('magic_quotes_runtime', 'off'); 
     101    ini_set('register_globals', 'off'); 
    101102 
    102103    // include all config.php from plugins 
  • branches/1.1/lib/validator/sfValidatorFile.class.php

    r6807 r6870  
    170170    foreach ($this->getOption('mime_type_guessers') as $method) 
    171171    { 
    172       if (!is_null($type = call_user_func($method, $file))) 
     172      $type = call_user_func($method, $file); 
     173 
     174      if (!is_null($type) && $type !== false) 
    173175      { 
    174176        return $type; 
  • branches/1.1/test/bin/prove.php

    r6859 r6870  
    44 * This file is part of the symfony package. 
    55 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
  • branches/1.1/test/bootstrap/functional.php

    r5260 r6870  
    44 * This file is part of the symfony package. 
    55 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
    99 */ 
     10 
     11// setup expected test environment (per check_configuration.php) 
     12ini_set('magic_quotes_gpc', 'off'); 
     13ini_set('register_globals', 'off'); 
     14ini_set('session.auto_start', 'off'); 
     15ini_set('arg.output_separator', '&amp;'); 
     16 
     17ini_set('allow_url_fopen', 'on'); 
    1018 
    1119if (!isset($root_dir)) 
  • branches/1.1/test/bootstrap/unit.php

    r5231 r6870  
    44 * This file is part of the symfony package. 
    55 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
    99 */ 
     10 
     11// setup expected test environment (per check_configuration.php) 
     12ini_set('magic_quotes_gpc', 'off'); 
     13ini_set('register_globals', 'off'); 
     14ini_set('session.auto_start', 'off'); 
     15ini_set('arg.output_separator', '&amp;'); 
     16 
     17ini_set('allow_url_fopen', 'on'); 
    1018 
    1119$_test_dir = realpath(dirname(__FILE__).'/..'); 
  • branches/1.1/test/unit/validator/sfValidatorFileTest.php

    r6748 r6870  
    9898$t->is($v->guessFromFileBinary($tmpDir.'/test.txt'), 'text/plain', '->guessFromFileBinary() guesses the type of a given file'); 
    9999$t->is($v->guessFromFileBinary($tmpDir.'/foo.txt'), null, '->guessFromFileBinary() returns null if the file type is not guessable'); 
    100 $t->is($v->guessFromFileBinary('/bin/ls'), 'application/octet-stream', '->guessFromFileBinary() returns null if the file type is not guessable'); 
     100$t->is($v->guessFromFileBinary('/bin/ls'), (PHP_OS != 'Darwin') ? 'application/x-executable' : 'application/octet-stream', '->guessFromFileBinary() returns correct type if file is guessable'); 
    101101 
    102102// ->getMimeType()