public function test_can_be_constructed_with_initial_state_callback() { $stateMachine = new StateMachine(function () { return 'a'; }); $this->assertEquals('a', $stateMachine->getCurrentState()); }
/** * @param string $event * @param string $expectedState */ private function fireAndAssertState($event, $expectedState) { $this->stateMachine->fire($event); $this->assertEquals($expectedState, $this->stateMachine->getCurrentState()); }