Ejemplo n.º 1
0
 protected function generateFourthRow()
 {
     $this->populateRowItem('`', KeyPress::generateNeighbors('0', '~', 'A', ""));
     $this->populateRowItem('~', KeyPress::generateNeighbors('1', '[', 'B', '`'));
     $this->populateRowItem('[', KeyPress::generateNeighbors('2', ']', 'C', '~'));
     $this->populateRowItem(']', KeyPress::generateNeighbors('3', '{', 'D', '['));
     $this->populateRowItem('{', KeyPress::generateNeighbors('4', '}', 'E', ']'));
     $this->populateRowItem('}', KeyPress::generateNeighbors('5', '<', 'G', '{'));
     $this->populateRowItem('<', KeyPress::generateNeighbors('6', '>', 'G', '}'));
     $this->populateRowItem('>', KeyPress::generateNeighbors('7', $this->getUnprogrammedKeyAsNeighborIfEnabled(), 'H', '<'));
     if ($this->enableUnProgrammedKeyForTraversal) {
         $this->populateRowItem('', KeyPress::generateNeighbors('8', ' ', 'I', '>'));
     }
     $this->populateRowItem(' ', KeyPress::generateNeighbors('#', '.', 'J', $this->getUnprogrammedKeyAsNeighborIfEnabled()));
     $this->populateRowItem('.', KeyPress::generateNeighbors('&', ',', 'Q', ' '));
     $this->populateRowItem(',', KeyPress::generateNeighbors('*', ';', 'R', '.'));
     $this->populateRowItem(';', KeyPress::generateNeighbors('(', ':', 'S', ','));
     $this->populateRowItem(':', KeyPress::generateNeighbors(')', '\'', 'T', ';'));
     $this->populateRowItem('\'', KeyPress::generateNeighbors('?', '"', 'U', ':'));
     $this->populateRowItem('"', KeyPress::generateNeighbors('/', '_', 'V', '\''));
     $this->populateRowItem('_', KeyPress::generateNeighbors('|', '=', 'W', '"'));
     $this->populateRowItem('=', KeyPress::generateNeighbors('\\', "", 'X', '_'));
     $this->populateRowItem("", KeyPress::generateNeighbors('-', '`', 'Z', '='));
 }
Ejemplo n.º 2
0
 /**
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage 1 is not a valid KeyPress direction.
  */
 public function testValidateInputWithInvalidKey()
 {
     $neighbors = array('1', '2', '3', '4');
     KeyPress::validateInput($neighbors);
 }