Example #1
0
 /**
  * Verify all the bitmask action works
  *
  * @test
  */
 public function testAssertMaskSetter()
 {
     $emulator = new Emulator();
     $emulator->setAssertMask(Emulator::ACTION_ALL);
     $this->assertSame(Emulator::ACTION_ALL, $emulator->getAssertMask() & Emulator::ACTION_ALL);
     foreach ($this->actions as $action) {
         $this->assertSame($action, $emulator->getAssertMask() & $action);
     }
     foreach ($this->actions as $action) {
         $emulator->setAssertMask($action);
         foreach ($this->actions as $testaction) {
             $ref = $action === $testaction ? $testaction : 0;
             $this->assertSame($ref, $emulator->getAssertMask() & $testaction);
         }
     }
 }