You are here

class SQLite3Test in Plug 7

Hierarchy

  • class \Doctrine\Tests\Common\Cache\CacheTest extends \Doctrine\Tests\DoctrineTestCase

Expanded class hierarchy of SQLite3Test

File

lib/doctrine/cache/tests/Doctrine/Tests/Common/Cache/SQLite3CacheTest.php, line 9

Namespace

Doctrine\Tests\Common\Cache
View source
class SQLite3Test extends CacheTest {

  /**
   * @var SQLite3
   */
  private $file, $sqlite;
  protected function setUp() {
    $this->file = tempnam(null, 'doctrine-cache-test-');
    unlink($this->file);
    $this->sqlite = new SQLite3($this->file);
  }
  protected function tearDown() {
    $this->sqlite = null;

    // DB must be closed before
    unlink($this->file);
  }
  public function testGetStats() {
    $this
      ->assertNull($this
      ->_getCacheDriver()
      ->getStats());
  }
  public function testFetchSingle() {
    $id = uniqid('sqlite3_id_');
    $data = "\0";

    // produces null bytes in serialized format
    $this
      ->_getCacheDriver()
      ->save($id, $data, 30);
    $this
      ->assertEquals($data, $this
      ->_getCacheDriver()
      ->fetch($id));
  }
  protected function _getCacheDriver() {
    return new SQLite3Cache($this->sqlite, 'test_table');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CacheTest::falseCastedValuesProvider public function The following values get converted to FALSE if you cast them to a boolean.
CacheTest::isSharedStorage protected function Return whether multiple cache providers share the same storage. 3
CacheTest::provideCrudValues public function
CacheTest::testBasicCrudOperations public function @dataProvider provideCrudValues
CacheTest::testDeleteAll public function
CacheTest::testDeleteAllAndNamespaceVersioningBetweenCaches public function
CacheTest::testDeleteAllNamespace public function
CacheTest::testFalseCastedValues public function Check to see that, even if the user saves a value that can be interpreted as false, the cache adapter will still recognize its existence there. 2
CacheTest::testFetchMissShouldReturnFalse public function
CacheTest::testFetchMulti public function
CacheTest::testFetchMultiWillFilterNonRequestedKeys public function
CacheTest::testFlushAll public function
CacheTest::testFlushAllAndNamespaceVersioningBetweenCaches public function
CacheTest::testNamespace public function
SQLite3Test::$file private property
SQLite3Test::setUp protected function
SQLite3Test::tearDown protected function
SQLite3Test::testFetchSingle public function
SQLite3Test::testGetStats public function @group DCOM-43 Overrides CacheTest::testGetStats
SQLite3Test::_getCacheDriver protected function Overrides CacheTest::_getCacheDriver