File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
tests/Traits/Configuration Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Rappasoft \LaravelLivewireTables \Tests \Traits \Configuration ;
4
4
5
+ use Rappasoft \LaravelLivewireTables \Tests \Http \Livewire \PetsTable ;
5
6
use Rappasoft \LaravelLivewireTables \Tests \TestCase ;
6
7
7
8
class FingerprintConfigurationTest extends TestCase
@@ -11,4 +12,22 @@ public function can_set_fingerprint(): void
11
12
{
12
13
$ this ->assertSame ('test ' , $ this ->basicTable ->setDataTableFingerprint ('test ' )->getDataTableFingerprint ());
13
14
}
15
+
16
+ /** @test */
17
+ public function can_set_fingerprint_in_configure_method (): void
18
+ {
19
+ $ mock = new class extends PetsTable {
20
+ public function configure (): void
21
+ {
22
+ $ this ->setDataTableFingerprint ('test ' );
23
+ }
24
+ };
25
+
26
+ $ mock ->configure ();
27
+ $ mock ->boot ();
28
+
29
+ $ this ->assertSame ('test ' , $ mock ->getDataTableFingerprint ());
30
+ }
31
+
32
+
14
33
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Rappasoft \LaravelLivewireTables \Tests \Traits \Configuration ;
4
4
5
+ use Rappasoft \LaravelLivewireTables \Tests \Http \Livewire \PetsTable ;
5
6
use Rappasoft \LaravelLivewireTables \Tests \TestCase ;
6
7
7
8
class QueryStringAliasConfigurationTest extends TestCase
@@ -11,4 +12,20 @@ public function can_set_query_string_alias(): void
11
12
{
12
13
$ this ->assertSame ('test ' , $ this ->basicTable ->setQueryStringAlias ('test ' )->getQueryStringAlias ());
13
14
}
15
+
16
+ /** @test */
17
+ public function can_set_query_string_in_configure_method (): void
18
+ {
19
+ $ mock = new class extends PetsTable {
20
+ public function configure (): void
21
+ {
22
+ $ this ->setQueryStringAlias ('test ' );
23
+ }
24
+ };
25
+
26
+ $ mock ->configure ();
27
+ $ mock ->boot ();
28
+
29
+ $ this ->assertSame ('test ' , $ mock ->getQueryStringAlias ());
30
+ }
14
31
}
You can’t perform that action at this time.
0 commit comments