Phalcon\Test\Unit\Mvc\Model\Metadata\XcacheCest::xcache PHP Method

xcache() public method

public xcache ( UnitTester $I )
$I UnitTester
    public function xcache(UnitTester $I)
    {
        $I->wantTo('fetch metadata from xcache cache');
        /** @var \Phalcon\Mvc\Model\MetaDataInterface $md */
        $md = $I->grabServiceFromDi('modelsMetadata');
        $md->reset();
        $I->assertTrue($md->isEmpty());
        Robots::findFirst();
        $I->assertEquals($this->data['meta-robots-robots'], xcache_get('$PMM$app\\meta-phalcon\\test\\models\\robots-robots'));
        $I->assertEquals($this->data['map-robots'], xcache_get('$PMM$app\\map-phalcon\\test\\models\\robots'));
        $I->assertFalse($md->isEmpty());
        $md->reset();
        $I->assertTrue($md->isEmpty());
    }