TYPO3 CMS  TYPO3_6-2
AbstractBackendTest.php
Go to the documentation of this file.
1 <?php
3 
25 
29  protected $backend;
30 
34  public function setUp() {
35  $className = $this->getUniqueId('ConcreteBackend_');
36  eval('
37  class ' . $className . ' extends TYPO3\\CMS\\Core\\Cache\\Backend\\AbstractBackend {
38  public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {}
39  public function get($entryIdentifier) {}
40  public function has($entryIdentifier) {}
41  public function remove($entryIdentifier) {}
42  public function flush() {}
43  public function flushByTag($tag) {}
44  public function findIdentifiersByTag($tag) {}
45  public function collectGarbage() {}
46  public function setSomeOption($value) {
47  $this->someOption = $value;
48  }
49  public function getSomeOption() {
50  return $this->someOption;
51  }
52  }
53  ');
54  $this->backend = new $className('Testing');
55  }
56 
61  $className = get_class($this->backend);
62  $backend = new $className('Testing', array('someOption' => 'someValue'));
63  $this->assertSame('someValue', $backend->getSomeOption());
64  }
65 
66 }