Issues

ZF-7397: Zend_Application_Resource_FrontcontrollerTest::testShouldSetModuleDirectoryWhenOptionPresent and Zend_Application_Resource_ViewTest::testOptionsPassedToResourceAreUsedToSetViewState fail on Windows

Issue Type: Unit Tests: Problem Created: 2009-07-27T09:33:42.000+0000 Last Updated: 2012-11-20T20:52:37.000+0000 Status: Closed Fix version(s): Reporter: Keno Fischer (loladiro) Assignee: None Tags: - Zend_Application

Related issues: Attachments:

Description

  1. Zend_Application_Resource_FrontcontrollerTest::testShouldSetModuleDirectoryWhenOptionPresent simplest way to solve is implementing a function like the following in Zend_Application_Resource_FrontcontrollerTest:
<pre class="literal">
    private function _normalizePathArray($dir)
    {
        foreach($dir as $key => &$dir1)
        {
            $dir2[$key] = str_replace("\\","/",$dir1);
        }       
        return $dir2;
    }

and changing line 188 into

<pre class="literal">
        $this->assertEquals($this->_normalizePathArray($expected),$this->_normalizePathArray($dir));
  1. Zend_Application_Resource_ViewTest::testOptionsPassedToResourceAreUsedToSetViewState fails simplest way to solve is implementing the same function in Zend_Application_Resource_ViewTest
<pre class="literal">
    private function _normalizePathArray($dir)
    {
        foreach($dir as $key => &$dir1)
        {
            $dir2[$key] = str_replace("\\","/",$dir1);
        }       
        return $dir2;
    }

and changing line 116 into

<pre class="literal">
        $this->assertContains(str_replace("\\","/",dirname(__FILE__)) . '/', $this->_normalizePathArray($paths), var_export($paths, 1));

I have not tested whether this patches work on Linux too, but for me (on Windows) they are working

Comments

Posted by Rob Allen (rob) on 2012-11-20T20:52:37.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts