Added vendor/ directory for Composer's installed files

This commit is contained in:
Ascendings
2015-08-30 12:33:20 -04:00
parent 45df179c49
commit b66a773ed8
1162 changed files with 112457 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Carbon\CarbonInterval;
use Carbon\Carbon;
class CarbonIntervalAddTest extends TestFixture
{
public function testAdd()
{
$ci = CarbonInterval::create(4, 3, 6, 7, 8, 10, 11)->add(new DateInterval('P2Y1M5DT22H33M44S'));
$this->assertCarbonInterval($ci, 6, 4, 54, 30, 43, 55);
}
public function testAddWithDiffDateInterval()
{
$diff = Carbon::now()->diff(Carbon::now()->addWeeks(3));
$ci = CarbonInterval::create(4, 3, 6, 7, 8, 10, 11)->add($diff);
$this->assertCarbonInterval($ci, 4, 3, 70, 8, 10, 11);
}
public function testAddWithNegativeDiffDateInterval()
{
$diff = Carbon::now()->diff(Carbon::now()->subWeeks(3));
$ci = CarbonInterval::create(4, 3, 6, 7, 8, 10, 11)->add($diff);
$this->assertCarbonInterval($ci, 4, 3, 28, 8, 10, 11);
}
}