public function testMultipleEnumCaching() { // populate cache $this->assertEquals(TestEnum::BAR, TestEnum::BAR()->val()); $this->assertEquals(AnotherTestEnum::BAR2, AnotherTestEnum::BAR2()->val()); // and check it $this->assertTrue(TestEnum::FOO()->equals(TestEnum::FOO)); $this->assertTrue(AnotherTestEnum::FOO2()->equals(AnotherTestEnum::FOO2)); }