home
/
zktecojo
/
public_html
/
vendor
/
nesbot
/
carbon
/
tests
➕ New
📤 Upload
✎ Editing:
TestFixture.php
← Back
<?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. */ require __DIR__.'/../vendor/autoload.php'; use Carbon\Carbon; class TestFixture extends \PHPUnit_Framework_TestCase { private $saveTz; protected function setUp() { //save current timezone $this->saveTz = date_default_timezone_get(); date_default_timezone_set('America/Toronto'); } protected function tearDown() { date_default_timezone_set($this->saveTz); } protected function assertCarbon(Carbon $d, $year, $month, $day, $hour = null, $minute = null, $second = null) { $this->assertSame($year, $d->year, 'Carbon->year'); $this->assertSame($month, $d->month, 'Carbon->month'); $this->assertSame($day, $d->day, 'Carbon->day'); if ($hour !== null) { $this->assertSame($hour, $d->hour, 'Carbon->hour'); } if ($minute !== null) { $this->assertSame($minute, $d->minute, 'Carbon->minute'); } if ($second !== null) { $this->assertSame($second, $d->second, 'Carbon->second'); } } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel