File tree 2 files changed +12
-23
lines changed 2 files changed +12
-23
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,19 @@ final class OptimusFactoryTest extends AbstractTestCase
21
21
{
22
22
public function testMakeStandard (): void
23
23
{
24
- $ instance = (new OptimusFactory ())->make ([
25
- 'prime ' => 0 ,
26
- 'inverse ' => 1 ,
27
- 'random ' => 2 ,
24
+ $ factory = $ this ->getOptimusFactory ();
25
+
26
+ $ return = $ factory ->make ([
27
+ 'prime ' => 'your-prime-integer ' ,
28
+ 'inverse ' => 'your-inverse-integer ' ,
29
+ 'random ' => 'your-random-integer ' ,
28
30
]);
29
31
30
- $ this ->assertInstanceOf (Optimus::class, $ instance );
32
+ $ this ->assertInstanceOf (Optimus::class, $ return );
33
+ }
34
+
35
+ protected function getOptimusFactory (): OptimusFactory
36
+ {
37
+ return new OptimusFactory ();
31
38
}
32
39
}
Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ public function testOptimusManagerIsInjectable(): void
35
35
36
36
public function testBindings (): void
37
37
{
38
- $ this ->configurePrimeNumbers ();
39
-
40
38
$ this ->assertIsInjectable (Optimus::class);
41
39
42
40
$ original = $ this ->app ['optimus.connection ' ];
@@ -46,20 +44,4 @@ public function testBindings(): void
46
44
$ this ->assertNotSame ($ original , $ new );
47
45
$ this ->assertEquals ($ original , $ new );
48
46
}
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
- }
65
47
}
You can’t perform that action at this time.
0 commit comments