/** * @dataProvider flagProvider */ public function testFlag(FlagInterface $flag, $default_state) { $this->assertEquals($default_state, $flag->isRaised()); $flag->lower(); $this->assertFalse($flag->isRaised()); $flag->raise(); $this->assertTrue($flag->isRaised()); $flag->lower(); $this->assertFalse($flag->isRaised()); }
/** * Abort the next iteration of polling */ public function abort() { $this->abort_flag->raise(); }