diff --git a/resources/views/backups/index.blade.php b/resources/views/backups/index.blade.php
index 8976fdc..d9efab9 100644
--- a/resources/views/backups/index.blade.php
+++ b/resources/views/backups/index.blade.php
@@ -24,7 +24,7 @@
| {{ $key + 1 }} |
{{ $backup->getFilename() }} |
- {{ formatSizeUnits($backup->getSize()) }} |
+ {{ format_size_units($backup->getSize()) }} |
{{ date('Y-m-d H:i:s', $backup->getMTime()) }} |
{{ $invoice->created_at->format('Y-m-d') }} |
{{ $invoice->project->nameLink() }} |
{{ $invoice->project->customer->nameLink() }} |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
{!! html_link_to_route(
'invoices.show', '', [$invoice->number],
@@ -49,7 +49,7 @@
|
| {{ trans('app.total') }} |
- {{ formatRp($invoices->sum('amount')) }} |
+ {{ format_money($invoices->sum('amount')) }} |
|
diff --git a/resources/views/customers/payments.blade.php b/resources/views/customers/payments.blade.php
index 38364f8..66a584d 100755
--- a/resources/views/customers/payments.blade.php
+++ b/resources/views/customers/payments.blade.php
@@ -42,7 +42,7 @@
| {{ __('app.total') }} |
- {{ formatRp($payments->sum('amount')) }} |
+ {{ format_money($payments->sum('amount')) }} |
|
diff --git a/resources/views/customers/projects.blade.php b/resources/views/customers/projects.blade.php
index c426a79..c7eaa7b 100755
--- a/resources/views/customers/projects.blade.php
+++ b/resources/views/customers/projects.blade.php
@@ -21,7 +21,7 @@
{{ $project->nameLink() }} |
{{ $project->start_date }} |
{{ $project->work_duration }} |
-
{{ formatRp($project->project_value) }} |
+
{{ format_money($project->project_value) }} |
{{ $project->present()->status }} |
{!! html_link_to_route('projects.show', '', [$project->id], ['icon' => 'search', 'class' => 'btn btn-info btn-xs', 'title' => trans('app.show')]) !!}
diff --git a/resources/views/customers/subscriptions.blade.php b/resources/views/customers/subscriptions.blade.php
index b07c629..96271c9 100755
--- a/resources/views/customers/subscriptions.blade.php
+++ b/resources/views/customers/subscriptions.blade.php
@@ -24,9 +24,9 @@
| {!! $subscription->type_label !!} |
{{ $subscription->customer->name }} |
- {{ dateId($subscription->due_date) }} {!! $subscription->nearOfDueDateSign() !!}
+ {{ date_id($subscription->due_date) }} {!! $subscription->nearOfDueDateSign() !!}
|
-
{{ formatRp($subscription->price) }} |
+
{{ format_money($subscription->price) }} |
{{ $subscription->vendor->name }} |
{{ $subscription->status() }} |
diff --git a/resources/views/invoice-drafts/partials/draft-confirm.blade.php b/resources/views/invoice-drafts/partials/draft-confirm.blade.php
index a8fbef3..eaef2f7 100644
--- a/resources/views/invoice-drafts/partials/draft-confirm.blade.php
+++ b/resources/views/invoice-drafts/partials/draft-confirm.blade.php
@@ -18,7 +18,7 @@
| {{ trans('invoice.due_date') }} | {{ $draft->dueDate }} |
| {{ trans('invoice.total') }} |
- {{ formatRp($draft->getTotal()) }} |
+ {{ format_money($draft->getTotal()) }} |
| {{ trans('invoice.notes') }} | {{ $draft->notes }} |
@@ -48,7 +48,7 @@
| {{ $key + 1 }} |
{!! nl2br($item->description) !!} |
- {{ formatRp($item->amount) }} |
+ {{ format_money($item->amount) }} |
@empty
@endforelse
@@ -56,7 +56,7 @@
| {{ trans('invoice.total') }} : |
- {{ formatRp($draft->getTotal()) }} |
+ {{ format_money($draft->getTotal()) }} |
diff --git a/resources/views/invoice-drafts/partials/draft-item-list.blade.php b/resources/views/invoice-drafts/partials/draft-item-list.blade.php
index 65f8217..eadf7f5 100644
--- a/resources/views/invoice-drafts/partials/draft-item-list.blade.php
+++ b/resources/views/invoice-drafts/partials/draft-item-list.blade.php
@@ -51,7 +51,7 @@
@endforeach
| {{ trans('invoice.amount') }} : |
- {{ formatRp($draft->getTotal()) }} |
+ {{ format_money($draft->getTotal()) }} |
|
diff --git a/resources/views/invoices/index.blade.php b/resources/views/invoices/index.blade.php
index b6c6f95..7a48368 100755
--- a/resources/views/invoices/index.blade.php
+++ b/resources/views/invoices/index.blade.php
@@ -34,7 +34,7 @@
| {{ $invoice->created_at->format('Y-m-d') }} |
{{ $invoice->project->nameLink() }} |
{{ $invoice->project->customer->nameLink() }} |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
{!! html_link_to_route(
'invoices.show', '', [$invoice->number],
@@ -61,7 +61,7 @@
|
| {{ trans('app.total') }} |
- {{ formatRp($invoices->sum('amount')) }} |
+ {{ format_money($invoices->sum('amount')) }} |
|
diff --git a/resources/views/invoices/partials/detail.blade.php b/resources/views/invoices/partials/detail.blade.php
index eed4668..d613565 100644
--- a/resources/views/invoices/partials/detail.blade.php
+++ b/resources/views/invoices/partials/detail.blade.php
@@ -7,6 +7,6 @@
| {{ trans('invoice.customer') }} | {{ $invoice->project->customer->nameLink() }} |
| {{ trans('invoice.items_count') }} | {{ $invoice->items_count }} |
| {{ trans('invoice.creator') }} | {{ $invoice->creator->name }} |
|---|
-
| {{ trans('invoice.amount') }} | {{ formatRp($invoice->amount) }} |
|---|
+
| {{ trans('invoice.amount') }} | {{ format_money($invoice->amount) }} |
|---|
diff --git a/resources/views/invoices/partials/item-list.blade.php b/resources/views/invoices/partials/item-list.blade.php
index 7834873..5f3d09d 100644
--- a/resources/views/invoices/partials/item-list.blade.php
+++ b/resources/views/invoices/partials/item-list.blade.php
@@ -77,7 +77,7 @@
| {{ trans('invoice.amount') }} : |
- {{ formatRp(collect($invoice->items)->sum('amount')) }} |
+ {{ format_money(collect($invoice->items)->sum('amount')) }} |
|
diff --git a/resources/views/invoices/pdf.blade.php b/resources/views/invoices/pdf.blade.php
index c830812..a97f9dd 100755
--- a/resources/views/invoices/pdf.blade.php
+++ b/resources/views/invoices/pdf.blade.php
@@ -39,7 +39,7 @@
|
- {!! appLogoImage(['style' => 'width:100%']) !!}
+ {!! app_logo_image(['style' => 'width:100%']) !!}
|
@@ -61,7 +61,7 @@
{{ __('invoice.invoice') }}
{{ __('invoice.number') }} : INV-{{ $invoice->number }}
- {{ __('app.date') }} : {{ dateId($invoice->date) }}
+ {{ __('app.date') }} : {{ date_id($invoice->date) }}
|
|
@@ -87,7 +87,7 @@
@if ($invoice->due_date)
{{ __('invoice.due_date') }}
- {{ dateId($invoice->due_date) }}
+ {{ date_id($invoice->due_date) }}
@endif
@if ($taxId = Option::get('agency_tax_id'))
{{ __('agency.tax_id') }}
@@ -114,7 +114,7 @@
|
| {{ 1 + $key }} |
{!! nl2br($item['description']) !!} |
- {{ formatRp($item['amount']) }} |
+ {{ format_money($item['amount']) }} |
@php
$subtotal += $item['amount'];
@@ -123,19 +123,19 @@
@if ($invoice->discount)
| {{ __('invoice.subtotal') }} : |
- {{ formatRp($subtotal) }} |
+ {{ format_money($subtotal) }} |
|
{{ __('invoice.discount') }}
{{ $invoice->discount_notes ? '('.$invoice->discount_notes.')': '' }} :
|
- - {{ formatRp($invoice->discount) }} |
+ - {{ format_money($invoice->discount) }} |
@endif
| {{ __('app.total') }} |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
@@ -176,7 +176,7 @@
{{ Option::get('agency_city') ? Option::get('agency_city').', ' : '' }}
- {{ dateId($invoice->date) }}
+ {{ date_id($invoice->date) }}
{{ Option::get('agency_name') }}
|
diff --git a/resources/views/invoices/show.blade.php b/resources/views/invoices/show.blade.php
index d0737b5..f96b3fc 100644
--- a/resources/views/invoices/show.blade.php
+++ b/resources/views/invoices/show.blade.php
@@ -39,7 +39,7 @@
| {{ $key + 1 }} |
{!! nl2br($item['description']) !!} |
- {{ formatRp($item['amount']) }} |
+ {{ format_money($item['amount']) }} |
@php
$subtotal += $item['amount'];
@@ -50,19 +50,19 @@
@if ($invoice->discount)
| {{ __('invoice.subtotal') }} : |
- {{ formatRp($subtotal) }} |
+ {{ format_money($subtotal) }} |
|
{{ __('invoice.discount') }}
{{ $invoice->discount_notes ? '('.$invoice->discount_notes.')': '' }} :
|
- - {{ formatRp($invoice->discount) }} |
+ - {{ format_money($invoice->discount) }} |
@endif
| {{ trans('app.total') }} : |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
diff --git a/resources/views/jobs/partials/job-show.blade.php b/resources/views/jobs/partials/job-show.blade.php
index 36b993c..8f983a7 100644
--- a/resources/views/jobs/partials/job-show.blade.php
+++ b/resources/views/jobs/partials/job-show.blade.php
@@ -5,9 +5,9 @@
| {{ __('job.name') }} | {{ $job->name }} |
| {{ __('job.type') }} | {{ $job->type() }} |
|---|
@can('see-pricings', $job)
-
| {{ __('job.price') }} | {{ formatRp($job->price) }} |
|---|
+
| {{ __('job.price') }} | {{ format_money($job->price) }} |
|---|
@endcan
-
| {{ __('job.progress') }} | {{ formatDecimal($job->progress) }}% |
|---|
+
| {{ __('job.progress') }} | {{ format_decimal($job->progress) }}% |
| {{ __('job.worker') }} | {{ $job->worker->name }} |
| {{ __('time.updated_at') }} | {{ $job->updated_at }} |
| {{ __('job.description') }} | {!! nl2br($job->description) !!} |
|---|
diff --git a/resources/views/jobs/partials/job-tasks.blade.php b/resources/views/jobs/partials/job-tasks.blade.php
index ea906d0..20fe1d1 100644
--- a/resources/views/jobs/partials/job-tasks.blade.php
+++ b/resources/views/jobs/partials/job-tasks.blade.php
@@ -66,7 +66,7 @@
| {{ __('app.total') }} |
- {{ formatDecimal($job->tasks->avg('progress')) }} % |
+ {{ format_decimal($job->tasks->avg('progress')) }} % |
@if (request('action') == 'sort_tasks')
{{ link_to_route('jobs.show', __('app.done'), [$job], ['class' => 'btn btn-default btn-xs pull-right']) }}
diff --git a/resources/views/jobs/unfinished.blade.php b/resources/views/jobs/unfinished.blade.php
index 74dfcae..8d31f01 100755
--- a/resources/views/jobs/unfinished.blade.php
+++ b/resources/views/jobs/unfinished.blade.php
@@ -46,9 +46,9 @@
@endif
| {{ $job->tasks_count = $job->tasks->count() }} |
- {{ formatDecimal($job->progress) }} % |
+ {{ format_decimal($job->progress) }} % |
@can('see-pricings', $job)
- {{ formatRp($job->price) }} |
+ {{ format_money($job->price) }} |
@endcan
{{ $job->worker->name }} |
@@ -63,9 +63,9 @@
|
| {{ __('app.total') }} |
{{ $jobs->sum('tasks_count') }} |
- {{ formatDecimal($jobs->avg('progress')) }} % |
+ {{ format_decimal($jobs->avg('progress')) }} % |
@can('see-pricings', new App\Entities\Projects\Job)
- {{ formatRp($jobs->sum('price')) }} |
+ {{ format_money($jobs->sum('price')) }} |
@endcan
|
diff --git a/resources/views/layouts/partials/sidebar.blade.php b/resources/views/layouts/partials/sidebar.blade.php
index c41001c..bd27221 100755
--- a/resources/views/layouts/partials/sidebar.blade.php
+++ b/resources/views/layouts/partials/sidebar.blade.php
@@ -10,7 +10,7 @@
diff --git a/resources/views/reports/payments/yearly.blade.php b/resources/views/reports/payments/yearly.blade.php
index 2728cc9..ca28dd9 100755
--- a/resources/views/reports/payments/yearly.blade.php
+++ b/resources/views/reports/payments/yearly.blade.php
@@ -37,16 +37,16 @@
@php $chartData = []; @endphp
- @foreach(getMonths() as $monthNumber => $monthName)
+ @foreach(get_months() as $monthNumber => $monthName)
@php
$any = isset($reports[$monthNumber]);
@endphp
- | {{ monthId($monthNumber) }} |
+ {{ month_id($monthNumber) }} |
{{ $any ? $reports[$monthNumber]->count : 0 }} |
- {{ formatRp($any ? $reports[$monthNumber]->cashin : 0) }} |
- {{ formatRp($any ? $reports[$monthNumber]->cashout : 0) }} |
- {{ formatRp($profit = $any ? $reports[$monthNumber]->profit : 0) }} |
+ {{ format_money($any ? $reports[$monthNumber]->cashin : 0) }} |
+ {{ format_money($any ? $reports[$monthNumber]->cashout : 0) }} |
+ {{ format_money($profit = $any ? $reports[$monthNumber]->profit : 0) }} |
{{ link_to_route(
'reports.payments.monthly',
@@ -54,14 +54,14 @@
['month' => $monthNumber, 'year' => $year],
[
'class' => 'btn btn-info btn-xs',
- 'title' => __('report.monthly', ['year_month' => monthId($monthNumber)]),
- 'title' => __('report.monthly', ['year_month' => monthId($monthNumber).' '.$year]),
+ 'title' => __('report.monthly', ['year_month' => month_id($monthNumber)]),
+ 'title' => __('report.monthly', ['year_month' => month_id($monthNumber).' '.$year]),
]
) }}
|
@php
- $chartData[] = ['month' => monthId($monthNumber), 'value' => $profit];
+ $chartData[] = ['month' => month_id($monthNumber), 'value' => $profit];
@endphp
@endforeach
@@ -69,9 +69,9 @@
| {{ trans('app.total') }} |
{{ $reports->sum('count') }} |
- {{ formatRp($reports->sum('cashin')) }} |
- {{ formatRp($reports->sum('cashout')) }} |
- {{ formatRp($reports->sum('profit')) }} |
+ {{ format_money($reports->sum('cashin')) }} |
+ {{ format_money($reports->sum('cashout')) }} |
+ {{ format_money($reports->sum('profit')) }} |
|
diff --git a/resources/views/subscriptions/index.blade.php b/resources/views/subscriptions/index.blade.php
index e93be92..2d0fdda 100755
--- a/resources/views/subscriptions/index.blade.php
+++ b/resources/views/subscriptions/index.blade.php
@@ -34,9 +34,9 @@
{!! $subscription->type_label !!} |
{{ $subscription->customer->name }} |
- {{ dateId($subscription->due_date) }} {!! $subscription->nearOfDueDateSign() !!}
+ {{ date_id($subscription->due_date) }} {!! $subscription->nearOfDueDateSign() !!}
|
-
{{ formatRp($subscription->price) }} |
+
{{ format_money($subscription->price) }} |
{{ $subscription->vendor->name }} |
{{ $subscription->status() }} |
diff --git a/resources/views/subscriptions/partials/subscription-show.blade.php b/resources/views/subscriptions/partials/subscription-show.blade.php
index 8234b9c..7d4f422 100644
--- a/resources/views/subscriptions/partials/subscription-show.blade.php
+++ b/resources/views/subscriptions/partials/subscription-show.blade.php
@@ -1,10 +1,10 @@
| {{ trans('subscription.name') }} | {{ $subscription->name }} |
- | {{ trans('subscription.price') }} | {{ formatRp($subscription->price) }} |
+ | {{ trans('subscription.price') }} | {{ format_money($subscription->price) }} |
| {{ trans('subscription.type') }} | {{ $subscription->type }} |
- | {{ trans('subscription.start_date') }} | {{ dateId($subscription->start_date) }} |
- | {{ trans('subscription.due_date') }} | {{ dateId($subscription->due_date) }} |
+ | {{ trans('subscription.start_date') }} | {{ date_id($subscription->start_date) }} |
+ | {{ trans('subscription.due_date') }} | {{ date_id($subscription->due_date) }} |
| {{ trans('subscription.customer') }} | {{ $subscription->customer->nameLink() }} |
| {{ trans('subscription.project') }} |
diff --git a/resources/views/users/agency/edit.blade.php b/resources/views/users/agency/edit.blade.php
index 5b430b2..77bbdd1 100644
--- a/resources/views/users/agency/edit.blade.php
+++ b/resources/views/users/agency/edit.blade.php
@@ -31,7 +31,7 @@
{{ Form::open(['route' => 'users.agency.logo-upload', 'method' => 'patch', 'files' => true]) }}
-
{!! appLogoImage(['style' => 'margin:20px auto']) !!}
+
{!! app_logo_image(['style' => 'margin:20px auto']) !!}
{!! FormField::file('logo', [
'label' => __('agency.logo_change'),
'info' => ['text' => __('agency.logo_upload_info'), 'class' => 'warning'],
diff --git a/resources/views/users/agency/show.blade.php b/resources/views/users/agency/show.blade.php
index 9507913..b74473a 100644
--- a/resources/views/users/agency/show.blade.php
+++ b/resources/views/users/agency/show.blade.php
@@ -6,7 +6,7 @@
-
{!! appLogoImage() !!}
+
{!! app_logo_image() !!}
{{ Option::get('agency_name') }}
{{ Option::get('agency_tagline') }}
diff --git a/resources/views/users/jobs.blade.php b/resources/views/users/jobs.blade.php
index 6a2f113..682875d 100755
--- a/resources/views/users/jobs.blade.php
+++ b/resources/views/users/jobs.blade.php
@@ -33,8 +33,8 @@
@endif
{{ $job->tasks_count = $job->tasks->count() }} |
-
{{ formatDecimal($job->progress = $job->progress) }} % |
-
{{ formatRp($job->price) }} |
+
{{ format_decimal($job->progress = $job->progress) }} % |
+
{{ format_money($job->price) }} |
{!! html_link_to_route('jobs.show', '', [$job], [
'icon' => 'search',
diff --git a/resources/views/users/projects.blade.php b/resources/views/users/projects.blade.php
index 34e1075..9c625d2 100755
--- a/resources/views/users/projects.blade.php
+++ b/resources/views/users/projects.blade.php
@@ -30,7 +30,7 @@
| {{ $project->nameLink() }} |
{{ $project->start_date }} |
{{ $project->work_duration }} |
-
{{ formatRp($project->project_value) }} |
+
{{ format_money($project->project_value) }} |
{{ $project->present()->status }} |
{{ $project->customer->name }} |
diff --git a/resources/views/vendors/show.blade.php b/resources/views/vendors/show.blade.php
index 953dc32..1f0db62 100755
--- a/resources/views/vendors/show.blade.php
+++ b/resources/views/vendors/show.blade.php
@@ -44,7 +44,7 @@
| {{ 1 + $key }} |
{{ $payment->project->name }} |
{{ $payment->date }} |
-
{{ formatRp($payment->amount) }} |
+
{{ format_money($payment->amount) }} |
{{ $payment->description }} |
@endforeach
@@ -52,7 +52,7 @@
| {{ __('app.total') }} |
- {{ formatRp($vendor->payments->sum('amount')) }} |
+ {{ format_money($vendor->payments->sum('amount')) }} |
|
diff --git a/tests/Feature/Invoices/InvoiceEntryTest.php b/tests/Feature/Invoices/InvoiceEntryTest.php
index b635e7b..0401c98 100644
--- a/tests/Feature/Invoices/InvoiceEntryTest.php
+++ b/tests/Feature/Invoices/InvoiceEntryTest.php
@@ -87,7 +87,7 @@ class InvoiceEntryTest extends TestCase
$this->seePageIs(route('invoice-drafts.show', $draft->draftKey));
$this->assertEquals(5000, $draft->getTotal());
- $this->see(formatRp(5000));
+ $this->see(format_money(5000));
}
/** @test */
@@ -137,7 +137,7 @@ class InvoiceEntryTest extends TestCase
$this->assertEquals(200, $draft->getTotal());
- $this->see(formatRp($draft->getTotal()));
+ $this->see(format_money($draft->getTotal()));
}
/** @test */
@@ -174,7 +174,7 @@ class InvoiceEntryTest extends TestCase
$this->see($project->name);
$this->see($project->customer->name);
$this->see($draft->notes);
- $this->see(formatRp(3000));
+ $this->see(format_money(3000));
$this->seeElement('input', ['id' => 'save-invoice-draft']);
}
diff --git a/tests/Feature/ManageJobsTest.php b/tests/Feature/ManageJobsTest.php
index c9972d9..a5aa6e2 100644
--- a/tests/Feature/ManageJobsTest.php
+++ b/tests/Feature/ManageJobsTest.php
@@ -142,7 +142,7 @@ class ManageJobsTest extends TestCase
$this->seePageIs(route('jobs.show', $project->id));
$this->see(trans('job.detail'));
$this->see($job->name);
- $this->see(formatRp($job->price));
+ $this->see(format_money($job->price));
$this->see($job->worker->name);
}
diff --git a/tests/Feature/ManageSubscriptionsTest.php b/tests/Feature/ManageSubscriptionsTest.php
index 96e4683..8046f58 100644
--- a/tests/Feature/ManageSubscriptionsTest.php
+++ b/tests/Feature/ManageSubscriptionsTest.php
@@ -111,8 +111,8 @@ class ManageSubscriptionsTest extends TestCase
$this->visit(route('subscriptions.show', $subscription->id));
$this->see($subscription->name);
- $this->see(formatRp($subscription->price));
- $this->see(dateId($subscription->start_date));
- $this->see(dateId($subscription->due_date));
+ $this->see(format_money($subscription->price));
+ $this->see(date_id($subscription->start_date));
+ $this->see(date_id($subscription->due_date));
}
}
diff --git a/tests/Feature/Payments/ManagePaymentsTest.php b/tests/Feature/Payments/ManagePaymentsTest.php
index 9d0133b..8f2cbdc 100644
--- a/tests/Feature/Payments/ManagePaymentsTest.php
+++ b/tests/Feature/Payments/ManagePaymentsTest.php
@@ -216,7 +216,7 @@ class ManagePaymentsTest extends TestCase
$this->seePageIs(route('payments.show', $payment->id));
$this->see(trans('payment.detail'));
$this->see($payment->date);
- $this->see(formatRp($payment->amount));
+ $this->see(format_money($payment->amount));
$this->see($payment->description);
$this->see($payment->partner->name);
}
diff --git a/tests/Unit/Helpers/AppLogoImageTest.php b/tests/Unit/Helpers/AppLogoImageTest.php
index 14d508e..c78543f 100644
--- a/tests/Unit/Helpers/AppLogoImageTest.php
+++ b/tests/Unit/Helpers/AppLogoImageTest.php
@@ -17,13 +17,13 @@ class AppLogoImageTest extends TestCase
'value' => 'icon_user_1.png',
]);
- $this->assertEquals(asset('assets/imgs/icon_user_1.png'), appLogoPath());
+ $this->assertEquals(asset('assets/imgs/icon_user_1.png'), app_logo_path());
}
/** @test */
public function app_logo_path_function_returns_default_logo_image_path_if_no_image_logo_path_setting()
{
- $this->assertEquals(asset('assets/imgs/default-logo.png'), appLogoPath());
+ $this->assertEquals(asset('assets/imgs/default-logo.png'), app_logo_path());
}
/** @test */
@@ -33,7 +33,7 @@ class AppLogoImageTest extends TestCase
$logoString .= ' src="'.asset('assets/imgs/default-logo.png').'"';
$logoString .= ' alt="Logo Laravel">';
- $this->assertEquals($logoString, appLogoImage());
+ $this->assertEquals($logoString, app_logo_image());
}
/** @test */
@@ -48,7 +48,7 @@ class AppLogoImageTest extends TestCase
$logoString .= ' src="'.asset('assets/imgs/icon_user_1.png').'"';
$logoString .= ' alt="Logo Laravel">';
- $this->assertEquals($logoString, appLogoImage());
+ $this->assertEquals($logoString, app_logo_image());
}
/** @test */
@@ -69,7 +69,7 @@ class AppLogoImageTest extends TestCase
'class' => '123',
'style' => 'display: inline',
];
- $this->assertEquals($logoString, appLogoImage($overrides));
+ $this->assertEquals($logoString, app_logo_image($overrides));
}
/** @test */
@@ -84,6 +84,6 @@ class AppLogoImageTest extends TestCase
$logoString .= ' src="'.asset('assets/imgs/default-logo.png').'"';
$logoString .= ' alt="Logo Laravel">';
- $this->assertEquals($logoString, appLogoImage());
+ $this->assertEquals($logoString, app_logo_image());
}
}
diff --git a/tests/Unit/Helpers/DateDifferenceTest.php b/tests/Unit/Helpers/DateDifferenceTest.php
index 6984536..3a9625e 100644
--- a/tests/Unit/Helpers/DateDifferenceTest.php
+++ b/tests/Unit/Helpers/DateDifferenceTest.php
@@ -14,31 +14,31 @@ class DateDifferenceTest extends TestCase
/** @test */
public function date_difference_function_exists()
{
- $this->assertTrue(function_exists('dateDifference'));
+ $this->assertTrue(function_exists('date_difference'));
}
/** @test */
public function date_difference_returns_days_count_by_default()
{
- $this->assertEquals(9, dateDifference('2018-04-01', '2018-04-10'));
+ $this->assertEquals(9, date_difference('2018-04-01', '2018-04-10'));
}
/** @test */
public function date_difference_can_returns_formatted_string()
{
- $this->assertEquals('9 days', dateDifference('2018-04-01', '2018-04-10', '%a days'));
+ $this->assertEquals('9 days', date_difference('2018-04-01', '2018-04-10', '%a days'));
}
/** @test */
public function date_difference_returns_proper_months_and_days_format()
{
// TODO: Need to fix, this should returns 1 months 9 days
- $this->assertEquals('1 month 12 days', dateDifference('2018-03-01', '2018-04-10', '%m month %d days'));
+ $this->assertEquals('1 month 12 days', date_difference('2018-03-01', '2018-04-10', '%m month %d days'));
}
/** @test */
public function date_difference_returns_proper_years_months_and_days_format()
{
- $this->assertEquals('1 year 1 month 12 days', dateDifference('2017-03-01', '2018-04-10', '%y year %m month %d days'));
+ $this->assertEquals('1 year 1 month 12 days', date_difference('2017-03-01', '2018-04-10', '%y year %m month %d days'));
}
}
diff --git a/tests/Unit/Helpers/MoneyFormatTest.php b/tests/Unit/Helpers/MoneyFormatTest.php
index fc0384c..483d96c 100644
--- a/tests/Unit/Helpers/MoneyFormatTest.php
+++ b/tests/Unit/Helpers/MoneyFormatTest.php
@@ -17,9 +17,9 @@ class MoneyFormatTest extends TestCase
/** @test */
public function format_money_returns_string_with_default_money_sign()
{
- $this->assertEquals('Rp. 1.000', formatRp(1000));
- $this->assertEquals('Rp. 0', formatRp(0));
- $this->assertEquals('- Rp. 1.000', formatRp(-1000));
+ $this->assertEquals('Rp. 1.000', format_money(1000));
+ $this->assertEquals('Rp. 0', format_money(0));
+ $this->assertEquals('- Rp. 1.000', format_money(-1000));
}
/** @test */
@@ -30,8 +30,8 @@ class MoneyFormatTest extends TestCase
'value' => 'USD',
]);
- $this->assertEquals('USD 1.000', formatRp(1000));
- $this->assertEquals('USD 0', formatRp(0));
- $this->assertEquals('- USD 1.000', formatRp(-1000));
+ $this->assertEquals('USD 1.000', format_money(1000));
+ $this->assertEquals('USD 0', format_money(0));
+ $this->assertEquals('- USD 1.000', format_money(-1000));
}
}
diff --git a/tests/Unit/Models/SubscriptionTest.php b/tests/Unit/Models/SubscriptionTest.php
index af0f041..3d2c17a 100644
--- a/tests/Unit/Models/SubscriptionTest.php
+++ b/tests/Unit/Models/SubscriptionTest.php
@@ -3,7 +3,7 @@
namespace Tests\Unit\Models;
use Carbon\Carbon;
-use Tests\TestCase as TestCase;
+use Tests\TestCase;
use App\Entities\Partners\Vendor;
use App\Entities\Projects\Project;
use App\Entities\Partners\Customer;
@@ -69,8 +69,8 @@ class SubscriptionTest extends TestCase
$next3Months = Carbon::now()->addMonths(2)->format('Y-m-d');
$subscription = factory(Subscription::class)->make(['due_date' => $next3Months]);
- $dueDateDescription = trans('subscription.start_date').' : '.dateId($subscription->start_date)."\n";
- $dueDateDescription .= trans('subscription.due_date').' : '.dateId($subscription->due_date);
+ $dueDateDescription = trans('subscription.start_date').' : '.date_id($subscription->start_date)."\n";
+ $dueDateDescription .= trans('subscription.due_date').' : '.date_id($subscription->due_date);
$this->assertEquals($dueDateDescription, $subscription->dueDateDescription());
}