File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 10
10
use CuePhp \Config \Loader \File \JsonLoader ;
11
11
use CuePhp \Config \Loader \File \PhpLoader ;
12
12
use CuePhp \Config \Loader \File \YamlLoader ;
13
+ use TypeError ;
13
14
14
15
class ConfigTest extends TestCase
15
16
{
@@ -49,7 +50,7 @@ public function testConstructWithYml()
49
50
$ config = new Config (__DIR__ . '/mocks/pass/config.yml ' , new YamlLoader ());
50
51
$ this ->assertSame (1 , $ config ->get ('demo.section ' ));
51
52
// TODO
52
- $ this ->expectException (LoaderException ::class);
53
+ $ this ->expectException (TypeError ::class);
53
54
$ config = new Config (__DIR__ . '/mocks/pass/empty.yml ' , new YamlLoader ());
54
55
$ this ->assertSame ([], $ config ->all ());
55
56
}
@@ -71,7 +72,7 @@ public function testConstructWithPhp()
71
72
$ config = new Config (__DIR__ . '/mocks/pass/config.php ' , new PhpLoader ());
72
73
$ this ->assertSame (1 , $ config ->get ('demo.section ' ));
73
74
// TODO
74
- $ this ->expectException (LoaderException ::class);
75
+ $ this ->expectException (TypeError ::class);
75
76
$ config = new Config (__DIR__ . '/mocks/pass/empty.php ' , new PhpLoader ());
76
77
$ this ->assertSame ([], $ config ->all ());
77
78
}
Original file line number Diff line number Diff line change 7
7
use CuePhp \Config \Exception \LoaderException ;
8
8
use PHPUnit \Framework \TestCase ;
9
9
use CuePhp \Config \Loader \File \PhpLoader ;
10
+ use TypeError ;
10
11
11
12
class PhpLoaderTest extends TestCase
12
13
{
@@ -27,7 +28,7 @@ protected function tearDown(): void
27
28
28
29
public function testLoadInvalidPhpFile ()
29
30
{
30
- $ this ->expectException (LoaderException ::class);
31
+ $ this ->expectException (TypeError ::class);
31
32
$ this ->php ->loadFromFile ( __DIR__ . '/../../mocks/fail/error.php ' );
32
33
}
33
34
Original file line number Diff line number Diff line change 7
7
use CuePhp \Config \Exception \LoaderException ;
8
8
use PHPUnit \Framework \TestCase ;
9
9
use CuePhp \Config \Loader \File \YamlLoader ;
10
+ use TypeError ;
10
11
11
12
class YamlLoaderTest extends TestCase
12
13
{
@@ -26,7 +27,7 @@ protected function tearDown(): void
26
27
27
28
public function testLoadInvalidYml ()
28
29
{
29
- $ this ->expectException (LoaderException ::class);
30
+ $ this ->expectException (TypeError ::class);
30
31
$ this ->yml ->loadFromFile ( __DIR__ . '/../../mocks/fail/error.yml ' );
31
32
}
32
33
You can’t perform that action at this time.
0 commit comments