Pinq\Tests\Integration\Caching\CacheProviderTest::testThatDevelopmentModeWillClearTheCacheOnce PHP Method

testThatDevelopmentModeWillClearTheCacheOnce() public method

    public function testThatDevelopmentModeWillClearTheCacheOnce()
    {
        $functionCacheMock = $this->getMock('Pinq\\Caching\\ICacheAdapter');
        $functionCacheMock->expects($this->once())->method('clear');
        Caching\CacheProvider::setCustomCache($functionCacheMock);
        Caching\CacheProvider::setDevelopmentMode(true);
        //Should clear
        Caching\CacheProvider::getCache();
        //Should not clear again
        Caching\CacheProvider::getCache();
    }