Example #1
0
 public function testEnumValues()
 {
     $one = new \TestEnum(\TestEnum::ONE);
     $two = new \TestEnum(\TestEnum::TWO);
     $three = new \TestEnum(\TestEnum::THREE);
     $this->assertSame(\TestEnum::ONE, $one->__toString());
     $this->assertSame(array('ONE' => \TestEnum::ONE, 'TWO' => \TestEnum::TWO, 'THREE' => \TestEnum::THREE), \TestEnum::values());
     $this->assertEquals($two, \TestEnum::valueOf('two'));
 }