Skip to content

Commit

Permalink
Published additional tests and fixes
Browse files Browse the repository at this point in the history
- Various code integrity fixes in different places:
-- Fixed obsolete references to classes
-- Fixed broken references to template and static view files
-- Fixed some minor occurrences of deprecated code
-- Code style minor fixes
- Various minor bugfixes
- Implemented "developer mode" in integration tests
- Added "rollback" scripts capability for data fixtures
- Removed deprecated methods and attributes from product type class
- Restructured code integrity tests:
-- Moved out part of the tests from integration into static tests
-- Introduced "Legacy" test suite in static tests. This test suite is not executed by default when running either phpunit directly or using the "batch tool"
-- Simplified and reorganized the "Exemplar" and self-assessment tests for static code analysis
- Covered previously made backwards-incompatible changes with legacy tests
- Changed storage of class map from a PHP-file with array into a better-performing text file with serialized array.
- Published dev/tests/static and dev/tests/unit
  • Loading branch information
magento-team committed Dec 28, 2011
1 parent 9b9ce2c commit 68bdc66
Show file tree
Hide file tree
Showing 302 changed files with 10,088 additions and 377 deletions.
7 changes: 5 additions & 2 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
$paths[] = BP . DS . 'lib';
Magento_Autoload::getInstance()->addIncludePath($paths);

Magento_Autoload::getInstance()->addIncludePath($paths)
->addFilesMap(BP . '/_classmap.php');
$classMapPath = BP . DS . 'var/classmap.ser';
if (file_exists($classMapPath)) {
Magento_Autoload::getInstance()->addFilesMap($classMapPath);
}

#Magento_Profiler::enable();
#Magento_Profiler::registerOutput(new Magento_Profiler_Output_Html());
Expand Down
8 changes: 7 additions & 1 deletion app/code/community/Phoenix/Moneybookers/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Phoenix
* @package Phoenix_Moneybookers
* @copyright Copyright (c) 2009 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
-->
Expand Down
14 changes: 14 additions & 0 deletions app/code/core/Mage/Catalog/Model/Resource/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,20 @@ protected function _insertAttribute($object, $attribute, $value)
return $this->_saveAttributeValue($object, $attribute, $value);
}

/**
* Update entity attribute value
*
* @param Varien_Object $object
* @param Mage_Eav_Model_Entity_Attribute_Abstract $attribute
* @param mixed $valueId
* @param mixed $value
* @return Mage_Catalog_Model_Resource_Abstract
*/
protected function _updateAttribute($object, $attribute, $valueId, $value)
{
return $this->_saveAttributeValue($object, $attribute, $value);
}

/**
* Update attribute value for specific store
*
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ public function getHelperClassName($helperClass)
* Retrieve resource helper instance
*
* Example:
* $config->getResourceHelper('Mage_Cms')
* $config->getResourceHelper('Mage_Core')
* will instantiate Mage_Cms_Model_Resource_Helper_<db_adapter_name>
*
* @param string $moduleName
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Core/Model/Convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
* @package Mage_Core
* @author Magento Core Team <core@magentocommerce.com>
*/
//class Mage_Core_Model_Convert extends Varien_Convert_Profile_Collection
class Mage_Core_Model_Convert extends Mage_Dataflow_Model_Convert_Profile_Collection
{
public function __construct()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @package Mage_Shell
* @author Magento Core Team <core@magentocommerce.com>
*/
abstract class Mage_Core_Model_Shell_Abstract
abstract class Mage_Core_Model_ShellAbstract
{
/**
* Raw arguments, that should be parsed
Expand Down Expand Up @@ -75,7 +75,7 @@ public function __construct($entryPoint)
* Sets raw arguments to be parsed
*
* @param array $args
* @return Mage_Core_Model_Shell_Abstract
* @return Mage_Core_Model_ShellAbstract
*/
public function setRawArgs($args)
{
Expand All @@ -98,7 +98,7 @@ protected function _getRootPath()
/**
* Parses .htaccess file and apply php settings to shell script
*
* @return Mage_Core_Model_Shell_Abstract
* @return Mage_Core_Model_ShellAbstract
*/
protected function _applyPhpVariables()
{
Expand Down Expand Up @@ -126,7 +126,7 @@ protected function _applyPhpVariables()
/**
* Parses input arguments
*
* @return Mage_Core_Model_Shell_Abstract
* @return Mage_Core_Model_ShellAbstract
*/
protected function _parseArgs()
{
Expand All @@ -150,7 +150,7 @@ protected function _parseArgs()
/**
* Runs script
*
* @return Mage_Core_Model_Shell_Abstract
* @return Mage_Core_Model_ShellAbstract
*/
abstract public function run();

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Directory/Model/Resource/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Mage_Directory_Model_Resource_Currency extends Mage_Core_Model_Resource_Db
*/
protected function _construct()
{
$this->_init('Mage_Directory_Model_Currency', 'currency_code');
$this->_init('directory_currency', 'currency_code');
$this->_currencyRateTable = $this->getTable('directory_currency_rate');
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/ImportExport/Model/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public function expandSource()
$count = self::MAX_IMPORT_CHUNKS;
for ($i = 1; $i < $count; $i++) {
$writer = Mage::getModel(
'importexport/export_adapter_csv',
'Mage_ImportExport_Model_Export_Adapter_Csv',
self::getWorkingDir() . sprintf($filenameFormat, $i)
);

Expand Down
26 changes: 26 additions & 0 deletions app/code/core/Mage/ImportExport/view/adminhtml/layout.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_ImportExport
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
-->
<layout>
<adminhtml_import_index>
<reference name="content">
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Index/Model/Shell.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @package Mage_Shell
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Index_Model_Shell extends Mage_Core_Model_Shell_Abstract
class Mage_Index_Model_Shell extends Mage_Core_Model_ShellAbstract
{
/**
* Gets indexer instance
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Log/Model/Shell.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @package Mage_Log
* @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Log_Model_Shell extends Mage_Core_Model_Shell_Abstract
class Mage_Log_Model_Shell extends Mage_Core_Model_ShellAbstract
{
/**
* Converts count to human view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function _toHtml()
{
/** @var $listXmlObj Mage_XmlConnect_Model_Simplexml_Element */
$methodListXmlObj = Mage::getModel(
'xmlconnect/simplexml_element',
'Mage_XmlConnect_Model_Simplexml_Element',
'<shipping_method_list></shipping_method_list>'
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function _toHtml()
$action = Mage::helper('Mage_XmlConnect_Helper_Data')->getActionUrl('xmlconnect/customer/saveaddress');

/** @var Mage_XmlConnect_Model_Simplexml_Form $fromXmlObj */
$fromXmlObj = Mage::getModel('xmlconnect/simplexml_form', array(
$fromXmlObj = Mage::getModel('Mage_XmlConnect_Model_Simplexml_Form', array(
'xml_id' => 'address_form',
'action' => $action,
'use_container' => true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Magento
* @package Magento
* @subpackage integration_tests
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

// Empty texture for test purpose
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
* @subpackage integration_tests
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
*/
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
* @subpackage integration_tests
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
*/
Loading

0 comments on commit 68bdc66

Please sign in to comment.