Skip to content

Commit f601440

Browse files
authored
Use phpdbg and other test improvements (#1082)
1 parent f2ca504 commit f601440

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ addons:
3939
chrome: stable
4040

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

6870
script:
6971
# Run unit tests
70-
- vendor/bin/phpunit -c phpunit${DB/mysql/}.xml
72+
- phpdbg -qrr vendor/bin/phpunit -c phpunit${DB/mysql/}.xml
7173

7274
# Start http server
75+
- phpenv config-add xdebug.ini
7376
- 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" &
7477
- if [[ "$SELENIUM" == "1" ]]; then until $(nc -z localhost 8000); do sleep 1; echo Waiting for http server to start...; done; fi
7578

app/Day.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ public function getInfoForJournalEntry()
7171
'rate' => $this->rate,
7272
'comment' => $this->comment,
7373
'day' => $this->date->day,
74-
'day_name' => ucfirst(\App\Helpers\DateHelper::getShortDay($this->date)),
74+
'day_name' => mb_convert_case(\App\Helpers\DateHelper::getShortDay($this->date), MB_CASE_TITLE, 'UTF-8'),
7575
'month' => $this->date->month,
76-
'month_name' => strtoupper(\App\Helpers\DateHelper::getShortMonth($this->date)),
76+
'month_name' => mb_convert_case(\App\Helpers\DateHelper::getShortMonth($this->date), MB_CASE_UPPER, 'UTF-8'),
7777
'year' => $this->date->year,
7878
'happens_today' => $this->date->isToday(),
7979
];

tests/CreatesApplication.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public function createApplication()
1717

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

20+
\App::setLocale('en');
21+
\App\Helpers\DateHelper::setLocale('en');
22+
2023
return $app;
2124
}
2225
}

0 commit comments

Comments
 (0)