File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33if (! function_exists ('setting ' ))
44{
55 /**
6- * Provides a convenience interface to the
7- * Bonfire/Settings/Settings class.
6+ * Provides a convenience interface to the Settings service.
87 *
98 * @param string|null $field
109 * @param null $value
Original file line number Diff line number Diff line change @@ -11,16 +11,11 @@ class HelperTest extends TestCase
1111{
1212 use DatabaseTestTrait;
1313
14- protected $ namespace = 'Sparks\Settings ' ;
15- protected $ refresh = true ;
16- protected $ table ;
17-
1814 public function setUp (): void
1915 {
2016 parent ::setUp ();
2117
22- $ this ->table = config ('Settings ' )->database ['table ' ];
23- helper ('setting ' );
18+ helper (['setting ' ]);
2419 }
2520
2621 public function testReturnsServiceByDefault ()
Original file line number Diff line number Diff line change @@ -11,17 +11,6 @@ class SettingsTest extends TestCase
1111{
1212 use DatabaseTestTrait;
1313
14- protected $ namespace = 'Sparks\Settings ' ;
15- protected $ refresh = true ;
16- protected $ table ;
17-
18- public function setUp (): void
19- {
20- parent ::setUp ();
21-
22- $ this ->table = config ('Settings ' )->database ['table ' ];
23- }
24-
2514 public function testSettingsGetsFromConfig ()
2615 {
2716 $ settings = new Settings ();
Original file line number Diff line number Diff line change 44
55use CodeIgniter \Test \CIUnitTestCase ;
66
7- class TestCase extends CIUnitTestCase
7+ abstract class TestCase extends CIUnitTestCase
88{
9+ protected $ namespace = 'Sparks\Settings ' ;
10+ protected $ refresh = true ;
911
12+ /**
13+ * @var string
14+ */
15+ protected $ table ;
1016
11- protected function setUp (): void
12- {
13- parent ::setUp ();
17+ public function setUp (): void
18+ {
19+ parent ::setUp ();
1420
15- $ _SESSION = [];
16- }
21+ $ this ->table = config ('Settings ' )->database ['table ' ];
22+ }
23+
24+ public function tearDown (): void
25+ {
26+ parent ::tearDown ();
27+
28+ $ this ->resetServices ();
29+ }
1730}
You can’t perform that action at this time.
0 commit comments