Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ addons:
chrome: stable

before_install:
- cp /home/travis/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/xdebug.ini .
- phpenv config-rm xdebug.ini
- mkdir -p $TRAVIS_BUILD_DIR/results/coverage
- cp scripts/tests/.env.$DB.travis .env
- if [[ "$DB" == "mysql" ]]; then mysql -v -e 'CREATE DATABASE monica;'; fi
Expand Down Expand Up @@ -67,9 +69,10 @@ before_script:

script:
# Run unit tests
- vendor/bin/phpunit -c phpunit${DB/mysql/}.xml
- phpdbg -qrr vendor/bin/phpunit -c phpunit${DB/mysql/}.xml

# Start http server
- phpenv config-add xdebug.ini
- bash -c "if [[ \"$SELENIUM\" == \"1\" ]]; then php -S localhost:8000 -t $TRAVIS_BUILD_DIR/public $TRAVIS_BUILD_DIR/scripts/tests/server-cc.php 2>/dev/null; fi" &
- if [[ "$SELENIUM" == "1" ]]; then until $(nc -z localhost 8000); do sleep 1; echo Waiting for http server to start...; done; fi

Expand Down
4 changes: 2 additions & 2 deletions app/Day.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ public function getInfoForJournalEntry()
'rate' => $this->rate,
'comment' => $this->comment,
'day' => $this->date->day,
'day_name' => ucfirst(\App\Helpers\DateHelper::getShortDay($this->date)),
'day_name' => mb_convert_case(\App\Helpers\DateHelper::getShortDay($this->date), MB_CASE_TITLE, 'UTF-8'),
'month' => $this->date->month,
'month_name' => strtoupper(\App\Helpers\DateHelper::getShortMonth($this->date)),
'month_name' => mb_convert_case(\App\Helpers\DateHelper::getShortMonth($this->date), MB_CASE_UPPER, 'UTF-8'),
'year' => $this->date->year,
'happens_today' => $this->date->isToday(),
];
Expand Down
3 changes: 3 additions & 0 deletions tests/CreatesApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public function createApplication()

$app->make(Kernel::class)->bootstrap();

\App::setLocale('en');
\App\Helpers\DateHelper::setLocale('en');

return $app;
}
}