コード例 #1
0
 /**
  * Tests checking for an option
  */
 public function testCheckingForAnOption()
 {
     $options = ['option1' => 123, 'option2' => 'abc', 'option3' => new \DateTime()];
     $o = new TestClass($options);
     foreach ($options as $key => $value) {
         $this->assertTrue($o->hasOption($key));
     }
     $this->assertFalse($o->hasOption('option99'));
 }