Zend Framework

add tests Zend_Log_Writer_SyslogTest and Zend_Log_Writer_ZendMonitorTest

Details

  • Type: Unit Tests: Improvement Unit Tests: Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.5
  • Fix Version/s: 1.10.7
  • Component/s: Zend_Log
  • Labels:
    None

Description

The issue ZF-7603 was reopened (by Freeaqingme) request that the tests were added, but not exists Zend_Log_Writer_SyslogTest.
Also not exists test to Zend_Log_Writer_ZendMonitor.

Freeaqingme suggested (in discussion #zftalk.dev) adding of:
Zend_Log_Writer_SyslogTest
Zend_Log_Writer_ZendMonitorTest

Issue Links

Activity

Hide
Matthew Weier O'Phinney added a comment -

Unfortunately, there are issues in writing tests for both of these log writers. In each case, the only meaningful tests we could write are integration tests, not unit tests, as there is no real way to stub out the functionality. Integration tests for syslog would require that they be run only by a privileged user (since the system logs are generally readable only by root on *nix machines, and often only by Administrators on Windows machines) – and this has security implications.

As for a ZendMonitor test suite, there is no API for retrieving the messages once logged.

Show
Matthew Weier O'Phinney added a comment - Unfortunately, there are issues in writing tests for both of these log writers. In each case, the only meaningful tests we could write are integration tests, not unit tests, as there is no real way to stub out the functionality. Integration tests for syslog would require that they be run only by a privileged user (since the system logs are generally readable only by root on *nix machines, and often only by Administrators on Windows machines) – and this has security implications. As for a ZendMonitor test suite, there is no API for retrieving the messages once logged.
Hide
Ramon Henrique Ornelas added a comment -

Fixed in trunk r22530.

Show
Ramon Henrique Ornelas added a comment - Fixed in trunk r22530.
Hide
Ramon Henrique Ornelas added a comment -

Applied in branch release-1.10 r22532.

Show
Ramon Henrique Ornelas added a comment - Applied in branch release-1.10 r22532.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: