Elgg\Cache\Pool\StashWrapperTest::testGetDoesNotRegenerateValueFromCallbackOnHit PHP Method

testGetDoesNotRegenerateValueFromCallbackOnHit() public method

    public function testGetDoesNotRegenerateValueFromCallbackOnHit()
    {
        $pool = StashWrapper::createEphemeral();
        $pool->get('foo', function () {
            return 1;
        });
        $result = $pool->get('foo', function () {
            return 2;
        });
        $this->assertEquals(1, $result);
    }