Ticket #1114 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

Rename AgaviViewTestCase Assertions to something more explicit

Reported by: felix Owned by: felix
Priority: normal Milestone:
Component: testing Version: 1.0.1
Severity: normal Keywords:
Cc: Patch attached: no

Description

The assertions in the AgaviViewTestCase? imply that they act on the full response object whereas the actual scope is on the data set by the view only. Examples:

  • assertResponseHasContentType
  • assertResponseHasHeader
  • assertResponseHasCookie

Those should be named clearer, maybe

  • assertViewSetsContentType
  • assertViewSetsHeader
  • assertViewSetsCookie

which would make clear that the scope is on the view and not the global response.

See #1113 for an example.

Attachments

Change History

Changed 9 months ago by felix

  • status changed from new to assigned

Changed 9 months ago by felix

  • status changed from assigned to closed
  • resolution set to fixed

(In [4160]) - Renamed assertions in the View to better reflect their scope.

* assertResponseHasRedirect => assertViewRedirects * assertResponseHasNoRedirect => assertViewRedirectsNot * assertResponseRedirectsTo => assertViewRedirectsTo * assertResponseHasContentType => assertViewSetsContentType * assertResponseHasHeader => assertViewSetsHeader * assertResponseHasCookie => assertViewSetsCookie * assertResponseHasHTTPStatus => assertViewResponseHasHTTPStatus * assertResponseHasContent => assertViewResponseHasContent * assertForwards => assertViewForwards

- Changed the unit tests accordingly. - Made the message in assertHasLayer() configurable by the user

fixes #1114

Add/Change #1114 (Rename AgaviViewTestCase Assertions to something more explicit)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.