Black Market getting closer
Tests are green, whohoo, refactoring :-D Just kidding! Can you see from the tests what this sentence in my spec exactly means?
The black market will be available every weekend.
Well at least my weekend begins in most cases at that time. Fingers crossed tomorrow as well, hehe!
public function testIsBlackMarketAvailable_startOfWeekend ()
{
$this ->givenCurrentTime('2015-09-18 18:00:00' );
$this ->thenBlackMarketIsAvailable();
}
public function testIsBlackMarketAvailable_middleOfWeekend ()
{
$this ->givenCurrentTime('2015-09-19 21:30:41' );
$this ->thenBlackMarketIsAvailable();
}
public function testIsBlackMarketAvailable_endOfWeekend ()
{
$this ->givenCurrentTime('2015-09-20 23:59:59' );
$this ->thenBlackMarketIsAvailable();
}
public function testIsBlackMarketAvailable_startOfWeek ()
{
$this ->givenCurrentTime('2015-09-21 00:00:00' );
$this ->thenBlackMarketIsNotAvailable();
}
public function testIsBlackMarketAvailable_endOfWeek ()
{
$this ->givenCurrentTime('2015-09-25 17:59:59' );
$this ->thenBlackMarketIsNotAvailable();
}
public function testIsBlackMarketAvailable_startOfWeekendBecauseTimeZoneOffset ()
{
$this ->givenTimezoneOffset(1 );
$this ->givenCurrentTime('2015-09-25 17:00:00' );
$this ->thenBlackMarketIsAvailable();
}
public function testIsBlackMarketAvailable_endOfWeekendBecauseTimeZoneOffset ()
{
$this ->givenTimezoneOffset(-5 );
$this ->givenCurrentTime('2015-09-21 04:59:59' );
$this ->thenBlackMarketIsAvailable();
}
Edit
Leotardis
Level: -
Rank: -
So the date used there, is that estimated release of the blackmarket update?
Edit
Leotardis
Level: -
Rank: -
I see, no need to rush though.
Edit
cbs_the_sage
Level: -
Rank: -
You're using perl for this?
Edit