@@ -32,22 +32,62 @@ protected function setUp()
3232 $ this ->extension_manager = $ this ->create_extension_manager ();
3333 }
3434
35- public function test_available ()
35+ public function test_all_available ()
3636 {
3737 // barfoo and vendor3/bar should not listed due to missing composer.json. barfoo also has incorrect dir structure.
3838 $ this ->assertEquals (array ('vendor/moo ' , 'vendor2/bar ' , 'vendor2/foo ' ), array_keys ($ this ->extension_manager ->all_available ()));
3939 }
4040
41- public function test_enabled ()
41+ public function test_all_enabled ()
4242 {
4343 $ this ->assertEquals (array ('vendor2/foo ' ), array_keys ($ this ->extension_manager ->all_enabled ()));
4444 }
4545
46- public function test_configured ()
46+ public function test_all_configured ()
4747 {
4848 $ this ->assertEquals (array ('vendor/moo ' , 'vendor2/foo ' ), array_keys ($ this ->extension_manager ->all_configured ()));
4949 }
5050
51+ public function test_is_enabled ()
52+ {
53+ $ this ->assertSame (true , $ this ->extension_manager ->is_enabled ('vendor2/foo ' ));
54+ $ this ->assertSame (false , $ this ->extension_manager ->is_enabled ('vendor/moo ' ));
55+ $ this ->assertSame (false , $ this ->extension_manager ->is_enabled ('vendor2/bar ' ));
56+ $ this ->assertSame (false , $ this ->extension_manager ->is_enabled ('bertie/worlddominationplan ' ));
57+ }
58+
59+ public function test_is_disabled ()
60+ {
61+ $ this ->assertSame (false , $ this ->extension_manager ->is_disabled ('vendor2/foo ' ));
62+ $ this ->assertSame (true , $ this ->extension_manager ->is_disabled ('vendor/moo ' ));
63+ $ this ->assertSame (false , $ this ->extension_manager ->is_disabled ('vendor2/bar ' ));
64+ $ this ->assertSame (false , $ this ->extension_manager ->is_disabled ('bertie/worlddominationplan ' ));
65+ }
66+
67+ public function test_is_purged ()
68+ {
69+ $ this ->assertSame (false , $ this ->extension_manager ->is_purged ('vendor2/foo ' ));
70+ $ this ->assertSame (false , $ this ->extension_manager ->is_purged ('vendor/moo ' ));
71+ $ this ->assertSame (true , $ this ->extension_manager ->is_purged ('vendor2/bar ' ));
72+ $ this ->assertSame (false , $ this ->extension_manager ->is_purged ('bertie/worlddominationplan ' ));
73+ }
74+
75+ public function test_is_configured ()
76+ {
77+ $ this ->assertSame (true , $ this ->extension_manager ->is_configured ('vendor2/foo ' ));
78+ $ this ->assertSame (true , $ this ->extension_manager ->is_configured ('vendor/moo ' ));
79+ $ this ->assertSame (false , $ this ->extension_manager ->is_configured ('vendor2/bar ' ));
80+ $ this ->assertSame (false , $ this ->extension_manager ->is_configured ('bertie/worlddominationplan ' ));
81+ }
82+
83+ public function test_is_available ()
84+ {
85+ $ this ->assertSame (true , $ this ->extension_manager ->is_available ('vendor2/foo ' ));
86+ $ this ->assertSame (true , $ this ->extension_manager ->is_available ('vendor/moo ' ));
87+ $ this ->assertSame (true , $ this ->extension_manager ->is_available ('vendor2/bar ' ));
88+ $ this ->assertSame (false , $ this ->extension_manager ->is_available ('bertie/worlddominationplan ' ));
89+ }
90+
5191 public function test_enable ()
5292 {
5393 vendor2 \bar \ext::$ state = 0 ;
0 commit comments