Merge branch 'master' of https://github.com/thelia/thelia into coupon

* 'master' of https://github.com/thelia/thelia: (33 commits)
  permissions
  finish contact process
  create contact form
  create example for mail usage
  permission cleanup
  change place where absolute url is create when rewritten url is enabled
  fix issue #43
  fix typo in product breadcrumb
  update countries list
  fix issue #35
  fix cartItem updateQuantity method
  add some verification on country default trigger
  not allowed to delete default country
  WIP : admin profiles
  fiw test suite
  clear cache when a module is removed
  end module removal
  create event object for module delete action
  update insert script
  new model
  ...

Conflicts:
	core/lib/Thelia/Controller/Admin/CouponController.php
This commit is contained in:
gmorel
2013-10-22 23:01:04 +02:00
128 changed files with 4095 additions and 1209 deletions

View File

@@ -14,6 +14,10 @@ use Thelia\Core\Event\Image\ImageCreateOrUpdateEvent;
use Thelia\Core\Translation\Translator;
use Thelia\Exception\ImageException;
use Thelia\Model\Admin;
use Thelia\Model\CategoryQuery;
use Thelia\Model\ContentQuery;
use Thelia\Model\FolderQuery;
use Thelia\Model\ProductQuery;
use Thelia\Tools\FileManager;
/**
@@ -631,13 +635,13 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
->getMock();
$fileManager = new FileManager($stubContainer);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_PRODUCT, 1);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_PRODUCT, ProductQuery::create()->findOne()->getId());
$this->assertInstanceOf('\Thelia\Model\Product', $actual);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_CATEGORY, 1);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_CATEGORY, CategoryQuery::create()->findOne()->getId());
$this->assertInstanceOf('\Thelia\Model\Category', $actual);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_CONTENT, 1);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_CONTENT, ContentQuery::create()->findOne()->getId());
$this->assertInstanceOf('\Thelia\Model\Content', $actual);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_FOLDER, 1);
$actual = $fileManager->getParentFileModel(FileManager::TYPE_FOLDER, FolderQuery::create()->findOne()->getId());
$this->assertInstanceOf('\Thelia\Model\Folder', $actual, 1);
$actual = $fileManager->getParentFileModel('bad', 1);
$this->assertNull($actual);