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')); }