Pinq\Tests\Integration\Caching\CacheTest::testThatNamespaceWillNotClearInAnotherNamespaces PHP Метод

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

    public function testThatNamespaceWillNotClearInAnotherNamespaces()
    {
        $anotherNamespaceCache = $this->namespacedCache->forNamespace('another::namespace');
        $anotherNamespaceCache->save('in-another-namespace-1', 1);
        $anotherNamespaceCache->save('in-another-namespace-2', 2);
        $this->namespacedCache->save('in-namespace', 2);
        $this->namespacedCache->clear();
        $this->assertFalse($this->namespacedCache->contains('in-namespace'));
        $this->assertTrue($anotherNamespaceCache->contains('in-another-namespace-1'));
        $this->assertTrue($anotherNamespaceCache->contains('in-another-namespace-2'));
    }