コード例 #1
0
ファイル: EnumTest.php プロジェクト: gerritdrost/phenum
 public function testEquals()
 {
     $foo = FoobarEnum::FOO();
     $bar = FoobarEnum::BAR();
     $this->assertFalse($foo->equals($bar));
     $this->assertFalse($bar->equals($foo));
     $this->assertTrue($foo->equals($foo));
     $this->assertTrue($bar->equals($bar));
     $foo2 = FoobarEnum::FOO();
     $this->assertTrue($foo->equals($foo2));
 }
コード例 #2
0
ファイル: EnumMapTest.php プロジェクト: gerritdrost/phenum
 public function testGetNotPresentValue()
 {
     $enumMap = $this->enumMap;
     $notPresentValue = 'foobar';
     $this->assertEquals($notPresentValue, $enumMap->get(FoobarEnum::FOO(), $notPresentValue));
 }