Elgg\Cache\EntityCacheTest::testRemovesDeletedEntityFromCache PHP Метод

testRemovesDeletedEntityFromCache() публичный Метод

    public function testRemovesDeletedEntityFromCache()
    {
        $user = $this->mocks()->getUser();
        _elgg_services()->session->setLoggedInUser($user);
        $object = $this->mocks()->getObject(['owner_guid' => $user->guid]);
        $this->assertEquals($object, _elgg_services()->entityCache->get($object->guid));
        $this->assertTrue($object->delete());
        $this->assertFalse(_elgg_services()->entityCache->get($object->guid));
        _elgg_services()->session->removeLoggedInUser();
    }