Bug #8913

Unit test failures because sys_get_temp_dir() doesn't always return directory name with trailing slash

Added by Christian Kuhn almost 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2010-07-17
Priority:Must have Due date:
Assignee:Andreas Förthner % Done:

100%

Category:- Testing -
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 11
PHP Version: Complexity:
Has patch: FLOW3 version affected:
Votes: 0

Description

php function sys_get_temp_dir() usually returns something like '/tmp/', but on some systems the trailing slash is missing (for me: a debian stable box, self compiled php 5.3.2, running as cgi). This leads to failing tests, eg. in Cache\Backend\PdoBackendTest

This could be easily fixed by always adding a slash (see attached patch), but leads to double slashes if the method returns with trailing slash.

Maybe it would be better to add / use some wrapper method to add the slash if it's missing?

sys_get_temp_dir.diff (4.5 kB) Christian Kuhn, 2010-07-17 01:35

Associated revisions

Revision 6d07da22
Added by Andreas Förthner almost 3 years ago

[~BUGFIX] FLOW3: Various tests are now using the concatenatePaths utitlity method when building a path to the temp directory. This resolves #8913.

History

Updated by Bastian Waidelich almost 3 years ago

  • Status changed from New to Accepted
  • Assignee set to Bastian Waidelich
  • Priority changed from Should have to Must have

Thanks for your feedback! Such function already exists in Utility\Files. I'll take care of this!

Updated by Andreas Förthner almost 3 years ago

  • Assignee changed from Bastian Waidelich to Andreas Förthner
  • Target version set to 1.0 alpha 11

Updated by Andreas Förthner almost 3 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4921.

Also available in: Atom PDF