This repository was archived by the owner on Aug 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,17 @@ public function getAction($state)
7070 * @param string $action
7171 *
7272 * @uses \Eliasis\Complement\Traits\ComplementState->$states
73+ * @uses \Eliasis\Complement\Traits\ComplementState->setStates()
7374 *
7475 * @return string → complement action
7576 */
7677 public function setAction ($ action )
7778 {
78- return $ this ->states ['action ' ] = $ action ;
79+ $ this ->states ['action ' ] = $ action ;
80+
81+ $ this ->setStates ();
82+
83+ return $ action ;
7984 }
8085
8186 /**
Original file line number Diff line number Diff line change @@ -108,11 +108,11 @@ public function testIfConfigurationFileWasGeneratedCorrectly()
108108 $ this ->assertCount (2 , $ complementsStates );
109109
110110 $ this ->assertArrayHasKey ('BasicLocalComplement ' , $ complementsStates );
111- $ this ->assertSame ($ complementsStates ['BasicLocalComplement ' ]['action ' ], 'activation ' );
111+ $ this ->assertSame ($ complementsStates ['BasicLocalComplement ' ]['action ' ], '' );
112112 $ this ->assertSame ($ complementsStates ['BasicLocalComplement ' ]['state ' ], 'inactive ' );
113113
114114 $ this ->assertArrayHasKey ('AdvancedLocalComplement ' , $ complementsStates );
115- $ this ->assertSame ($ complementsStates ['AdvancedLocalComplement ' ]['action ' ], 'activation ' );
115+ $ this ->assertSame ($ complementsStates ['AdvancedLocalComplement ' ]['action ' ], '' );
116116 $ this ->assertSame ($ complementsStates ['AdvancedLocalComplement ' ]['state ' ], 'active ' );
117117 }
118118}
Original file line number Diff line number Diff line change 11{
22 "Default" : {
33 "BasicLocalComplement" : {
4- "action" : " activation " ,
4+ "action" : " " ,
55 "state" : " inactive"
66 },
77 "AdvancedLocalComplement" : {
88 "action" : " " ,
99 "state" : " active"
1010 },
1111 "RemoteComplement" : {
12- "action" : " " ,
13- "state" : " uninstalled"
12+ "action" : " "
1413 }
1514 }
1615}
You can’t perform that action at this time.
0 commit comments