Пример #1
0
 /**
  * Pass
  */
 public function testPass()
 {
     $this->pass->setWebServiceURL('http://example.com')->setForegroundColor('rgb(0, 255, 0)')->setBackgroundColor('rgb(0, 255, 0)')->setLabelColor('rgb(0, 255, 0)')->setAuthenticationToken('123')->setType('generic')->setSuppressStripShine(false)->setAppLaunchURL('http://app.launch.url')->addAssociatedStoreIdentifier(123);
     $properties = array('webServiceURL', 'foregroundColor', 'backgroundColor', 'labelColor', 'authenticationToken', 'suppressStripShine', 'associatedStoreIdentifiers', 'appLaunchURL');
     $array = $this->pass->toArray();
     foreach ($properties as $property) {
         $this->assertTrue(isset($array[$property]));
     }
 }
Пример #2
0
 public function toArray()
 {
     $array = parent::toArray();
     $array[$this->getType()]['transitType'] = $this->transitType;
     return $array;
 }