Skip to content

Commit

Permalink
Add tests for add and sub weekends during weekend
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Oct 12, 2015
1 parent 1c875b4 commit d8c49f5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/DateTime/AddTest.php
Expand Up @@ -168,6 +168,15 @@ public function testAddDay($class)
$this->assertSame(1, $class::createFromDate(1975, 5, 31)->addDay()->day);
}

/**
* @dataProvider classNameProvider
* @return void
*/
public function testAddWeekdayDuringWeekend($class)
{
$this->assertSame(9, $class::createFromDate(2012, 1, 7)->addWeekday()->day);
}

/**
* @dataProvider classNameProvider
* @return void
Expand Down
9 changes: 9 additions & 0 deletions tests/DateTime/SubTest.php
Expand Up @@ -126,6 +126,15 @@ public function testSubDay($class)
$this->assertSame(30, $class::createFromDate(1975, 5, 1)->subDay()->day);
}

/**
* @dataProvider classNameProvider
* @return void
*/
public function testSubWeekdayDuringWeekend($class)
{
$this->assertSame(6, $class::createFromDate(2012, 1, 8)->subWeekday()->day);
}

/**
* @dataProvider classNameProvider
* @return void
Expand Down

0 comments on commit d8c49f5

Please sign in to comment.