Exemple #1
0
 /**
  * test the protected getCacheKey method of the Cache object
  *
  * @param \MvcLite\ObjectAbstract $object
  * @param string $name
  * @param string $expected
  *
  * @dataProvider provideGetCacheKey
  */
 public function testGetCacheKey(ObjectAbstract $object, $name, $expected)
 {
     $sut = Cache::getInstance();
     $result = $this->getReflectionMethod($sut, 'getCacheKey')->invoke($sut, $object, $name);
     $this->assertSame($expected, $result);
 }
Exemple #2
0
 /**
  * test the protected getCacheKey method of the Cache object
  *
  * @param \MvcLite\ObjectAbstract $object
  * @param string $name
  * @param string $expected
  *
  * @dataProvider provideGetCacheKey
  */
 public function testGetCacheKey(ObjectAbstract $object, $name, $expected)
 {
     $sut = Cache::getInstance();
     $method = new \ReflectionMethod('\\MvcLite\\Cache', 'getCacheKey');
     $method->setAccessible(true);
     $result = $method->invoke($sut, $object, $name);
     $this->assertSame($expected, $result);
 }