Skip to content

Commit 709a9fd

Browse files
committed
Setup PHPUnit bootstrap script to set timezone.
1 parent 4326e6a commit 709a9fd

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

phpunit.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| Register The Composer Auto Loader
6+
|--------------------------------------------------------------------------
7+
|
8+
| Composer provides a convenient, automatically generated class loader
9+
| for our application. We just need to utilize it! We'll require it
10+
| into the script here so that we do not have to worry about the
11+
| loading of any our classes "manually". Feels great to relax.
12+
|
13+
*/
14+
15+
require __DIR__.'/vendor/autoload.php';
16+
17+
/*
18+
|--------------------------------------------------------------------------
19+
| Set The Default Timezone
20+
|--------------------------------------------------------------------------
21+
|
22+
| Here we will set the default timezone for PHP. PHP is notoriously mean
23+
| if the timezone is not explicitly set. This will be used by each of
24+
| the PHP date and date-time functions throughout the application.
25+
|
26+
*/
27+
28+
date_default_timezone_set('UTC');

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
33
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
4+
bootstrap="phpunit.php"
55
colors="true"
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"

0 commit comments

Comments
 (0)