File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,15 @@ public function fake(Generator &$faker): Monster
2323 {
2424 return new Monster ([
2525 'name ' => $ faker ->lastName (),
26- 'health ' => mt_rand (1 , 50 ),
26+ 'health ' => random_int (1 , 50 ),
2727
2828 /**
2929 * This is a special function of Fabricator that means "get how many items
3030 * have been generated for this table so far". It is handy for faking
3131 * related items, like the number of possible dungeons. But if none have
3232 * been made we will just pick a number.
3333 */
34- 'dungeon_id ' => mt_rand (1 , Fabricator::getCount ('dungeons ' ) ?: 3 ),
34+ 'dungeon_id ' => random_int (1 , Fabricator::getCount ('dungeons ' ) ?: 3 ),
3535 ]);
3636 }
3737}
Original file line number Diff line number Diff line change 3838
3939namespace Tests \Support \Libraries ;
4040
41+ use Config \App ;
42+
4143/**
4244 * Class ConfigReader
4345 *
4446 * An extension of BaseConfig that prevents the constructor from
4547 * loading external values. Used to read actual local values from
4648 * a config file.
4749 */
48- class ConfigReader extends \ Config \ App
50+ class ConfigReader extends App
4951{
5052 public function __construct ()
5153 {
Original file line number Diff line number Diff line change 11<?php
22
3+ use CodeIgniter \Test \CIUnitTestCase ;
4+ use Tests \Support \Libraries \ConfigReader ;
5+
36/**
47 * @internal
58 */
6- final class HealthTest extends \ CodeIgniter \ Test \ CIUnitTestCase
9+ final class HealthTest extends CIUnitTestCase
710{
811 protected function setUp (): void
912 {
@@ -31,7 +34,7 @@ public function testBaseUrlHasBeenSet()
3134 }
3235
3336 // Then check the actual config file
34- $ reader = new \ Tests \ Support \ Libraries \ ConfigReader ();
37+ $ reader = new ConfigReader ();
3538 $ config = ! empty ($ reader ->baseUrl );
3639
3740 $ this ->assertTrue ($ env || $ config );
You can’t perform that action at this time.
0 commit comments