DateRangeTest

Extends \CakeTestCase

DateRangeTest

package

DateRangeTest

subpackage

Utility

Methods

Data provider for testConstruct

constructProvider() : array

Response

array

Data provider for testIsContains

isContainsProvider() : array

Response

array

Data provider for testPeriod

periodProvider() : array

Response

array

Test date range construct

testConstruct(string|integer|\DateTime $start, string|integer|\DateTime $end, \DateTime $ExpectedStart, \DateTime $ExpectedEnd) 
dataProvider

constructProvider

Arguments

$start

string|integer|\DateTime

$end

string|integer|\DateTime

$ExpectedStart

\DateTime

$ExpectedEnd

\DateTime

Test data formatting

testFormat() 

Test exception when end date greater than start date

testInvalidRange() 

Test method that checks if date contains in range

testIsContains(string $start, string $end, string $date, boolean $inclusive, boolean $contains) 
dataProvider

isContainsProvider

Arguments

$start

string

$end

string

$date

string

$inclusive

boolean

$contains

boolean

Test period generation

testPeriod(string $start, string $end, string $time, array $dates) 
dataProvider

periodProvider

Arguments

$start

string

$end

string

$time

string

$dates

array