예제 #1
0
 public function __construct(array $options = array())
 {
     $options = new Options($options);
     Options::required('name, alpha2, alpha3, numeric', $options);
     $this->name = $options['name'];
     unset($options['name']);
     foreach ($options as $k => $v) {
         $this->codes[] = new CountryCode($v);
     }
 }
예제 #2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testFailRecursiveRequired()
 {
     $options = new Options($this->options);
     $exists = Options::required('pass', $options->billing_address);
 }