Skip to content

Commit b9982ac

Browse files
committed
Migrate tests
1 parent cbd5154 commit b9982ac

File tree

3 files changed

+7
-23
lines changed

3 files changed

+7
-23
lines changed

README.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@ If you have any question how the package works, we suggest to read this post:
99

1010
You can install the package with composer, running the `composer require thepinecode/blade-filters` command.
1111

12-
### Laravel 5.5 and up
13-
14-
If you are using version 5.5 and up, there is nothing else to do.
15-
Since the package supports autodiscovery, Laravel will register the service provider automatically behind the scenes.
16-
17-
#### Disable the autodiscovery for the package
18-
19-
In some cases you may disable autodiscovery for this package.
20-
You can add the provider class to the `dont-discover` array to disable it.
21-
22-
Then you need to register it manually again.
23-
24-
### Laravel 5.4 and below
25-
26-
You have to register the service provider manually.
27-
Go to the `config/app.php` file and add the `Pine\BladeFilters\BladeFiltersServiceProvider::class` to the providers array.
28-
2912
## Using the filters
3013

3114
You can use the filters in any of your blade templates.
@@ -202,7 +185,7 @@ BladeFilters::macro('filterName', function ($value, $param1 = 'default', $param2
202185

203186
### Defining custom filters
204187

205-
Since the filters are only methods that are defined in the `Str` facade and the `BladeFilters` class, to create filters,
188+
Since the filters are only methods that are defined in the `Str` facade and the `BladeFilters` class, to create filters,
206189
you need to create a macro in a service provider's `boot()` method.
207190

208191
```php

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
}
2121
},
2222
"require": {
23-
"php" : "^7.0"
23+
"php" : "^7.2.5",
24+
"laravel/framework": "^6.0|^7.0"
2425
},
2526
"require-dev": {
26-
"orchestra/testbench":"~4.5.0"
27+
"orchestra/testbench":"~5.0.0"
2728
},
2829
"extra": {
2930
"laravel": {

tests/BladeFiltersTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function a_string_can_be_wrapped_and_multiline()
5656
{
5757
$this->get('/blade-filters/wrapped')
5858
->assertSee(
59-
'<h1>' . BladeFilters::title('this is a title') . '</h1>'
59+
'<h1>' . BladeFilters::title('this is a title') . '</h1>', false
6060
)->assertSee(
61-
'<a href="' . BladeFilters::slug('this is a link') . '">Link</a>'
61+
'<a href="' . BladeFilters::slug('this is a link') . '">Link</a>', false
6262
);
6363
}
6464

@@ -76,6 +76,6 @@ public function it_throws_exception_when_missing_filter()
7676
public function at_curly_brace_js_syntax_ignored()
7777
{
7878
$this->get('/blade-filters/ignore-js')
79-
->assertSee('<h1>{{ val.title | title }}</h1>');
79+
->assertSee('<h1>{{ val.title | title }}</h1>', false);
8080
}
8181
}

0 commit comments

Comments
 (0)