Example #1
0
 /**
  * @dataProvider getClearedPaths
  *
  * @param string $path
  * @param string $storage_path
  * @param string $cleared_path
  */
 public function testDoClearPath($path, $storage_path, $cleared_path)
 {
     if ($storage_path) {
         $storage = $this->getMock('\\AnimeDb\\Bundle\\CatalogBundle\\Entity\\Storage');
         $storage->expects($this->atLeastOnce())->method('getPath')->will($this->returnValue($storage_path));
         $this->item->setStorage($storage);
     }
     $this->item->setPath($path);
     $this->assertEquals($cleared_path, $this->item->getRealPath());
     $this->assertEquals($path, $this->item->getPath());
 }