コード例 #1
0
 /**
  * @covers FactoryEnum::introspect()
  * @covers FactoryEnum::contains()
  * @covers FactoryEnum::defines()
  */
 public function testIntrospect()
 {
     $_constants = TestEnum::all();
     $this->assertNotEmpty($_constants);
     foreach ($_constants as $_constant => $_value) {
         $this->assertTrue(TestEnum::contains($_value));
         $this->assertTrue(TestEnum::defines($_constant));
     }
 }
コード例 #2
0
 public function testContainsMethod()
 {
     $this->assertTrue(TestEnum::contains('FalseMember'));
     $this->assertFalse(TestEnum::contains('ImaginaryMember'));
 }