Skip to content

Commit

Permalink
[1.x] Should have fixed testcases data providers.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGhostHunter committed Jan 9, 2024
1 parent a0033eb commit b68bf29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Latest Version on Packagist](https://img.shields.io/packagist/v/laragear/meta-testing.svg)](https://packagist.org/packages/laragear/refine)
[![Latest stable test run](https://github.com/Laragear/Refine/workflows/Tests/badge.svg)](https://github.com/Laragear/Refine/actions)
[![Codecov coverage](https://codecov.io/gh/Laragear/Refine/branch/1.x/graph/badge.svg?token=bogXap7Rjn)](https://codecov.io/gh/Laragear/Refine)
[![Maintainability](https://api.codeclimate.com/v1/badges/70970a4557ebd90484fd/maintainability)](https://codeclimate.com/github/Laragear/Refine/maintainability)
[![Maintainability](https://api.codeclimate.com/v1/badges/19ea8702c12213898a9c/maintainability)](https://codeclimate.com/github/Laragear/Refine/maintainability)
[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=Laragear_Refine&metric=alert_status)](https://sonarcloud.io/dashboard?id=Laragear_Refine)
[![Laravel Octane Compatibility](https://img.shields.io/badge/Laravel%20Octane-Compatible-success?style=flat&logo=laravel)](https://laravel.com/docs/10.x/octane#introduction)

Expand Down
7 changes: 7 additions & 0 deletions tests/RefinerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function test_abstract_refiner_uses_query_keys_by_default(): void

/**
* @param \Closure():\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $getQuery
* @dataProvider provideBuilders
*/
#[DataProvider('provideBuilders')]
public function test_calls_run_before_with_request_and_builder(Closure $getQuery): void
Expand All @@ -48,6 +49,7 @@ public function test_calls_run_before_with_request_and_builder(Closure $getQuery

/**
* @param \Closure():\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $getQuery
* @dataProvider provideBuilders
*/
#[DataProvider('provideBuilders')]
public function test_calls_run_after_with_request_and_builder(Closure $getQuery): void
Expand All @@ -64,6 +66,7 @@ public function test_calls_run_after_with_request_and_builder(Closure $getQuery)

/**
* @param \Closure():\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $getQuery
* @dataProvider provideBuilders
*/
#[DataProvider('provideBuilders')]
public function test_calls_matched_methods_from_request(Closure $getQuery): void
Expand All @@ -83,6 +86,7 @@ public function test_calls_matched_methods_from_request(Closure $getQuery): void

/**
* @param \Closure():\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $getQuery
* @dataProvider provideBuilders
*/
#[DataProvider('provideBuilders')]
public function test_calls_matched_method_using_camel_Case(Closure $getQuery): void
Expand All @@ -102,6 +106,7 @@ public function test_calls_matched_method_using_camel_Case(Closure $getQuery): v

/**
* @param \Closure():\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $getQuery
* @dataProvider provideBuilders
*/
#[DataProvider('provideBuilders')]
public function test_doesnt_calls_non_callable_methods(Closure $getQuery): void
Expand All @@ -121,6 +126,7 @@ public function test_doesnt_calls_non_callable_methods(Closure $getQuery): void

/**
* @param \Closure():\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $getQuery
* @dataProvider provideBuilders
*/
#[DataProvider('provideBuilders')]
public function test_doesnt_calls_refiner_included_methods(Closure $getQuery): void
Expand All @@ -138,6 +144,7 @@ public function test_doesnt_calls_refiner_included_methods(Closure $getQuery): v

/**
* @param \Closure():\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $getQuery
* @dataProvider provideBuilders
*/
#[DataProvider('provideBuilders')]
public function test_calls_matched_methods_from_request_using_custom_keys(Closure $getQuery): void
Expand Down

0 comments on commit b68bf29

Please sign in to comment.