[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/message/tests/ -> inbound_test.php (summary)

Tests for core_message_inbound to test Variable Envelope Return Path functionality.

Copyright: 2014 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 667 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 message/tests/fixtures/inbound_fixtures.php

Defines 3 classes

core_message_inbound_testcase:: (19 methods):
  setUp()
  helper_create_handler()
  test_is_enabled()
  test_address_constraints()
  test_address_uniqueness()
  test_address_parsing()
  test_address_validation_invalid_format_failure()
  test_address_validation_unknown_handler()
  test_address_validation_disabled_handler()
  test_address_validation_invalid_user()
  test_address_validation_disabled_user()
  test_address_validation_invalid_key()
  test_address_validation_expired_key()
  test_address_validation_invalid_hash()
  test_address_validation_invalid_sender()
  test_address_validation_success()
  test_default_hander_expiry_unlimited()
  test_default_hander_expiry_low()
  test_default_hander_expiry_medium()

core_message_inbound_test_helper:: (3 methods):
  validate()
  get_data()
  process()

core_message_inbound_test_manager:: (1 method):
  handler_from_record()


Class: core_message_inbound_testcase  - X-Ref

Tests for core_message_inbound to test Variable Envelope Return Path functionality.

setUp()   X-Ref
Perform setup tasks generic to each test.
This includes:
* configuring the messageinbound_mailbox.


helper_create_handler($handlerclass, $enabled = true, $component = 'core_test', $namespace = '\\core\\test\\')   X-Ref
Helper to create a new Inbound Message handler.

param: $handlerclass The class of the handler to create
param: $enabled Whether the handler should be enabled
param: $component The component
param: $namepace The namepace

test_is_enabled()   X-Ref
Test that the enabled check perform as expected.


test_address_constraints()   X-Ref
Test that data items conform to RFCs 5231, and 5322 standards for
addressing, and to RFC 5233 for sub-addressing.


test_address_uniqueness()   X-Ref
Test that the generated e-mail addresses are sufficiently random by
testing the multiple handlers, multiple users, and multiple data
items.


test_address_parsing()   X-Ref
Test address parsing of a generated address.


test_address_validation_invalid_format_failure()   X-Ref
Test address parsing of an address with an unrecognised format.


test_address_validation_unknown_handler()   X-Ref
Test address parsing of an address with an unknown handler.


test_address_validation_disabled_handler()   X-Ref
Test address parsing of an address with a disabled handler.


test_address_validation_invalid_user()   X-Ref
Test address parsing of an address for an invalid user.


test_address_validation_disabled_user()   X-Ref
Test address parsing of an address for a disabled user.


test_address_validation_invalid_key()   X-Ref
Test address parsing of an address for an invalid key.


test_address_validation_expired_key()   X-Ref
Test address parsing of an address for an expired key.


test_address_validation_invalid_hash()   X-Ref
Test address parsing of an address for an invalid hash.


test_address_validation_invalid_sender()   X-Ref
Test address parsing of an address for an invalid sender.


test_address_validation_success()   X-Ref
Test address parsing of an address for an address which is correct.


test_default_hander_expiry_unlimited()   X-Ref
Test that a handler with no default expiration does not have an
expiration time applied.


test_default_hander_expiry_low()   X-Ref
Test application of the default expiry on a handler.


test_default_hander_expiry_medium()   X-Ref
Test application of the default expiry on a handler.


Class: core_message_inbound_test_helper  - X-Ref

A helper function for unit testing to expose protected functions in the core_message_inbound API for testing.

validate($address)   X-Ref
The validate function.

param: string $address
return: int

get_data()   X-Ref
The get_data function.

return: stdClass

process($address)   X-Ref
The address processor function.

param: string $address
return: void

Class: core_message_inbound_test_manager  - X-Ref

A helper function for unit testing to expose protected functions in the core_message_inbound API for testing.

handler_from_record($record)   X-Ref
Helper to fetch make the handler_from_record public for unit testing.

param: $record The handler record to fetch



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1