zendframework / zend-ldap

Ldap component from Zend Framework
BSD 3-Clause "New" or "Revised" License
29 stars 29 forks source link

Fix issue #31 at ZendTest\Ldap\ConnectTest::testUnknownHostConnect. A… #38

Closed yeiniel closed 8 years ago

yeiniel commented 8 years ago

…n important detail is that PHP v5.6.11 also use the same message than PHP v7.x. Therefore this commit perform the comparison using PHP version 5.6.0 as break point. It will need further testing with other PHP version to determine .

Maks3w commented 8 years ago

Another posibility is create an array of allowed messages and assert if the exception message is in the array

heiglandreas commented 8 years ago

I'd also opt for @Maks3w idea of adding an array of allowed messages. Otherwise the tests will become messy and I'd much more like to have them as interpreter-agnostic as possible. And specifying a certain PHP-Version and the availability of a special constant feels a bit like user-agent sniffing.... ;)

yeiniel commented 8 years ago

ok, working on changes.