File tree 3 files changed +21
-10
lines changed 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 64
64
65
65
- name : Install dependencies
66
66
run : |
67
- composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
67
+ composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
68
68
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
69
69
70
70
- name : Execute tests
Original file line number Diff line number Diff line change @@ -21,19 +21,12 @@ final class OptimusFactoryTest extends AbstractTestCase
21
21
{
22
22
public function testMakeStandard (): void
23
23
{
24
- $ factory = $ this ->getOptimusFactory ();
25
-
26
- $ return = $ factory ->make ([
24
+ $ instance = (new OptimusFactory ())->make ([
27
25
'prime ' => 0 ,
28
26
'inverse ' => 1 ,
29
27
'random ' => 2 ,
30
28
]);
31
29
32
- $ this ->assertInstanceOf (Optimus::class, $ return );
33
- }
34
-
35
- protected function getOptimusFactory (): OptimusFactory
36
- {
37
- return new OptimusFactory ();
30
+ $ this ->assertInstanceOf (Optimus::class, $ instance );
38
31
}
39
32
}
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ public function testOptimusManagerIsInjectable(): void
35
35
36
36
public function testBindings (): void
37
37
{
38
+ $ this ->configurePrimeNumbers ();
39
+
38
40
$ this ->assertIsInjectable (Optimus::class);
39
41
40
42
$ original = $ this ->app ['optimus.connection ' ];
@@ -44,4 +46,20 @@ public function testBindings(): void
44
46
$ this ->assertNotSame ($ original , $ new );
45
47
$ this ->assertEquals ($ original , $ new );
46
48
}
49
+
50
+ protected function configurePrimeNumbers (): void
51
+ {
52
+ config ()->set ('optimus.connections ' , [
53
+ 'main ' => [
54
+ 'prime ' => 1490261603 ,
55
+ 'inverse ' => 1573362507 ,
56
+ 'random ' => 1369544188 ,
57
+ ],
58
+ 'custom ' => [
59
+ 'prime ' => 1770719809 ,
60
+ 'inverse ' => 1417283009 ,
61
+ 'random ' => 508877541 ,
62
+ ],
63
+ ]);
64
+ }
47
65
}
You can’t perform that action at this time.
0 commit comments