public function testNotHasState()
 {
     $stateMachine = new StateMachine();
     $stateMachine->setState('FOO', 'bar');
     $this->assertFalse($stateMachine->hasState('foo'));
     $this->assertTrue($stateMachine->hasState('FOO'));
 }
 public function testHasStateWithValue()
 {
     $twigExtension = new StateMachineExtension();
     $stateMachine = new StateMachine();
     $stateMachine->setState('FOO', 'bar');
     $this->assertTrue($twigExtension->hasStateWithValue('FOO', 'bar'));
     $this->assertFalse($twigExtension->hasStateWithValue('NOT PRESENT', 'foobar'));
 }
 /**
  * @param string $stateName
  * @param mixed $value
  * @return bool
  */
 public function hasStateWithValue($stateName, $value)
 {
     return StateMachine::instance()->hasStateWithValue($stateName, $value);
 }