Development

#2486 ([PATCH] assertion fail on non-unix system in configTest functional test)

You must first sign up to be able to contribute.

Ticket #2486 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] assertion fail on non-unix system in configTest functional test

Reported by: Pascal.Borreli Assigned to: fabien
Priority: minor Milestone: 1.0.9
Component: tests Version: 1.0.8
Keywords: lime test configtest backslashes DIRECTORY_SEPARATOR Cc:
Qualification: Unreviewed

Description

Hi,

On windows system, if we launch functional tests configTest.php in svn we obtain errors :

c:\symfony_svn\branches\1.0\php test\functional\configTest.php
not ok 1 - sfLoader::getConfigDirs() returns directories for configuration files
#     Failed test (configTest.php at line 31)
#            got: array (  0 => 'SYMFONY/config/filters.yml',  
                           1 => 'PROJECT\\plugins/sfConfigPlugin/config/filters.yml',                   
                           2 => 'PROJECT/config/filters.yml',  
                           3 => 'PROJECT\\apps\\frontend/config/filters.yml',)
#       expected: array (  0 => 'SYMFONY/config/filters.yml',  
                           1 => 'PROJECT/plugins/sfConfigPlugin/config/filters.yml',
                           2 => 'PROJECT/config/filters.yml',  
                           3 => 'PROJECT/apps/frontend/config/filters.yml',)

As you can see, the result and expected output are different because windows system returns some backslashes (in sfConfig::get()) which is handled correctly in php, but fail when we evaluate assertions.

I've included a patch forcing backslashes to be converted in simple slashes before comparison.

Cheers,
Pascal
SQLI Oujda/Maroc

Attachments

configTest.2.php (443 bytes) - added by Pascal.Borreli on 11/01/07 19:43:07.
configTest.php (443 bytes) - added by Pascal.Borreli on 11/01/07 19:45:02.

Change History

11/01/07 19:43:07 changed by Pascal.Borreli

  • attachment configTest.2.php added.

11/01/07 19:45:02 changed by Pascal.Borreli

  • attachment configTest.php added.

11/04/07 16:19:33 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone set to 1.0.9.

in r5841 and r5842