Skip to content

Commit fa7af8a

Browse files
committed
url tests descriptions
1 parent cfdbefd commit fa7af8a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/unit/LocaleUrlTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
use ElaborateCode\JigsawLocalization\Mocks\PageMock;
44

5-
it('sets path on DEFAULT_LOCALE for partial path', function () {
5+
it('sets URL with base path on DEFAULT_LOCALE for partial path', function () {
66
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
77

88
$page = new PageMock;
99

1010
expect(locale_url($page, 'blog'))->toBe('https://elaboratecode.com/packages/blog');
1111
});
1212

13-
it('sets path on locale for partial path', function () {
13+
it('sets URL with base path on locale for partial path', function () {
1414
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
1515

1616
$page = new PageMock;

tests/unit/TranslateUrlTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22

33
use ElaborateCode\JigsawLocalization\Mocks\PageMock;
44

5-
test('path es => ar', function () {
5+
test('URL with base path es => ar', function () {
66
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
77

88
$page = (new PageMock)->setPath('/es/blog');
99

1010
expect(translate_url($page, 'ar'))->toBe('https://elaboratecode.com/packages/ar/blog');
1111
});
1212

13-
test('path ar <=> fr-CA', function () {
13+
test('URL with base path ar <=> fr-CA', function () {
1414
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
1515

1616
expect(translate_url((new PageMock)->setPath('/ar/blog'), 'fr-CA'))->toBe('https://elaboratecode.com/packages/fr-CA/blog');
1717
expect(translate_url((new PageMock)->setPath('/fr-CA/blog'), 'fr-CA'))->toBe('https://elaboratecode.com/packages/fr-CA/blog');
1818
});
1919

20-
test('path ar <=> haw-US', function () {
20+
test('URL with base path ar <=> haw-US', function () {
2121
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
2222

2323
expect(translate_url((new PageMock)->setPath('/ar/blog'), 'haw-US'))->toBe('https://elaboratecode.com/packages/haw-US/blog');
2424
expect(translate_url((new PageMock)->setPath('/haw-US/blog'), 'haw-US'))->toBe('https://elaboratecode.com/packages/haw-US/blog');
2525
});
2626

27-
test('path haw-US <=> fr-CA', function () {
27+
test('URL with base path haw-US <=> fr-CA', function () {
2828
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
2929

3030
expect(translate_url((new PageMock)->setPath('/fr-CA/blog'), 'haw-US'))->toBe('https://elaboratecode.com/packages/haw-US/blog');
3131
expect(translate_url((new PageMock)->setPath('/haw-US/blog'), 'fr-CA'))->toBe('https://elaboratecode.com/packages/fr-CA/blog');
3232
});
3333

34-
test('path from DEFAULT_LOCALE', function () {
34+
test('URL with base path from DEFAULT_LOCALE', function () {
3535
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
3636

3737
expect(translate_url((new PageMock)->setPath('/blog'), 'ar'))->toBe('https://elaboratecode.com/packages/ar/blog');
@@ -40,7 +40,7 @@
4040
expect(translate_url((new PageMock)->setPath('/blog'), packageDefaultLocale()))->toBe('https://elaboratecode.com/packages/blog');
4141
});
4242

43-
test('path to DEFAULT_LOCALE', function () {
43+
test('URL with base path to DEFAULT_LOCALE', function () {
4444
$this->app->config = collect(['baseUrl' => 'https://elaboratecode.com/packages']);
4545

4646
expect([

0 commit comments

Comments
 (0)