From 7444894729e0a54fc327d2f956ef6f059ae72707 Mon Sep 17 00:00:00 2001 From: mage2-team Date: Fri, 25 Apr 2014 10:45:07 -0700 Subject: [PATCH] 2.0.0.0-dev75 * Modularity improvements: * Introduced a new CheckoutAgreements module. Moved all "Terms and Conditions" related logic from Magento_Checkout to Magento_CheckoutAgreements * Moved library related logic from `Magento\Core\Model\App` * Fixed bugs: * Fixed an issue where Currency Options were not displayed on the Currency Setup tab * Fixed an issue where a fatal error appeared during customer registration if mail server was off * Fixed an issue where customer with middle name did not appear in the Customers grid in the backend * Fixed an issue where related products were not displayed on the product page in the backend * Fixed the broken View Files Population tool * Fixed an issue where Magento broke down if the Main Web Site was deleted * Fixed potential security issue with orders protect_code * Fixed an issue where an error appeared when placing an order if cache was turned on * Fixed an issue where a warning appeared when running system_config.php tool * Fixed an issue with incorrect reset password link for users on custom websites * Fixed an issue with invalid error message displayed when trying to save a customer group with existing group name * Fixed an issue with menu layout non-responsive behavior in the Blank theme * Framework Improvements: * Covered Magento library components with unit tests * `Magento\Framework\Error\*` * `Magento\Framework\Event\Observer\*` * `Magento\Framework\Filesystem\*` * `Magento\Framework\Filesystem\File\*` * Updated the obsolete_classes list with changes, introduced by Offline Payment Methods Module implementation * Moved `lib/Magento/*` to `lib/Magento/Framework/*` * Covered Magento application components with unit tests: * `Store\Model\*` * `Sales/Helper/Guest.php` * `Sales/Helper/Admin.php` * `Sales/Model/Observer.php` * `Sales/Model/Payment/Method/Converter.php` * `Sales/Model/Email/Template.php` * `Sales/Model/Observer/Backend/CustomerQuote.php` * `Sales/Model/Status/ListStatus.php` * Refactored the following modules to use Customer Service: * Magento_Persistent * Magento_GoogleShopping * Magento_ProductAlert * Magento_SendFriend * Moved customer-specific logic from the Magento_ImportExport module to the Customer module * Refactored the rest of Customer Group usages * Refactored customerAccountService::createAccount to not expose the hashed password input from webapi * Implemented a delimiter usage for Cache key in Customer Registry * Customer Service usage: * Updated exception hierarchy with a new localized exception class * Updated CRUD APIs to support email and base URL instead of IDs * JavaScript improvements: * Implemented the validation widget * Implemented the tooltip widget * Implemented the popup/modal window widget * Implemented the calendar widget * Implemented the suggest widget * Added configuration for Travis CI --- .travis.yml | 43 + CHANGELOG.md | 55 + app/autoload.php | 4 +- app/bootstrap.php | 14 +- .../Block/Grid/Renderer/Actions.php | 4 +- .../Block/Grid/Renderer/Notice.php | 4 +- .../Block/Grid/Renderer/Severity.php | 4 +- .../AdminNotification/Block/ToolbarEntry.php | 4 +- .../Controller/Adminhtml/Notification.php | 8 +- .../Model/Config/Source/Frequency.php | 2 +- .../Magento/AdminNotification/Model/Feed.php | 20 +- .../Magento/AdminNotification/Model/Inbox.php | 6 +- .../Model/NotificationService.php | 4 +- .../AdminNotification/Model/Observer.php | 4 +- .../Model/Resource/Grid/Collection.php | 2 +- .../Model/Resource/Inbox.php | 2 +- .../Model/Resource/Inbox/Collection.php | 2 +- .../Resource/Inbox/Collection/Critical.php | 2 +- .../Model/Resource/System/Message.php | 2 +- .../Resource/System/Message/Collection.php | 18 +- .../Message/Collection/Synchronized.php | 2 +- .../AdminNotification/Model/Survey.php | 16 +- .../Model/System/Message.php | 2 +- .../Model/System/Message/Baseurl.php | 6 +- .../Model/System/Message/CacheOutdated.php | 12 +- .../Model/System/Message/Security.php | 8 +- .../Model/System/Message/Survey.php | 12 +- .../Model/System/MessageList.php | 4 +- .../AdminNotification/etc/adminhtml/acl.xml | 2 +- .../AdminNotification/etc/adminhtml/di.xml | 4 +- .../etc/adminhtml/events.xml | 2 +- .../Magento/AdminNotification/etc/module.xml | 2 +- .../install-1.6.0.0.php | 18 +- .../upgrade-1.6.0.0-2.0.0.0.php | 8 +- .../Block/Authorizenet/Info/Cc.php | 4 +- .../Authorizenet/Block/Directpost/Form.php | 4 +- .../Authorizenet/Block/Directpost/Iframe.php | 14 +- .../Authorizenet/Directpost/Payment.php | 8 +- .../Adminhtml/Authorizenet/Payment.php | 6 +- .../Controller/Authorizenet/Payment.php | 6 +- .../Controller/Directpost/Payment.php | 12 +- .../Magento/Authorizenet/Helper/Backend.php | 2 +- app/code/Magento/Authorizenet/Helper/Data.php | 8 +- .../Authorizenet/Model/Authorizenet.php | 134 +- .../Authorizenet/Model/Authorizenet/Cards.php | 6 +- .../Authorizenet/Model/Authorizenet/Debug.php | 2 +- .../Model/Authorizenet/Request.php | 2 +- .../Model/Authorizenet/Result.php | 2 +- .../Authorizenet/Source/PaymentAction.php | 2 +- .../Magento/Authorizenet/Model/Directpost.php | 110 +- .../Model/Directpost/Observer.php | 18 +- .../Authorizenet/Model/Directpost/Request.php | 2 +- .../Model/Directpost/Response.php | 2 +- .../Authorizenet/Model/Directpost/Session.php | 22 +- .../Model/Resource/Authorizenet/Debug.php | 2 +- .../Authorizenet/Debug/Collection.php | 2 +- .../Magento/Authorizenet/etc/adminhtml/di.xml | 2 +- .../Authorizenet/etc/adminhtml/events.xml | 2 +- app/code/Magento/Authorizenet/etc/di.xml | 4 +- .../Magento/Authorizenet/etc/frontend/di.xml | 2 +- .../Authorizenet/etc/frontend/events.xml | 2 +- app/code/Magento/Authorizenet/etc/module.xml | 2 +- .../Authz/Model/UserIdentifier/Factory.php | 4 +- .../Magento/Authz/Service/AuthorizationV1.php | 8 +- app/code/Magento/Authz/etc/adminhtml/di.xml | 2 +- app/code/Magento/Authz/etc/di.xml | 2 +- app/code/Magento/Authz/etc/module.xml | 2 +- .../Magento/Backend/App/AbstractAction.php | 24 +- .../Magento/Backend/App/Action/Context.php | 32 +- .../App/Action/Plugin/Authentication.php | 6 +- .../Backend/App/Router/DefaultRouter.php | 14 +- .../Magento/Backend/Block/AbstractBlock.php | 4 +- .../Block/Cache/Grid/Column/Statuses.php | 2 +- app/code/Magento/Backend/Block/Context.php | 66 +- .../Block/Dashboard/AbstractDashboard.php | 4 +- .../Magento/Backend/Block/Dashboard/Graph.php | 10 +- .../Backend/Block/Dashboard/Orders/Grid.php | 6 +- .../Magento/Backend/Block/Dashboard/Sales.php | 6 +- .../Backend/Block/Dashboard/Searches/Last.php | 6 +- .../Searches/Renderer/Searchquery.php | 10 +- .../Backend/Block/Dashboard/Searches/Top.php | 6 +- .../Backend/Block/Dashboard/Tab/Amounts.php | 4 +- .../Backend/Block/Dashboard/Tab/Orders.php | 4 +- .../Block/Dashboard/Tab/Products/Ordered.php | 6 +- .../Backend/Block/Dashboard/Totals.php | 6 +- .../Magento/Backend/Block/Media/Uploader.php | 14 +- app/code/Magento/Backend/Block/Menu.php | 6 +- app/code/Magento/Backend/Block/Page.php | 6 +- app/code/Magento/Backend/Block/Page/Head.php | 30 +- .../Magento/Backend/Block/Page/Locale.php | 14 +- .../Block/Page/System/Config/Robots/Reset.php | 8 +- .../Magento/Backend/Block/Store/Switcher.php | 12 +- .../Store/Switcher/Form/Renderer/Fieldset.php | 10 +- .../Form/Renderer/Fieldset/Element.php | 10 +- .../Block/System/Account/Edit/Form.php | 16 +- .../Backend/Block/System/Cache/Form.php | 10 +- .../Backend/Block/System/Config/Edit.php | 2 +- .../Backend/Block/System/Config/Form.php | 28 +- .../Block/System/Config/Form/Field.php | 36 +- .../System/Config/Form/Field/Datetime.php | 6 +- .../System/Config/Form/Field/Factory.php | 6 +- .../Field/FieldArray/AbstractFieldArray.php | 16 +- .../Block/System/Config/Form/Field/File.php | 2 +- .../System/Config/Form/Field/Heading.php | 6 +- .../Block/System/Config/Form/Field/Image.php | 2 +- .../System/Config/Form/Field/Notification.php | 4 +- .../Config/Form/Field/Regexceptions.php | 14 +- .../Form/Field/Select/Allowspecific.php | 2 +- .../Block/System/Config/Form/Fieldset.php | 28 +- .../System/Config/Form/Fieldset/Factory.php | 6 +- .../Form/Fieldset/Modules/DisableOutput.php | 24 +- .../Backend/Block/System/Config/Switcher.php | 2 +- .../System/Storage/Media/Synchronize.php | 8 +- .../Backend/Block/System/Design/Edit.php | 6 +- .../Block/System/Design/Edit/Tab/General.php | 20 +- .../Block/System/Store/Delete/Form.php | 2 +- .../Backend/Block/System/Store/Edit.php | 6 +- .../Block/System/Store/Edit/AbstractForm.php | 6 +- .../Block/System/Store/Edit/Form/Group.php | 18 +- .../Block/System/Store/Edit/Form/Store.php | 24 +- .../Block/System/Store/Edit/Form/Website.php | 14 +- .../Block/System/Store/Grid/Render/Group.php | 2 +- .../Block/System/Store/Grid/Render/Store.php | 2 +- .../System/Store/Grid/Render/Website.php | 2 +- .../Backend/Block/System/Variable/Edit.php | 6 +- .../Block/System/Variable/Edit/Form.php | 2 +- app/code/Magento/Backend/Block/Template.php | 14 +- .../Backend/Block/Template/Context.php | 98 +- .../Magento/Backend/Block/Text/ListText.php | 2 +- .../Urlrewrite/Catalog/Category/Tree.php | 12 +- .../Block/Urlrewrite/Catalog/Edit/Form.php | 16 +- .../Block/Urlrewrite/Catalog/Product/Grid.php | 2 +- .../Block/Urlrewrite/Cms/Page/Edit/Form.php | 16 +- .../Block/Urlrewrite/Cms/Page/Grid.php | 2 +- .../Backend/Block/Urlrewrite/Edit/Form.php | 14 +- .../Magento/Backend/Block/Urlrewrite/Link.php | 2 +- .../Backend/Block/Urlrewrite/Selector.php | 2 +- .../Backend/Block/Widget/Accordion.php | 2 +- .../Backend/Block/Widget/Accordion/Item.php | 2 +- .../Magento/Backend/Block/Widget/Form.php | 24 +- .../Backend/Block/Widget/Form/Container.php | 2 +- .../Backend/Block/Widget/Form/Element.php | 6 +- .../Block/Widget/Form/Element/Dependence.php | 6 +- .../Block/Widget/Form/Element/Gallery.php | 4 +- .../Backend/Block/Widget/Form/Generic.php | 12 +- .../Block/Widget/Form/Renderer/Element.php | 4 +- .../Block/Widget/Form/Renderer/Fieldset.php | 4 +- .../Widget/Form/Renderer/Fieldset/Element.php | 4 +- .../Magento/Backend/Block/Widget/Grid.php | 30 +- .../Backend/Block/Widget/Grid/Column.php | 8 +- .../Grid/Column/Filter/AbstractFilter.php | 6 +- .../Widget/Grid/Column/Filter/Country.php | 4 +- .../Block/Widget/Grid/Column/Filter/Date.php | 24 +- .../Widget/Grid/Column/Filter/Datetime.php | 14 +- .../Block/Widget/Grid/Column/Filter/Price.php | 4 +- .../Block/Widget/Grid/Column/Filter/Store.php | 4 +- .../Block/Widget/Grid/Column/Filter/Theme.php | 12 +- .../Grid/Column/Renderer/AbstractRenderer.php | 20 +- .../Widget/Grid/Column/Renderer/Action.php | 26 +- .../Widget/Grid/Column/Renderer/Button.php | 4 +- .../Widget/Grid/Column/Renderer/Checkbox.php | 4 +- .../Widget/Grid/Column/Renderer/Concat.php | 4 +- .../Widget/Grid/Column/Renderer/Country.php | 12 +- .../Widget/Grid/Column/Renderer/Currency.php | 16 +- .../Widget/Grid/Column/Renderer/Date.php | 10 +- .../Widget/Grid/Column/Renderer/Datetime.php | 10 +- .../Grid/Column/Renderer/DraggableHandle.php | 4 +- .../Widget/Grid/Column/Renderer/Input.php | 4 +- .../Block/Widget/Grid/Column/Renderer/Ip.php | 4 +- .../Widget/Grid/Column/Renderer/Longtext.php | 4 +- .../Grid/Column/Renderer/Massaction.php | 4 +- .../Widget/Grid/Column/Renderer/Number.php | 4 +- .../Widget/Grid/Column/Renderer/Options.php | 4 +- .../Widget/Grid/Column/Renderer/Price.php | 16 +- .../Widget/Grid/Column/Renderer/Radio.php | 4 +- .../Column/Renderer/RendererInterface.php | 4 +- .../Widget/Grid/Column/Renderer/Select.php | 4 +- .../Widget/Grid/Column/Renderer/Store.php | 8 +- .../Widget/Grid/Column/Renderer/Text.php | 4 +- .../Widget/Grid/Column/Renderer/Wrapline.php | 10 +- .../Backend/Block/Widget/Grid/ColumnSet.php | 36 +- .../Backend/Block/Widget/Grid/Container.php | 2 +- .../Backend/Block/Widget/Grid/Export.php | 52 +- .../Backend/Block/Widget/Grid/Extended.php | 56 +- .../Grid/Massaction/AbstractMassaction.php | 14 +- .../Widget/Grid/Massaction/Additional.php | 16 +- .../Block/Widget/Grid/Massaction/Extended.php | 8 +- .../Block/Widget/Grid/Massaction/Item.php | 12 +- .../Item/Additional/DefaultAdditional.php | 2 +- .../Backend/Block/Widget/Grid/Serializer.php | 12 +- .../Magento/Backend/Block/Widget/Tabs.php | 32 +- .../Backend/Controller/Adminhtml/Ajax.php | 6 +- .../Backend/Controller/Adminhtml/Cache.php | 10 +- .../Controller/Adminhtml/Dashboard.php | 8 +- .../Backend/Controller/Adminhtml/Index.php | 1 - .../Controller/Adminhtml/System/Account.php | 4 +- .../Controller/Adminhtml/System/Config.php | 2 - .../Adminhtml/System/Config/Save.php | 14 +- .../System/Config/System/Storage.php | 6 +- .../Controller/Adminhtml/System/Design.php | 20 +- .../Controller/Adminhtml/System/Store.php | 22 +- .../Controller/Adminhtml/System/Variable.php | 10 +- .../Controller/Adminhtml/Urlrewrite.php | 4 +- .../Helper/Dashboard/AbstractDashboard.php | 7 +- .../Magento/Backend/Helper/Dashboard/Data.php | 8 +- .../Backend/Helper/Dashboard/Order.php | 4 +- app/code/Magento/Backend/Helper/Data.php | 12 +- app/code/Magento/Backend/Model/Auth.php | 8 +- .../Magento/Backend/Model/Auth/Exception.php | 2 +- .../Magento/Backend/Model/Auth/Session.php | 38 +- .../Model/Authorization/RoleLocator.php | 2 +- .../Model/Cache/Resource/Grid/Collection.php | 2 +- app/code/Magento/Backend/Model/Config.php | 28 +- .../Model/Config/Backend/Admin/Custom.php | 16 +- .../Model/Config/Backend/Admin/Observer.php | 6 +- .../Model/Config/Backend/Admin/Robots.php | 18 +- .../Model/Config/Backend/Admin/Usecustom.php | 20 +- .../Config/Backend/Admin/Usesecretkey.php | 16 +- .../Backend/Model/Config/Backend/Baseurl.php | 46 +- .../Backend/Currency/AbstractCurrency.php | 16 +- .../Model/Config/Backend/Currency/Allow.php | 26 +- .../Model/Config/Backend/Currency/Base.php | 4 +- .../Model/Config/Backend/Currency/Cron.php | 16 +- .../Backend/Currency/DefaultCurrency.php | 6 +- .../Model/Config/Backend/Email/Address.php | 2 +- .../Model/Config/Backend/Email/Sender.php | 6 +- .../Model/Config/Backend/Encrypted.php | 24 +- .../Backend/Model/Config/Backend/File.php | 32 +- .../Model/Config/Backend/Image/Adapter.php | 26 +- .../Model/Config/Backend/Image/Favicon.php | 2 +- .../Model/Config/Backend/Image/Logo.php | 2 +- .../Backend/Model/Config/Backend/Locale.php | 32 +- .../Model/Config/Backend/Locale/Timezone.php | 2 +- .../Backend/Model/Config/Backend/Log/Cron.php | 20 +- .../Backend/Model/Config/Backend/Secure.php | 22 +- .../Config/Backend/Storage/Media/Database.php | 16 +- .../Backend/Model/Config/Backend/Store.php | 16 +- .../Model/Config/Backend/Translate.php | 16 +- .../Model/Config/BackendClone/Factory.php | 6 +- .../Backend/Model/Config/BackendFactory.php | 6 +- .../Backend/Model/Config/CommentFactory.php | 6 +- .../Magento/Backend/Model/Config/Factory.php | 6 +- .../Backend/Model/Config/SchemaLocator.php | 6 +- .../Model/Config/Source/Admin/Page.php | 2 +- .../Backend/Model/Config/Source/Checktype.php | 2 +- .../Model/Config/Source/Date/Short.php | 2 +- .../Model/Config/Source/Design/Robots.php | 2 +- .../Model/Config/Source/Dev/Dbautoup.php | 2 +- .../Model/Config/Source/Email/Identity.php | 2 +- .../Model/Config/Source/Email/Method.php | 2 +- .../Model/Config/Source/Email/Smtpauth.php | 2 +- .../Model/Config/Source/Email/Template.php | 8 +- .../Model/Config/Source/Enabledisable.php | 2 +- .../Model/Config/Source/Image/Adapter.php | 8 +- .../Backend/Model/Config/Source/Locale.php | 8 +- .../Model/Config/Source/Locale/Country.php | 8 +- .../Model/Config/Source/Locale/Currency.php | 8 +- .../Config/Source/Locale/Currency/All.php | 8 +- .../Model/Config/Source/Locale/Timezone.php | 8 +- .../Config/Source/Locale/Weekdaycodes.php | 8 +- .../Model/Config/Source/Locale/Weekdays.php | 8 +- .../Backend/Model/Config/Source/Nooptreq.php | 2 +- .../Model/Config/Source/Reports/Scope.php | 2 +- .../Config/Source/Storage/Media/Database.php | 2 +- .../Config/Source/Storage/Media/Storage.php | 2 +- .../Backend/Model/Config/Source/Store.php | 2 +- .../Model/Config/Source/Web/Protocol.php | 2 +- .../Model/Config/Source/Web/Redirect.php | 2 +- .../Backend/Model/Config/Source/Website.php | 2 +- .../Config/Source/Website/OptionHash.php | 2 +- .../Backend/Model/Config/Source/Yesno.php | 2 +- .../Model/Config/Source/Yesnocustom.php | 2 +- .../Backend/Model/Config/SourceFactory.php | 6 +- .../Model/Config/Structure/Converter.php | 2 +- .../Backend/Model/Config/Structure/Data.php | 10 +- .../Element/Dependency/FieldFactory.php | 6 +- .../Model/Config/Structure/Element/Field.php | 10 +- .../Structure/Element/FlyweightFactory.php | 6 +- .../Model/Config/Structure/Element/Group.php | 10 +- .../Config/Structure/Element/Group/Proxy.php | 12 +- .../Config/Structure/Element/Section.php | 6 +- .../Model/Config/Structure/Mapper/Factory.php | 6 +- .../Backend/Model/Config/Structure/Reader.php | 12 +- .../Model/Config/Structure/Search/Proxy.php | 6 +- .../Backend/Model/Layout/Filter/Acl.php | 10 +- .../Magento/Backend/Model/Locale/Manager.php | 8 +- .../Magento/Backend/Model/Locale/Resolver.php | 12 +- app/code/Magento/Backend/Model/Menu.php | 6 +- .../Backend/Model/Menu/AbstractDirector.php | 4 +- .../Model/Menu/Builder/CommandFactory.php | 6 +- .../Magento/Backend/Model/Menu/Config.php | 12 +- .../Backend/Model/Menu/Config/Converter.php | 2 +- .../Backend/Model/Menu/Config/Menu/Dom.php | 4 +- .../Backend/Model/Menu/Config/Reader.php | 10 +- .../Model/Menu/Config/SchemaLocator.php | 6 +- .../Backend/Model/Menu/Director/Director.php | 6 +- app/code/Magento/Backend/Model/Menu/Item.php | 24 +- .../Backend/Model/Menu/Item/Factory.php | 6 +- app/code/Magento/Backend/Model/Observer.php | 6 +- .../Magento/Backend/Model/Search/Catalog.php | 8 +- .../Magento/Backend/Model/Search/Customer.php | 14 +- .../Magento/Backend/Model/Search/Order.php | 2 +- app/code/Magento/Backend/Model/Session.php | 22 +- .../Magento/Backend/Model/Session/Quote.php | 24 +- .../Backend/Model/Translate/Inline/Config.php | 2 +- app/code/Magento/Backend/Model/Url.php | 34 +- .../Magento/Backend/Model/UrlInterface.php | 2 +- app/code/Magento/Backend/Model/View.php | 16 +- .../Model/Widget/Grid/AbstractTotals.php | 22 +- .../Widget/Grid/Row/GeneratorInterface.php | 2 +- .../Model/Widget/Grid/Row/UrlGenerator.php | 4 +- .../Widget/Grid/Row/UrlGeneratorFactory.php | 6 +- .../Model/Widget/Grid/Row/UrlGeneratorId.php | 2 +- .../Backend/Model/Widget/Grid/SubTotals.php | 4 +- .../Backend/Model/Widget/Grid/Totals.php | 4 +- .../Model/Widget/Grid/TotalsInterface.php | 4 +- .../Magento/Backend/etc/adminhtml/acl.xml | 2 +- .../Magento/Backend/etc/adminhtml/cache.xml | 2 +- app/code/Magento/Backend/etc/adminhtml/di.xml | 18 +- .../Magento/Backend/etc/adminhtml/events.xml | 2 +- .../Magento/Backend/etc/adminhtml/system.xml | 6 +- app/code/Magento/Backend/etc/di.xml | 32 +- app/code/Magento/Backend/etc/events.xml | 2 +- app/code/Magento/Backend/etc/install/di.xml | 2 +- app/code/Magento/Backend/etc/module.xml | 2 +- .../Backend/view/adminhtml/admin/popup.phtml | 6 +- .../adminhtml/layout/adminhtml_noroute.xml | 2 +- .../Backend/view/adminhtml/layout/default.xml | 14 +- .../view/adminhtml/media/uploader.phtml | 4 +- .../view/adminhtml/page/js/calendar.phtml | 2 +- .../view/adminhtml/page/js/components.phtml | 2 +- .../widget/form/renderer/fieldset.phtml | 2 +- .../Magento/Backup/Block/Adminhtml/Backup.php | 8 +- .../Backup/Block/Adminhtml/Dialogs.php | 4 +- .../Grid/Column/Renderer/Download.php | 4 +- .../Backup/Controller/Adminhtml/Index.php | 48 +- app/code/Magento/Backup/Helper/Data.php | 46 +- app/code/Magento/Backup/Model/Backup.php | 49 +- .../Magento/Backup/Model/BackupFactory.php | 6 +- .../Backup/Model/Config/Backend/Cron.php | 20 +- .../Backup/Model/Config/Source/Type.php | 2 +- app/code/Magento/Backup/Model/Db.php | 12 +- .../Magento/Backup/Model/Fs/Collection.php | 4 +- .../Magento/Backup/Model/Grid/Options.php | 2 +- app/code/Magento/Backup/Model/Observer.php | 30 +- app/code/Magento/Backup/Model/Resource/Db.php | 6 +- .../Magento/Backup/Model/Resource/Helper.php | 8 +- app/code/Magento/Backup/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Backup/etc/di.xml | 4 +- app/code/Magento/Backup/etc/module.xml | 2 +- .../Product/Edit/Tab/Attributes/Extend.php | 6 +- .../Catalog/Product/Edit/Tab/Bundle.php | 6 +- .../Product/Edit/Tab/Bundle/Option.php | 12 +- .../Edit/Tab/Bundle/Option/Selection.php | 10 +- .../Adminhtml/Sales/Order/Items/Renderer.php | 2 +- .../Bundle/Block/Catalog/Product/Price.php | 20 +- .../Catalog/Product/View/Type/Bundle.php | 18 +- .../Product/View/Type/Bundle/Option.php | 20 +- .../Block/Checkout/Cart/Item/Renderer.php | 8 +- .../Block/Sales/Order/Items/Renderer.php | 2 +- .../Helper/Catalog/Product/Configuration.php | 6 +- app/code/Magento/Bundle/Model/Observer.php | 14 +- app/code/Magento/Bundle/Model/Option.php | 2 +- .../Product/Attribute/Source/Price/View.php | 4 +- .../Bundle/Model/Product/CatalogPrice.php | 8 +- .../Magento/Bundle/Model/Product/Price.php | 8 +- .../Magento/Bundle/Model/Product/Type.php | 38 +- .../Magento/Bundle/Model/Resource/Bundle.php | 2 +- .../Bundle/Model/Resource/Indexer/Stock.php | 2 +- .../Magento/Bundle/Model/Resource/Option.php | 12 +- .../Model/Resource/Option/Collection.php | 4 +- .../Bundle/Model/Resource/Selection.php | 2 +- .../Sales/Order/Pdf/Items/AbstractItems.php | 12 +- .../Sales/Order/Pdf/Items/Creditmemo.php | 26 +- .../Model/Sales/Order/Pdf/Items/Invoice.php | 26 +- .../Model/Sales/Order/Pdf/Items/Shipment.php | 26 +- app/code/Magento/Bundle/Model/Selection.php | 14 +- .../Source/Option/Selection/Price/Type.php | 2 +- .../Bundle/Model/Source/Option/Type.php | 2 +- .../Adjustment/BundleCalculatorInterface.php | 8 +- .../Bundle/Pricing/Adjustment/Calculator.php | 24 +- .../Pricing/Price/BundleOptionPrice.php | 8 +- .../Price/BundleOptionPriceInterface.php | 2 +- .../Pricing/Price/BundleSelectionFactory.php | 8 +- .../Pricing/Price/BundleSelectionPrice.php | 10 +- .../Bundle/Pricing/Price/FinalPrice.php | 8 +- app/code/Magento/Bundle/etc/adminhtml/di.xml | 2 +- .../Magento/Bundle/etc/adminhtml/events.xml | 2 +- app/code/Magento/Bundle/etc/di.xml | 12 +- app/code/Magento/Bundle/etc/frontend/di.xml | 2 +- .../Magento/Bundle/etc/frontend/events.xml | 2 +- app/code/Magento/Bundle/etc/module.xml | 2 +- .../sql/bundle_setup/install-1.6.0.0.php | 230 +- .../mysql4-upgrade-1.6.0.0-1.6.0.0.1.php | 6 +- .../upgrade-1.6.0.0-1.6.0.0.1.php | 10 +- .../adminhtml/layout/catalog_product_new.xml | 2 +- .../product/price/selection/amount.phtml | 2 +- .../frontend/product/price/tier_prices.phtml | 2 +- .../Adminhtml/Captcha/DefaultCaptcha.php | 4 +- app/code/Magento/Captcha/Block/Captcha.php | 6 +- .../Captcha/Block/Captcha/DefaultCaptcha.php | 6 +- .../Magento/Captcha/Model/CaptchaFactory.php | 6 +- .../Magento/Captcha/Model/Config/Font.php | 2 +- .../Model/Config/Form/AbstractForm.php | 2 +- .../Magento/Captcha/Model/Config/Mode.php | 2 +- app/code/Magento/Captcha/Model/Cron.php | 2 +- .../Magento/Captcha/Model/DefaultModel.php | 6 +- app/code/Magento/Captcha/Model/Observer.php | 38 +- .../Magento/Captcha/Model/Resource/Log.php | 14 +- app/code/Magento/Captcha/etc/adminhtml/di.xml | 2 +- .../Magento/Captcha/etc/adminhtml/events.xml | 2 +- app/code/Magento/Captcha/etc/crontab/di.xml | 2 +- app/code/Magento/Captcha/etc/di.xml | 2 +- app/code/Magento/Captcha/etc/events.xml | 2 +- .../Magento/Captcha/etc/frontend/events.xml | 2 +- app/code/Magento/Captcha/etc/module.xml | 2 +- .../sql/captcha_setup/install-1.7.0.0.0.php | 10 +- .../Adminhtml/Category/AbstractCategory.php | 10 +- .../Adminhtml/Category/Checkboxes/Tree.php | 2 +- .../Block/Adminhtml/Category/Edit/Form.php | 10 +- .../Block/Adminhtml/Category/Helper/Image.php | 20 +- .../Adminhtml/Category/Helper/Pricestep.php | 2 +- .../Category/Helper/Sortby/Available.php | 2 +- .../Category/Helper/Sortby/DefaultSortby.php | 2 +- .../Adminhtml/Category/Tab/Attributes.php | 10 +- .../Block/Adminhtml/Category/Tab/Design.php | 2 +- .../Block/Adminhtml/Category/Tab/General.php | 2 +- .../Block/Adminhtml/Category/Tab/Product.php | 6 +- .../Catalog/Block/Adminhtml/Category/Tabs.php | 10 +- .../Catalog/Block/Adminhtml/Category/Tree.php | 28 +- .../Adminhtml/Category/Widget/Chooser.php | 8 +- .../Magento/Catalog/Block/Adminhtml/Form.php | 8 +- .../Form/Renderer/Attribute/Urlkey.php | 12 +- .../Form/Renderer/Config/DateFieldsOrder.php | 2 +- .../Form/Renderer/Config/YearRange.php | 2 +- .../Block/Adminhtml/Helper/Form/Wysiwyg.php | 26 +- .../Adminhtml/Helper/Form/Wysiwyg/Content.php | 10 +- .../Adminhtml/Product/Attribute/Edit.php | 6 +- .../Adminhtml/Product/Attribute/Edit/Form.php | 2 +- .../Product/Attribute/Edit/Tab/Advanced.php | 10 +- .../Product/Attribute/Edit/Tab/Front.php | 10 +- .../Product/Attribute/Edit/Tab/Main.php | 8 +- .../Product/Attribute/Edit/Tab/System.php | 2 +- .../NewAttribute/Product/Attributes.php | 4 +- .../Adminhtml/Product/Attribute/Set/Main.php | 12 +- .../Attribute/Set/Main/Formattribute.php | 2 +- .../Product/Attribute/Set/Main/Formgroup.php | 10 +- .../Product/Attribute/Set/Main/Formset.php | 10 +- .../Product/Attribute/Set/Toolbar/Add.php | 2 +- .../Attribute/Set/Toolbar/Main/Filter.php | 10 +- .../Adminhtml/Product/Composite/Configure.php | 6 +- .../Adminhtml/Product/Composite/Error.php | 14 +- .../Adminhtml/Product/Composite/Fieldset.php | 4 +- .../Product/Composite/Fieldset/Qty.php | 8 +- .../Product/Composite/Update/Result.php | 20 +- .../Catalog/Block/Adminhtml/Product/Edit.php | 12 +- .../Edit/Action/Attribute/Tab/Attributes.php | 14 +- .../Adminhtml/Product/Edit/AttributeSet.php | 6 +- .../Block/Adminhtml/Product/Edit/Js.php | 6 +- .../Adminhtml/Product/Edit/NewCategory.php | 16 +- .../Product/Edit/Tab/Ajax/Serializer.php | 2 +- .../Adminhtml/Product/Edit/Tab/Attributes.php | 12 +- .../Product/Edit/Tab/Attributes/Create.php | 6 +- .../Product/Edit/Tab/Attributes/Search.php | 12 +- .../Adminhtml/Product/Edit/Tab/Crosssell.php | 6 +- .../Adminhtml/Product/Edit/Tab/Inventory.php | 6 +- .../Product/Edit/Tab/Options/Option.php | 16 +- .../Product/Edit/Tab/Options/Popup/Grid.php | 2 +- .../Edit/Tab/Options/Type/AbstractType.php | 2 +- .../Adminhtml/Product/Edit/Tab/Price.php | 2 +- .../Edit/Tab/Price/Group/AbstractGroup.php | 20 +- .../Adminhtml/Product/Edit/Tab/Related.php | 6 +- .../Adminhtml/Product/Edit/Tab/Upsell.php | 6 +- .../Adminhtml/Product/Edit/Tab/Websites.php | 14 +- .../Block/Adminhtml/Product/Edit/Tabs.php | 22 +- .../Product/Frontend/Product/Watermark.php | 16 +- .../Catalog/Block/Adminhtml/Product/Grid.php | 2 +- .../Adminhtml/Product/Helper/Form/Apply.php | 4 +- .../Product/Helper/Form/BaseImage.php | 26 +- .../Adminhtml/Product/Helper/Form/Boolean.php | 2 +- .../Product/Helper/Form/Category.php | 26 +- .../Adminhtml/Product/Helper/Form/Config.php | 2 +- .../Adminhtml/Product/Helper/Form/Gallery.php | 20 +- .../Product/Helper/Form/Gallery/Content.php | 10 +- .../Adminhtml/Product/Helper/Form/Image.php | 4 +- .../Product/Helper/Form/Msrp/Enabled.php | 2 +- .../Product/Helper/Form/Msrp/Price.php | 2 +- .../Adminhtml/Product/Helper/Form/Price.php | 20 +- .../Adminhtml/Product/Helper/Form/Weight.php | 18 +- .../Block/Adminhtml/Product/Options/Ajax.php | 12 +- .../Adminhtml/Product/Widget/Chooser.php | 2 +- .../Catalog/Block/Adminhtml/Search/Edit.php | 6 +- .../Block/Adminhtml/Search/Edit/Form.php | 10 +- .../Magento/Catalog/Block/Breadcrumbs.php | 4 +- .../Magento/Catalog/Block/Category/View.php | 12 +- .../Catalog/Block/Category/Widget/Link.php | 4 +- app/code/Magento/Catalog/Block/Navigation.php | 18 +- app/code/Magento/Catalog/Block/Product.php | 6 +- .../Catalog/Block/Product/AbstractProduct.php | 20 +- .../Catalog/Block/Product/Compare/Link.php | 2 +- .../Block/Product/Compare/ListCompare.php | 4 +- .../Catalog/Block/Product/Compare/Sidebar.php | 4 +- .../Magento/Catalog/Block/Product/Context.php | 82 +- .../Magento/Catalog/Block/Product/Gallery.php | 15 +- .../Magento/Catalog/Block/Product/Image.php | 6 +- .../Catalog/Block/Product/ListProduct.php | 6 +- .../Catalog/Block/Product/NewProduct.php | 10 +- .../Magento/Catalog/Block/Product/Price.php | 30 +- .../Catalog/Block/Product/Price/Template.php | 6 +- .../Block/Product/ProductList/Related.php | 4 +- .../Block/Product/ProductList/Toolbar.php | 14 +- .../Block/Product/ProductList/Upsell.php | 8 +- .../Block/Product/TemplateSelector.php | 12 +- .../Magento/Catalog/Block/Product/View.php | 22 +- .../Block/Product/View/AbstractView.php | 6 +- .../Catalog/Block/Product/View/Additional.php | 2 +- .../Catalog/Block/Product/View/Attributes.php | 12 +- .../Block/Product/View/Description.php | 12 +- .../Catalog/Block/Product/View/Gallery.php | 8 +- .../Catalog/Block/Product/View/Options.php | 22 +- .../Product/View/Options/AbstractOptions.php | 6 +- .../Block/Product/View/Options/Type/Date.php | 12 +- .../Block/Product/View/Options/Type/File.php | 4 +- .../Product/View/Options/Type/Select.php | 6 +- .../Catalog/Block/Product/View/Price.php | 12 +- .../Catalog/Block/Product/View/Tabs.php | 2 +- .../Block/Product/Widget/Html/Pager.php | 2 +- .../Catalog/Block/Product/Widget/Link.php | 4 +- .../Block/Product/Widget/NewWidget.php | 10 +- .../Magento/Catalog/Block/ShortcutButtons.php | 2 +- .../Magento/Catalog/Block/Widget/Link.php | 6 +- .../Catalog/Controller/Adminhtml/Category.php | 24 +- .../Controller/Adminhtml/Category/Widget.php | 8 +- .../Catalog/Controller/Adminhtml/Product.php | 40 +- .../Adminhtml/Product/Action/Attribute.php | 14 +- .../Adminhtml/Product/Attribute.php | 20 +- .../Controller/Adminhtml/Product/Builder.php | 8 +- .../Controller/Adminhtml/Product/Gallery.php | 6 +- .../Initialization/Helper/HandlerFactory.php | 6 +- .../Controller/Adminhtml/Product/Set.php | 18 +- .../Catalog/Controller/Adminhtml/Search.php | 10 +- .../Magento/Catalog/Controller/Category.php | 10 +- .../Magento/Catalog/Controller/Product.php | 6 +- .../Catalog/Controller/Product/Compare.php | 6 +- app/code/Magento/Catalog/Helper/Category.php | 8 +- app/code/Magento/Catalog/Helper/Data.php | 20 +- app/code/Magento/Catalog/Helper/Image.php | 6 +- app/code/Magento/Catalog/Helper/Output.php | 8 +- app/code/Magento/Catalog/Helper/Product.php | 50 +- .../Catalog/Helper/Product/Compare.php | 6 +- .../Catalog/Helper/Product/Composite.php | 14 +- .../Catalog/Helper/Product/Configuration.php | 12 +- .../Helper/Product/ConfigurationPool.php | 6 +- .../Helper/Product/Edit/Action/Attribute.php | 8 +- .../Catalog/Helper/Product/Flat/Indexer.php | 32 +- .../Catalog/Helper/Product/Options.php | 2 +- .../Magento/Catalog/Helper/Product/Price.php | 8 +- .../Magento/Catalog/Helper/Product/View.php | 26 +- .../Magento/Catalog/Model/AbstractModel.php | 20 +- .../Attribute/Backend/Customlayoutupdate.php | 6 +- .../Model/Attribute/Config/Converter.php | 2 +- .../Catalog/Model/Attribute/Config/Data.php | 6 +- .../Catalog/Model/Attribute/Config/Reader.php | 12 +- .../Model/Attribute/Config/SchemaLocator.php | 6 +- .../Attribute/LockValidatorComposite.php | 10 +- .../Attribute/LockValidatorInterface.php | 6 +- app/code/Magento/Catalog/Model/Category.php | 66 +- .../Category/Attribute/Backend/Image.php | 6 +- .../Category/Attribute/Backend/Sortby.php | 18 +- .../Category/Attribute/Backend/Urlkey.php | 2 +- app/code/Magento/Catalog/Model/Config.php | 6 +- .../Catalog/Model/Config/Backend/Category.php | 16 +- .../Model/Config/CatalogClone/Media/Image.php | 16 +- .../Catalog/Model/Config/Source/Category.php | 2 +- .../Model/Config/Source/GridPerPage.php | 2 +- .../Catalog/Model/Config/Source/ListMode.php | 2 +- .../Model/Config/Source/ListPerPage.php | 2 +- .../Catalog/Model/Config/Source/ListSort.php | 2 +- .../Model/Config/Source/Price/Scope.php | 2 +- .../Model/Config/Source/Price/Step.php | 2 +- .../Config/Source/Product/Options/Price.php | 2 +- .../Config/Source/Product/Options/Type.php | 2 +- .../Model/Config/Source/Product/Thumbnail.php | 2 +- .../Model/Config/Source/TimeFormat.php | 2 +- .../Config/Source/Watermark/Position.php | 2 +- app/code/Magento/Catalog/Model/Design.php | 42 +- .../Catalog/Model/Entity/Attribute.php | 34 +- app/code/Magento/Catalog/Model/Factory.php | 14 +- .../Catalog/Model/Indexer/Category/Flat.php | 2 +- .../Indexer/Category/Flat/AbstractAction.php | 38 +- .../Indexer/Category/Flat/Action/Rows.php | 2 +- .../Category/Flat/Plugin/StoreGroup.php | 14 +- .../Category/Flat/Plugin/StoreView.php | 4 +- .../Category/Flat/System/Config/Mode.php | 16 +- .../Model/Indexer/Category/Product.php | 2 +- .../Category/Product/AbstractAction.php | 30 +- .../Indexer/Category/Product/Action/Full.php | 4 +- .../Indexer/Category/Product/Action/Rows.php | 4 +- .../Category/Product/Action/RowsFactory.php | 6 +- .../Category/Product/Plugin/MviewState.php | 30 +- .../Category/Product/Plugin/StoreGroup.php | 12 +- .../Category/Product/Plugin/StoreView.php | 4 +- .../Indexer/Product/Category/Action/Rows.php | 6 +- .../Product/Category/Action/RowsFactory.php | 4 +- .../Catalog/Model/Indexer/Product/Flat.php | 2 +- .../Indexer/Product/Flat/AbstractAction.php | 8 +- .../Indexer/Product/Flat/Action/Full.php | 4 +- .../Model/Indexer/Product/Flat/Action/Row.php | 4 +- .../Indexer/Product/Flat/Action/Rows.php | 4 +- .../Product/Flat/Action/Rows/TableData.php | 2 +- .../Indexer/Product/Flat/FlatTableBuilder.php | 12 +- .../Indexer/Product/Flat/Plugin/Store.php | 4 +- .../Product/Flat/Plugin/StoreGroup.php | 4 +- .../Product/Flat/System/Config/Mode.php | 16 +- .../Indexer/Product/Flat/TableBuilder.php | 14 +- .../Model/Indexer/Product/Flat/TableData.php | 2 +- .../Catalog/Model/Indexer/Product/Price.php | 2 +- .../Indexer/Product/Price/AbstractAction.php | 18 +- .../Model/Indexer/Product/Price/Observer.php | 18 +- .../Price/System/Config/PriceScope.php | 16 +- .../Magento/Catalog/Model/Indexer/Url.php | 18 +- app/code/Magento/Catalog/Model/Layer.php | 18 +- .../Magento/Catalog/Model/Layer/Category.php | 6 +- .../Model/Layer/Filter/AbstractFilter.php | 8 +- .../Catalog/Model/Layer/Filter/Attribute.php | 6 +- .../Catalog/Model/Layer/Filter/Category.php | 12 +- .../Catalog/Model/Layer/Filter/Factory.php | 10 +- .../Catalog/Model/Layer/Filter/Item.php | 12 +- .../Catalog/Model/Layer/Filter/Price.php | 6 +- .../Catalog/Model/Layer/FilterList.php | 6 +- .../Magento/Catalog/Model/Layer/Search.php | 6 +- .../Magento/Catalog/Model/Layer/State.php | 6 +- app/code/Magento/Catalog/Model/Observer.php | 16 +- .../Catalog/Model/Observer/Reindex.php | 10 +- app/code/Magento/Catalog/Model/Product.php | 44 +- .../Magento/Catalog/Model/Product/Action.php | 18 +- .../Product/Attribute/Backend/Boolean.php | 2 +- .../Product/Attribute/Backend/Groupprice.php | 4 +- .../Backend/Groupprice/AbstractGroupprice.php | 14 +- .../Model/Product/Attribute/Backend/Media.php | 20 +- .../Model/Product/Attribute/Backend/Msrp.php | 4 +- .../Model/Product/Attribute/Backend/Price.php | 8 +- .../Model/Product/Attribute/Backend/Sku.php | 12 +- .../Product/Attribute/Backend/Startdate.php | 20 +- .../Model/Product/Attribute/Backend/Stock.php | 8 +- .../Product/Attribute/Backend/Tierprice.php | 4 +- .../Product/Attribute/Backend/Urlkey.php | 2 +- .../Product/Attribute/Backend/Weight.php | 4 +- .../Product/Attribute/Frontend/Image.php | 2 +- .../Catalog/Model/Product/Attribute/Group.php | 16 +- .../Product/Attribute/Source/Inputtype.php | 12 +- .../Attribute/Source/Msrp/Type/Enabled.php | 4 +- .../Attribute/Source/Msrp/Type/Price.php | 2 +- .../Catalog/Model/Product/CatalogPrice.php | 2 +- .../Model/Product/CatalogPriceFactory.php | 6 +- .../Catalog/Model/Product/Compare/Item.php | 22 +- .../Model/Product/Compare/ListCompare.php | 2 +- .../Catalog/Model/Product/Condition.php | 6 +- .../Product/Condition/ConditionInterface.php | 4 +- .../Configuration/Item/ItemInterface.php | 4 +- .../Product/Configuration/Item/Option.php | 2 +- .../Model/Product/CopyConstructorFactory.php | 6 +- .../Magento/Catalog/Model/Product/Image.php | 44 +- .../Catalog/Model/Product/Image/View.php | 12 +- .../Catalog/Model/Product/Indexer/Eav.php | 18 +- .../Magento/Catalog/Model/Product/Link.php | 18 +- .../Catalog/Model/Product/Media/Config.php | 4 +- .../Magento/Catalog/Model/Product/Option.php | 30 +- .../Model/Product/Option/Type/Date.php | 34 +- .../Model/Product/Option/Type/DefaultType.php | 18 +- .../Model/Product/Option/Type/Factory.php | 10 +- .../Model/Product/Option/Type/File.php | 32 +- .../Model/Product/Option/Type/Select.php | 14 +- .../Model/Product/Option/Type/Text.php | 16 +- .../Model/Product/Option/UrlBuilder.php | 6 +- .../Catalog/Model/Product/Option/Value.php | 18 +- .../Model/Product/PriceModifier/Composite.php | 4 +- .../Model/Product/ProductList/Toolbar.php | 6 +- .../Magento/Catalog/Model/Product/Type.php | 10 +- .../Model/Product/Type/AbstractType.php | 72 +- .../Catalog/Model/Product/Type/Pool.php | 10 +- .../Catalog/Model/Product/Type/Price.php | 21 +- .../Model/Product/Type/Price/Factory.php | 10 +- .../Magento/Catalog/Model/Product/Url.php | 26 +- .../Catalog/Model/Product/Validator.php | 4 +- .../Catalog/Model/Product/Visibility.php | 6 +- .../Magento/Catalog/Model/Product/Website.php | 10 +- .../Catalog/Model/ProductOptions/Config.php | 6 +- .../Model/ProductOptions/Config/Converter.php | 2 +- .../Model/ProductOptions/Config/Reader.php | 12 +- .../ProductOptions/Config/SchemaLocator.php | 6 +- .../Catalog/Model/ProductTypes/Config.php | 6 +- .../Model/ProductTypes/Config/Converter.php | 2 +- .../Model/ProductTypes/Config/Reader.php | 12 +- .../ProductTypes/Config/SchemaLocator.php | 6 +- .../Model/Resource/AbstractResource.php | 34 +- .../Catalog/Model/Resource/Attribute.php | 22 +- .../Catalog/Model/Resource/Category.php | 40 +- .../Category/Attribute/Collection.php | 16 +- .../Category/Attribute/Frontend/Image.php | 4 +- .../Resource/Category/Collection/Factory.php | 6 +- .../Catalog/Model/Resource/Category/Flat.php | 12 +- .../Resource/Category/Flat/Collection.php | 45 +- .../Catalog/Model/Resource/Category/Tree.php | 20 +- .../Collection/AbstractCollection.php | 20 +- .../Magento/Catalog/Model/Resource/Config.php | 2 +- .../Catalog/Model/Resource/Eav/Attribute.php | 40 +- .../Model/Resource/Layer/Filter/Attribute.php | 2 +- .../Model/Resource/Layer/Filter/Decimal.php | 4 +- .../Model/Resource/Layer/Filter/Price.php | 20 +- .../Catalog/Model/Resource/Product.php | 22 +- .../Catalog/Model/Resource/Product/Action.php | 2 +- .../Backend/Groupprice/AbstractGroupprice.php | 10 +- .../Product/Attribute/Backend/Image.php | 6 +- .../Product/Attribute/Backend/Media.php | 8 +- .../Product/Attribute/Backend/Tierprice.php | 4 +- .../Product/Attribute/Backend/Urlkey.php | 8 +- .../Resource/Product/Attribute/Collection.php | 18 +- .../Model/Resource/Product/Collection.php | 64 +- .../Model/Resource/Product/Compare/Item.php | 2 +- .../Product/Compare/Item/Collection.php | 24 +- .../Catalog/Model/Resource/Product/Flat.php | 2 +- .../Product/Indexer/AbstractIndexer.php | 6 +- .../Model/Resource/Product/Indexer/Eav.php | 4 +- .../Product/Indexer/Eav/AbstractEav.php | 8 +- .../Resource/Product/Indexer/Eav/Source.php | 8 +- .../Product/Indexer/Price/DefaultPrice.php | 6 +- .../Product/Indexer/Price/Factory.php | 6 +- .../Catalog/Model/Resource/Product/Link.php | 2 +- .../Resource/Product/Link/Collection.php | 2 +- .../Catalog/Model/Resource/Product/Option.php | 36 +- .../Resource/Product/Option/Collection.php | 18 +- .../Model/Resource/Product/Option/Value.php | 16 +- .../Product/Option/Value/Collection.php | 2 +- .../Model/Resource/Product/Relation.php | 2 +- .../Model/Resource/Product/Website.php | 2 +- .../Magento/Catalog/Model/Resource/Setup.php | 2 +- .../Magento/Catalog/Model/Resource/Url.php | 66 +- app/code/Magento/Catalog/Model/Session.php | 2 +- .../Backend/Catalog/Url/Rewrite/Suffix.php | 16 +- .../Magento/Catalog/Model/Template/Filter.php | 14 +- .../Catalog/Model/Template/Filter/Factory.php | 14 +- app/code/Magento/Catalog/Model/Url.php | 42 +- .../Catalog/Pricing/Price/FinalPrice.php | 8 +- .../Pricing/Price/FinalPriceInterface.php | 2 - .../Catalog/Pricing/Price/GroupPrice.php | 4 +- .../Catalog/Pricing/Price/MsrpPrice.php | 4 +- .../Pricing/Price/MsrpPriceInterface.php | 2 +- .../Catalog/Pricing/Price/RegularPrice.php | 12 +- .../Catalog/Pricing/Price/SpecialPrice.php | 6 +- .../Catalog/Pricing/Price/TierPrice.php | 24 +- app/code/Magento/Catalog/Pricing/Render.php | 10 +- .../Catalog/Pricing/Render/FinalPriceBox.php | 4 +- .../Catalog/Pricing/Render/PriceBox.php | 14 +- .../data-upgrade-1.6.0.0.16-1.6.0.0.17.php | 14 +- .../data-upgrade-1.6.0.0.20-1.6.0.0.21.php | 2 +- .../Magento/Catalog/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Catalog/etc/adminhtml/di.xml | 4 +- .../Magento/Catalog/etc/adminhtml/events.xml | 2 +- app/code/Magento/Catalog/etc/di.xml | 28 +- app/code/Magento/Catalog/etc/events.xml | 2 +- app/code/Magento/Catalog/etc/frontend/di.xml | 4 +- .../Magento/Catalog/etc/frontend/events.xml | 2 +- app/code/Magento/Catalog/etc/module.xml | 2 +- app/code/Magento/Catalog/etc/mview.xml | 2 +- app/code/Magento/Catalog/etc/view.xml | 2 +- .../sql/catalog_setup/install-1.6.0.0.0.php | 1140 +++--- .../sql/catalog_setup/install-1.6.0.0.php | 1140 +++--- .../mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php | 6 +- .../upgrade-1.6.0.0.2-1.6.0.0.3.php | 4 +- .../upgrade-1.6.0.0.25-1.6.0.0.26.php | 2 +- .../upgrade-1.6.0.0.4-1.6.0.0.5.php | 2 +- .../upgrade-1.6.0.0.6-1.6.0.0.7.php | 2 +- .../upgrade-1.6.0.0.9-1.6.0.0.10.php | 54 +- .../catalog/product/edit/options/option.phtml | 2 +- .../CATALOG_PRODUCT_COMPOSITE_CONFIGURE.xml | 2 +- .../layout/catalog_category_edit.xml | 2 +- .../adminhtml/layout/catalog_product_new.xml | 2 +- .../view/frontend/js/related-products.js | 3 + .../view/frontend/js/upsell-products.js | 3 + .../view/frontend/layout/MAP_popup.xml | 2 +- .../layout/catalog_product_prices.xml | 4 +- .../frontend/layout/catalog_product_view.xml | 4 +- .../Catalog/view/frontend/layout/default.xml | 2 +- .../product/price/amount/default.phtml | 4 +- .../product/price/amount/option.phtml | 2 +- .../frontend/product/price/msrp_price.phtml | 6 +- .../frontend/product/price/tier_prices.phtml | 2 +- .../frontend/product/view/price_clone.phtml | 2 +- .../Adminhtml/Form/Field/Customergroup.php | 6 +- .../Block/Adminhtml/Form/Field/Minsaleqty.php | 4 +- .../Block/Adminhtml/Form/Field/Stock.php | 28 +- .../CatalogInventory/Block/Qtyincrements.php | 12 +- .../Block/Stockqty/AbstractStockqty.php | 12 +- .../Block/Stockqty/DefaultStockqty.php | 2 +- .../CatalogInventory/Helper/Minsaleqty.php | 6 +- .../Model/Config/Backend/Managestock.php | 16 +- .../CatalogInventory/Model/Indexer/Stock.php | 20 +- .../CatalogInventory/Model/Observer.php | 2 +- .../Model/Quote/Item/QuantityValidator.php | 8 +- .../QuantityValidator/Initializer/Option.php | 6 +- .../Initializer/StockItem.php | 4 +- .../Model/Resource/Indexer/Stock.php | 4 +- .../Resource/Indexer/Stock/DefaultStock.php | 6 +- .../Resource/Indexer/Stock/StockInterface.php | 2 +- .../Model/Resource/Indexer/StockFactory.php | 6 +- .../CatalogInventory/Model/Resource/Stock.php | 8 +- .../Model/Resource/Stock/Item.php | 8 +- .../Model/Resource/Stock/Item/Collection.php | 22 +- .../Model/Resource/Stock/Status.php | 10 +- .../Model/Source/Backorders.php | 2 +- .../CatalogInventory/Model/Source/Stock.php | 2 +- .../Magento/CatalogInventory/Model/Stock.php | 30 +- .../CatalogInventory/Model/Stock/Item.php | 48 +- .../CatalogInventory/Model/Stock/Status.php | 30 +- .../System/Config/Backend/Minsaleqty.php | 16 +- .../System/Config/Backend/Qtyincrements.php | 4 +- .../CatalogInventory/etc/adminhtml/acl.xml | 2 +- .../CatalogInventory/etc/adminhtml/di.xml | 2 +- .../CatalogInventory/etc/adminhtml/events.xml | 2 +- app/code/Magento/CatalogInventory/etc/di.xml | 6 +- .../Magento/CatalogInventory/etc/events.xml | 2 +- .../Magento/CatalogInventory/etc/module.xml | 2 +- .../install-1.6.0.0.php | 106 +- .../mysql4-upgrade-1.6.0.0-1.6.0.0.1.php | 4 +- .../upgrade-1.6.0.0.1-1.6.0.0.2.php | 2 +- .../upgrade-1.6.0.0.2-1.6.0.0.3.php | 2 +- .../Block/Adminhtml/Promo/Catalog/Edit.php | 6 +- .../Adminhtml/Promo/Catalog/Edit/Form.php | 2 +- .../Promo/Catalog/Edit/Tab/Actions.php | 2 +- .../Promo/Catalog/Edit/Tab/Conditions.php | 10 +- .../Adminhtml/Promo/Catalog/Edit/Tab/Main.php | 22 +- .../Promo/Widget/Chooser/Daterange.php | 16 +- .../Controller/Adminhtml/Promo/Catalog.php | 14 +- .../Controller/Adminhtml/Promo/Widget.php | 2 +- app/code/Magento/CatalogRule/Model/Flag.php | 2 +- .../Magento/CatalogRule/Model/Observer.php | 14 +- .../Model/Resource/Grid/Collection.php | 2 - .../CatalogRule/Model/Resource/Rule.php | 36 +- .../Model/Resource/Rule/Product/Price.php | 6 +- .../Rule/Product/Price/Collection.php | 2 +- app/code/Magento/CatalogRule/Model/Rule.php | 36 +- .../Model/Rule/Action/Collection.php | 8 +- .../Magento/CatalogRule/Model/Rule/Job.php | 10 +- .../CatalogRule/Model/Rule/Product/Price.php | 4 +- .../Pricing/Price/CatalogRulePrice.php | 8 +- .../data-upgrade-1.6.0.3-1.6.0.4.php | 10 +- .../Magento/CatalogRule/etc/adminhtml/acl.xml | 2 +- .../Magento/CatalogRule/etc/adminhtml/di.xml | 2 +- .../CatalogRule/etc/adminhtml/events.xml | 2 +- .../CatalogRule/etc/crontab/events.xml | 2 +- app/code/Magento/CatalogRule/etc/di.xml | 8 +- app/code/Magento/CatalogRule/etc/events.xml | 2 +- .../CatalogRule/etc/frontend/events.xml | 2 +- app/code/Magento/CatalogRule/etc/module.xml | 2 +- .../sql/catalogrule_setup/install-1.6.0.0.php | 120 +- .../upgrade-1.6.0.0-1.6.0.1.php | 8 +- .../upgrade-1.6.0.1-1.6.0.2.php | 26 +- .../upgrade-1.6.0.2-1.6.0.3.php | 6 +- .../CatalogSearch/Block/Advanced/Form.php | 16 +- .../CatalogSearch/Block/Advanced/Result.php | 8 +- .../CatalogSearch/Block/Autocomplete.php | 132 - .../Magento/CatalogSearch/Block/Result.php | 4 +- app/code/Magento/CatalogSearch/Block/Term.php | 10 +- .../CatalogSearch/Controller/Advanced.php | 6 +- .../Magento/CatalogSearch/Controller/Ajax.php | 5 +- .../Magento/CatalogSearch/Controller/Term.php | 1 - .../Magento/CatalogSearch/Helper/Data.php | 39 +- .../Magento/CatalogSearch/Model/Advanced.php | 16 +- .../Model/Config/Backend/Search/Type.php | 12 +- .../Model/Config/Source/Search/Type.php | 2 +- .../Magento/CatalogSearch/Model/Fulltext.php | 12 +- .../CatalogSearch/Model/Fulltext/Observer.php | 30 +- .../CatalogSearch/Model/Indexer/Fulltext.php | 10 +- .../Magento/CatalogSearch/Model/Query.php | 16 +- .../CatalogSearch/Model/Resource/Advanced.php | 14 +- .../Model/Resource/Advanced/Collection.php | 36 +- .../Model/Resource/EngineFactory.php | 6 +- .../Model/Resource/EngineInterface.php | 4 +- .../CatalogSearch/Model/Resource/Fulltext.php | 48 +- .../Model/Resource/Fulltext/Collection.php | 24 +- .../Model/Resource/Fulltext/Engine.php | 2 +- .../CatalogSearch/Model/Resource/Helper.php | 2 +- .../Model/Resource/Indexer/Fulltext.php | 2 +- .../CatalogSearch/Model/Resource/Query.php | 32 +- .../Model/Resource/Query/Collection.php | 20 +- .../Model/Resource/Search/Collection.php | 26 +- .../CatalogSearch/etc/adminhtml/acl.xml | 2 +- .../CatalogSearch/etc/adminhtml/di.xml | 6 +- app/code/Magento/CatalogSearch/etc/di.xml | 4 +- .../Magento/CatalogSearch/etc/frontend/di.xml | 6 +- .../CatalogSearch/etc/frontend/page_types.xml | 1 - app/code/Magento/CatalogSearch/etc/module.xml | 2 +- .../catalogsearch_setup/install-1.6.0.0.php | 58 +- .../CatalogSearch/view/frontend/form-mini.js | 24 +- .../view/frontend/form.mini.phtml | 3 +- .../layout/catalogsearch_advanced_index.xml | 2 +- .../view/frontend/layout/default.xml | 6 +- .../Magento/Centinel/Block/Authentication.php | 6 +- .../Block/Authentication/Complete.php | 12 +- .../Centinel/Block/Authentication/Start.php | 12 +- app/code/Magento/Centinel/Block/Logo.php | 2 +- .../Controller/Adminhtml/Centinel/Index.php | 12 +- .../Magento/Centinel/Controller/Index.php | 8 +- app/code/Magento/Centinel/Helper/Data.php | 6 +- .../Magento/Centinel/Model/AbstractState.php | 14 +- app/code/Magento/Centinel/Model/Api.php | 20 +- app/code/Magento/Centinel/Model/Config.php | 6 +- app/code/Magento/Centinel/Model/Observer.php | 10 +- app/code/Magento/Centinel/Model/Service.php | 36 +- .../Magento/Centinel/Model/StateFactory.php | 6 +- .../Magento/Centinel/etc/adminhtml/di.xml | 6 +- .../Magento/Centinel/etc/adminhtml/events.xml | 2 +- app/code/Magento/Centinel/etc/di.xml | 2 +- app/code/Magento/Centinel/etc/events.xml | 2 +- app/code/Magento/Centinel/etc/frontend/di.xml | 6 +- .../Magento/Centinel/etc/frontend/events.xml | 2 +- app/code/Magento/Centinel/etc/module.xml | 2 +- app/code/Magento/Checkout/Block/Cart.php | 10 +- .../Checkout/Block/Cart/AbstractCart.php | 10 +- .../Magento/Checkout/Block/Cart/Coupon.php | 4 +- .../Checkout/Block/Cart/Item/Configure.php | 2 +- .../Checkout/Block/Cart/Item/Renderer.php | 18 +- app/code/Magento/Checkout/Block/Cart/Link.php | 12 +- .../Magento/Checkout/Block/Cart/Shipping.php | 4 +- .../Magento/Checkout/Block/Cart/Sidebar.php | 12 +- .../Magento/Checkout/Block/Cart/Totals.php | 6 +- app/code/Magento/Checkout/Block/Link.php | 12 +- app/code/Magento/Checkout/Block/Onepage.php | 4 +- .../Block/Onepage/AbstractOnepage.php | 14 +- .../Checkout/Block/Onepage/Billing.php | 4 +- .../Checkout/Block/Onepage/Failure.php | 6 +- .../Magento/Checkout/Block/Onepage/Link.php | 6 +- .../Magento/Checkout/Block/Onepage/Login.php | 12 +- .../Checkout/Block/Onepage/Payment/Info.php | 4 +- .../Block/Onepage/Payment/Methods.php | 4 +- .../Checkout/Block/Onepage/Review/Info.php | 4 +- .../Checkout/Block/Onepage/Shipping.php | 4 +- .../Onepage/Shipping/Method/Available.php | 4 +- .../Checkout/Block/Onepage/Success.php | 6 +- .../Checkout/Block/QuoteShortcutButtons.php | 2 +- app/code/Magento/Checkout/Block/Success.php | 6 +- .../Magento/Checkout/Block/Total/Nominal.php | 12 +- .../Magento/Checkout/Controller/Action.php | 2 +- app/code/Magento/Checkout/Controller/Cart.php | 70 +- .../Magento/Checkout/Controller/Onepage.php | 52 +- app/code/Magento/Checkout/Helper/Data.php | 63 +- .../Checkout/Helper/ExpressRedirect.php | 6 +- .../AgreementsProviderInterface.php | 37 + .../Model/Agreements/AgreementsValidator.php} | 41 +- app/code/Magento/Checkout/Model/Cart.php | 58 +- .../Checkout/Model/Cart/CartInterface.php | 2 +- .../Model/Config/Source/Cart/Summary.php | 2 +- .../Model/Layout/DepersonalizePlugin.php | 14 +- app/code/Magento/Checkout/Model/Observer.php | 10 +- .../Magento/Checkout/Model/Resource/Cart.php | 2 +- .../Magento/Checkout/Model/Resource/Setup.php | 2 +- app/code/Magento/Checkout/Model/Session.php | 34 +- .../Magento/Checkout/Model/Type/Onepage.php | 46 +- .../Magento/Checkout/etc/adminhtml/di.xml | 2 +- .../Magento/Checkout/etc/adminhtml/system.xml | 4 - app/code/Magento/Checkout/etc/di.xml | 6 +- app/code/Magento/Checkout/etc/fieldset.xml | 2 +- app/code/Magento/Checkout/etc/frontend/di.xml | 4 +- .../Magento/Checkout/etc/frontend/events.xml | 2 +- app/code/Magento/Checkout/etc/module.xml | 3 +- .../sql/checkout_setup/install-1.6.0.0.php | 87 - .../view/frontend/cart/minicart.phtml | 7 +- .../view/frontend/js/components.phtml | 3 + .../frontend/layout/checkout_cart_index.xml | 4 +- .../layout/checkout_onepage_index.xml | 4 +- .../layout/checkout_onepage_paymentmethod.xml | 4 +- .../layout/checkout_onepage_review.xml | 7 +- .../Checkout/view/frontend/layout/default.xml | 4 +- .../Block/Adminhtml/Agreement.php | 10 +- .../Block/Adminhtml/Agreement/Edit.php | 12 +- .../Block/Adminhtml/Agreement/Edit/Form.php | 14 +- .../Block/Adminhtml/Agreement/Grid.php | 14 +- .../Block/Agreements.php | 18 +- .../Controller/Adminhtml/Agreement.php | 28 +- .../Model/Agreement.php | 27 +- .../Model/AgreementsProvider.php | 77 + .../Model/Resource/Agreement.php | 32 +- .../Model/Resource/Agreement/Collection.php | 12 +- .../etc/adminhtml/acl.xml | 9 +- .../etc/adminhtml/menu.xml | 4 +- .../etc/adminhtml/routes.xml | 2 +- .../etc/adminhtml/system.xml | 37 + .../Magento/CheckoutAgreements/etc/di.xml | 42 + .../Magento/CheckoutAgreements/etc/module.xml | 38 + .../install-1.0.0.0.php | 117 + .../view/frontend/agreements.phtml | 2 +- .../layout/checkout_onepage_review.xml} | 4 +- .../multishipping_checkout_overview.xml | 30 + .../frontend/layout/paypal_express_review.xml | 30 + .../layout/paypal_payflowexpress_review.xml | 30 + .../Cms/Block/Adminhtml/Block/Edit.php | 6 +- .../Cms/Block/Adminhtml/Block/Edit/Form.php | 10 +- .../Block/Adminhtml/Block/Widget/Chooser.php | 6 +- .../Magento/Cms/Block/Adminhtml/Page/Edit.php | 8 +- .../Cms/Block/Adminhtml/Page/Edit/Form.php | 2 +- .../Block/Adminhtml/Page/Edit/Tab/Content.php | 10 +- .../Block/Adminhtml/Page/Edit/Tab/Design.php | 20 +- .../Block/Adminhtml/Page/Edit/Tab/Main.php | 10 +- .../Block/Adminhtml/Page/Edit/Tab/Meta.php | 2 +- .../Magento/Cms/Block/Adminhtml/Page/Grid.php | 8 +- .../Adminhtml/Page/Grid/Renderer/Action.php | 4 +- .../Page/Grid/Renderer/Action/UrlBuilder.php | 6 +- .../Block/Adminhtml/Page/Widget/Chooser.php | 6 +- .../Adminhtml/Wysiwyg/Images/Content.php | 10 +- .../Wysiwyg/Images/Content/Files.php | 28 +- .../Wysiwyg/Images/Content/Uploader.php | 4 +- .../Block/Adminhtml/Wysiwyg/Images/Tree.php | 6 +- app/code/Magento/Cms/Block/Block.php | 6 +- app/code/Magento/Cms/Block/Page.php | 6 +- app/code/Magento/Cms/Block/Widget/Block.php | 6 +- .../Magento/Cms/Block/Widget/Page/Link.php | 6 +- .../Cms/Controller/Adminhtml/Block.php | 6 +- .../Magento/Cms/Controller/Adminhtml/Page.php | 14 +- .../Cms/Controller/Adminhtml/Wysiwyg.php | 6 +- .../Controller/Adminhtml/Wysiwyg/Images.php | 10 +- app/code/Magento/Cms/Controller/Router.php | 16 +- app/code/Magento/Cms/Helper/Page.php | 24 +- .../Magento/Cms/Helper/Wysiwyg/Images.php | 14 +- app/code/Magento/Cms/Model/Block.php | 8 +- .../Magento/Cms/Model/Config/Source/Page.php | 2 +- .../Model/Config/Source/Wysiwyg/Enabled.php | 2 +- app/code/Magento/Cms/Model/Observer.php | 8 +- app/code/Magento/Cms/Model/Page.php | 2 +- .../Magento/Cms/Model/Page/Urlrewrite.php | 2 +- app/code/Magento/Cms/Model/Resource/Block.php | 36 +- .../Cms/Model/Resource/Block/Collection.php | 4 +- app/code/Magento/Cms/Model/Resource/Page.php | 62 +- .../Cms/Model/Resource/Page/Collection.php | 20 +- .../Cms/Model/Resource/Page/Service.php | 2 +- .../Cms/Model/Resource/Page/Urlrewrite.php | 2 +- app/code/Magento/Cms/Model/Resource/Setup.php | 8 +- .../Cms/Model/Template/FilterProvider.php | 14 +- app/code/Magento/Cms/Model/Wysiwyg/Config.php | 28 +- .../Cms/Model/Wysiwyg/Images/Storage.php | 48 +- .../Wysiwyg/Images/Storage/Collection.php | 2 +- .../data-upgrade-1.6.0.0.2-1.6.0.0.3.php | 18 +- app/code/Magento/Cms/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Cms/etc/adminhtml/di.xml | 4 +- app/code/Magento/Cms/etc/di.xml | 4 +- app/code/Magento/Cms/etc/frontend/di.xml | 2 +- app/code/Magento/Cms/etc/frontend/events.xml | 2 +- app/code/Magento/Cms/etc/module.xml | 2 +- .../Cms/sql/cms_setup/install-1.6.0.0.php | 76 +- .../cms_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php | 14 +- .../adminhtml/browser/content/uploader.phtml | 4 +- .../layout/cms_index_defaultindex.xml | 2 +- .../layout/cms_index_defaultnoroute.xml | 2 +- .../Attribute/Edit/Tab/Advanced/Observer.php | 4 +- .../Attribute/Edit/Tab/Variations/Main.php | 6 +- .../NewAttribute/Product/Created.php | 12 +- .../Product/Edit/Tab/Super/Config.php | 18 +- .../Super/Config/Grid/Renderer/Checkbox.php | 14 +- .../Super/Config/Grid/Renderer/Inventory.php | 4 +- .../Product/Edit/Tab/Super/Config/Matrix.php | 12 +- .../Product/Edit/Tab/Super/Config/Simple.php | 10 +- .../Product/Edit/Tab/Super/Settings.php | 10 +- .../Block/Cart/Item/Renderer/Configurable.php | 12 +- .../Backend/Grid/ColumnSet.php | 10 +- .../AssociatedSelector/Renderer/Id.php | 4 +- .../Block/Product/View/Type/Configurable.php | 10 +- .../Model/Attribute/LockValidator.php | 8 +- .../Group/AttributeMapper/Plugin.php | 4 +- .../Model/Product/Type/Configurable.php | 44 +- .../Product/Type/Configurable/Attribute.php | 2 +- .../Model/Product/Type/Configurable/Price.php | 8 +- .../Model/Product/Type/Plugin.php | 4 +- .../Model/Product/Validator/Plugin.php | 8 +- .../Resource/Indexer/Stock/Configurable.php | 2 +- .../Product/Collection/AssociatedProduct.php | 30 +- .../Resource/Product/Type/Configurable.php | 2 +- .../Product/Type/Configurable/Attribute.php | 2 +- .../Configurable/Attribute/Collection.php | 30 +- .../ConfigurableProduct/etc/adminhtml/di.xml | 2 +- .../etc/adminhtml/events.xml | 2 +- .../Magento/ConfigurableProduct/etc/di.xml | 4 +- .../ConfigurableProduct/etc/module.xml | 2 +- .../configurable_setup/install-1.0.0.0.php | 82 +- .../edit/super/attribute-js-template.phtml | 2 +- .../edit/super/attribute-template.phtml | 2 +- .../adminhtml/layout/catalog_product_new.xml | 4 +- .../form.phtml | 2 +- .../Adminhtml/Extension/Custom/Edit/Form.php | 2 +- .../Extension/Custom/Edit/Tab/AbstractTab.php | 10 +- .../Extension/Custom/Edit/Tab/Authors.php | 14 +- .../Extension/Custom/Edit/Tab/Contents.php | 8 +- .../Extension/Custom/Edit/Tab/Depends.php | 2 +- .../Extension/Custom/Edit/Tab/Package.php | 6 +- .../Extension/Custom/Edit/Tab/Release.php | 2 +- .../Controller/Adminhtml/Extension/Custom.php | 10 +- app/code/Magento/Connect/Helper/Data.php | 12 +- app/code/Magento/Connect/Model/Extension.php | 44 +- .../Connect/Model/Extension/Collection.php | 4 +- app/code/Magento/Connect/Model/Session.php | 22 +- .../Magento/Connect/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Connect/etc/di.xml | 4 +- app/code/Magento/Connect/etc/module.xml | 2 +- app/code/Magento/Contact/Controller/Index.php | 18 +- .../Model/System/Config/Backend/Links.php | 2 +- .../Magento/Contact/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Contact/etc/frontend/di.xml | 2 +- app/code/Magento/Contact/etc/module.xml | 2 +- .../frontend/layout/contact_index_index.xml | 2 +- .../Contact/view/frontend/layout/default.xml | 2 +- .../Core/App/Action/FormKeyValidator.php | 6 +- .../Magento/Core/App/Action/Plugin/Design.php | 6 +- .../Core/App/Action/Plugin/LastUrl.php | 10 +- app/code/Magento/Core/App/Media.php | 6 +- app/code/Magento/Core/App/Router/Base.php | 24 +- app/code/Magento/Core/Block/RequireCookie.php | 2 +- app/code/Magento/Core/Controller/Index.php | 2 +- app/code/Magento/Core/Controller/Noroute.php | 4 +- app/code/Magento/Core/Helper/Data.php | 30 +- app/code/Magento/Core/Helper/File/Media.php | 12 +- app/code/Magento/Core/Helper/File/Storage.php | 2 +- app/code/Magento/Core/Helper/Theme.php | 28 +- app/code/Magento/Core/Model/App/Emulation.php | 52 +- app/code/Magento/Core/Model/Asset/Config.php | 2 +- .../Model/Asset/Plugin/CleanMergedJsCss.php | 8 +- app/code/Magento/Core/Model/Design.php | 38 +- .../Core/Model/Design/Backend/Exceptions.php | 32 +- .../Core/Model/Design/Backend/Theme.php | 24 +- app/code/Magento/Core/Model/EntityFactory.php | 10 +- app/code/Magento/Core/Model/Factory.php | 12 +- app/code/Magento/Core/Model/File/Storage.php | 22 +- .../Core/Model/File/Storage/Config.php | 6 +- .../Core/Model/File/Storage/Database.php | 16 +- .../Storage/Database/AbstractDatabase.php | 26 +- .../Model/File/Storage/Directory/Database.php | 20 +- .../Magento/Core/Model/File/Storage/File.php | 12 +- .../Magento/Core/Model/File/Storage/Flag.php | 2 +- .../Core/Model/File/Storage/Response.php | 10 +- .../Model/File/Storage/Synchronization.php | 6 +- app/code/Magento/Core/Model/File/Uploader.php | 2 +- .../Core/Model/Layout/DepersonalizePlugin.php | 26 +- app/code/Magento/Core/Model/Layout/Link.php | 2 +- app/code/Magento/Core/Model/Layout/Merge.php | 78 +- .../Magento/Core/Model/Layout/Translator.php | 2 +- app/code/Magento/Core/Model/Layout/Update.php | 26 +- .../Core/Model/Layout/Update/Validator.php | 18 +- app/code/Magento/Core/Model/Observer.php | 36 +- .../Magento/Core/Model/Resource/Config.php | 2 +- .../Core/Model/Resource/Config/Data.php | 10 +- .../Model/Resource/Config/Data/Collection.php | 2 +- .../Magento/Core/Model/Resource/Design.php | 14 +- .../Core/Model/Resource/Design/Collection.php | 24 +- .../Resource/File/Storage/AbstractStorage.php | 8 +- .../Model/Resource/File/Storage/Database.php | 32 +- .../File/Storage/Directory/Database.php | 20 +- .../Core/Model/Resource/File/Storage/File.php | 16 +- .../Core/Model/Resource/Layout/Link.php | 2 +- .../Model/Resource/Layout/Link/Collection.php | 26 +- .../Core/Model/Resource/Layout/Update.php | 20 +- .../Resource/Layout/Update/Collection.php | 32 +- .../Magento/Core/Model/Resource/Setup.php | 8 +- .../Magento/Core/Model/Resource/Theme.php | 2 +- .../Core/Model/Resource/Theme/Collection.php | 30 +- .../Resource/Theme/Customization/Update.php | 2 +- .../Model/Resource/Theme/Data/Collection.php | 4 +- .../Core/Model/Resource/Theme/File.php | 2 +- .../Model/Resource/Theme/File/Collection.php | 8 +- .../Model/Resource/Theme/Grid/Collection.php | 2 +- .../Magento/Core/Model/Resource/Variable.php | 10 +- .../Model/Resource/Variable/Collection.php | 2 +- .../TemplateEngine/Decorator/DebugHints.php | 14 +- .../TemplateEngine/Plugin/DebugHints.php | 16 +- app/code/Magento/Core/Model/Theme.php | 53 +- .../Magento/Core/Model/Theme/Collection.php | 33 +- .../Core/Model/Theme/Customization/Config.php | 2 +- app/code/Magento/Core/Model/Theme/Data.php | 2 +- .../Core/Model/Theme/Data/Collection.php | 4 +- .../Core/Model/Theme/Domain/Physical.php | 22 +- .../Core/Model/Theme/Domain/Staging.php | 10 +- .../Core/Model/Theme/Domain/Virtual.php | 20 +- app/code/Magento/Core/Model/Theme/File.php | 42 +- .../Magento/Core/Model/Theme/FileProvider.php | 6 +- .../Magento/Core/Model/Theme/Image/Path.php | 10 +- .../Magento/Core/Model/Theme/Observer.php | 24 +- .../Magento/Core/Model/Theme/Registration.php | 6 +- .../Magento/Core/Model/Theme/Resolver.php | 12 +- .../Magento/Core/Model/Theme/Source/Theme.php | 4 +- .../Core/Model/Theme/ThemeProvider.php | 8 +- .../Core/Model/Url/RouteParamsResolver.php | 8 +- .../Magento/Core/Model/Url/ScopeResolver.php | 6 +- .../Magento/Core/Model/Url/SecurityInfo.php | 2 +- .../Magento/Core/Model/Validator/Factory.php | 32 +- app/code/Magento/Core/Model/Variable.php | 20 +- .../Magento/Core/Model/Variable/Config.php | 8 +- app/code/Magento/Core/Model/View/Design.php | 18 +- .../Magento/Core/Model/View/Url/Config.php | 2 +- .../data-upgrade-1.6.0.10-1.6.0.11.php | 8 +- .../data-upgrade-1.6.0.12-1.6.0.13.php | 2 +- .../data-upgrade-1.6.0.2-1.6.0.3.php | 2 +- .../data-upgrade-1.6.0.3-1.6.0.4.php | 10 +- .../data-upgrade-1.6.0.4-1.6.0.5.php | 2 +- .../data-upgrade-1.6.0.5-1.6.0.6.php | 2 +- app/code/Magento/Core/etc/cache.xml | 2 +- app/code/Magento/Core/etc/config.xml | 22 +- app/code/Magento/Core/etc/di.xml | 283 +- app/code/Magento/Core/etc/events.xml | 2 +- app/code/Magento/Core/etc/frontend/di.xml | 7 +- app/code/Magento/Core/etc/frontend/events.xml | 2 +- app/code/Magento/Core/etc/layouts.xsd | 2 +- app/code/Magento/Core/etc/module.xml | 2 +- app/code/Magento/Core/i18n/de_DE.csv | 4 +- app/code/Magento/Core/i18n/en_US.csv | 4 +- app/code/Magento/Core/i18n/es_ES.csv | 4 +- app/code/Magento/Core/i18n/fr_FR.csv | 4 +- app/code/Magento/Core/i18n/nl_NL.csv | 4 +- app/code/Magento/Core/i18n/pt_BR.csv | 4 +- app/code/Magento/Core/i18n/zh_CN.csv | 4 +- .../Core/sql/core_setup/install-1.6.0.0.php | 156 +- .../core_setup/upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../core_setup/upgrade-1.6.0.10-1.6.0.11.php | 4 +- .../core_setup/upgrade-1.6.0.11-1.6.0.12.php | 22 +- .../core_setup/upgrade-1.6.0.12-1.6.0.13.php | 4 +- .../core_setup/upgrade-1.6.0.13-1.6.0.14.php | 2 +- .../core_setup/upgrade-1.6.0.14-1.6.0.15.php | 2 +- .../core_setup/upgrade-1.6.0.2-1.6.0.3.php | 12 +- .../core_setup/upgrade-1.6.0.3-1.6.0.4.php | 20 +- .../core_setup/upgrade-1.6.0.5-1.6.0.6.php | 20 +- .../core_setup/upgrade-1.6.0.6-1.6.0.7.php | 18 +- .../core_setup/upgrade-1.6.0.7-1.6.0.8.php | 4 +- .../core_setup/upgrade-1.6.0.8-1.6.0.9.php | 20 +- .../core_setup/upgrade-1.6.0.9-1.6.0.10.php | 18 +- .../Magento/Core/view/frontend/template.phtml | 2 +- .../Cron/Plugin/ApplicationInitializer.php | 10 +- app/code/Magento/Cron/Exception.php | 2 +- .../Model/Config/Backend/Product/Alert.php | 16 +- .../Cron/Model/Config/Backend/Sitemap.php | 16 +- .../Cron/Model/Config/Converter/Db.php | 2 +- .../Cron/Model/Config/Converter/Xml.php | 2 +- app/code/Magento/Cron/Model/Config/Data.php | 6 +- .../Magento/Cron/Model/Config/Reader/Xml.php | 12 +- .../Cron/Model/Config/SchemaLocator.php | 6 +- .../Cron/Model/Config/Source/Frequency.php | 2 +- .../Model/Groups/Config/Converter/Xml.php | 2 +- .../Magento/Cron/Model/Groups/Config/Data.php | 6 +- .../Cron/Model/Groups/Config/Reader/Xml.php | 12 +- .../Model/Groups/Config/SchemaLocator.php | 6 +- app/code/Magento/Cron/Model/Observer.php | 12 +- .../Magento/Cron/Model/Resource/Schedule.php | 2 +- .../Model/Resource/Schedule/Collection.php | 2 +- app/code/Magento/Cron/Model/Schedule.php | 24 +- app/code/Magento/Cron/etc/crontab/events.xml | 2 +- app/code/Magento/Cron/etc/di.xml | 8 +- app/code/Magento/Cron/etc/module.xml | 2 +- .../Cron/sql/cron_setup/install-1.6.0.0.php | 18 +- .../Block/Adminhtml/System/Currency.php | 2 +- .../Adminhtml/System/Currency/Rate/Matrix.php | 2 +- .../System/Currency/Rate/Services.php | 4 +- .../Block/Adminhtml/System/Currencysymbol.php | 2 +- .../Controller/Adminhtml/System/Currency.php | 12 +- .../Adminhtml/System/Currencysymbol.php | 4 +- .../Magento/CurrencySymbol/Helper/Data.php | 6 +- .../Magento/CurrencySymbol/Model/Observer.php | 4 +- .../Model/System/Currencysymbol.php | 12 +- .../CurrencySymbol/etc/adminhtml/acl.xml | 2 +- app/code/Magento/CurrencySymbol/etc/di.xml | 4 +- .../Magento/CurrencySymbol/etc/events.xml | 2 +- .../Magento/CurrencySymbol/etc/module.xml | 2 +- .../Block/Account/AuthorizationLink.php | 6 +- .../Customer/Block/Account/Customer.php | 8 +- .../Customer/Block/Account/Dashboard.php | 6 +- .../Block/Account/Dashboard/Address.php | 8 +- .../Block/Account/Dashboard/Block.php | 6 +- .../Block/Account/Dashboard/Hello.php | 6 +- .../Customer/Block/Account/Dashboard/Info.php | 8 +- .../Block/Account/Dashboard/Newsletter.php | 6 +- .../Block/Account/Dashboard/Sidebar.php | 6 +- .../Customer/Block/Account/Forgotpassword.php | 2 +- .../Magento/Customer/Block/Account/Link.php | 6 +- .../Customer/Block/Account/RegisterLink.php | 6 +- .../Customer/Block/Account/Resetpassword.php | 2 +- .../Magento/Customer/Block/Address/Book.php | 12 +- .../Magento/Customer/Block/Address/Edit.php | 10 +- .../Address/Renderer/DefaultRenderer.php | 14 +- .../Address/Renderer/RendererInterface.php | 6 +- .../Magento/Customer/Block/Adminhtml/Edit.php | 6 +- .../Customer/Block/Adminhtml/Edit/Form.php | 12 +- .../Edit/Renderer/Attribute/Group.php | 6 +- .../Block/Adminhtml/Edit/Renderer/Newpass.php | 4 +- .../Block/Adminhtml/Edit/Renderer/Region.php | 6 +- .../Block/Adminhtml/Edit/Tab/Account.php | 57 +- .../Block/Adminhtml/Edit/Tab/Addresses.php | 18 +- .../Block/Adminhtml/Edit/Tab/Cart.php | 12 +- .../Adminhtml/Edit/Tab/GenericMetadata.php | 4 +- .../Block/Adminhtml/Edit/Tab/Newsletter.php | 12 +- .../Adminhtml/Edit/Tab/Newsletter/Grid.php | 6 +- .../Tab/Newsletter/Grid/Renderer/Action.php | 12 +- .../Tab/Newsletter/Grid/Renderer/Status.php | 4 +- .../Block/Adminhtml/Edit/Tab/Orders.php | 8 +- .../Block/Adminhtml/Edit/Tab/View.php | 25 +- .../Adminhtml/Edit/Tab/View/Accordion.php | 8 +- .../Block/Adminhtml/Edit/Tab/View/Cart.php | 12 +- .../Edit/Tab/View/Grid/Renderer/Item.php | 4 +- .../Block/Adminhtml/Edit/Tab/View/Orders.php | 6 +- .../Block/Adminhtml/Edit/Tab/View/Sales.php | 8 +- .../Adminhtml/Edit/Tab/View/Wishlist.php | 6 +- .../Wishlist/Grid/Renderer/Description.php | 4 +- .../Customer/Block/Adminhtml/Edit/Tabs.php | 14 +- .../Block/Adminhtml/Form/Element/Boolean.php | 2 +- .../Block/Adminhtml/Form/Element/File.php | 20 +- .../Block/Adminhtml/Grid/Filter/Country.php | 4 +- .../Adminhtml/Grid/Renderer/Multiaction.php | 8 +- .../Customer/Block/Adminhtml/Group/Edit.php | 6 +- .../Block/Adminhtml/Group/Edit/Form.php | 10 +- .../Block/Adminhtml/Online/Filter.php | 2 +- .../Adminhtml/Online/Grid/Renderer/Ip.php | 4 +- .../Adminhtml/Online/Grid/Renderer/Type.php | 4 +- .../Adminhtml/Online/Grid/Renderer/Url.php | 4 +- .../Sales/Order/Address/Form/Renderer/Vat.php | 10 +- .../Adminhtml/System/Config/Validatevat.php | 8 +- app/code/Magento/Customer/Block/Form/Edit.php | 4 +- .../Magento/Customer/Block/Form/Login.php | 6 +- .../Magento/Customer/Block/Form/Register.php | 16 +- .../Magento/Customer/Block/Newsletter.php | 4 +- .../Customer/Block/Widget/AbstractWidget.php | 8 +- .../Magento/Customer/Block/Widget/Dob.php | 4 +- .../Magento/Customer/Block/Widget/Gender.php | 4 +- .../Magento/Customer/Block/Widget/Name.php | 4 +- .../Magento/Customer/Block/Widget/Taxvat.php | 4 +- .../Magento/Customer/Controller/Account.php | 83 +- .../Magento/Customer/Controller/Address.php | 10 +- .../Adminhtml/Cart/Product/Composite/Cart.php | 12 +- .../Customer/Controller/Adminhtml/Group.php | 26 +- .../Customer/Controller/Adminhtml/Index.php | 49 +- .../Adminhtml/System/Config/Validatevat.php | 2 +- .../Wishlist/Product/Composite/Wishlist.php | 8 +- app/code/Magento/Customer/Exception.php | 2 +- app/code/Magento/Customer/Helper/Address.php | 8 +- app/code/Magento/Customer/Helper/Data.php | 22 +- app/code/Magento/Customer/Model/Address.php | 16 +- .../Model/Address/AbstractAddress.php | 20 +- .../Magento/Customer/Model/Address/Config.php | 14 +- .../Model/Address/Config/Converter.php | 2 +- .../Customer/Model/Address/Config/Reader.php | 10 +- .../Model/Address/Config/SchemaLocator.php | 6 +- .../Customer/Model/AddressRegistry.php | 4 +- .../Model/App/Action/ContextPlugin.php | 2 +- .../Model/Attribute/Data/Postcode.php | 16 +- .../Model/Config/Backend/Address/Street.php | 18 +- .../Model/Config/Backend/Show/Customer.php | 18 +- .../Magento/Customer/Model/Config/Share.php | 22 +- .../Model/Config/Source/Address/Type.php | 2 +- .../Customer/Model/Config/Source/Group.php | 8 +- .../Model/Config/Source/Group/Multiselect.php | 8 +- app/code/Magento/Customer/Model/Converter.php | 36 +- app/code/Magento/Customer/Model/Customer.php | 73 +- .../Customer/Attribute/Backend/Billing.php | 4 +- .../Customer/Attribute/Backend/Password.php | 16 +- .../Customer/Attribute/Backend/Shipping.php | 4 +- .../Customer/Attribute/Backend/Store.php | 6 +- .../Customer/Attribute/Backend/Website.php | 6 +- .../Model/Customer/Attribute/Source/Group.php | 6 +- .../Customer/Model/CustomerRegistry.php | 66 +- app/code/Magento/Customer/Model/Group.php | 18 +- .../Magento/Customer/Model/GroupRegistry.php | 4 +- .../Model/ImportExport/Export}/Address.php | 24 +- .../Model/ImportExport/Export}/Customer.php | 18 +- .../ImportExport/Import}/AbstractCustomer.php | 21 +- .../Model/ImportExport/Import}/Address.php | 31 +- .../Model/ImportExport/Import}/Customer.php | 30 +- .../Import}/CustomerComposite.php | 62 +- .../Model/Layout/DepersonalizePlugin.php | 28 +- .../Model/Metadata/ElementFactory.php | 10 +- .../Magento/Customer/Model/Metadata/Form.php | 16 +- .../Model/Metadata/Form/AbstractData.php | 32 +- .../Customer/Model/Metadata/Form/Date.php | 4 +- .../Customer/Model/Metadata/Form/File.php | 19 +- .../Customer/Model/Metadata/Form/Text.php | 18 +- .../Customer/Model/Metadata/FormFactory.php | 6 +- .../Customer/Model/Metadata/Validator.php | 4 +- app/code/Magento/Customer/Model/Observer.php | 10 +- .../Customer/Model/Renderer/Region.php | 12 +- .../Resource/AbstractServiceCollection.php | 12 +- .../Customer/Model/Resource/Address.php | 22 +- .../Address/Attribute/Backend/Region.php | 6 +- .../Customer/Model/Resource/Customer.php | 38 +- .../Model/Resource/Customer/Collection.php | 24 +- .../Customer/CustomersTypeOptions.php | 2 +- .../Customer/Grid/ServiceCollection.php | 18 +- .../Form/Attribute/CollectionFactory.php | 6 +- .../Magento/Customer/Model/Resource/Group.php | 14 +- .../Model/Resource/Group/Collection.php | 2 +- .../Resource/Group/Grid/ServiceCollection.php | 8 +- .../ImportExport/Import}/Customer/Storage.php | 15 +- .../Import/CustomerComposite/Data.php | 25 +- .../Magento/Customer/Model/Resource/Setup.php | 2 +- app/code/Magento/Customer/Model/Session.php | 42 +- .../Customer/Model/Session/Storage.php | 2 +- .../Service/V1/CustomerAccountService.php | 211 +- .../V1/CustomerAccountServiceInterface.php | 137 +- .../Service/V1/CustomerAddressService.php | 46 +- .../V1/CustomerAddressServiceInterface.php | 16 +- .../Service/V1/CustomerCurrentService.php | 12 +- .../Service/V1/CustomerGroupService.php | 48 +- .../V1/CustomerGroupServiceInterface.php | 24 +- .../Service/V1/CustomerMetadataService.php | 53 +- .../V1/CustomerMetadataServiceInterface.php | 6 +- .../Customer/Service/V1/Data/Address.php | 2 +- .../Service/V1/Data/AddressBuilder.php | 17 +- .../Service/V1/Data/AddressConverter.php | 19 +- .../Customer/Service/V1/Data/Customer.php | 2 +- .../Service/V1/Data/CustomerBuilder.php | 22 +- .../Service/V1/Data/CustomerDetails.php | 2 +- .../V1/Data/CustomerDetailsBuilder.php | 2 +- .../Service/V1/Data/CustomerGroup.php | 2 +- .../Service/V1/Data/CustomerGroupBuilder.php | 2 +- .../V1/Data/CustomerValidationResults.php | 2 +- .../Data/CustomerValidationResultsBuilder.php | 2 +- .../Service/V1/Data/Eav/AttributeMetadata.php | 2 +- .../V1/Data/Eav/AttributeMetadataBuilder.php | 2 +- .../Customer/Service/V1/Data/Eav/Option.php | 2 +- .../Service/V1/Data/Eav/OptionBuilder.php | 2 +- .../Service/V1/Data/Eav/ValidationRule.php | 2 +- .../V1/Data/Eav/ValidationRuleBuilder.php | 2 +- .../Customer/Service/V1/Data/Region.php | 2 +- .../Service/V1/Data/RegionBuilder.php | 2 +- .../Service/V1/Data/SearchResults.php | 4 +- .../Service/V1/Data/SearchResultsBuilder.php | 4 +- .../data-upgrade-1.6.2.0.1-1.6.2.0.2.php | 6 +- .../Magento/Customer/etc/adminhtml/acl.xml | 2 +- .../Magento/Customer/etc/adminhtml/di.xml | 2 +- app/code/Magento/Customer/etc/config.xml | 6 + app/code/Magento/Customer/etc/di.xml | 9 +- app/code/Magento/Customer/etc/events.xml | 2 +- .../etc/di.xml => Customer/etc/export.xml} | 9 +- app/code/Magento/Customer/etc/fieldset.xml | 2 +- app/code/Magento/Customer/etc/frontend/di.xml | 4 +- app/code/Magento/Customer/etc/import.xml | 30 + app/code/Magento/Customer/etc/module.xml | 3 +- app/code/Magento/Customer/etc/validation.xml | 2 +- app/code/Magento/Customer/etc/webapi.xml | 30 +- .../sql/customer_setup/install-1.6.0.0.php | 364 +- .../upgrade-1.6.2.0-1.6.2.0.1.php | 2 +- .../upgrade-1.6.2.0.4-1.6.2.0.5.php | 2 +- .../view/frontend/account/navigation.phtml | 2 +- .../view/frontend/layout/customer_account.xml | 8 +- .../layout/customer_account_confirmation.xml | 2 +- .../layout/customer_account_create.xml | 2 +- .../layout/customer_account_index.xml | 2 +- .../layout/customer_account_login.xml | 2 +- .../layout/customer_account_logoutsuccess.xml | 2 +- .../Block/Adminhtml/Editor/Container.php | 2 +- .../Form/Element/BackgroundUploader.php | 14 +- .../Adminhtml/Editor/Form/Element/Button.php | 2 +- .../Editor/Form/Element/ColorPicker.php | 2 +- .../Adminhtml/Editor/Form/Element/Column.php | 14 +- .../Element/Composite/AbstractComposite.php | 24 +- .../Form/Element/ContainerInterface.php | 2 +- .../Editor/Form/Element/FontPicker.php | 2 +- .../Editor/Form/Element/Uploader.php | 2 +- .../Block/Adminhtml/Editor/Form/Renderer.php | 10 +- .../Editor/Form/Renderer/Recursive.php | 10 +- .../Adminhtml/Editor/Toolbar/Buttons/Edit.php | 10 +- .../Adminhtml/Editor/Toolbar/Buttons/Save.php | 8 +- .../Block/Adminhtml/Editor/Tools/Block.php | 2 +- .../Block/Adminhtml/Editor/Tools/Code/Css.php | 2 +- .../Adminhtml/Editor/Tools/Code/Custom.php | 14 +- .../Editor/Tools/Code/ImageSizing.php | 24 +- .../Block/Adminhtml/Editor/Tools/Code/Js.php | 12 +- .../Adminhtml/Editor/Tools/Files/Content.php | 2 +- .../Editor/Tools/QuickStyles/AbstractTab.php | 4 +- .../Editor/Tools/QuickStyles/Backgrounds.php | 2 +- .../Editor/Tools/QuickStyles/Buttons.php | 2 +- .../Editor/Tools/QuickStyles/Fonts.php | 2 +- .../Editor/Tools/QuickStyles/Header.php | 2 +- .../Editor/Tools/QuickStyles/Tips.php | 2 +- .../Block/Adminhtml/Editor/Tools/Settings.php | 2 +- .../Editor/Tools/Tabs/AbstractTabs.php | 2 +- .../Adminhtml/Editor/Tools/Tabs/Body.php | 2 +- .../DesignEditor/Block/Adminhtml/Theme.php | 4 +- .../Block/Adminhtml/Theme/Button.php | 2 +- .../SelectorList/AbstractSelectorList.php | 2 +- .../Adminhtml/System/Design/Editor.php | 34 +- .../Adminhtml/System/Design/Editor/Files.php | 2 +- .../Adminhtml/System/Design/Editor/Tools.php | 62 +- .../Controller/Varien/Router/Standard.php | 20 +- .../DesignEditor/Model/AreaEmulator.php | 8 +- .../Model/Config/Control/AbstractControl.php | 6 +- .../Model/Config/Control/ImageSizing.php | 6 +- .../Model/Config/Control/QuickStyles.php | 2 +- .../Editor/Tools/Controls/Configuration.php | 42 +- .../Model/Editor/Tools/Controls/Factory.php | 38 +- .../Editor/Tools/QuickStyles/Form/Builder.php | 12 +- .../QuickStyles/Form/Element/Factory.php | 6 +- .../QuickStyles/Form/Renderer/Factory.php | 16 +- .../Tools/QuickStyles/ImageUploader.php | 6 +- .../Tools/QuickStyles/Renderer/Factory.php | 6 +- .../Magento/DesignEditor/Model/Observer.php | 20 +- .../Model/Plugin/ThemeCopyService.php | 8 +- app/code/Magento/DesignEditor/Model/State.php | 14 +- .../DesignEditor/Model/Theme/Change.php | 2 +- .../DesignEditor/Model/Theme/Context.php | 6 +- .../Customization/File/QuickStyleCss.php | 6 +- .../Model/Theme/Resource/Change.php | 12 +- .../DesignEditor/Model/Translate/Inline.php | 34 +- .../Model/Translate/Inline/Provider.php | 16 +- .../DesignEditor/Model/Url/Factory.php | 10 +- .../DesignEditor/Model/Url/NavigationMode.php | 26 +- .../DesignEditor/etc/adminhtml/acl.xml | 2 +- .../Magento/DesignEditor/etc/adminhtml/di.xml | 2 +- app/code/Magento/DesignEditor/etc/di.xml | 6 +- app/code/Magento/DesignEditor/etc/events.xml | 2 +- .../Magento/DesignEditor/etc/frontend/di.xml | 2 +- app/code/Magento/DesignEditor/etc/module.xml | 2 +- .../Magento/DesignEditor/etc/vde/events.xml | 2 +- .../designeditor_setup/install-1.0.0.1.php | 4 +- .../upgrade-1.0.0.1-1.0.0.2.php | 2 +- .../upgrade-1.0.0.2-1.0.0.3.php | 12 +- .../form/renderer/checkbox-utility.phtml | 2 +- .../form/renderer/composite/children.phtml | 2 +- .../editor/form/renderer/element/input.phtml | 2 +- .../form/renderer/element/wrapper.phtml | 2 +- .../editor/form/renderer/simple.phtml | 2 - .../editor/form/renderer/template.phtml | 4 +- .../view/adminhtml/editor/toolbar.phtml | 2 +- .../view/frontend/translate_inline.phtml | 2 +- .../Dhl/Block/Adminhtml/Unitofmeasure.php | 4 +- app/code/Magento/Dhl/Model/Carrier.php | 132 +- .../Rma/Edit/Tab/General/Shippingmethod.php | 4 +- app/code/Magento/Dhl/Model/Resource/Setup.php | 16 +- .../Magento/Dhl/Model/Source/Contenttype.php | 2 +- app/code/Magento/Dhl/etc/di.xml | 4 +- app/code/Magento/Dhl/etc/module.xml | 2 +- .../Adminhtml/Frontend/Currency/Base.php | 4 +- .../Adminhtml/Frontend/Region/Updater.php | 2 +- app/code/Magento/Directory/Block/Currency.php | 12 +- app/code/Magento/Directory/Block/Data.php | 28 +- app/code/Magento/Directory/Exception.php | 2 +- app/code/Magento/Directory/Helper/Data.php | 4 +- .../Model/Config/Source/Allregion.php | 2 +- .../Directory/Model/Config/Source/Country.php | 2 +- .../Model/Config/Source/Country/Full.php | 2 +- app/code/Magento/Directory/Model/Country.php | 30 +- .../Directory/Model/Country/Format.php | 2 +- .../Directory/Model/CountryFactory.php | 6 +- app/code/Magento/Directory/Model/Currency.php | 32 +- .../Directory/Model/Currency/Filter.php | 14 +- .../Model/Currency/Import/Factory.php | 6 +- .../Model/Currency/Import/Source/Service.php | 2 +- .../Model/Currency/Import/Webservicex.php | 4 +- app/code/Magento/Directory/Model/Observer.php | 18 +- .../Magento/Directory/Model/PriceCurrency.php | 4 +- app/code/Magento/Directory/Model/Region.php | 2 +- .../Magento/Directory/Model/RegionFactory.php | 6 +- .../Directory/Model/Resource/Country.php | 6 +- .../Model/Resource/Country/Collection.php | 36 +- .../Model/Resource/Country/Format.php | 2 +- .../Resource/Country/Format/Collection.php | 2 +- .../Directory/Model/Resource/Currency.php | 6 +- .../Directory/Model/Resource/Region.php | 14 +- .../Model/Resource/Region/Collection.php | 28 +- .../Directory/Model/Resource/Setup.php | 8 +- .../directory_setup/data-install-1.6.0.0.php | 2 +- .../Magento/Directory/etc/adminhtml/di.xml | 2 +- app/code/Magento/Directory/etc/di.xml | 4 +- app/code/Magento/Directory/etc/module.xml | 2 +- .../sql/directory_setup/install-1.6.0.0.php | 44 +- .../Directory/view/frontend/currency.phtml | 4 +- .../Catalog/Product/Edit/Tab/Downloadable.php | 8 +- .../Product/Edit/Tab/Downloadable/Links.php | 22 +- .../Product/Edit/Tab/Downloadable/Samples.php | 20 +- .../Block/Catalog/Product/Links.php | 10 +- .../Block/Checkout/Cart/Item/Renderer.php | 8 +- .../Downloadable/Block/Checkout/Success.php | 4 +- .../Block/Customer/Products/ListProducts.php | 6 +- .../Sales/Order/Email/Items/Downloadable.php | 6 +- .../Order/Email/Items/Order/Downloadable.php | 4 +- .../Order/Item/Renderer/Downloadable.php | 8 +- .../Adminhtml/Downloadable/Product/Edit.php | 2 +- .../Downloadable/Controller/Download.php | 8 +- .../Magento/Downloadable/Helper/Download.php | 8 +- app/code/Magento/Downloadable/Helper/File.php | 6 +- app/code/Magento/Downloadable/Model/Link.php | 18 +- .../Downloadable/Model/Link/Purchased.php | 2 +- .../Model/Link/Purchased/Item.php | 2 +- .../Magento/Downloadable/Model/Observer.php | 22 +- .../Downloadable/Model/Product/Type.php | 24 +- .../Downloadable/Model/Resource/Link.php | 2 +- .../Model/Resource/Link/Collection.php | 2 +- .../Model/Resource/Link/Purchased.php | 2 +- .../Resource/Link/Purchased/Collection.php | 2 +- .../Model/Resource/Link/Purchased/Item.php | 2 +- .../Link/Purchased/Item/Collection.php | 2 +- .../Downloadable/Model/Resource/Sample.php | 2 +- .../Model/Resource/Sample/Collection.php | 2 +- .../Sales/Order/Pdf/Items/AbstractItems.php | 20 +- .../Sales/Order/Pdf/Items/Creditmemo.php | 26 +- .../Model/Sales/Order/Pdf/Items/Invoice.php | 26 +- .../Magento/Downloadable/Model/Sample.php | 18 +- .../Config/Source/Contentdisposition.php | 2 +- .../System/Config/Source/Orderitemstatus.php | 2 +- .../Downloadable/Pricing/Price/LinkPrice.php | 2 +- .../Pricing/Price/LinkPriceInterface.php | 4 +- .../Downloadable/etc/adminhtml/acl.xml | 2 +- .../Magento/Downloadable/etc/adminhtml/di.xml | 2 +- .../Downloadable/etc/adminhtml/events.xml | 2 +- app/code/Magento/Downloadable/etc/di.xml | 6 +- .../Magento/Downloadable/etc/fieldset.xml | 2 +- .../Magento/Downloadable/etc/frontend/di.xml | 2 +- .../Downloadable/etc/frontend/events.xml | 2 +- app/code/Magento/Downloadable/etc/module.xml | 2 +- .../downloadable_setup/install-1.6.0.0.php | 186 +- .../mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php | 6 +- .../layout/checkout_cart_item_renderers.xml | 2 +- .../view/frontend/layout/customer_account.xml | 2 +- .../Attribute/Edit/Main/AbstractMain.php | 12 +- .../Edit/Options/AbstractOptions.php | 2 +- .../Attribute/Edit/Options/Labels.php | 6 +- .../Attribute/Edit/Options/Options.php | 14 +- .../Adminhtml/Attribute/Grid/AbstractGrid.php | 2 +- app/code/Magento/Eav/Exception.php | 2 +- .../System/Config/Source/Inputtype.php | 2 +- .../Eav/Model/Attribute/Data/AbstractData.php | 36 +- .../Magento/Eav/Model/Attribute/Data/Date.php | 4 +- .../Magento/Eav/Model/Attribute/Data/File.php | 16 +- .../Magento/Eav/Model/Attribute/Data/Text.php | 18 +- .../Eav/Model/AttributeDataFactory.php | 14 +- .../Magento/Eav/Model/AttributeFactory.php | 6 +- app/code/Magento/Eav/Model/Cache/Type.php | 2 +- app/code/Magento/Eav/Model/Config.php | 44 +- app/code/Magento/Eav/Model/Entity.php | 8 +- .../Eav/Model/Entity/AbstractEntity.php | 123 +- .../Magento/Eav/Model/Entity/Attribute.php | 36 +- .../Entity/Attribute/AbstractAttribute.php | 46 +- .../Attribute/Backend/AbstractBackend.php | 24 +- .../Entity/Attribute/Backend/ArrayBackend.php | 2 +- .../Attribute/Backend/BackendInterface.php | 14 +- .../Entity/Attribute/Backend/Datetime.php | 18 +- .../Entity/Attribute/Backend/Increment.php | 2 +- .../Entity/Attribute/Backend/Serialized.php | 10 +- .../Model/Entity/Attribute/Backend/Store.php | 6 +- .../Entity/Attribute/Backend/Time/Created.php | 8 +- .../Entity/Attribute/Backend/Time/Updated.php | 10 +- .../Eav/Model/Entity/Attribute/Config.php | 6 +- .../Entity/Attribute/Config/Converter.php | 2 +- .../Model/Entity/Attribute/Config/Reader.php | 10 +- .../Entity/Attribute/Config/SchemaLocator.php | 6 +- .../Attribute/Frontend/AbstractFrontend.php | 4 +- .../Entity/Attribute/Frontend/Datetime.php | 12 +- .../Eav/Model/Entity/Attribute/Group.php | 2 +- .../Eav/Model/Entity/Attribute/Option.php | 2 +- .../Eav/Model/Entity/Attribute/Set.php | 20 +- .../Attribute/Source/AbstractSource.php | 6 +- .../Model/Entity/Attribute/Source/Boolean.php | 4 +- .../Model/Entity/Attribute/Source/Table.php | 8 +- .../Entity/Collection/AbstractCollection.php | 68 +- .../Entity/Increment/AbstractIncrement.php | 2 +- app/code/Magento/Eav/Model/Entity/Setup.php | 10 +- .../Eav/Model/Entity/Setup/Context.php | 30 +- .../Entity/Setup/PropertyMapper/Composite.php | 4 +- app/code/Magento/Eav/Model/Entity/Store.php | 2 +- app/code/Magento/Eav/Model/Entity/Type.php | 26 +- app/code/Magento/Eav/Model/Form.php | 46 +- app/code/Magento/Eav/Model/Form/Element.php | 22 +- app/code/Magento/Eav/Model/Form/Factory.php | 6 +- app/code/Magento/Eav/Model/Form/Fieldset.php | 22 +- app/code/Magento/Eav/Model/Form/Type.php | 18 +- .../Magento/Eav/Model/Resource/Attribute.php | 10 +- .../Model/Resource/Attribute/Collection.php | 16 +- .../Magento/Eav/Model/Resource/Config.php | 2 +- .../Eav/Model/Resource/Entity/Attribute.php | 20 +- .../Resource/Entity/Attribute/Collection.php | 4 +- .../Entity/Attribute/Grid/Collection.php | 26 +- .../Model/Resource/Entity/Attribute/Group.php | 18 +- .../Entity/Attribute/Group/Collection.php | 2 +- .../Resource/Entity/Attribute/Option.php | 6 +- .../Entity/Attribute/Option/Collection.php | 18 +- .../Model/Resource/Entity/Attribute/Set.php | 6 +- .../Entity/Attribute/Set/Collection.php | 2 +- .../Eav/Model/Resource/Entity/Store.php | 8 +- .../Eav/Model/Resource/Entity/Type.php | 4 +- .../Model/Resource/Entity/Type/Collection.php | 2 +- .../Eav/Model/Resource/Form/Attribute.php | 2 +- .../Resource/Form/Attribute/Collection.php | 24 +- .../Eav/Model/Resource/Form/Element.php | 4 +- .../Resource/Form/Element/Collection.php | 2 +- .../Eav/Model/Resource/Form/Fieldset.php | 6 +- .../Resource/Form/Fieldset/Collection.php | 42 +- .../Magento/Eav/Model/Resource/Form/Type.php | 6 +- .../Model/Resource/Form/Type/Collection.php | 2 +- .../Magento/Eav/Model/Resource/Helper.php | 28 +- .../Eav/Model/Validator/Attribute/Backend.php | 10 +- .../Eav/Model/Validator/Attribute/Data.php | 10 +- .../data-upgrade-1.6.0.0-1.6.0.1.php | 34 +- app/code/Magento/Eav/etc/cache.xml | 2 +- app/code/Magento/Eav/etc/di.xml | 4 +- app/code/Magento/Eav/etc/module.xml | 2 +- app/code/Magento/Eav/etc/validation.xml | 2 +- .../Eav/sql/eav_setup/install-1.6.0.0.php | 450 +-- .../sql/eav_setup/upgrade-1.6.0.1-1.6.0.2.php | 4 +- .../Email/Block/Adminhtml/Template.php | 2 +- .../Email/Block/Adminhtml/Template/Edit.php | 12 +- .../Block/Adminhtml/Template/Edit/Form.php | 10 +- .../Template/Grid/Renderer/Action.php | 6 +- .../Template/Grid/Renderer/Sender.php | 4 +- .../Adminhtml/Template/Grid/Renderer/Type.php | 4 +- .../Block/Adminhtml/Template/Preview.php | 12 +- .../Controller/Adminhtml/Email/Template.php | 14 +- .../Magento/Email/Model/AbstractTemplate.php | 32 +- .../Magento/Email/Model/BackendTemplate.php | 20 +- .../Magento/Email/Model/Resource/Template.php | 12 +- .../Model/Resource/Template/Collection.php | 2 +- .../Magento/Email/Model/Source/Variables.php | 2 +- app/code/Magento/Email/Model/Template.php | 51 +- .../Magento/Email/Model/Template/Config.php | 6 +- .../Email/Model/Template/Config/Converter.php | 2 +- .../Email/Model/Template/Config/Data.php | 6 +- .../Model/Template/Config/FileIterator.php | 12 +- .../Model/Template/Config/FileResolver.php | 6 +- .../Email/Model/Template/Config/Reader.php | 10 +- .../Model/Template/Config/SchemaLocator.php | 6 +- .../Magento/Email/Model/Template/Filter.php | 49 +- .../Email/Model/Template/SenderResolver.php | 4 +- app/code/Magento/Email/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Email/etc/di.xml | 12 +- app/code/Magento/Email/etc/module.xml | 2 +- .../Email/sql/email_setup/install-1.0.0.0.php | 30 +- .../view/adminhtml/layout/systemPreview.xml | 2 +- app/code/Magento/Fedex/Model/Carrier.php | 42 +- .../Rma/Edit/Tab/General/Shippingmethod.php | 4 +- .../Magento/Fedex/Model/Source/Generic.php | 2 +- app/code/Magento/Fedex/etc/di.xml | 2 +- app/code/Magento/Fedex/etc/module.xml | 2 +- .../Fedex/sql/fedex_setup/install-2.0.0.0.php | 4 +- .../Adminhtml/Product/Helper/Form/Config.php | 12 +- .../Block/Adminhtml/Sales/Order/View/Form.php | 6 +- .../GiftMessage/Block/Message/Inline.php | 8 +- .../Message/Multishipping/Plugin/ItemsBox.php | 4 +- .../Magento/GiftMessage/Helper/Message.php | 36 +- app/code/Magento/GiftMessage/Helper/Url.php | 4 +- .../Magento/GiftMessage/Model/Message.php | 14 +- .../Magento/GiftMessage/Model/Observer.php | 12 +- .../GiftMessage/Model/Resource/Message.php | 2 +- .../Model/Resource/Message/Collection.php | 2 +- .../GiftMessage/Model/Resource/Setup.php | 2 +- app/code/Magento/GiftMessage/Model/Save.php | 8 +- .../Magento/GiftMessage/Model/TypeFactory.php | 10 +- .../Magento/GiftMessage/etc/adminhtml/di.xml | 2 +- .../GiftMessage/etc/adminhtml/events.xml | 2 +- app/code/Magento/GiftMessage/etc/di.xml | 6 +- .../Magento/GiftMessage/etc/frontend/di.xml | 2 +- .../GiftMessage/etc/frontend/events.xml | 2 +- app/code/Magento/GiftMessage/etc/module.xml | 2 +- .../sql/giftmessage_setup/install-1.6.0.0.php | 12 +- app/code/Magento/GoogleAdwords/Block/Code.php | 6 +- .../Magento/GoogleAdwords/Helper/Data.php | 6 +- .../Config/Backend/AbstractConversion.php | 22 +- .../Model/Config/Source/Language.php | 8 +- .../Model/Config/Source/ValueType.php | 2 +- .../Magento/GoogleAdwords/Model/Observer.php | 8 +- .../GoogleAdwords/Model/Validator/Factory.php | 22 +- .../GoogleAdwords/etc/frontend/events.xml | 2 +- app/code/Magento/GoogleAdwords/etc/module.xml | 2 +- app/code/Magento/GoogleAnalytics/Block/Ga.php | 6 +- .../GoogleAnalytics/Model/Observer.php | 8 +- .../GoogleAnalytics/etc/adminhtml/acl.xml | 2 +- app/code/Magento/GoogleAnalytics/etc/di.xml | 4 +- .../GoogleAnalytics/etc/frontend/events.xml | 2 +- .../Magento/GoogleAnalytics/etc/module.xml | 2 +- .../GoogleOptimizer/Block/AbstractCode.php | 12 +- .../Block/Adminhtml/AbstractTab.php | 10 +- .../Category/Edit/Tab/Googleoptimizer.php | 10 +- .../GoogleOptimizer/Block/Code/Category.php | 2 +- .../GoogleOptimizer/Block/Code/Page.php | 8 +- .../GoogleOptimizer/Block/Code/Product.php | 2 +- .../Magento/GoogleOptimizer/Helper/Code.php | 6 +- .../Magento/GoogleOptimizer/Helper/Form.php | 2 +- .../Magento/GoogleOptimizer/Model/Code.php | 2 +- .../Model/Observer/AbstractSave.php | 2 +- .../Model/Observer/Block/Category/Tab.php | 8 +- .../Model/Observer/Category/Delete.php | 2 +- .../Model/Observer/Category/Save.php | 2 +- .../Model/Observer/CmsPage/Delete.php | 2 +- .../Model/Observer/CmsPage/Save.php | 2 +- .../Model/Observer/Product/Delete.php | 2 +- .../Model/Observer/Product/Save.php | 2 +- .../GoogleOptimizer/Model/Resource/Code.php | 2 +- .../Magento/GoogleOptimizer/etc/events.xml | 2 +- .../Magento/GoogleOptimizer/etc/module.xml | 2 +- .../googleoptimizer_setup/install-2.0.0.0.php | 20 +- .../Block/Adminhtml/Items/Renderer/Id.php | 4 +- .../Block/Adminhtml/Types/Edit.php | 8 +- .../Block/Adminhtml/Types/Edit/Attributes.php | 10 +- .../Block/Adminhtml/Types/Edit/Form.php | 22 +- .../Adminhtml/Types/Renderer/Country.php | 4 +- .../GoogleShopping/Block/SiteVerification.php | 8 +- .../Adminhtml/Googleshopping/Items.php | 14 +- .../Adminhtml/Googleshopping/Types.php | 18 +- .../Magento/GoogleShopping/Helper/Data.php | 6 +- .../GoogleShopping/Model/Attribute.php | 14 +- .../Model/Attribute/Availability.php | 4 +- .../Model/Attribute/Condition.php | 4 +- .../Model/Attribute/Content.php | 4 +- .../Model/Attribute/ContentLanguage.php | 16 +- .../Model/Attribute/DefaultAttribute.php | 14 +- .../Model/Attribute/Destinations.php | 16 +- .../Model/Attribute/GoogleProductCategory.php | 16 +- .../GoogleShopping/Model/Attribute/Id.php | 4 +- .../Model/Attribute/ImageLink.php | 16 +- .../GoogleShopping/Model/Attribute/Link.php | 16 +- .../GoogleShopping/Model/Attribute/Price.php | 214 +- .../Model/Attribute/ProductType.php | 16 +- .../Model/Attribute/Quantity.php | 4 +- .../Attribute/SalePriceEffectiveDate.php | 10 +- .../Model/Attribute/ShippingWeight.php | 4 +- .../Model/Attribute/TargetCountry.php | 16 +- .../GoogleShopping/Model/Attribute/Tax.php | 18 +- .../GoogleShopping/Model/Attribute/Title.php | 4 +- .../GoogleShopping/Model/AttributeFactory.php | 12 +- .../Magento/GoogleShopping/Model/Config.php | 8 +- .../Magento/GoogleShopping/Model/Flag.php | 2 +- .../Magento/GoogleShopping/Model/Item.php | 14 +- .../GoogleShopping/Model/MassOperations.php | 10 +- .../Magento/GoogleShopping/Model/Observer.php | 14 +- .../Model/Resource/Attribute.php | 2 +- .../Model/Resource/Attribute/Collection.php | 2 +- .../GoogleShopping/Model/Resource/Item.php | 4 +- .../Model/Resource/Item/Collection.php | 26 +- .../GoogleShopping/Model/Resource/Setup.php | 8 +- .../GoogleShopping/Model/Resource/Type.php | 2 +- .../Model/Resource/Type/Collection.php | 4 +- .../Magento/GoogleShopping/Model/Service.php | 36 +- .../GoogleShopping/Model/Service/Item.php | 30 +- .../Model/Source/Accounttype.php | 2 +- .../GoogleShopping/Model/Source/Authtype.php | 2 +- .../GoogleShopping/Model/Source/Country.php | 2 +- .../Model/Source/Destinationstates.php | 8 +- .../Magento/GoogleShopping/Model/Type.php | 16 +- .../GoogleShopping/etc/adminhtml/acl.xml | 2 +- .../GoogleShopping/etc/adminhtml/di.xml | 4 +- .../GoogleShopping/etc/adminhtml/events.xml | 2 +- app/code/Magento/GoogleShopping/etc/di.xml | 6 +- .../Magento/GoogleShopping/etc/module.xml | 2 +- .../googleshopping_setup/install-1.6.0.0.php | 44 +- .../upgrade-1.6.0.0-1.6.0.0.1.php | 4 +- .../Block/Adminhtml/Order/Create/Sidebar.php | 4 +- .../Product/Composite/Fieldset/Grouped.php | 4 +- .../Block/Cart/Item/Renderer/Grouped.php | 12 +- .../ListAssociatedProducts.php | 6 +- .../Block/Stockqty/Type/Grouped.php | 2 +- .../Controller/Adminhtml/Edit.php | 12 +- .../Model/Product/Type/Grouped.php | 22 +- .../Model/Product/Type/Plugin.php | 4 +- .../Model/Resource/Indexer/Stock/Grouped.php | 2 +- .../Grouped/AssociatedProductsCollection.php | 30 +- .../Product/Quote/Plugin/Initializer.php | 4 +- .../Pricing/Price/FinalPrice.php | 14 +- .../GroupedProduct/etc/adminhtml/di.xml | 2 +- app/code/Magento/GroupedProduct/etc/di.xml | 6 +- .../GroupedProduct/etc/frontend/di.xml | 2 +- .../Magento/GroupedProduct/etc/module.xml | 2 +- .../layout/catalog_product_grouped.xml | 4 +- .../adminhtml/layout/catalog_product_new.xml | 2 +- .../adminhtml/product/grouped/grouped.phtml | 4 +- ...catalog_product_rss_feed_renderer_list.xml | 2 +- .../frontend/product/price/final_price.phtml | 2 +- .../Block/Adminhtml/Export/Edit/Form.php | 10 +- .../Block/Adminhtml/Export/Filter.php | 22 +- .../Block/Adminhtml/Form/After.php | 8 +- .../Block/Adminhtml/Import/Edit/Before.php | 6 +- .../Block/Adminhtml/Import/Edit/Form.php | 10 +- .../Block/Adminhtml/Import/Frame/Result.php | 12 +- .../Controller/Adminhtml/Export.php | 4 +- app/code/Magento/ImportExport/Helper/Data.php | 10 +- .../ImportExport/Model/AbstractModel.php | 18 +- .../Magento/ImportExport/Model/Export.php | 52 +- .../Model/Export/AbstractEntity.php | 24 +- .../Model/Export/Adapter/AbstractAdapter.php | 10 +- .../ImportExport/Model/Export/Adapter/Csv.php | 4 +- .../Model/Export/Adapter/Factory.php | 6 +- .../ImportExport/Model/Export/Config.php | 6 +- .../Model/Export/Config/Converter.php | 2 +- .../Model/Export/Config/Reader.php | 12 +- .../Model/Export/Config/SchemaLocator.php | 6 +- .../Model/Export/Entity/AbstractEav.php | 67 +- .../Model/Export/Entity/AbstractEntity.php | 14 +- .../Model/Export/Entity/Factory.php | 6 +- .../Model/Export/Entity/Product.php | 18 +- .../Export/Entity/Product/Type/Factory.php | 6 +- .../ImportExport/Model/Export/Factory.php | 12 +- .../Model/Export/RowCustomizer/Composite.php | 4 +- .../Magento/ImportExport/Model/Import.php | 48 +- .../Model/Import/AbstractEntity.php | 20 +- .../ImportExport/Model/Import/Adapter.php | 10 +- .../ImportExport/Model/Import/Config.php | 6 +- .../Model/Import/Config/Converter.php | 2 +- .../Model/Import/Config/Reader.php | 12 +- .../Model/Import/Config/SchemaLocator.php | 6 +- .../Model/Import/Entity/AbstractEav.php | 10 +- .../Model/Import/Entity/AbstractEntity.php | 24 +- .../Model/Import/Entity/Factory.php | 6 +- .../Model/Import/Entity/Product.php | 62 +- .../Model/Import/Entity/Product/Option.php | 12 +- .../Entity/Product/Type/AbstractType.php | 4 +- .../Import/Entity/Product/Type/Factory.php | 6 +- .../ImportExport/Model/Import/Source/Csv.php | 8 +- .../ImportExport/Model/Import/Uploader.php | 10 +- .../Resource/CollectionByPagesIterator.php | 6 +- .../ImportExport/Model/Resource/Helper.php | 4 +- .../Model/Resource/Import/Data.php | 8 +- .../Model/Source/Export/Entity.php | 2 +- .../Model/Source/Export/Format.php | 2 +- .../Model/Source/Import/AbstractBehavior.php | 2 +- .../Model/Source/Import/Behavior/Basic.php | 7 +- .../Model/Source/Import/Behavior/Custom.php | 7 +- .../Model/Source/Import/Behavior/Factory.php | 6 +- .../Model/Source/Import/Entity.php | 2 +- .../ImportExport/etc/adminhtml/acl.xml | 2 +- app/code/Magento/ImportExport/etc/config.xml | 6 - app/code/Magento/ImportExport/etc/di.xml | 4 +- app/code/Magento/ImportExport/etc/export.xml | 2 - app/code/Magento/ImportExport/etc/import.xml | 3 - app/code/Magento/ImportExport/etc/module.xml | 3 +- .../importexport_setup/install-1.6.0.0.php | 14 +- .../mysql4-upgrade-1.6.0.1-1.6.0.2.php | 4 +- .../upgrade-1.6.0.2-1.6.0.3.php | 4 +- .../upgrade-1.6.0.3-1.6.0.4.php | 2 +- .../layout/adminhtml_import_busy.xml | 2 +- .../Index/Block/Adminhtml/Process/Edit.php | 6 +- .../Block/Adminhtml/Process/Edit/Form.php | 2 +- .../Block/Adminhtml/Process/Edit/Tab/Main.php | 2 +- .../Index/Controller/Adminhtml/Process.php | 18 +- app/code/Magento/Index/Model/Event.php | 26 +- app/code/Magento/Index/Model/Indexer.php | 10 +- .../Index/Model/Indexer/AbstractIndexer.php | 2 +- .../Magento/Index/Model/Indexer/Config.php | 10 +- .../Index/Model/Indexer/Config/Converter.php | 2 +- .../Index/Model/Indexer/Config/Reader.php | 12 +- .../Model/Indexer/Config/SchemaLocator.php | 6 +- .../Magento/Index/Model/Indexer/Factory.php | 6 +- app/code/Magento/Index/Model/Lock/Storage.php | 2 +- app/code/Magento/Index/Model/Observer.php | 2 +- app/code/Magento/Index/Model/Process.php | 30 +- app/code/Magento/Index/Model/Process/File.php | 4 +- .../Index/Model/Process/FileFactory.php | 6 +- .../Index/Model/Resource/AbstractResource.php | 6 +- .../Magento/Index/Model/Resource/Event.php | 6 +- .../Index/Model/Resource/Event/Collection.php | 2 +- .../Magento/Index/Model/Resource/Process.php | 8 +- .../Model/Resource/Process/Collection.php | 2 +- .../Magento/Index/Model/Resource/Setup.php | 8 +- app/code/Magento/Index/Model/Shell.php | 4 +- .../Model/System/Message/IndexOutdated.php | 12 +- app/code/Magento/Index/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Index/etc/adminhtml/di.xml | 2 +- app/code/Magento/Index/etc/di.xml | 4 +- app/code/Magento/Index/etc/events.xml | 2 +- app/code/Magento/Index/etc/module.xml | 2 +- .../Index/sql/index_setup/install-1.6.0.0.php | 48 +- app/code/Magento/Indexer/App/Indexer.php | 6 +- .../Grid/Column/Renderer/Scheduled.php | 4 +- .../Backend/Grid/Column/Renderer/Status.php | 4 +- .../Backend/Grid/Column/Renderer/Updated.php | 4 +- .../Block/Backend/Grid/ItemsUpdater.php | 8 +- .../Indexer/Controller/Adminhtml/Indexer.php | 4 +- .../Magento/Indexer/Model/ActionFactory.php | 6 +- .../Magento/Indexer/Model/CacheContext.php | 2 +- .../Indexer/Model/Config/Converter.php | 2 +- .../Magento/Indexer/Model/Config/Data.php | 6 +- .../Magento/Indexer/Model/Config/Reader.php | 12 +- .../Indexer/Model/Config/SchemaLocator.php | 6 +- app/code/Magento/Indexer/Model/Indexer.php | 14 +- .../Indexer/Model/Indexer/Collection.php | 6 +- .../Magento/Indexer/Model/Indexer/State.php | 10 +- .../Indexer/Model/IndexerInterface.php | 2 +- .../Indexer/Model/Mview/View/State.php | 14 +- app/code/Magento/Indexer/Model/Processor.php | 6 +- .../Model/Processor/InvalidateCache.php | 12 +- .../Indexer/Model/Resource/Indexer/State.php | 2 +- .../Resource/Indexer/State/Collection.php | 2 +- .../Model/Resource/Mview/View/State.php | 2 +- .../Resource/Mview/View/State/Collection.php | 4 +- app/code/Magento/Indexer/Model/Shell.php | 4 +- .../Magento/Indexer/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Indexer/etc/di.xml | 12 +- app/code/Magento/Indexer/etc/module.xml | 2 +- .../sql/indexer_setup/install-1.0.0.0.php | 26 +- .../Install/App/Action/Plugin/Design.php | 18 +- .../Magento/Install/App/Action/Plugin/Dir.php | 6 +- .../Install/App/Action/Plugin/Install.php | 6 +- app/code/Magento/Install/App/Console.php | 8 +- .../Magento/Install/Block/AbstractBlock.php | 14 +- app/code/Magento/Install/Block/Admin.php | 4 +- app/code/Magento/Install/Block/Begin.php | 8 +- app/code/Magento/Install/Block/Config.php | 14 +- app/code/Magento/Install/Block/Db/Main.php | 18 +- app/code/Magento/Install/Block/Db/Type.php | 16 +- app/code/Magento/Install/Block/Download.php | 14 +- app/code/Magento/Install/Block/End.php | 8 +- app/code/Magento/Install/Block/Locale.php | 40 +- app/code/Magento/Install/Block/State.php | 6 +- .../Magento/Install/Controller/Action.php | 4 +- app/code/Magento/Install/Controller/Index.php | 4 +- .../Magento/Install/Controller/Wizard.php | 20 +- app/code/Magento/Install/Model/Config.php | 4 +- .../Install/Model/Config/Converter.php | 2 +- .../Magento/Install/Model/Config/Data.php | 2 +- .../Magento/Install/Model/Config/Reader.php | 2 +- .../Install/Model/Config/SchemaLocator.php | 6 +- app/code/Magento/Install/Model/Installer.php | 66 +- .../Install/Model/Installer/Config.php | 20 +- .../Install/Model/Installer/Console.php | 24 +- .../Magento/Install/Model/Installer/Data.php | 2 +- .../Magento/Install/Model/Installer/Db.php | 26 +- .../Install/Model/Installer/Db/AbstractDb.php | 10 +- .../Install/Model/Installer/Db/Factory.php | 6 +- .../Install/Model/Installer/Filesystem.php | 6 +- .../Magento/Install/Model/Installer/Pear.php | 8 +- app/code/Magento/Install/Model/Observer.php | 8 +- .../Install/Model/Resource/Resource.php | 2 +- app/code/Magento/Install/Model/Setup.php | 2 +- app/code/Magento/Install/Model/Wizard.php | 6 +- app/code/Magento/Install/etc/di.xml | 12 +- app/code/Magento/Install/etc/frontend/di.xml | 4 +- app/code/Magento/Install/etc/install/di.xml | 2 +- .../Magento/Install/etc/install/events.xml | 2 +- app/code/Magento/Install/etc/module.xml | 3 +- .../view/install/layout/install_wizard.xml | 2 +- .../Block/Adminhtml/Integration/Edit.php | 6 +- .../Block/Adminhtml/Integration/Edit/Form.php | 2 +- .../Adminhtml/Integration/Edit/Tab/Info.php | 6 +- .../Block/Adminhtml/Integration/Tokens.php | 2 +- .../Widget/Grid/Column/Renderer/Button.php | 12 +- .../Grid/Column/Renderer/Button/Delete.php | 8 +- .../Grid/Column/Renderer/Button/Edit.php | 8 +- .../Widget/Grid/Column/Renderer/Link.php | 8 +- .../Grid/Column/Renderer/Link/Activate.php | 2 +- .../Controller/Adminhtml/Integration.php | 24 +- .../Magento/Integration/Controller/Token.php | 12 +- app/code/Magento/Integration/Exception.php | 2 +- .../Magento/Integration/Model/Cache/Type.php | 2 +- .../Integration/Model/Config/Converter.php | 2 +- .../Integration/Model/Config/Reader.php | 12 +- .../Model/Config/SchemaLocator.php | 6 +- .../Magento/Integration/Model/Integration.php | 24 +- .../Integration/Model/Integration/Factory.php | 6 +- .../Model/Integration/Source/Status.php | 2 +- .../Integration/Model/Oauth/Consumer.php | 38 +- .../Model/Oauth/Consumer/Factory.php | 6 +- .../Oauth/Consumer/Validator/KeyLength.php | 6 - .../Magento/Integration/Model/Oauth/Nonce.php | 18 +- .../Integration/Model/Oauth/Nonce/Factory.php | 6 +- .../Model/Oauth/Nonce/Generator.php | 28 +- .../Magento/Integration/Model/Oauth/Token.php | 34 +- .../Integration/Model/Oauth/Token/Factory.php | 6 +- .../Model/Oauth/Token/Provider.php | 82 +- .../Model/Resource/Integration.php | 2 +- .../Model/Resource/Integration/Collection.php | 2 +- .../Model/Resource/Oauth/Consumer.php | 16 +- .../Resource/Oauth/Consumer/Collection.php | 8 +- .../Model/Resource/Oauth/Nonce.php | 4 +- .../Model/Resource/Oauth/Nonce/Collection.php | 8 +- .../Model/Resource/Oauth/Token.php | 16 +- .../Model/Resource/Oauth/Token/Collection.php | 6 +- .../Integration/Model/Resource/Setup.php | 8 +- .../Magento/Integration/Service/OauthV1.php | 46 +- .../Integration/Service/OauthV1Interface.php | 16 +- app/code/Magento/Integration/etc/cache.xml | 2 +- app/code/Magento/Integration/etc/di.xml | 12 +- app/code/Magento/Integration/etc/module.xml | 2 +- .../sql/integration_setup/install-1.0.0.0.php | 126 +- .../upgrade-1.0.0.0-1.0.0.1.php | 2 +- .../upgrade-1.0.0.1-1.0.0.2.php | 2 +- .../Attribute/Edit/Tab/Front/Observer.php | 8 +- .../Product/Attribute/Grid/Observer.php | 6 +- .../LayeredNavigation/Block/Navigation.php | 6 +- .../Block/Navigation/FilterRenderer.php | 4 +- .../Block/Navigation/State.php | 8 +- .../etc/adminhtml/events.xml | 2 +- .../LayeredNavigation/etc/frontend/di.xml | 2 +- .../Magento/LayeredNavigation/etc/module.xml | 2 +- app/code/Magento/Log/Model/Aggregation.php | 18 +- app/code/Magento/Log/Model/Cron.php | 32 +- app/code/Magento/Log/Model/Customer.php | 24 +- app/code/Magento/Log/Model/Log.php | 18 +- .../Log/Model/Resource/Aggregation.php | 2 +- .../Magento/Log/Model/Resource/Customer.php | 4 +- .../Magento/Log/Model/Resource/Helper.php | 2 +- app/code/Magento/Log/Model/Resource/Log.php | 20 +- .../Magento/Log/Model/Resource/Visitor.php | 44 +- .../Log/Model/Resource/Visitor/Collection.php | 4 +- .../Log/Model/Resource/Visitor/Online.php | 8 +- .../Resource/Visitor/Online/Collection.php | 18 +- .../Visitor/Online/Grid/Collection.php | 16 +- .../Visitor/Online/Grid/Row/UrlGenerator.php | 8 +- .../Log/Model/Shell/Command/Factory.php | 6 +- app/code/Magento/Log/Model/Visitor.php | 68 +- app/code/Magento/Log/Model/Visitor/Online.php | 18 +- .../data/log_setup/data-install-1.6.0.0.php | 2 +- app/code/Magento/Log/etc/di.xml | 2 +- app/code/Magento/Log/etc/frontend/events.xml | 2 +- app/code/Magento/Log/etc/module.xml | 2 +- .../Log/sql/log_setup/install-1.6.0.0.php | 94 +- .../Block/Checkout/AbstractMultishipping.php | 6 +- .../Block/Checkout/Address/Select.php | 6 +- .../Block/Checkout/Addresses.php | 18 +- .../Multishipping/Block/Checkout/Billing.php | 4 +- .../Block/Checkout/Billing/Items.php | 4 +- .../Multishipping/Block/Checkout/Link.php | 6 +- .../Multishipping/Block/Checkout/Overview.php | 14 +- .../Block/Checkout/Payment/Info.php | 4 +- .../Multishipping/Block/Checkout/Shipping.php | 18 +- .../Multishipping/Block/Checkout/State.php | 6 +- .../Multishipping/Block/Checkout/Success.php | 4 +- .../Multishipping/Controller/Checkout.php | 32 +- .../Model/Checkout/Type/Multishipping.php | 38 +- .../Checkout/Type/Multishipping/State.php | 12 +- .../Multishipping/etc/adminhtml/acl.xml | 2 +- .../Magento/Multishipping/etc/frontend/di.xml | 2 +- app/code/Magento/Multishipping/etc/module.xml | 2 +- .../multishipping_checkout_addresses.xml | 4 +- .../multishipping_checkout_overview.xml | 5 +- .../multishipping_checkout_shipping.xml | 4 +- .../Problem/Grid/Renderer/Checkbox.php | 4 +- .../Newsletter/Block/Adminhtml/Queue/Edit.php | 8 +- .../Block/Adminhtml/Queue/Edit/Form.php | 16 +- .../Adminhtml/Queue/Grid/Renderer/Action.php | 4 +- .../Block/Adminhtml/Queue/Preview.php | 4 +- .../Block/Adminhtml/Queue/Preview/Form.php | 2 +- .../Subscriber/Grid/Filter/Website.php | 10 +- .../Subscriber/Grid/Renderer/Checkbox.php | 4 +- .../Block/Adminhtml/Template/Edit.php | 6 +- .../Block/Adminhtml/Template/Edit/Form.php | 10 +- .../Block/Adminhtml/Template/Grid.php | 2 +- .../Template/Grid/Renderer/Action.php | 4 +- .../Template/Grid/Renderer/Sender.php | 4 +- .../Block/Adminhtml/Template/Preview.php | 4 +- .../Block/Adminhtml/Template/Preview/Form.php | 2 +- .../Magento/Newsletter/Block/Subscribe.php | 6 +- .../Grid/Options/GroupOptionHash.php | 2 +- .../Grid/Options/StoreOptionHash.php | 2 +- .../Newsletter/Controller/Adminhtml/Queue.php | 14 +- .../Controller/Adminhtml/Template.php | 12 +- .../Newsletter/Controller/Subscriber.php | 18 +- app/code/Magento/Newsletter/Model/Problem.php | 18 +- app/code/Magento/Newsletter/Model/Queue.php | 30 +- .../Newsletter/Model/Queue/Options/Status.php | 2 +- .../Model/Queue/TransportBuilder.php | 4 +- .../Model/Resource/Grid/Collection.php | 2 +- .../Newsletter/Model/Resource/Problem.php | 2 +- .../Model/Resource/Problem/Collection.php | 20 +- .../Newsletter/Model/Resource/Queue.php | 12 +- .../Model/Resource/Queue/Collection.php | 26 +- .../Newsletter/Model/Resource/Subscriber.php | 18 +- .../Model/Resource/Subscriber/Collection.php | 18 +- .../Newsletter/Model/Resource/Template.php | 16 +- .../Model/Resource/Template/Collection.php | 2 +- app/code/Magento/Newsletter/Model/Session.php | 2 +- .../Magento/Newsletter/Model/Subscriber.php | 58 +- .../Magento/Newsletter/Model/Template.php | 22 +- .../data-upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../data-upgrade-1.6.0.1-1.6.0.2.php | 14 +- .../Magento/Newsletter/etc/adminhtml/acl.xml | 2 +- .../Magento/Newsletter/etc/adminhtml/di.xml | 2 +- app/code/Magento/Newsletter/etc/di.xml | 4 +- .../Magento/Newsletter/etc/frontend/di.xml | 2 +- app/code/Magento/Newsletter/etc/module.xml | 2 +- .../sql/newsletter_setup/install-1.6.0.0.php | 116 +- .../layout/newsletter_queue_preview_popup.xml | 2 +- .../newsletter_template_preview_popup.xml | 2 +- .../view/adminhtml/layout/preview.xml | 2 +- .../view/frontend/layout/customer_account.xml | 2 +- .../OfflinePayments/Block/Info/Ccsave.php | 6 +- .../OfflinePayments/Model/Observer.php | 4 +- .../OfflinePayments/Model/Purchaseorder.php | 6 +- .../Magento/OfflinePayments/etc/events.xml | 2 +- .../Magento/OfflinePayments/etc/module.xml | 2 +- .../view/adminhtml/form/cashondelivery.phtml | 2 +- .../view/frontend/form/cashondelivery.phtml | 2 +- .../Block/Adminhtml/Form/Field/Export.php | 14 +- .../Block/Adminhtml/Form/Field/Import.php | 2 +- .../Model/Carrier/Flatrate.php | 4 +- .../Model/Carrier/Freeshipping.php | 4 +- .../OfflineShipping/Model/Carrier/Pickup.php | 4 +- .../Model/Carrier/Tablerate.php | 4 +- .../Model/Config/Backend/Tablerate.php | 20 +- .../Model/Config/Source/Flatrate.php | 2 +- .../Model/Config/Source/Tablerate.php | 2 +- .../Model/Observer/SalesRule/ActionsTab.php | 6 +- .../Model/Resource/Carrier/Tablerate.php | 24 +- .../Resource/Carrier/Tablerate/Collection.php | 2 +- .../OfflineShipping/etc/adminhtml/events.xml | 2 +- app/code/Magento/OfflineShipping/etc/di.xml | 2 +- .../Magento/OfflineShipping/etc/fieldset.xml | 2 +- .../Magento/OfflineShipping/etc/module.xml | 2 +- .../offlineshipping_setup/install-2.0.0.0.php | 34 +- app/code/Magento/Ogone/Block/Paypage.php | 2 +- app/code/Magento/Ogone/Block/Placeform.php | 6 +- app/code/Magento/Ogone/Controller/Api.php | 6 +- app/code/Magento/Ogone/Model/Api.php | 26 +- app/code/Magento/Ogone/Model/Config.php | 20 +- .../Ogone/Model/Source/PaymentAction.php | 2 +- .../Magento/Ogone/Model/Source/Pmlist.php | 2 +- .../Magento/Ogone/Model/Source/Template.php | 2 +- app/code/Magento/Ogone/etc/frontend/di.xml | 2 +- app/code/Magento/Ogone/etc/module.xml | 2 +- .../Ogone/sql/ogone_setup/install-1.6.0.0.php | 2 +- .../Magento/PageCache/Block/Javascript.php | 6 +- .../Block/System/Config/Form/Field/Export.php | 4 +- .../Magento/PageCache/Controller/Block.php | 2 +- .../Model/App}/CacheIdentifierPlugin.php | 13 +- .../Model/App/FrontController/MessageBox.php | 12 +- .../Magento/PageCache/Model/Cache/Type.php | 2 +- app/code/Magento/PageCache/Model/Config.php | 2 +- .../PageCache/Model/Layout/LayoutPlugin.php | 16 +- app/code/Magento/PageCache/Model/Observer.php | 34 +- .../Model/System/Config/Backend/Ttl.php | 4 +- .../Model/System/Config/Backend/Varnish.php | 6 +- .../System/Config/Source/Application.php | 2 +- .../Magento/PageCache/etc/adminhtml/di.xml | 2 +- app/code/Magento/PageCache/etc/cache.xml | 2 +- app/code/Magento/PageCache/etc/events.xml | 2 +- .../Magento/PageCache/etc/frontend/di.xml | 4 +- app/code/Magento/PageCache/etc/module.xml | 2 +- .../PayPalRecurringPayment/Model/Api/Nvp.php | 30 +- .../PayPalRecurringPayment/Model/Express.php | 10 +- .../PayPalRecurringPayment/Model/Ipn.php | 14 +- .../Magento/PayPalRecurringPayment/etc/di.xml | 2 +- .../PayPalRecurringPayment/etc/module.xml | 2 +- app/code/Magento/Payment/Block/Form.php | 6 +- app/code/Magento/Payment/Block/Form/Cc.php | 4 +- .../Magento/Payment/Block/Form/Container.php | 6 +- app/code/Magento/Payment/Block/Info.php | 16 +- .../Payment/Block/Info/AbstractContainer.php | 6 +- app/code/Magento/Payment/Block/Info/Cc.php | 10 +- .../Payment/Block/Info/Substitution.php | 2 +- app/code/Magento/Payment/Helper/Data.php | 12 +- app/code/Magento/Payment/Model/Cart.php | 10 +- .../Payment/Model/Cart/SalesModel/Factory.php | 6 +- .../Payment/Model/Cart/SalesModel/Order.php | 2 +- .../Payment/Model/Cart/SalesModel/Quote.php | 2 +- .../Cart/SalesModel/SalesModelInterface.php | 2 +- .../Model/Checks/SpecificationFactory.php | 8 +- app/code/Magento/Payment/Model/Config.php | 12 +- .../Payment/Model/Config/Converter.php | 2 +- .../Magento/Payment/Model/Config/Reader.php | 2 +- .../Payment/Model/Config/SchemaLocator.php | 6 +- .../Model/Config/Source/Allmethods.php | 2 +- .../Config/Source/Allspecificcountries.php | 2 +- .../Payment/Model/Config/Source/Cctype.php | 2 +- app/code/Magento/Payment/Model/Info.php | 32 +- .../Magento/Payment/Model/Info/Exception.php | 2 +- .../Payment/Model/Method/AbstractMethod.php | 86 +- app/code/Magento/Payment/Model/Method/Cc.php | 40 +- .../Magento/Payment/Model/Method/Factory.php | 10 +- .../Magento/Payment/Model/Method/Free.php | 8 +- .../Model/Method/Specification/Factory.php | 2 +- app/code/Magento/Payment/Model/Observer.php | 6 +- .../Magento/Payment/Model/Paygate/Result.php | 2 +- .../Payment/Model/Resource/Grid/GroupList.php | 2 +- .../Payment/Model/Resource/Grid/TypeList.php | 2 +- .../Magento/Payment/Model/Source/Cctype.php | 2 +- .../Magento/Payment/Model/Source/Invoice.php | 2 +- .../Magento/Payment/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Payment/etc/di.xml | 4 +- app/code/Magento/Payment/etc/events.xml | 2 +- app/code/Magento/Payment/etc/module.xml | 2 +- .../Adminhtml/Billing/Agreement/View.php | 6 +- .../Billing/Agreement/View/Tab/Info.php | 6 +- .../Billing/Agreement/View/Tab/Orders.php | 2 +- .../Adminhtml/Customer/Edit/Tab/Agreement.php | 6 +- .../Adminhtml/Settlement/Details/Form.php | 20 +- .../Adminhtml/System/Config/ApiWizard.php | 8 +- .../Adminhtml/System/Config/Field/Hidden.php | 2 +- .../System/Config/Fieldset/Expanded.php | 6 +- .../System/Config/Fieldset/Group.php | 8 +- .../Adminhtml/System/Config/Fieldset/Hint.php | 12 +- .../System/Config/Fieldset/Location.php | 4 +- .../System/Config/Fieldset/Payment.php | 14 +- .../System/Config/Fieldset/Store.php | 6 +- .../System/Config/Payflowlink/Info.php | 4 +- .../Paypal/Block/Billing/Agreement/View.php | 12 +- .../Paypal/Block/Billing/Agreements.php | 8 +- .../Onepage/Success/BillingAgreement.php | 6 +- .../Magento/Paypal/Block/Express/Form.php | 8 +- .../Magento/Paypal/Block/Express/Review.php | 14 +- .../Magento/Paypal/Block/Express/Shortcut.php | 26 +- app/code/Magento/Paypal/Block/Iframe.php | 12 +- app/code/Magento/Paypal/Block/Logo.php | 12 +- .../Paypal/Block/Payflow/Advanced/Iframe.php | 4 +- .../Paypal/Block/Payflow/Link/Iframe.php | 4 +- .../Block/Payment/Form/Billing/Agreement.php | 4 +- .../Magento/Paypal/Block/Payment/Info.php | 8 +- .../Block/Payment/Info/Billing/Agreement.php | 6 +- .../Magento/Paypal/Block/Standard/Form.php | 14 +- .../Paypal/Block/Standard/Redirect.php | 24 +- .../Adminhtml/Billing/Agreement.php | 14 +- .../Controller/Adminhtml/Paypal/Reports.php | 18 +- .../Paypal/Controller/Billing/Agreement.php | 22 +- .../Magento/Paypal/Controller/Express.php | 4 +- .../Controller/Express/AbstractExpress.php | 69 +- app/code/Magento/Paypal/Controller/Ipn.php | 6 +- .../Magento/Paypal/Controller/Payflow.php | 6 +- app/code/Magento/Paypal/Exception.php | 2 +- app/code/Magento/Paypal/Helper/Hss.php | 6 +- app/code/Magento/Paypal/Model/AbstractIpn.php | 10 +- .../Magento/Paypal/Model/Api/AbstractApi.php | 42 +- app/code/Magento/Paypal/Model/Api/Nvp.php | 46 +- .../Magento/Paypal/Model/Api/PayflowNvp.php | 22 +- .../Magento/Paypal/Model/Api/Standard.php | 2 +- .../Magento/Paypal/Model/Api/Type/Factory.php | 6 +- .../Model/Billing/AbstractAgreement.php | 24 +- .../Paypal/Model/Billing/Agreement.php | 26 +- .../Model/Billing/Agreement/OrdersUpdater.php | 12 +- app/code/Magento/Paypal/Model/Cert.php | 30 +- app/code/Magento/Paypal/Model/Config.php | 8 +- .../Magento/Paypal/Model/Config/Factory.php | 6 +- app/code/Magento/Paypal/Model/Direct.php | 52 +- app/code/Magento/Paypal/Model/Express.php | 54 +- .../Magento/Paypal/Model/Express/Checkout.php | 62 +- .../Paypal/Model/Express/Checkout/Factory.php | 6 +- app/code/Magento/Paypal/Model/Hostedpro.php | 30 +- .../Paypal/Model/Hostedpro/Request.php | 10 +- app/code/Magento/Paypal/Model/Info.php | 10 +- app/code/Magento/Paypal/Model/Ipn.php | 16 +- app/code/Magento/Paypal/Model/IpnFactory.php | 6 +- .../Magento/Paypal/Model/Method/Agreement.php | 38 +- .../Paypal/Model/Method/ProTypeFactory.php | 8 +- app/code/Magento/Paypal/Model/Observer.php | 20 +- app/code/Magento/Paypal/Model/Payflow/Pro.php | 12 +- .../Magento/Paypal/Model/Payflow/Request.php | 22 +- .../Magento/Paypal/Model/PayflowExpress.php | 12 +- app/code/Magento/Paypal/Model/Payflowlink.php | 72 +- app/code/Magento/Paypal/Model/Payflowpro.php | 94 +- .../Method/Billing/AbstractAgreement.php | 10 +- .../Paypal/Model/Payment/Transaction.php | 38 +- app/code/Magento/Paypal/Model/Pro.php | 32 +- .../Paypal/Model/Report/Settlement.php | 42 +- .../Paypal/Model/Report/Settlement/Row.php | 2 +- .../Model/Resource/Billing/Agreement.php | 2 +- .../Resource/Billing/Agreement/Collection.php | 18 +- .../Magento/Paypal/Model/Resource/Cert.php | 20 +- .../Model/Resource/Payment/Transaction.php | 10 +- .../Payment/Transaction/Collection.php | 2 +- .../Model/Resource/Report/Settlement.php | 16 +- .../Settlement/Options/TransactionEvents.php | 2 +- .../Model/Resource/Report/Settlement/Row.php | 2 +- .../Report/Settlement/Row/Collection.php | 2 +- app/code/Magento/Paypal/Model/Standard.php | 22 +- .../Model/System/Config/Backend/Cert.php | 28 +- .../Model/System/Config/Backend/Cron.php | 16 +- .../System/Config/Backend/MerchantCountry.php | 16 +- .../Config/Source/AuthorizationAmounts.php | 2 +- .../System/Config/Source/BuyerCountry.php | 2 +- .../System/Config/Source/FetchingSchedule.php | 2 +- .../Model/System/Config/Source/Logo.php | 2 +- .../System/Config/Source/MerchantCountry.php | 2 +- .../System/Config/Source/PaymentActions.php | 2 +- .../Config/Source/PaymentActions/Express.php | 2 +- .../Config/Source/RequireBillingAddress.php | 2 +- .../Model/System/Config/Source/UrlMethod.php | 2 +- app/code/Magento/Paypal/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Paypal/etc/adminhtml/di.xml | 12 +- .../Magento/Paypal/etc/adminhtml/events.xml | 2 +- app/code/Magento/Paypal/etc/di.xml | 4 +- app/code/Magento/Paypal/etc/events.xml | 2 +- app/code/Magento/Paypal/etc/frontend/di.xml | 12 +- .../Magento/Paypal/etc/frontend/events.xml | 2 +- app/code/Magento/Paypal/etc/module.xml | 2 +- .../sql/paypal_setup/install-1.6.0.0.php | 102 +- .../paypal_setup/upgrade-1.6.0.0-1.6.0.1.php | 12 +- .../paypal_setup/upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../paypal_setup/upgrade-1.6.0.2-1.6.0.3.php | 2 +- .../layout/checkout_onepage_index.xml | 2 +- .../view/frontend/layout/customer_account.xml | 2 +- .../frontend/layout/paypal_express_review.xml | 6 +- .../layout/paypal_express_review_details.xml | 2 +- .../layout/paypal_payflowexpress_review.xml | 4 +- .../Persistent/Block/Form/Remember.php | 12 +- .../Persistent/Block/Header/Additional.php | 46 +- app/code/Magento/Persistent/Helper/Data.php | 52 +- .../Magento/Persistent/Helper/Session.php | 36 +- app/code/Magento/Persistent/Model/Factory.php | 6 +- .../Magento/Persistent/Model/Observer.php | 150 +- .../Persistent/Model/Observer/Session.php | 18 +- .../Persistent/Model/Persistent/Config.php | 30 +- .../Persistent/Model/Resource/Session.php | 2 +- app/code/Magento/Persistent/Model/Session.php | 38 +- .../Magento/Persistent/etc/adminhtml/acl.xml | 2 +- .../Magento/Persistent/etc/frontend/di.xml | 2 +- .../Persistent/etc/frontend/events.xml | 4 +- app/code/Magento/Persistent/etc/module.xml | 2 +- .../sql/persistent_setup/install-1.0.0.0.php | 24 +- .../layout/checkout_onepage_index.xml | 4 +- .../layout/customer_account_create.xml | 2 +- .../layout/customer_account_login.xml | 2 +- .../view/frontend/remember_me_tooltip.phtml | 2 +- .../Block/Email/AbstractEmail.php | 2 +- .../ProductAlert/Block/Email/Stock.php | 4 +- .../ProductAlert/Block/Product/View.php | 12 +- .../Magento/ProductAlert/Controller/Add.php | 30 +- .../ProductAlert/Controller/Unsubscribe.php | 48 +- app/code/Magento/ProductAlert/Helper/Data.php | 53 +- app/code/Magento/ProductAlert/Model/Email.php | 56 +- .../Magento/ProductAlert/Model/Observer.php | 38 +- app/code/Magento/ProductAlert/Model/Price.php | 20 +- .../Model/Resource/AbstractResource.php | 14 +- .../ProductAlert/Model/Resource/Price.php | 10 +- .../Model/Resource/Price/Collection.php | 21 +- .../ProductAlert/Model/Resource/Stock.php | 10 +- .../Model/Resource/Stock/Collection.php | 22 +- app/code/Magento/ProductAlert/Model/Stock.php | 20 +- app/code/Magento/ProductAlert/etc/di.xml | 4 +- app/code/Magento/ProductAlert/etc/module.xml | 2 +- .../productalert_setup/install-1.6.0.0.php | 60 +- .../Customer/Edit/Tab/RecurringPayment.php | 6 +- .../Block/Adminhtml/Payment/Edit/Form.php | 18 +- .../Block/Adminhtml/Payment/Grid.php | 2 +- .../Block/Adminhtml/Payment/View.php | 6 +- .../Adminhtml/Payment/View/Getawayinfo.php | 6 +- .../Block/Adminhtml/Payment/View/Info.php | 6 +- .../Block/Adminhtml/Payment/View/Items.php | 2 +- .../Adminhtml/Payment/View/Tab/Orders.php | 8 +- .../Product/Edit/Tab/Price/Recurring.php | 12 +- .../Block/Catalog/Product/View/Payment.php | 20 +- .../Block/Checkout/Onepage/Success.php | 10 +- .../RecurringPayment/Block/Payment/Grid.php | 27 +- .../Block/Payment/Related/Orders/Grid.php | 22 +- .../RecurringPayment/Block/Payment/View.php | 18 +- .../Block/Payment/View/Address.php | 8 +- .../Block/Payment/View/Fees.php | 8 +- .../Block/Payment/View/Item.php | 10 +- .../Block/Payment/View/Reference.php | 8 +- .../Block/Payment/View/Schedule.php | 8 +- .../RecurringPayment/Block/Payments.php | 6 +- .../Controller/Adminhtml/RecurringPayment.php | 16 +- .../Controller/RecurringPayment.php | 22 +- .../Model/ManagerInterface.php | 6 +- .../Model/ManagerInterfaceFactory.php | 6 +- .../Model/Method/PaymentMethodsList.php | 2 +- .../RecurringPayment/Model/Observer.php | 16 +- .../Observer/CheckoutManagerObserver.php | 6 +- .../Observer/PaymentAvailabilityObserver.php | 4 +- .../RecurringPayment/Model/Payment.php | 54 +- .../RecurringPayment/Model/PeriodUnits.php | 2 +- .../Product/Attribute/Backend/Recurring.php | 4 +- .../Model/RecurringPayment.php | 87 +- .../Model/Resource/Order/CollectionFilter.php | 2 +- .../Model/Resource/Payment.php | 2 +- .../Model/Resource/Payment/Collection.php | 2 +- .../Magento/RecurringPayment/Model/States.php | 2 +- .../RecurringPayment/etc/adminhtml/acl.xml | 2 +- .../RecurringPayment/etc/adminhtml/events.xml | 2 +- app/code/Magento/RecurringPayment/etc/di.xml | 4 +- .../Magento/RecurringPayment/etc/events.xml | 2 +- .../Magento/RecurringPayment/etc/fieldset.xml | 2 +- .../RecurringPayment/etc/frontend/events.xml | 2 +- .../Magento/RecurringPayment/etc/module.xml | 2 +- .../install-1.0.0.0.php | 96 +- .../view/frontend/layout/customer_account.xml | 2 +- .../sales_recurringpayment_view__tabs.xml | 4 +- .../view/frontend/recurring/grid.phtml | 2 +- .../Adminhtml/Config/Form/Field/MtdStart.php | 2 +- .../Adminhtml/Config/Form/Field/YtdStart.php | 2 +- .../Reports/Block/Adminhtml/Filter/Form.php | 10 +- .../Magento/Reports/Block/Adminhtml/Grid.php | 6 +- .../Block/Adminhtml/Grid/AbstractGrid.php | 8 +- .../Grid/Column/Renderer/Blanknumber.php | 4 +- .../Grid/Column/Renderer/Currency.php | 4 +- .../Grid/Column/Renderer/Customer.php | 4 +- .../Grid/Column/Renderer/Product.php | 4 +- .../Product/Downloads/Renderer/Purchases.php | 4 +- .../Block/Adminhtml/Product/Lowstock/Grid.php | 2 +- .../Block/Adminhtml/Product/Viewed/Grid.php | 2 +- .../Block/Adminhtml/Sales/Coupons/Grid.php | 2 +- .../Sales/Grid/Column/Renderer/Date.php | 12 +- .../Adminhtml/Shopcart/Abandoned/Grid.php | 2 +- .../Block/Adminhtml/Shopcart/Product/Grid.php | 2 +- .../Reports/Block/Product/AbstractProduct.php | 2 +- .../Magento/Reports/Block/Product/Viewed.php | 2 +- .../Adminhtml/Report/AbstractReport.php | 16 +- .../Adminhtml/Report/Statistics.php | 22 +- app/code/Magento/Reports/Helper/Data.php | 12 +- app/code/Magento/Reports/Model/Config.php | 8 +- .../Magento/Reports/Model/DateFactory.php | 6 +- app/code/Magento/Reports/Model/Event.php | 24 +- .../Magento/Reports/Model/Event/Observer.php | 40 +- app/code/Magento/Reports/Model/Event/Type.php | 2 +- app/code/Magento/Reports/Model/Flag.php | 2 +- .../Reports/Model/Grouped/Collection.php | 6 +- app/code/Magento/Reports/Model/Item.php | 2 +- .../Model/Product/Index/AbstractIndex.php | 32 +- .../Reports/Model/Product/Index/Compared.php | 24 +- .../Reports/Model/Product/Index/Factory.php | 4 +- .../Model/Resource/Customer/Collection.php | 20 +- .../Summary/Collection/AbstractCollection.php | 8 +- .../Magento/Reports/Model/Resource/Event.php | 8 +- .../Model/Resource/Event/Collection.php | 2 +- .../Reports/Model/Resource/Event/Type.php | 2 +- .../Model/Resource/Event/Type/Collection.php | 2 +- .../Magento/Reports/Model/Resource/Helper.php | 2 +- .../Model/Resource/HelperInterface.php | 2 +- .../Model/Resource/Order/Collection.php | 36 +- .../Model/Resource/Product/Collection.php | 26 +- .../Resource/Product/Index/AbstractIndex.php | 18 +- .../Index/Collection/AbstractCollection.php | 24 +- .../Resource/Product/Lowstock/Collection.php | 26 +- .../Model/Resource/Quote/Collection.php | 16 +- .../Model/Resource/Refresh/Collection.php | 16 +- .../Model/Resource/Report/AbstractReport.php | 46 +- .../Model/Resource/Report/Collection.php | 36 +- .../Report/Collection/AbstractCollection.php | 2 +- .../Resource/Report/Collection/Factory.php | 8 +- .../Model/Resource/Report/Product/Viewed.php | 16 +- .../Report/Product/Viewed/Collection.php | 24 +- .../Resource/Review/Customer/Collection.php | 18 +- .../Resource/Review/Product/Collection.php | 6 +- .../Magento/Reports/Model/Resource/Setup.php | 8 +- .../Model/Resource/Wishlist/Collection.php | 18 +- app/code/Magento/Reports/Model/Totals.php | 4 +- .../Magento/Reports/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Reports/etc/adminhtml/di.xml | 2 +- app/code/Magento/Reports/etc/di.xml | 8 +- app/code/Magento/Reports/etc/frontend/di.xml | 2 +- .../Magento/Reports/etc/frontend/events.xml | 2 +- app/code/Magento/Reports/etc/module.xml | 2 +- .../sql/reports_setup/install-1.6.0.0.php | 78 +- .../reports_setup/mysql4-install-1.6.0.0.php | 68 +- .../upgrade-1.6.0.0-1.6.0.0.1.php | 30 +- .../upgrade-1.6.0.0.1-1.6.0.0.2.php | 2 +- .../Review/Block/Adminhtml/Add/Form.php | 10 +- .../Magento/Review/Block/Adminhtml/Edit.php | 6 +- .../Review/Block/Adminhtml/Edit/Form.php | 12 +- .../Magento/Review/Block/Adminhtml/Grid.php | 8 +- .../Block/Adminhtml/Grid/Renderer/Type.php | 4 +- .../Magento/Review/Block/Adminhtml/Main.php | 6 +- .../Review/Block/Adminhtml/Product/Grid.php | 2 +- .../Block/Adminhtml/Rating/Detailed.php | 6 +- .../Review/Block/Adminhtml/Rating/Edit.php | 6 +- .../Block/Adminhtml/Rating/Edit/Form.php | 2 +- .../Block/Adminhtml/Rating/Edit/Tab/Form.php | 16 +- .../Review/Block/Adminhtml/Rating/Summary.php | 6 +- .../Review/Block/Customer/ListCustomer.php | 10 +- .../Magento/Review/Block/Customer/Recent.php | 8 +- .../Magento/Review/Block/Customer/View.php | 2 +- app/code/Magento/Review/Block/Form.php | 18 +- .../Review/Block/Product/ReviewRenderer.php | 6 +- .../Magento/Review/Block/Product/View.php | 12 +- .../Review/Block/Product/View/Other.php | 12 +- .../Review/Block/Rating/Entity/Detailed.php | 6 +- app/code/Magento/Review/Block/View.php | 2 +- .../Review/Controller/Adminhtml/Product.php | 20 +- .../Review/Controller/Adminhtml/Rating.php | 6 +- .../Magento/Review/Controller/Customer.php | 1 - .../Magento/Review/Controller/Product.php | 20 +- .../Magento/Review/Helper/Action/Pager.php | 4 +- app/code/Magento/Review/Helper/Data.php | 12 +- app/code/Magento/Review/Model/Observer.php | 14 +- app/code/Magento/Review/Model/Rating.php | 20 +- .../Magento/Review/Model/Rating/Entity.php | 2 +- .../Magento/Review/Model/Rating/Option.php | 2 +- .../Review/Model/Rating/Option/Vote.php | 2 +- .../Magento/Review/Model/Resource/Rating.php | 22 +- .../Model/Resource/Rating/Collection.php | 18 +- .../Review/Model/Resource/Rating/Entity.php | 2 +- .../Model/Resource/Rating/Grid/Collection.php | 22 +- .../Review/Model/Resource/Rating/Option.php | 6 +- .../Resource/Rating/Option/Collection.php | 2 +- .../Model/Resource/Rating/Option/Vote.php | 2 +- .../Rating/Option/Vote/Collection.php | 18 +- .../Magento/Review/Model/Resource/Review.php | 22 +- .../Model/Resource/Review/Collection.php | 18 +- .../Resource/Review/Product/Collection.php | 24 +- .../Review/Model/Resource/Review/Status.php | 2 +- .../Resource/Review/Status/Collection.php | 2 +- .../Review/Model/Resource/Review/Summary.php | 4 +- .../Resource/Review/Summary/Collection.php | 10 +- app/code/Magento/Review/Model/Review.php | 28 +- .../Magento/Review/Model/Review/Status.php | 18 +- .../Magento/Review/Model/Review/Summary.php | 10 +- .../review_setup/data-install-1.6.0.0.php | 2 +- app/code/Magento/Review/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Review/etc/adminhtml/di.xml | 6 +- .../Magento/Review/etc/adminhtml/events.xml | 2 +- app/code/Magento/Review/etc/di.xml | 4 +- app/code/Magento/Review/etc/frontend/di.xml | 6 +- .../Magento/Review/etc/frontend/events.xml | 2 +- app/code/Magento/Review/etc/module.xml | 2 +- .../sql/review_setup/install-1.6.0.0.php | 200 +- .../view/frontend/layout/customer_account.xml | 2 +- .../Rss/App/Action/Plugin/Authentication.php | 22 +- app/code/Magento/Rss/Block/AbstractBlock.php | 6 +- .../Rss/Block/Catalog/AbstractCatalog.php | 12 +- .../Magento/Rss/Block/Catalog/Category.php | 4 +- .../Magento/Rss/Block/Catalog/NewCatalog.php | 14 +- .../Magento/Rss/Block/Catalog/NotifyStock.php | 6 +- app/code/Magento/Rss/Block/Catalog/Review.php | 6 +- .../Magento/Rss/Block/Catalog/Salesrule.php | 4 +- .../Magento/Rss/Block/Catalog/Special.php | 22 +- app/code/Magento/Rss/Block/ListBlock.php | 8 +- app/code/Magento/Rss/Block/Order/Details.php | 2 +- app/code/Magento/Rss/Block/Order/NewOrder.php | 12 +- app/code/Magento/Rss/Block/Order/Status.php | 12 +- app/code/Magento/Rss/Controller/Order.php | 6 +- app/code/Magento/Rss/Helper/WishlistRss.php | 4 +- .../Rss/Model/System/Config/Backend/Links.php | 18 +- app/code/Magento/Rss/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Rss/etc/adminhtml/di.xml | 2 +- app/code/Magento/Rss/etc/di.xml | 2 +- app/code/Magento/Rss/etc/module.xml | 2 +- .../Rss/view/frontend/layout/default.xml | 2 +- .../frontend/layout/rss_catalog_category.xml | 4 +- .../view/frontend/layout/rss_catalog_new.xml | 4 +- .../frontend/layout/rss_catalog_special.xml | 2 +- app/code/Magento/Rule/Block/Actions.php | 4 +- app/code/Magento/Rule/Block/Conditions.php | 4 +- app/code/Magento/Rule/Block/Editable.php | 18 +- app/code/Magento/Rule/Block/Newchild.php | 6 +- app/code/Magento/Rule/Block/Rule.php | 2 +- app/code/Magento/Rule/Model/AbstractModel.php | 54 +- .../Rule/Model/Action/AbstractAction.php | 18 +- .../Magento/Rule/Model/Action/Collection.php | 8 +- app/code/Magento/Rule/Model/ActionFactory.php | 6 +- .../Model/Condition/AbstractCondition.php | 28 +- .../Magento/Rule/Model/Condition/Combine.php | 8 +- .../Magento/Rule/Model/Condition/Context.php | 34 +- .../Condition/Product/AbstractProduct.php | 16 +- .../Magento/Rule/Model/ConditionFactory.php | 6 +- .../Magento/Rule/Model/Renderer/Actions.php | 4 +- .../Rule/Model/Renderer/Conditions.php | 4 +- .../Rule/Model/Resource/AbstractResource.php | 14 +- .../Rule/Collection/AbstractCollection.php | 6 +- app/code/Magento/Rule/Model/Rule.php | 24 +- app/code/Magento/Rule/etc/module.xml | 2 +- .../Block/Adminhtml/Items/AbstractItems.php | 42 +- .../Block/Adminhtml/Order/AbstractOrder.php | 12 +- .../Sales/Block/Adminhtml/Order/Address.php | 6 +- .../Block/Adminhtml/Order/Address/Form.php | 14 +- .../Block/Adminhtml/Order/Comments/View.php | 4 +- .../Order/Create/Billing/Method/Form.php | 4 +- .../Block/Adminhtml/Order/Create/Comment.php | 2 +- .../Block/Adminhtml/Order/Create/Data.php | 6 +- .../Block/Adminhtml/Order/Create/Form.php | 12 +- .../Order/Create/Form/AbstractForm.php | 30 +- .../Adminhtml/Order/Create/Form/Account.php | 8 +- .../Adminhtml/Order/Create/Form/Address.php | 12 +- .../Adminhtml/Order/Create/Giftmessage.php | 4 +- .../Order/Create/Giftmessage/Form.php | 16 +- .../Adminhtml/Order/Create/Items/Grid.php | 4 +- .../Block/Adminhtml/Order/Create/Load.php | 18 +- .../Block/Adminhtml/Order/Create/Messages.php | 2 +- .../Create/Search/Grid/Renderer/Price.php | 4 +- .../Create/Search/Grid/Renderer/Product.php | 4 +- .../Order/Create/Search/Grid/Renderer/Qty.php | 6 +- .../Block/Adminhtml/Order/Create/Sidebar.php | 2 +- .../Order/Create/Sidebar/AbstractSidebar.php | 12 +- .../Adminhtml/Order/Create/Sidebar/Cart.php | 2 +- .../Order/Create/Sidebar/Compared.php | 2 +- .../Order/Create/Sidebar/Pcompared.php | 2 +- .../Order/Create/Sidebar/Pviewed.php | 2 +- .../Order/Create/Sidebar/Reorder.php | 2 +- .../Order/Create/Sidebar/Wishlist.php | 2 +- .../Block/Adminhtml/Order/Create/Totals.php | 4 +- .../Adminhtml/Order/Creditmemo/Create.php | 6 +- .../Order/Creditmemo/Create/Adjustments.php | 6 +- .../Order/Creditmemo/Create/Items.php | 4 +- .../Adminhtml/Order/Creditmemo/Totals.php | 4 +- .../Block/Adminhtml/Order/Creditmemo/View.php | 6 +- .../Order/Creditmemo/View/Comments.php | 10 +- .../Block/Adminhtml/Order/Invoice/Create.php | 6 +- .../Adminhtml/Order/Invoice/Create/Items.php | 4 +- .../Block/Adminhtml/Order/Invoice/View.php | 6 +- .../Adminhtml/Order/Invoice/View/Comments.php | 10 +- .../Sales/Block/Adminhtml/Order/Payment.php | 4 +- .../Adminhtml/Order/Status/Assign/Form.php | 10 +- .../Adminhtml/Order/Status/NewStatus/Form.php | 4 +- .../Sales/Block/Adminhtml/Order/Totalbar.php | 4 +- .../Sales/Block/Adminhtml/Order/Totals.php | 6 +- .../Block/Adminhtml/Order/Totals/Item.php | 2 +- .../Sales/Block/Adminhtml/Order/View.php | 6 +- .../Adminhtml/Order/View/Giftmessage.php | 12 +- .../Block/Adminhtml/Order/View/History.php | 6 +- .../Sales/Block/Adminhtml/Order/View/Info.php | 6 +- .../Block/Adminhtml/Order/View/Items.php | 4 +- .../View/Items/Renderer/DefaultRenderer.php | 8 +- .../Block/Adminhtml/Order/View/Messages.php | 24 +- .../Adminhtml/Order/View/Tab/Creditmemos.php | 2 +- .../Adminhtml/Order/View/Tab/History.php | 10 +- .../Adminhtml/Order/View/Tab/Invoices.php | 2 +- .../Adminhtml/Order/View/Tab/Shipments.php | 12 +- .../Adminhtml/Order/View/Tab/Transactions.php | 12 +- .../Sales/Block/Adminhtml/Order/View/Tabs.php | 14 +- .../Adminhtml/Reorder/Renderer/Action.php | 6 +- .../Block/Adminhtml/Report/Filter/Form.php | 12 +- .../Adminhtml/Report/Filter/Form/Coupon.php | 12 +- .../Adminhtml/Report/Filter/Form/Order.php | 4 +- .../Config/Form/Fieldset/Order/Statuses.php | 16 +- .../Magento/Sales/Block/Adminhtml/Totals.php | 18 +- .../Block/Adminhtml/Transactions/Detail.php | 10 +- .../Adminhtml/Transactions/Detail/Grid.php | 14 +- app/code/Magento/Sales/Block/Guest/Link.php | 6 +- .../Sales/Block/Items/AbstractItems.php | 18 +- .../Magento/Sales/Block/Order/Comments.php | 10 +- .../Magento/Sales/Block/Order/Creditmemo.php | 8 +- .../Sales/Block/Order/Creditmemo/Items.php | 10 +- .../Sales/Block/Order/Creditmemo/Totals.php | 12 +- .../Block/Order/Email/Creditmemo/Items.php | 4 +- .../Sales/Block/Order/Email/Invoice/Items.php | 4 +- .../Block/Order/Email/Items/DefaultItems.php | 4 +- .../Order/Email/Items/Order/DefaultOrder.php | 4 +- .../Block/Order/Email/Shipment/Items.php | 4 +- .../Magento/Sales/Block/Order/History.php | 6 +- app/code/Magento/Sales/Block/Order/Info.php | 12 +- .../Sales/Block/Order/Info/Buttons.php | 12 +- .../Magento/Sales/Block/Order/Invoice.php | 8 +- .../Sales/Block/Order/Invoice/Items.php | 10 +- .../Sales/Block/Order/Invoice/Totals.php | 8 +- .../Order/Item/Renderer/DefaultRenderer.php | 18 +- app/code/Magento/Sales/Block/Order/Items.php | 10 +- app/code/Magento/Sales/Block/Order/Link.php | 12 +- .../Block/Order/PrintOrder/Creditmemo.php | 12 +- .../Sales/Block/Order/PrintOrder/Invoice.php | 12 +- .../Sales/Block/Order/PrintOrder/Shipment.php | 12 +- .../Sales/Block/Order/PrintShipment.php | 12 +- app/code/Magento/Sales/Block/Order/Recent.php | 6 +- app/code/Magento/Sales/Block/Order/Totals.php | 32 +- app/code/Magento/Sales/Block/Order/View.php | 12 +- .../Magento/Sales/Block/Reorder/Sidebar.php | 6 +- .../Magento/Sales/Block/Widget/Guest/Form.php | 8 +- .../Sales/Controller/AbstractController.php | 8 +- .../Creditmemo/AbstractCreditmemo.php | 4 +- .../Adminhtml/Invoice/AbstractInvoice.php | 4 +- .../Sales/Controller/Adminhtml/Order.php | 50 +- .../Controller/Adminhtml/Order/Create.php | 18 +- .../Controller/Adminhtml/Order/Creditmemo.php | 22 +- .../Sales/Controller/Adminhtml/Order/Edit.php | 2 +- .../Controller/Adminhtml/Order/Invoice.php | 20 +- .../Controller/Adminhtml/Order/Status.php | 16 +- .../Adminhtml/Order/View/Giftmessage.php | 2 +- .../Adminhtml/Shipment/AbstractShipment.php | 4 +- .../Controller/Adminhtml/Transactions.php | 10 +- app/code/Magento/Sales/Helper/Admin.php | 8 +- app/code/Magento/Sales/Helper/Guest.php | 116 +- app/code/Magento/Sales/Helper/Reorder.php | 4 +- .../Magento/Sales/Model/AbstractModel.php | 34 +- .../Magento/Sales/Model/AdminOrder/Create.php | 112 +- .../AdminOrder/Product/Quote/Initializer.php | 4 +- .../Magento/Sales/Model/Config/Converter.php | 2 +- app/code/Magento/Sales/Model/Config/Data.php | 6 +- .../Magento/Sales/Model/Config/Ordered.php | 8 +- .../Magento/Sales/Model/Config/Reader.php | 12 +- .../Sales/Model/Config/SchemaLocator.php | 6 +- .../Model/Config/Source/Order/Status.php | 2 +- .../Magento/Sales/Model/Convert/Order.php | 14 +- .../Magento/Sales/Model/Convert/Quote.php | 14 +- .../Sales/Model/ConverterInterface.php | 8 +- app/code/Magento/Sales/Model/Download.php | 2 +- .../Model/Grid/Child/CollectionUpdater.php | 8 +- .../Sales/Model/Grid/CollectionUpdater.php | 8 +- app/code/Magento/Sales/Model/Observer.php | 28 +- .../Observer/Backend/CatalogProductQuote.php | 6 +- .../Model/Observer/Backend/CustomerQuote.php | 4 +- .../Frontend/Quote/Address/CollectTotals.php | 13 +- .../Frontend/Quote/Address/VatValidator.php | 4 +- app/code/Magento/Sales/Model/Order.php | 70 +- .../Magento/Sales/Model/Order/Address.php | 16 +- .../Magento/Sales/Model/Order/Creditmemo.php | 52 +- .../Sales/Model/Order/Creditmemo/Comment.php | 24 +- .../Sales/Model/Order/Creditmemo/Item.php | 22 +- .../Model/Order/Creditmemo/Total/Shipping.php | 4 +- .../Order/Grid/Massaction/ItemsUpdater.php | 8 +- .../Model/Order/Grid/Row/UrlGenerator.php | 8 +- .../Magento/Sales/Model/Order/Invoice.php | 54 +- .../Sales/Model/Order/Invoice/Comment.php | 24 +- .../Order/Invoice/Grid/Row/UrlGenerator.php | 8 +- .../Sales/Model/Order/Invoice/Item.php | 22 +- app/code/Magento/Sales/Model/Order/Item.php | 22 +- .../Magento/Sales/Model/Order/Payment.php | 42 +- .../Sales/Model/Order/Payment/Transaction.php | 62 +- .../Sales/Model/Order/Pdf/AbstractPdf.php | 42 +- .../Magento/Sales/Model/Order/Pdf/Config.php | 6 +- .../Model/Order/Pdf/Config/Converter.php | 2 +- .../Sales/Model/Order/Pdf/Config/Reader.php | 2 +- .../Model/Order/Pdf/Config/SchemaLocator.php | 6 +- .../Sales/Model/Order/Pdf/Creditmemo.php | 18 +- .../Magento/Sales/Model/Order/Pdf/Invoice.php | 18 +- .../Model/Order/Pdf/Items/AbstractItems.php | 62 +- .../Items/Creditmemo/DefaultCreditmemo.php | 26 +- .../Pdf/Items/Invoice/DefaultInvoice.php | 26 +- .../Pdf/Items/Shipment/DefaultShipment.php | 26 +- .../Sales/Model/Order/Pdf/ItemsFactory.php | 6 +- .../Sales/Model/Order/Pdf/Shipment.php | 18 +- .../Model/Order/Pdf/Total/DefaultTotal.php | 2 +- .../Sales/Model/Order/Pdf/Total/Factory.php | 10 +- .../Magento/Sales/Model/Order/Shipment.php | 54 +- .../Sales/Model/Order/Shipment/Comment.php | 24 +- .../Sales/Model/Order/Shipment/Item.php | 22 +- .../Sales/Model/Order/Shipment/Track.php | 26 +- app/code/Magento/Sales/Model/Order/Status.php | 18 +- .../Sales/Model/Order/Status/History.php | 24 +- app/code/Magento/Sales/Model/Order/Tax.php | 2 +- app/code/Magento/Sales/Model/Order/Total.php | 2 +- .../Sales/Model/Order/Total/AbstractTotal.php | 2 +- .../Sales/Model/Order/Total/Config/Base.php | 8 +- .../Sales/Model/Order/TotalFactory.php | 6 +- .../Sales/Model/Payment/Method/Converter.php | 18 +- app/code/Magento/Sales/Model/Quote.php | 80 +- .../Magento/Sales/Model/Quote/Address.php | 20 +- .../Address/AbstractCarrierInterface.php | 24 +- .../Sales/Model/Quote/Address/Rate.php | 2 +- .../Address/RateCollectorInterfaceFactory.php | 6 +- .../Sales/Model/Quote/Address/RateRequest.php | 2 +- .../Address/RateResult/AbstractResult.php | 2 +- .../Sales/Model/Quote/Address/Total.php | 2 +- .../Quote/Address/Total/AbstractTotal.php | 4 +- .../Model/Quote/Address/Total/Collector.php | 8 +- .../Model/Quote/Address/Total/Discount.php | 6 +- .../Model/Quote/Address/Total/Nominal.php | 2 +- .../Model/Quote/Address/TotalFactory.php | 6 +- app/code/Magento/Sales/Model/Quote/Item.php | 51 +- .../Sales/Model/Quote/Item/AbstractItem.php | 33 +- .../Magento/Sales/Model/Quote/Item/Option.php | 2 +- .../Magento/Sales/Model/Quote/Payment.php | 28 +- .../Sales/Model/Resource/AbstractResource.php | 24 +- .../Collection/AbstractCollection.php | 6 +- .../Magento/Sales/Model/Resource/Factory.php | 6 +- .../Magento/Sales/Model/Resource/Helper.php | 2 +- .../Model/Resource/Order/AbstractOrder.php | 42 +- .../Sales/Model/Resource/Order/Address.php | 14 +- .../Order/Attribute/Backend/Billing.php | 4 +- .../Order/Attribute/Backend/Child.php | 2 +- .../Order/Attribute/Backend/Shipping.php | 4 +- .../Sales/Model/Resource/Order/Collection.php | 26 +- .../Resource/Order/Collection/Factory.php | 6 +- .../Comment/Collection/AbstractCollection.php | 4 +- .../Creditmemo/Attribute/Backend/Child.php | 2 +- .../Order/Creditmemo/Grid/StatusList.php | 2 +- .../Creditmemo/Order/Grid/Collection.php | 26 +- .../Model/Resource/Order/Grid/Collection.php | 2 +- .../Resource/Order/Grid/StatusesArray.php | 2 +- .../Order/Invoice/Attribute/Backend/Child.php | 2 +- .../Order/Invoice/Attribute/Backend/Item.php | 2 +- .../Order/Invoice/Attribute/Backend/Order.php | 2 +- .../Order/Invoice/Grid/StatusList.php | 2 +- .../Order/Invoice/Orders/Grid/Collection.php | 26 +- .../Sales/Model/Resource/Order/Payment.php | 8 +- .../Resource/Order/Payment/Collection.php | 16 +- .../Resource/Order/Payment/Transaction.php | 8 +- .../Shipment/Attribute/Backend/Child.php | 2 +- .../Order/Shipment/Order/Grid/Collection.php | 26 +- .../Sales/Model/Resource/Order/Status.php | 16 +- .../Resource/Order/Status/Collection.php | 2 +- .../Sales/Model/Resource/Order/Tax.php | 2 +- .../Model/Resource/Order/Tax/Collection.php | 2 +- .../Magento/Sales/Model/Resource/Quote.php | 10 +- .../Quote/Address/Attribute/Backend/Child.php | 2 +- .../Address/Attribute/Backend/Region.php | 6 +- .../Resource/Quote/Address/Collection.php | 2 +- .../Quote/Address/Item/Collection.php | 2 +- .../Quote/Address/Rate/Collection.php | 20 +- .../Sales/Model/Resource/Quote/Collection.php | 2 +- .../Model/Resource/Quote/Item/Collection.php | 22 +- .../Model/Resource/Quote/Item/Option.php | 2 +- .../Resource/Quote/Item/Option/Collection.php | 2 +- .../Sales/Model/Resource/Quote/Payment.php | 4 +- .../Resource/Quote/Payment/Collection.php | 18 +- .../Magento/Sales/Model/Resource/Report.php | 2 +- .../Model/Resource/Report/Bestsellers.php | 16 +- .../Report/Bestsellers/Collection.php | 22 +- .../Report/Collection/AbstractCollection.php | 12 +- .../Report/Invoiced/Collection/Invoiced.php | 12 +- .../Report/Invoiced/Collection/Order.php | 14 +- .../Sales/Model/Resource/Report/Order.php | 16 +- .../Resource/Report/Order/Collection.php | 14 +- .../Report/Refunded/Collection/Order.php | 14 +- .../Report/Refunded/Collection/Refunded.php | 12 +- .../Report/Shipping/Collection/Order.php | 14 +- .../Report/Shipping/Collection/Shipment.php | 12 +- .../Sales/Model/Resource/Sale/Collection.php | 16 +- .../Magento/Sales/Model/Resource/Setup.php | 18 +- .../Resource/Transaction/Grid/Collection.php | 22 +- .../Resource/Transaction/Grid/TypeList.php | 2 +- .../Magento/Sales/Model/Service/Quote.php | 25 +- .../Sales/Model/Status/ListFactory.php | 6 +- .../Magento/Sales/Model/Status/ListStatus.php | 2 +- app/code/Magento/Sales/etc/adminhtml/acl.xml | 2 +- .../Magento/Sales/etc/adminhtml/events.xml | 2 +- app/code/Magento/Sales/etc/di.xml | 8 +- app/code/Magento/Sales/etc/events.xml | 2 +- app/code/Magento/Sales/etc/fieldset.xml | 2 +- app/code/Magento/Sales/etc/frontend/di.xml | 2 +- .../Magento/Sales/etc/frontend/events.xml | 2 +- app/code/Magento/Sales/etc/module.xml | 2 +- .../Sales/sql/sales_setup/install-1.6.0.0.php | 2076 +++++----- .../sales_setup/upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../sales_setup/upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../sales_setup/upgrade-1.6.0.11-1.6.0.12.php | 2 +- .../sales_setup/upgrade-1.6.0.2-1.6.0.3.php | 2 +- .../sales_setup/upgrade-1.6.0.4-1.6.0.5.php | 6 +- .../sales_setup/upgrade-1.6.0.5-1.6.0.6.php | 10 +- .../sales_setup/upgrade-1.6.0.6-1.6.0.7.php | 2 +- .../sales_setup/upgrade-1.6.0.7-1.6.0.8.php | 4 +- .../sales_setup/upgrade-1.6.0.8-1.6.0.9.php | 4 +- .../layout/sales_order_create_index.xml | 2 +- .../sales_order_create_load_block_data.xml | 2 +- .../sales_order_create_load_block_items.xml | 2 +- .../layout/sales_order_creditmemo_new.xml | 2 +- .../sales_order_creditmemo_updateqty.xml | 2 +- .../layout/sales_order_creditmemo_view.xml | 2 +- .../layout/sales_order_invoice_new.xml | 2 +- .../layout/sales_order_invoice_updateqty.xml | 2 +- .../layout/sales_order_invoice_view.xml | 2 +- .../adminhtml/layout/sales_order_view.xml | 2 +- .../Sales/view/email/shipment_new.html | 4 +- .../Sales/view/email/shipment_new_guest.html | 4 +- .../view/frontend/layout/customer_account.xml | 2 +- .../sales_email_order_creditmemo_items.xml | 4 +- .../sales_email_order_invoice_items.xml | 4 +- .../layout/sales_email_order_items.xml | 6 +- .../sales_email_order_shipment_items.xml | 4 +- .../layout/sales_guest_creditmemo.xml | 2 +- .../frontend/layout/sales_guest_invoice.xml | 2 +- .../frontend/layout/sales_guest_print.xml | 2 +- .../layout/sales_guest_printcreditmemo.xml | 2 +- .../layout/sales_guest_printinvoice.xml | 2 +- .../layout/sales_guest_printshipment.xml | 2 +- .../view/frontend/layout/sales_guest_view.xml | 2 +- .../layout/sales_order_creditmemo.xml | 4 +- .../layout/sales_order_guest_info_links.xml | 2 +- .../layout/sales_order_info_links.xml | 2 +- .../frontend/layout/sales_order_invoice.xml | 4 +- .../frontend/layout/sales_order_print.xml | 4 +- .../layout/sales_order_printcreditmemo.xml | 4 +- .../layout/sales_order_printinvoice.xml | 4 +- .../layout/sales_order_printshipment.xml | 4 +- .../frontend/layout/sales_order_shipment.xml | 2 +- .../view/frontend/layout/sales_order_view.xml | 4 +- .../Block/Adminhtml/Promo/Quote/Edit.php | 6 +- .../Block/Adminhtml/Promo/Quote/Edit/Form.php | 2 +- .../Promo/Quote/Edit/Tab/Actions.php | 10 +- .../Promo/Quote/Edit/Tab/Conditions.php | 10 +- .../Promo/Quote/Edit/Tab/Coupons.php | 10 +- .../Promo/Quote/Edit/Tab/Coupons/Form.php | 10 +- .../Promo/Quote/Edit/Tab/Coupons/Grid.php | 6 +- .../Tab/Coupons/Grid/Column/Renderer/Used.php | 4 +- .../Adminhtml/Promo/Quote/Edit/Tab/Labels.php | 6 +- .../Adminhtml/Promo/Quote/Edit/Tab/Main.php | 22 +- .../Quote/Edit/Tab/Main/Renderer/Checkbox.php | 14 +- .../Block/Adminhtml/Promo/Widget/Chooser.php | 6 +- .../Controller/Adminhtml/Promo/Quote.php | 28 +- app/code/Magento/SalesRule/Model/Coupon.php | 2 +- .../SalesRule/Model/Coupon/Codegenerator.php | 2 +- .../SalesRule/Model/Coupon/Massgenerator.php | 36 +- app/code/Magento/SalesRule/Model/Observer.php | 20 +- .../SalesRule/Model/Quote/Discount.php | 6 +- .../SalesRule/Model/Resource/Coupon.php | 10 +- .../Model/Resource/Coupon/Collection.php | 2 +- .../SalesRule/Model/Resource/Coupon/Usage.php | 8 +- .../Model/Resource/Report/Collection.php | 14 +- .../SalesRule/Model/Resource/Report/Rule.php | 16 +- .../Magento/SalesRule/Model/Resource/Rule.php | 12 +- .../Model/Resource/Rule/Collection.php | 24 +- .../Model/Resource/Rule/Customer.php | 2 +- .../Resource/Rule/Customer/Collection.php | 2 +- app/code/Magento/SalesRule/Model/Rule.php | 32 +- .../Model/Rule/Action/Collection.php | 8 +- .../Action/Discount/CalculatorFactory.php | 6 +- .../Model/Rule/Condition/Address.php | 4 +- .../Model/Rule/Condition/Combine.php | 8 +- .../Model/Rule/Condition/Product.php | 8 +- .../Model/Rule/Condition/Product/Found.php | 4 +- .../Rule/Condition/Product/Subselect.php | 4 +- .../Magento/SalesRule/Model/Rule/Customer.php | 2 +- .../System/Config/Source/Coupon/Format.php | 2 +- .../Magento/SalesRule/Model/Validator.php | 24 +- .../data-upgrade-1.6.0.3-1.6.0.4.php | 10 +- .../Magento/SalesRule/etc/adminhtml/acl.xml | 2 +- .../Magento/SalesRule/etc/adminhtml/di.xml | 2 +- .../SalesRule/etc/adminhtml/events.xml | 2 +- app/code/Magento/SalesRule/etc/di.xml | 4 +- app/code/Magento/SalesRule/etc/events.xml | 2 +- app/code/Magento/SalesRule/etc/fieldset.xml | 2 +- app/code/Magento/SalesRule/etc/module.xml | 2 +- .../sql/salesrule_setup/install-1.6.0.0.php | 208 +- .../upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../upgrade-1.6.0.1-1.6.0.2.php | 30 +- .../upgrade-1.6.0.2-1.6.0.3.php | 30 +- app/code/Magento/Sendfriend/Block/Send.php | 36 +- .../Magento/Sendfriend/Controller/Product.php | 20 +- .../Magento/Sendfriend/Model/Observer.php | 4 +- .../Sendfriend/Model/Resource/Sendfriend.php | 2 +- .../Model/Resource/Sendfriend/Collection.php | 2 +- .../Magento/Sendfriend/Model/Sendfriend.php | 76 +- .../Sendfriend/etc/frontend/events.xml | 2 +- app/code/Magento/Sendfriend/etc/module.xml | 2 +- .../sql/sendfriend_setup/install-1.6.0.0.php | 10 +- .../Shipping/Block/Adminhtml/Create.php | 6 +- .../Shipping/Block/Adminhtml/Create/Form.php | 2 +- .../Shipping/Block/Adminhtml/Create/Items.php | 4 +- .../Block/Adminhtml/Order/Packaging.php | 24 +- .../Block/Adminhtml/Order/Packaging/Grid.php | 6 +- .../Block/Adminhtml/Order/Tracking.php | 6 +- .../Block/Adminhtml/Order/Tracking/View.php | 4 +- .../Magento/Shipping/Block/Adminhtml/View.php | 6 +- .../Block/Adminhtml/View/Comments.php | 10 +- .../Shipping/Block/Adminhtml/View/Form.php | 4 +- app/code/Magento/Shipping/Block/Items.php | 10 +- .../Magento/Shipping/Block/Order/Shipment.php | 12 +- .../Magento/Shipping/Block/Tracking/Ajax.php | 2 +- .../Magento/Shipping/Block/Tracking/Link.php | 12 +- .../Magento/Shipping/Block/Tracking/Popup.php | 16 +- .../Controller/Adminhtml/Order/Shipment.php | 50 +- .../Magento/Shipping/Controller/Tracking.php | 6 +- app/code/Magento/Shipping/Helper/Carrier.php | 6 +- .../Model/Carrier/AbstractCarrier.php | 32 +- .../Model/Carrier/AbstractCarrierOnline.php | 32 +- .../Model/Carrier/Source/GenericInterface.php | 2 +- .../Magento/Shipping/Model/CarrierFactory.php | 6 +- app/code/Magento/Shipping/Model/Config.php | 2 +- .../Model/Config/Source/Allmethods.php | 2 +- .../Config/Source/Allspecificcountries.php | 2 +- .../Model/Config/Source/Online/Mode.php | 2 +- .../Config/Source/Online/Requesttype.php | 2 +- app/code/Magento/Shipping/Model/Info.php | 2 +- app/code/Magento/Shipping/Model/Observer.php | 6 +- .../Shipping/Model/Order/Pdf/Packaging.php | 30 +- .../Magento/Shipping/Model/Order/Track.php | 24 +- .../Shipping/Model/Shipment/Request.php | 2 +- .../Model/Shipment/ReturnShipment.php | 2 +- app/code/Magento/Shipping/Model/Shipping.php | 10 +- .../Shipping/Model/Shipping/Labels.php | 14 +- .../Shipping/Model/Simplexml/Element.php | 2 +- .../Shipping/Model/Source/HandlingAction.php | 2 +- .../Shipping/Model/Source/HandlingType.php | 2 +- .../Model/Tracking/Result/AbstractResult.php | 2 +- .../Magento/Shipping/etc/adminhtml/acl.xml | 2 +- .../Magento/Shipping/etc/adminhtml/di.xml | 2 +- app/code/Magento/Shipping/etc/di.xml | 2 +- app/code/Magento/Shipping/etc/module.xml | 2 +- .../layout/adminhtml_order_shipment_new.xml | 2 +- .../layout/adminhtml_order_shipment_view.xml | 2 +- .../adminhtml/order/packaging/packed.phtml | 6 +- .../frontend/layout/sales_guest_shipment.xml | 2 +- .../frontend/layout/sales_order_shipment.xml | 2 +- .../Magento/Sitemap/Block/Adminhtml/Edit.php | 6 +- .../Sitemap/Block/Adminhtml/Edit/Form.php | 10 +- .../Block/Adminhtml/Grid/Renderer/Action.php | 4 +- .../Block/Adminhtml/Grid/Renderer/Link.php | 4 +- .../Block/Adminhtml/Grid/Renderer/Time.php | 10 +- .../Sitemap/Controller/Adminhtml/Sitemap.php | 12 +- .../Sitemap/Model/Config/Source/Frequency.php | 2 +- app/code/Magento/Sitemap/Model/Observer.php | 14 +- .../Model/Resource/Catalog/Category.php | 6 +- .../Model/Resource/Catalog/Product.php | 16 +- .../Sitemap/Model/Resource/Cms/Page.php | 6 +- .../Sitemap/Model/Resource/Sitemap.php | 2 +- .../Model/Resource/Sitemap/Collection.php | 2 +- app/code/Magento/Sitemap/Model/Sitemap.php | 76 +- .../Source/Product/Image/IncludeImage.php | 2 +- .../Magento/Sitemap/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Sitemap/etc/di.xml | 2 +- app/code/Magento/Sitemap/etc/module.xml | 2 +- .../sql/sitemap_setup/install-1.6.0.0.php | 18 +- .../App/Action/Plugin/Context.php} | 10 +- .../Store/App/Action/Plugin/StoreCheck.php | 22 +- .../Plugin/DispatchExceptionHandler.php | 2 +- .../Plugin/RequestPreprocessor.php | 8 +- .../Magento/Store/App/Response/Redirect.php | 26 +- .../Magento/Store/Block/Store/Switcher.php | 6 +- app/code/Magento/Store/Block/Switcher.php | 6 +- .../Store/Model/Config/Reader/Store.php | 6 +- app/code/Magento/Store/Model/Exception.php | 2 +- app/code/Magento/Store/Model/Group.php | 19 +- .../Resource/Config/Collection/Scoped.php | 14 +- .../Magento/Store/Model/Resource/Group.php | 10 +- .../Store/Model/Resource/Group/Collection.php | 2 +- .../Magento/Store/Model/Resource/Store.php | 18 +- .../Store/Model/Resource/Store/Collection.php | 8 +- .../Magento/Store/Model/Resource/Website.php | 20 +- .../Model/Resource/Website/Collection.php | 14 +- app/code/Magento/Store/Model/Storage/Db.php | 221 +- .../Store/Model/Storage/DefaultStorage.php | 40 +- .../Magento/Store/Model/StorageFactory.php | 189 +- app/code/Magento/Store/Model/Store.php | 131 +- app/code/Magento/Store/Model/StoreManager.php | 56 +- .../Store/Model/StoreManagerInterface.php | 24 +- app/code/Magento/Store/Model/StoresConfig.php | 2 +- app/code/Magento/Store/Model/System/Store.php | 2 +- app/code/Magento/Store/Model/Website.php | 22 +- app/code/Magento/Store/etc/di.xml | 29 +- app/code/Magento/Store/etc/frontend/di.xml | 5 +- app/code/Magento/Store/etc/module.xml | 2 +- .../Store/sql/store_setup/install-2.0.0.0.php | 10 +- .../view/frontend/switch/languages.phtml | 4 +- .../Adminhtml/Frontend/Region/Updater.php | 2 +- .../Magento/Tax/Block/Adminhtml/Rate/Form.php | 14 +- .../Adminhtml/Rate/Grid/Renderer/Country.php | 4 +- .../Adminhtml/Rate/Grid/Renderer/Data.php | 4 +- .../Tax/Block/Adminhtml/Rate/Title.php | 6 +- .../Block/Adminhtml/Rate/Title/Fieldset.php | 14 +- .../Magento/Tax/Block/Adminhtml/Rule/Edit.php | 6 +- .../Tax/Block/Adminhtml/Rule/Edit/Form.php | 12 +- .../Magento/Tax/Block/Checkout/Discount.php | 4 +- .../Magento/Tax/Block/Checkout/Grandtotal.php | 4 +- .../Magento/Tax/Block/Checkout/Shipping.php | 4 +- .../Magento/Tax/Block/Checkout/Subtotal.php | 4 +- .../Magento/Tax/Block/Sales/Order/Tax.php | 24 +- .../Magento/Tax/Controller/Adminhtml/Rate.php | 12 +- .../Magento/Tax/Controller/Adminhtml/Rule.php | 10 +- .../Magento/Tax/Controller/Adminhtml/Tax.php | 14 +- app/code/Magento/Tax/Exception.php | 2 +- app/code/Magento/Tax/Helper/Data.php | 22 +- app/code/Magento/Tax/Model/Calculation.php | 56 +- .../Magento/Tax/Model/Calculation/Rate.php | 34 +- .../Tax/Model/Calculation/Rate/Title.php | 2 +- .../Tax/Model/Calculation/RateFactory.php | 6 +- .../Magento/Tax/Model/Calculation/Rule.php | 18 +- app/code/Magento/Tax/Model/ClassModel.php | 26 +- .../Tax/Model/Config/Source/Apply/On.php | 2 +- .../Tax/Model/Config/Source/Basedon.php | 2 +- .../Tax/Model/Config/Source/Catalog.php | 2 +- .../Model/Config/Source/TaxClass/Customer.php | 2 +- .../Model/Config/Source/TaxClass/Product.php | 2 +- app/code/Magento/Tax/Model/Observer.php | 26 +- .../Tax/Model/Rate/CsvImportHandler.php | 14 +- .../Tax/Model/Resource/Calculation.php | 26 +- .../Model/Resource/Calculation/Collection.php | 2 +- .../Tax/Model/Resource/Calculation/Rate.php | 2 +- .../Resource/Calculation/Rate/Collection.php | 18 +- .../Model/Resource/Calculation/Rate/Title.php | 2 +- .../Calculation/Rate/Title/Collection.php | 2 +- .../Tax/Model/Resource/Calculation/Rule.php | 2 +- .../Resource/Calculation/Rule/Collection.php | 6 +- .../Tax/Model/Resource/Report/Collection.php | 12 +- .../Magento/Tax/Model/Resource/Report/Tax.php | 16 +- .../Rule/Grid/Options/CustomerTaxClass.php | 2 +- .../Rule/Grid/Options/HashOptimized.php | 2 +- .../Rule/Grid/Options/ProductTaxClass.php | 2 +- .../Tax/Model/Resource/Sales/Order/Tax.php | 2 +- .../Resource/Sales/Order/Tax/Collection.php | 4 +- .../Model/Resource/Sales/Order/Tax/Item.php | 2 +- .../Sales/Order/Tax/Item/Collection.php | 2 +- app/code/Magento/Tax/Model/Resource/Setup.php | 2 +- .../Magento/Tax/Model/Resource/TaxClass.php | 2 +- .../Model/Resource/TaxClass/Collection.php | 2 +- .../Magento/Tax/Model/Sales/Order/Tax.php | 2 +- .../Tax/Model/Sales/Order/Tax/Item.php | 2 +- .../Tax/Model/Sales/Total/Quote/Shipping.php | 2 +- .../Tax/Model/Sales/Total/Quote/Subtotal.php | 16 +- .../Tax/Model/Sales/Total/Quote/Tax.php | 8 +- .../Model/System/Config/Source/Algorithm.php | 2 +- .../Tax/Model/System/Config/Source/Apply.php | 2 +- .../Model/System/Config/Source/PriceType.php | 2 +- .../System/Config/Source/Tax/Display/Type.php | 2 +- .../Model/System/Config/Source/Tax/Region.php | 2 +- .../Tax/Model/TaxClass/AbstractType.php | 4 +- .../Magento/Tax/Model/TaxClass/Factory.php | 10 +- .../Tax/Model/TaxClass/Source/Product.php | 4 +- .../Tax/Model/TaxClass/Type/Customer.php | 17 +- .../Tax/Model/TaxClass/Type/TypeInterface.php | 2 +- app/code/Magento/Tax/Pricing/Adjustment.php | 4 +- .../Magento/Tax/Pricing/Render/Adjustment.php | 10 +- app/code/Magento/Tax/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Tax/etc/di.xml | 6 +- app/code/Magento/Tax/etc/events.xml | 2 +- app/code/Magento/Tax/etc/fieldset.xml | 2 +- app/code/Magento/Tax/etc/module.xml | 2 +- .../Tax/sql/tax_setup/install-1.6.0.0.php | 94 +- .../sql/tax_setup/upgrade-1.6.0.1-1.6.0.2.php | 18 +- .../sql/tax_setup/upgrade-1.6.0.2-1.6.0.3.php | 2 +- .../Adminhtml/System/Design/Theme/Edit.php | 12 +- .../System/Design/Theme/Edit/AbstractTab.php | 16 +- .../System/Design/Theme/Edit/Form.php | 2 +- .../Design/Theme/Edit/Form/Element/File.php | 2 +- .../Design/Theme/Edit/Form/Element/Image.php | 24 +- .../Design/Theme/Edit/Form/Element/Links.php | 14 +- .../System/Design/Theme/Edit/Tab/Css.php | 16 +- .../System/Design/Theme/Edit/Tab/General.php | 34 +- .../System/Design/Theme/Edit/Tab/Js.php | 6 +- .../Block/Adminhtml/Wysiwyg/Files/Content.php | 2 +- .../Wysiwyg/Files/Content/Uploader.php | 4 +- app/code/Magento/Theme/Block/Html.php | 17 +- .../Magento/Theme/Block/Html/Breadcrumbs.php | 2 +- app/code/Magento/Theme/Block/Html/Footer.php | 6 +- app/code/Magento/Theme/Block/Html/Head.php | 59 +- .../Block/Html/Head/AssetBlockInterface.php | 2 +- .../Magento/Theme/Block/Html/Head/Css.php | 17 +- .../Magento/Theme/Block/Html/Head/Link.php | 12 +- .../Magento/Theme/Block/Html/Head/Script.php | 17 +- app/code/Magento/Theme/Block/Html/Header.php | 9 +- app/code/Magento/Theme/Block/Html/Notices.php | 6 +- app/code/Magento/Theme/Block/Html/Pager.php | 8 +- app/code/Magento/Theme/Block/Html/Title.php | 2 +- app/code/Magento/Theme/Block/Html/Topmenu.php | 35 +- app/code/Magento/Theme/Block/Html/Welcome.php | 2 +- .../Adminhtml/System/Design/Theme.php | 87 +- .../Adminhtml/System/Design/Wysiwyg/Files.php | 8 +- app/code/Magento/Theme/Helper/Layout.php | 8 +- app/code/Magento/Theme/Helper/Storage.php | 20 +- app/code/Magento/Theme/Model/Config.php | 26 +- .../Theme/Model/Config/Customization.php | 22 +- app/code/Magento/Theme/Model/CopyService.php | 22 +- .../Magento/Theme/Model/Layout/Config.php | 12 +- .../Theme/Model/Layout/Config/Converter.php | 2 +- .../Theme/Model/Layout/Config/Reader.php | 2 +- .../Model/Layout/Config/SchemaLocator.php | 6 +- .../Theme/Model/Layout/Source/Layout.php | 2 +- .../Theme/Customization/File/CustomCss.php | 6 +- .../Magento/Theme/Model/Theme/SingleFile.php | 12 +- .../Magento/Theme/Model/Uploader/Service.php | 16 +- .../Magento/Theme/Model/Wysiwyg/Storage.php | 36 +- app/code/Magento/Theme/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Theme/etc/adminhtml/di.xml | 2 +- app/code/Magento/Theme/etc/di.xml | 4 +- app/code/Magento/Theme/etc/module.xml | 2 +- .../Theme/view/frontend/js/calendar.phtml | 2 +- .../Theme/view/frontend/js/cookie.phtml | 2 +- .../Theme/view/frontend/layout/default.xml | 16 +- .../frontend/layout/default_head_blocks.xml | 2 +- .../view/frontend/layout/page_calendar.xml | 4 +- .../Magento/Theme/view/frontend/link.phtml | 2 +- app/code/Magento/Translation/Block/Js.php | 4 +- .../Magento/Translation/Controller/Ajax.php | 6 +- .../Translation/Model/Inline/Config.php | 2 +- .../Translation/Model/Inline/Parser.php | 8 +- .../Translation/Model/Resource/String.php | 28 +- .../Translation/Model/Resource/Translate.php | 2 +- app/code/Magento/Translation/Model/String.php | 2 +- .../data-upgrade-1.0.0.0-1.0.0.1.php | 2 +- .../Magento/Translation/etc/adminhtml/di.xml | 8 +- app/code/Magento/Translation/etc/cache.xml | 2 +- app/code/Magento/Translation/etc/di.xml | 40 +- app/code/Magento/Translation/etc/module.xml | 2 +- .../sql/translation_setup/install-1.0.0.0.php | 26 +- app/code/Magento/Ups/Model/Carrier.php | 50 +- .../Magento/Ups/Model/Config/Source/Type.php | 2 +- app/code/Magento/Ups/etc/module.xml | 2 +- .../UrlRewrite/App/Request/RewriteService.php | 4 +- .../Magento/UrlRewrite/Helper/UrlRewrite.php | 12 +- .../UrlRewrite/Model/Resource/UrlRewrite.php | 8 +- .../Model/Resource/UrlRewrite/Collection.php | 22 +- .../Magento/UrlRewrite/Model/UrlRewrite.php | 28 +- .../Model/UrlRewrite/OptionProvider.php | 2 +- .../Model/UrlRewrite/TypeProvider.php | 2 +- .../Magento/UrlRewrite/etc/frontend/di.xml | 2 +- app/code/Magento/UrlRewrite/etc/module.xml | 2 +- .../sql/urlrewrite_setup/install-1.0.0.0.php | 28 +- app/code/Magento/User/Block/Buttons.php | 6 +- app/code/Magento/User/Block/Role/Edit.php | 10 +- .../Magento/User/Block/Role/Grid/User.php | 12 +- app/code/Magento/User/Block/Role/Tab/Edit.php | 18 +- app/code/Magento/User/Block/Role/Tab/Info.php | 2 +- .../Magento/User/Block/Role/Tab/Users.php | 4 +- app/code/Magento/User/Block/User/Edit.php | 6 +- .../Magento/User/Block/User/Edit/Form.php | 2 +- .../Magento/User/Block/User/Edit/Tab/Main.php | 20 +- .../User/Block/User/Edit/Tab/Roles.php | 12 +- .../User/Controller/Adminhtml/Auth.php | 12 +- .../User/Controller/Adminhtml/User.php | 12 +- .../User/Controller/Adminhtml/User/Role.php | 10 +- app/code/Magento/User/Helper/Data.php | 6 +- .../Magento/User/Model/Acl/Loader/Role.php | 6 +- .../Magento/User/Model/Acl/Loader/Rule.php | 10 +- .../Model/Resource/Permissions/Collection.php | 2 +- app/code/Magento/User/Model/Resource/Role.php | 22 +- .../User/Model/Resource/Role/Collection.php | 2 +- .../Model/Resource/Role/User/Collection.php | 2 +- .../Magento/User/Model/Resource/Rules.php | 36 +- .../User/Model/Resource/Rules/Collection.php | 2 +- .../Magento/User/Model/Resource/Setup.php | 8 +- app/code/Magento/User/Model/Resource/User.php | 62 +- .../User/Model/Resource/User/Collection.php | 2 +- .../Model/Resource/User/Locked/Collection.php | 2 +- app/code/Magento/User/Model/Role.php | 10 +- app/code/Magento/User/Model/Rules.php | 10 +- app/code/Magento/User/Model/User.php | 74 +- .../data-upgrade-1.6.1.1-1.6.1.2.php | 4 +- .../data-upgrade-1.6.1.3-1.6.1.4.php | 4 +- .../data-upgrade-1.6.1.4-1.6.1.5.php | 4 +- app/code/Magento/User/etc/adminhtml/acl.xml | 2 +- app/code/Magento/User/etc/adminhtml/di.xml | 2 +- app/code/Magento/User/etc/di.xml | 12 +- app/code/Magento/User/etc/module.xml | 2 +- .../User/sql/user_setup/install-1.6.0.0.php | 72 +- .../user_setup/upgrade-1.6.0.0-1.6.1.0.php | 6 +- .../user_setup/upgrade-1.6.1.0-1.6.1.1.php | 2 +- .../user_setup/upgrade-1.6.1.2-1.6.1.3.php | 4 +- .../user_setup/upgrade-1.6.1.3-1.6.1.4.php | 6 +- .../user_setup/upgrade-1.6.1.4-1.6.1.5.php | 4 +- .../user_setup/upgrade-1.6.1.5-1.6.1.6.php | 4 +- .../Tab/General/Shipping/Packaging/Plugin.php | 8 +- app/code/Magento/Usps/Model/Carrier.php | 52 +- app/code/Magento/Usps/etc/adminhtml/di.xml | 2 +- app/code/Magento/Usps/etc/module.xml | 2 +- .../Activate/Permissions/Tab/Webapi.php | 20 +- .../Adminhtml/Integration/Edit/Tab/Webapi.php | 20 +- .../Webapi/Controller/ErrorProcessor.php | 89 +- .../Magento/Webapi/Controller/Request.php | 4 +- app/code/Magento/Webapi/Controller/Rest.php | 78 +- .../Webapi/Controller/Rest/Request.php | 4 +- .../Rest/Request/Deserializer/Factory.php | 6 +- .../Rest/Request/Deserializer/Xml.php | 6 +- .../Webapi/Controller/Rest/Response.php | 21 +- .../Rest/Response/Renderer/Factory.php | 6 +- .../Controller/Rest/Response/Renderer/Xml.php | 12 +- .../Controller/ServiceArgsSerializer.php | 2 +- app/code/Magento/Webapi/Controller/Soap.php | 20 +- .../Controller/Soap/Request/Handler.php | 10 +- app/code/Magento/Webapi/Exception.php | 39 +- app/code/Magento/Webapi/Helper/Data.php | 8 +- app/code/Magento/Webapi/Model/Cache/Type.php | 2 +- .../Webapi/Model/Cache/TypeIntegration.php | 2 +- app/code/Magento/Webapi/Model/Config.php | 2 +- .../Magento/Webapi/Model/Config/Converter.php | 2 +- .../Model/Config/Integration/Converter.php | 2 +- .../Model/Config/Integration/Reader.php | 12 +- .../Config/Integration/SchemaLocator.php | 6 +- .../Magento/Webapi/Model/Config/Reader.php | 12 +- .../Webapi/Model/Config/SchemaLocator.php | 6 +- .../Magento/Webapi/Model/PathProcessor.php | 4 +- .../Model/Plugin/AuthorizationServiceV1.php | 2 +- .../Magento/Webapi/Model/Plugin/Setup.php | 2 +- app/code/Magento/Webapi/Model/Rest/Config.php | 6 +- app/code/Magento/Webapi/Model/Soap/Config.php | 8 +- app/code/Magento/Webapi/Model/Soap/Fault.php | 47 +- app/code/Magento/Webapi/Model/Soap/Server.php | 12 +- .../Webapi/Model/Soap/Server/Factory.php | 6 +- .../Webapi/Model/Soap/Wsdl/Factory.php | 6 +- .../Webapi/Model/Soap/Wsdl/Generator.php | 15 +- app/code/Magento/Webapi/ServiceException.php | 2 +- app/code/Magento/Webapi/etc/cache.xml | 2 +- app/code/Magento/Webapi/etc/di.xml | 8 +- app/code/Magento/Webapi/etc/frontend/di.xml | 2 +- app/code/Magento/Webapi/etc/module.xml | 2 +- .../Magento/Webapi/etc/webapi_rest/di.xml | 6 +- .../Magento/Webapi/etc/webapi_soap/di.xml | 4 +- .../sql/webapi_setup/install-1.0.0.0.php | 58 +- .../webapi_setup/upgrade-1.0.0.0-1.0.0.1.php | 4 +- .../webapi_setup/upgrade-1.0.0.1-1.0.0.2.php | 32 +- .../webapi_setup/upgrade-1.0.0.2-1.0.0.3.php | 4 +- .../webapi_setup/upgrade-1.0.0.3-1.0.0.4.php | 2 +- .../Magento/Weee/Block/Element/Weee/Tax.php | 2 +- .../Magento/Weee/Block/Renderer/Weee/Tax.php | 12 +- app/code/Magento/Weee/Helper/Data.php | 38 +- .../Weee/Model/Attribute/Backend/Weee/Tax.php | 6 +- .../Weee/Model/Config/Source/Display.php | 2 +- app/code/Magento/Weee/Model/Observer.php | 60 +- .../Resource/Attribute/Backend/Weee/Tax.php | 2 +- app/code/Magento/Weee/Model/Resource/Tax.php | 12 +- app/code/Magento/Weee/Model/Tax.php | 24 +- app/code/Magento/Weee/Pricing/Adjustment.php | 4 +- .../Weee/Pricing/Render/Adjustment.php | 16 +- .../Magento/Weee/etc/adminhtml/events.xml | 2 +- app/code/Magento/Weee/etc/di.xml | 8 +- app/code/Magento/Weee/etc/events.xml | 2 +- app/code/Magento/Weee/etc/fieldset.xml | 2 +- app/code/Magento/Weee/etc/module.xml | 2 +- .../Weee/sql/weee_setup/install-1.6.0.0.php | 52 +- .../view/frontend/pricing/adjustment.phtml | 2 +- .../Widget/Block/Adminhtml/Widget/Chooser.php | 22 +- .../Widget/Block/Adminhtml/Widget/Form.php | 10 +- .../Block/Adminhtml/Widget/Instance/Edit.php | 6 +- .../Instance/Edit/Chooser/Container.php | 16 +- .../Edit/Chooser/DesignAbstraction.php | 18 +- .../Widget/Instance/Edit/Chooser/Layout.php | 14 +- .../Widget/Instance/Edit/Chooser/Template.php | 2 +- .../Adminhtml/Widget/Instance/Edit/Form.php | 2 +- .../Widget/Instance/Edit/Tab/Main.php | 18 +- .../Widget/Instance/Edit/Tab/Main/Layout.php | 6 +- .../Widget/Instance/Edit/Tab/Properties.php | 4 +- .../Widget/Instance/Edit/Tab/Settings.php | 20 +- .../Widget/Block/Adminhtml/Widget/Options.php | 34 +- .../Magento/Widget/Block/BlockInterface.php | 2 +- .../Widget/Controller/Adminhtml/Widget.php | 8 +- .../Controller/Adminhtml/Widget/Instance.php | 26 +- .../Magento/Widget/Model/Config/Converter.php | 2 +- app/code/Magento/Widget/Model/Config/Data.php | 2 +- .../Widget/Model/Config/FileResolver.php | 18 +- .../Magento/Widget/Model/Config/Reader.php | 16 +- .../Widget/Model/Config/SchemaLocator.php | 6 +- .../Widget/Model/NamespaceResolver.php | 10 +- .../Magento/Widget/Model/Resource/Widget.php | 2 +- .../Widget/Model/Resource/Widget/Instance.php | 6 +- .../Resource/Widget/Instance/Collection.php | 2 +- .../Widget/Instance/Options/ThemeId.php | 2 +- .../Widget/Instance/Options/Types.php | 2 +- .../Magento/Widget/Model/Template/Filter.php | 24 +- app/code/Magento/Widget/Model/Widget.php | 38 +- .../Magento/Widget/Model/Widget/Config.php | 10 +- .../Magento/Widget/Model/Widget/Instance.php | 44 +- .../Model/Widget/Instance/OptionsFactory.php | 8 +- .../data-upgrade-1.6.0.0-1.6.0.1.php | 6 +- app/code/Magento/Widget/etc/adminhtml/acl.xml | 2 +- app/code/Magento/Widget/etc/adminhtml/di.xml | 2 +- app/code/Magento/Widget/etc/di.xml | 2 +- app/code/Magento/Widget/etc/module.xml | 2 +- .../sql/widget_setup/install-1.6.0.0.php | 68 +- .../widget_setup/upgrade-1.6.0.1-1.6.0.2.php | 8 +- .../Magento/Wishlist/Block/AbstractBlock.php | 2 +- .../Wishlist/Block/Customer/Sharing.php | 12 +- .../Wishlist/Block/Customer/Sidebar.php | 2 +- .../Wishlist/Block/Customer/Wishlist.php | 6 +- .../Block/Customer/Wishlist/Button.php | 6 +- .../Block/Customer/Wishlist/Items.php | 6 +- .../Magento/Wishlist/Block/Item/Configure.php | 12 +- app/code/Magento/Wishlist/Block/Link.php | 6 +- .../Wishlist/Block/Share/Email/Rss.php | 2 +- .../Controller/AbstractController.php | 8 +- .../Magento/Wishlist/Controller/Index.php | 70 +- .../Magento/Wishlist/Controller/Shared.php | 10 +- app/code/Magento/Wishlist/Helper/Data.php | 6 +- .../Wishlist/Model/Config/Source/Summary.php | 2 +- app/code/Magento/Wishlist/Model/Item.php | 70 +- .../Magento/Wishlist/Model/Item/Option.php | 2 +- app/code/Magento/Wishlist/Model/Observer.php | 36 +- .../Magento/Wishlist/Model/Resource/Item.php | 2 +- .../Model/Resource/Item/Collection.php | 28 +- .../Model/Resource/Item/Collection/Grid.php | 26 +- .../Wishlist/Model/Resource/Item/Option.php | 2 +- .../Model/Resource/Item/Option/Collection.php | 2 +- .../Wishlist/Model/Resource/Wishlist.php | 4 +- .../Model/Resource/Wishlist/Collection.php | 2 +- app/code/Magento/Wishlist/Model/Wishlist.php | 55 +- .../Magento/Wishlist/etc/adminhtml/acl.xml | 2 +- .../Magento/Wishlist/etc/adminhtml/di.xml | 6 +- app/code/Magento/Wishlist/etc/di.xml | 2 +- app/code/Magento/Wishlist/etc/events.xml | 2 +- app/code/Magento/Wishlist/etc/frontend/di.xml | 8 +- .../Magento/Wishlist/etc/frontend/events.xml | 2 +- app/code/Magento/Wishlist/etc/module.xml | 2 +- app/code/Magento/Wishlist/etc/view.xml | 2 +- .../sql/wishlist_setup/install-1.6.0.0.php | 60 +- .../customer/edit/tab/wishlist.phtml | 2 +- .../layout/customer_index_wishlist.xml | 2 +- .../view/frontend/layout/customer_account.xml | 2 +- .../Magento_Backend/layout/default.xml | 2 +- .../adminhtml/Magento/backend/theme.xml | 2 +- .../Magento_Checkout/css/source/module.less | 7 + .../layout/checkout_cart_index.xml | 2 +- .../Magento_Theme/css/source/module.less | 4 + app/design/frontend/Magento/blank/theme.xml | 2 +- app/design/frontend/Magento/blank/view.xml | 2 +- .../layout/checkout_cart_index.xml | 2 +- .../plushe/Magento_Theme/layout/default.xml | 2 +- app/design/frontend/Magento/plushe/theme.xml | 2 +- app/design/frontend/Magento/plushe/view.xml | 2 +- app/design/install/Magento/basic/theme.xml | 2 +- app/etc/di.xml | 247 +- app/etc/local.xml.template | 2 +- app/functions.php | 11 +- dev/shell/indexer.php | 2 - dev/shell/log.php | 2 - dev/shell/newindexer.php | 2 - .../etc/local-mysql.travis.xml.dist | 52 + .../TestFramework/Annotation/AppArea.php | 8 +- .../TestFramework/Annotation/AppIsolation.php | 4 +- .../TestFramework/Annotation/DataFixture.php | 12 +- .../TestFramework/Annotation/DbIsolation.php | 4 +- .../Magento/TestFramework/Application.php | 42 +- .../Magento/TestFramework/Bootstrap.php | 20 +- .../TestFramework/Bootstrap/Profiler.php | 10 +- .../TestFramework/Bootstrap/Settings.php | 4 +- .../Magento/TestFramework/Cookie.php | 2 +- .../Magento/TestFramework/Db/AbstractDb.php | 10 +- .../TestFramework/Db/Adapter/Mysql.php | 2 +- .../TestFramework/Db/ConnectionAdapter.php | 2 +- .../Magento/TestFramework/Db/Mysql.php | 6 +- .../Magento/TestFramework/Entity.php | 8 +- .../Magento/TestFramework/Event/Magento.php | 4 +- .../Magento/TestFramework/Event/PhpUnit.php | 4 +- .../TestFramework/Event/Transaction.php | 4 +- .../Magento/TestFramework/Helper/Api.php | 8 +- .../TestFramework/Helper/Bootstrap.php | 16 +- .../Magento/TestFramework/Helper/Config.php | 2 +- .../Magento/TestFramework/Helper/Memory.php | 8 +- .../TestFramework/Interception/PluginList.php | 34 +- .../Mail/Template/TransportBuilderMock.php | 54 + .../Mail/TransportInterfaceMock.php | 39 + .../Magento/TestFramework/ObjectManager.php | 29 +- .../TestFramework/ObjectManager/Config.php | 2 +- .../ObjectManager/Configurator.php | 4 +- .../TestFramework/ObjectManagerFactory.php | 23 +- .../TestFramework/Profiler/OutputBamboo.php | 14 +- .../TestCase/AbstractConfigFiles.php | 12 +- .../TestCase/AbstractController.php | 18 +- .../TestCase/AbstractIntegrity.php | 2 +- .../Magento/TestFramework/View/Layout.php | 2 +- .../Workaround/Cleanup/StaticProperties.php | 2 +- dev/tests/integration/framework/bootstrap.php | 11 +- .../tests/unit/framework/bootstrap.php | 2 +- .../Magento/Test/Annotation/AppAreaTest.php | 2 +- .../Test/Annotation/AppIsolationTest.php | 4 +- .../Test/Annotation/DataFixtureTest.php | 4 +- .../Test/Annotation/DbIsolationTest.php | 4 +- .../Magento/Test/ApplicationTest.php | 14 +- .../Magento/Test/Bootstrap/DocBlockTest.php | 2 +- .../Magento/Test/Bootstrap/ProfilerTest.php | 6 +- .../Magento/Test/Bootstrap/SettingsTest.php | 2 +- .../testsuite/Magento/Test/BootstrapTest.php | 6 +- .../testsuite/Magento/Test/EntityTest.php | 10 +- .../Magento/Test/Event/MagentoTest.php | 2 +- .../Magento/Test/Event/PhpUnitTest.php | 2 +- .../Magento/Test/Helper/BootstrapTest.php | 4 +- .../Magento/Test/Helper/MemoryTest.php | 4 +- .../Magento/Test/ObjectManagerTest.php | 27 +- .../Test/Profiler/OutputBambooTest.php | 2 +- .../testsuite/Magento/Test/ResponseTest.php | 2 +- .../Test/TestCase/ControllerAbstractTest.php | 28 +- dev/tests/integration/phpunit.xml.dist | 9 +- .../Block/Directpost/IframeTest.php | 2 +- .../Authz/Service/AuthorizationV1Test.php | 2 +- .../Backend/App/AbstractActionTest.php | 12 +- .../Backend/App/Router/DefaultRouterTest.php | 6 +- .../Backend/Block/Dashboard/GraphTest.php | 4 +- .../Magento/Backend/Block/Page/HeadTest.php | 2 +- .../Magento/Backend/Block/Page/HeaderTest.php | 2 +- .../Block/System/Account/Edit/FormTest.php | 10 +- .../Backend/Block/System/Config/FormStub.php | 2 +- .../Backend/Block/System/Config/FormTest.php | 38 +- .../System/Design/Edit/Tab/GeneralTest.php | 8 +- .../Backend/Block/System/Store/DeleteTest.php | 8 +- .../System/Store/Edit/Form/GroupTest.php | 12 +- .../System/Store/Edit/Form/StoreTest.php | 12 +- .../System/Store/Edit/Form/WebsiteTest.php | 12 +- .../Backend/Block/System/Store/EditTest.php | 20 +- .../Block/System/Variable/EditTest.php | 4 +- .../Magento/Backend/Block/TemplateTest.php | 2 +- .../Urlrewrite/Catalog/Category/EditTest.php | 4 +- .../Urlrewrite/Catalog/Category/TreeTest.php | 4 +- .../Urlrewrite/Catalog/Edit/FormTest.php | 24 +- .../Urlrewrite/Catalog/Product/EditTest.php | 4 +- .../Urlrewrite/Catalog/Product/GridTest.php | 4 +- .../Urlrewrite/Cms/Page/Edit/FormTest.php | 8 +- .../Block/Urlrewrite/Cms/Page/EditTest.php | 4 +- .../Block/Urlrewrite/Cms/Page/GridTest.php | 6 +- .../Block/Urlrewrite/Edit/FormTest.php | 30 +- .../Backend/Block/Urlrewrite/EditTest.php | 4 +- .../Backend/Block/Widget/ContainerTest.php | 6 +- .../Block/Widget/Form/ContainerTest.php | 8 +- .../Magento/Backend/Block/Widget/FormTest.php | 8 +- .../Block/Widget/Grid/ColumnSetTest.php | 6 +- .../Block/Widget/Grid/ContainerTest.php | 2 +- .../Block/Widget/Grid/ExtendedTest.php | 4 +- .../Backend/Block/Widget/Grid/ItemTest.php | 8 +- .../Widget/Grid/Massaction/AdditionalTest.php | 8 +- .../Block/Widget/Grid/MassactionTest.php | 6 +- .../Magento/Backend/Block/Widget/GridTest.php | 18 +- .../Magento/Backend/Block/Widget/TabsTest.php | 8 +- .../Magento/Backend/Block/WidgetTest.php | 4 +- .../Backend/Block/_files/backend_theme.php | 2 +- .../layout_test_grid_handle.xml | 2 +- .../Controller/Adminhtml/CacheTest.php | 6 +- .../Adminhtml/System/AccountTest.php | 3 +- .../Controller/Adminhtml/System/StoreTest.php | 8 +- .../Magento/Backend/Helper/DataTest.php | 4 +- .../Backend/Model/Auth/SessionTest.php | 4 +- .../Magento/Backend/Model/AuthTest.php | 2 +- .../Model/Config/Backend/Admin/RobotsTest.php | 2 +- .../Model/Config/Backend/BaseurlTest.php | 2 +- .../Config/Backend/Image/AdapterTest.php | 4 +- .../Magento/Backend/Model/ConfigTest.php | 4 +- .../Backend/Model/Locale/ResolverTest.php | 14 +- .../Magento/Backend/Model/MenuTest.php | 2 +- .../Magento/Backend/Model/ObserverTest.php | 8 +- .../Backend/Model/Session/QuoteTest.php | 2 +- .../Magento/Backend/Model/SessionTest.php | 2 +- .../Backend/Model/Translate/InlineTest.php | 8 +- .../Magento/Backend/Model/UrlTest.php | 12 +- .../Backend/Model/_files/no_robots_txt.php | 2 +- .../Backend/Model/_files/robots_txt.php | 2 +- .../Magento/Backend/Utility/Controller.php | 2 +- .../_files/cache/non_application_cache.php | 2 +- .../Tab/Bundle/Option/Search/GridTest.php | 4 +- .../Edit/Tab/Bundle/Option/SearchTest.php | 4 +- .../Magento/Bundle/Controller/ProductTest.php | 2 +- .../Adminhtml/Captcha/DefaultCaptchaTest.php | 2 +- .../Captcha/Block/Captcha/DefaultTest.php | 2 +- .../Magento/Captcha/Model/ObserverTest.php | 2 +- .../Product/Attribute/Set/Toolbar/AddTest.php | 10 +- .../Product/Edit/Tab/Options/OptionTest.php | 2 +- .../Edit/Tab/Options/Type/SelectTest.php | 6 +- .../Block/Adminhtml/Product/Edit/TabsTest.php | 10 +- .../Block/Adminhtml/Product/EditTest.php | 4 +- .../Product/Helper/Form/CategoryTest.php | 6 +- .../Helper/Form/Gallery/ContentTest.php | 6 +- .../Product/Helper/Form/WeightTest.php | 6 +- .../Adminhtml/Product/Options/AjaxTest.php | 4 +- .../Catalog/Block/Product/AbstractTest.php | 12 +- .../Catalog/Block/Product/ListTest.php | 8 +- .../Magento/Catalog/Block/Product/NewTest.php | 12 +- .../Product/ProductList/CrosssellTest.php | 8 +- .../Block/Product/ProductList/RelatedTest.php | 8 +- .../Block/Product/ProductList/ToolbarTest.php | 10 +- .../Catalog/Block/Product/SendTest.php | 2 +- .../Block/Product/View/AdditionalTest.php | 14 +- .../Block/Product/View/OptionsTest.php | 6 +- .../Catalog/Block/Product/ViewTest.php | 14 +- .../Controller/Adminhtml/CategoryTest.php | 4 +- .../Product/Action/AttributeTest.php | 2 +- .../Adminhtml/Product/AttributeTest.php | 6 +- .../Controller/Adminhtml/ProductTest.php | 8 +- .../Catalog/Controller/CategoryTest.php | 6 +- .../Controller/Product/CompareTest.php | 67 +- .../Catalog/Controller/ProductTest.php | 6 +- .../Magento/Catalog/Helper/CategoryTest.php | 8 +- .../Magento/Catalog/Helper/DataTest.php | 26 +- .../Magento/Catalog/Helper/ImageTest.php | 4 +- .../Catalog/Helper/Product/CompositeTest.php | 8 +- .../Catalog/Helper/Product/ViewTest.php | 12 +- .../Magento/Catalog/Helper/ProductTest.php | 14 +- .../Model/Category/CategoryImageTest.php | 5 +- .../_files/category_without_image.php | 2 +- .../Magento/Catalog/Model/CategoryTest.php | 2 +- .../Catalog/Model/CategoryTreeTest.php | 4 +- .../Magento/Catalog/Model/DesignTest.php | 6 +- .../Catalog/Model/Layer/CategoryTest.php | 12 +- .../Model/Layer/Filter/AttributeTest.php | 8 +- .../Model/Layer/Filter/CategoryTest.php | 12 +- .../Model/Layer/Filter/DecimalTest.php | 12 +- .../Catalog/Model/Layer/Filter/ItemTest.php | 6 +- .../Filter/Price/AlgorithmAdvancedTest.php | 6 +- .../Layer/Filter/Price/AlgorithmBaseTest.php | 2 +- .../Catalog/Model/Layer/Filter/PriceTest.php | 17 +- .../Product/Attribute/Backend/MediaTest.php | 4 +- .../Attribute/Backend/TierpriceTest.php | 10 +- .../Model/Product/Compare/ListCompareTest.php | 5 +- .../Catalog/Model/Product/ImageTest.php | 2 +- .../Model/Product/Type/AbstractTest.php | 50 +- .../Catalog/Model/Product/Type/PriceTest.php | 2 +- .../Catalog/Model/Product/TypeTest.php | 4 +- .../Magento/Catalog/Model/Product/UrlTest.php | 2 +- .../Catalog/Model/ProductExternalTest.php | 17 +- .../Catalog/Model/ProductGettersTest.php | 6 +- .../Magento/Catalog/Model/ProductTest.php | 12 +- .../Magento/Catalog/Model/UrlTest.php | 12 +- .../Catalog/_files/product_image_rollback.php | 2 +- .../Catalog/controllers/_files/products.php | 2 +- .../CatalogInventory/Model/Stock/ItemTest.php | 4 +- .../Promo/Catalog/Edit/Tab/MainTest.php | 6 +- .../_files/catalog_rule_10_off_not_logged.php | 21 +- .../Block/Advanced/ResultTest.php | 14 +- .../CatalogSearch/Block/ResultTest.php | 10 +- .../Magento/CatalogSearch/Block/TermTest.php | 4 +- .../CatalogSearch/Controller/ResultTest.php | 2 +- .../Magento/CatalogSearch/Helper/DataTest.php | 6 +- .../Checkout/Block/Cart/Item/RendererTest.php | 7 +- .../Checkout/Block/Cart/SidebarTest.php | 4 +- .../Magento/Checkout/Block/CartTest.php | 26 +- .../Checkout/Block/Onepage/BillingTest.php | 2 +- .../Block/Onepage/Payment/MethodsTest.php | 4 +- .../Magento/Checkout/Controller/CartTest.php | 12 +- .../Checkout/Controller/OnepageTest.php | 2 +- .../Checkout/Model/Type/OnepageTest.php | 2 +- .../Magento/Checkout/_files/cart.php | 10 +- .../Checkout/_files/discount_10percent.php | 2 +- .../Checkout/_files/product_bundle.php | 2 +- .../_files/product_with_custom_option.php | 2 +- .../_files/quote_with_bundle_product.php | 2 +- .../quote_with_check_payment_rollback.php | 2 +- .../quote_with_downloadable_product.php | 2 +- .../_files/quote_with_simple_product.php | 2 +- ..._with_simple_product_and_custom_option.php | 2 +- .../Adminhtml/Page/Edit/Tab/DesignTest.php | 6 +- .../testsuite/Magento/Cms/Block/BlockTest.php | 2 +- .../Magento/Cms/Block/Widget/BlockTest.php | 2 +- .../Magento/Cms/Controller/RouterTest.php | 14 +- .../testsuite/Magento/Cms/Helper/PageTest.php | 4 +- .../Magento/Cms/Model/Wysiwyg/ConfigTest.php | 4 +- .../Cms/Model/Wysiwyg/Images/StorageTest.php | 10 +- .../Edit/Tab/Super/Config/MatrixTest.php | 8 +- .../Product/Edit/Tab/Super/ConfigTest.php | 11 +- .../Product/Edit/Tab/Super/SettingsTest.php | 6 +- .../Backend/Grid/ColumnSetTest.php | 8 +- .../Product/View/Type/ConfigurableTest.php | 2 +- .../Controller/Adminhtml/ProductTest.php | 2 +- .../Controller/CartTest.php | 2 +- .../Type/Configurable/AttributeTest.php | 4 +- .../Model/Product/Type/ConfigurableTest.php | 18 +- .../Collection/AssociatedProductTest.php | 4 +- .../quote_with_configurable_product.php | 2 +- .../Magento/Core/Model/App/EmulationTest.php | 4 +- .../Magento/Core/Model/DataSource.php | 2 +- .../Model/Design/Backend/ExceptionsTest.php | 2 +- .../Magento/Core/Model/DesignTest.php | 21 +- .../Magento/Core/Model/ObserverTest.php | 13 +- .../Core/Model/Resource/HelperTest.php | 6 +- .../Core/Model/Resource/Layout/UpdateTest.php | 4 +- .../Model/Resource/Theme/CollectionTest.php | 26 +- .../Magento/Core/Model/TemplateTest.php | 2 +- .../Core/Model/Theme/CollectionTest.php | 8 +- .../Core/Model/Theme/Domain/VirtualTest.php | 26 +- .../Magento/Core/Model/Theme/FileTest.php | 4 +- .../Core/Model/Theme/RegistrationTest.php | 22 +- .../Core/Model/Theme/Source/ThemeTest.php | 2 +- .../_files/design/frontend/a_d/theme.xml | 2 +- .../_files/design/frontend/b_e/theme.xml | 2 +- .../design/frontend/magento_default/theme.xml | 2 +- .../design/frontend/magento_g/theme.xml | 2 +- .../Magento/Core/Model/ThemeTest.php | 19 +- .../Core/Model/Validator/FactoryTest.php | 6 +- .../Magento/Core/Model/View/DesignTest.php | 38 +- .../design/adminhtml/vendor_test/theme.xml | 2 +- .../area_two/vendor_theme_one/theme.xml | 2 +- .../design_area/vendor_theme_one/theme.xml | 2 +- .../design/frontend/magento_default/theme.xml | 2 +- .../frontend/magento_default_iphone/theme.xml | 2 +- .../layout_test_handle.xml | 2 +- .../frontend/test_cache_test_theme/theme.xml | 2 +- .../Magento_Core/layout_test_handle_main.xml | 2 +- .../layout_test_handle_sample.xml | 6 +- .../design/frontend/test_default/theme.xml | 2 +- .../design/frontend/test_default/view.xml | 2 +- .../frontend/test_publication/theme.xml | 2 +- .../test_test_theme/layout_test_handle.xml | 2 +- .../design/frontend/test_test_theme/theme.xml | 2 +- .../frontend/vendor_custom_theme/theme.xml | 2 +- .../design/frontend/vendor_default/theme.xml | 2 +- .../Core/Model/_files/design/themes.php | 2 +- .../Magento/Core/_files/design_change.php | 2 +- .../Magento/Core/_files/etc/module.xml | 2 +- .../Magento/Core/_files/layout_update.php | 10 +- .../Magento/Core/_files/media_for_change.php | 2 +- .../Core/_files/media_for_change_rollback.php | 4 +- .../Magento/Cron/Model/ObserverTest.php | 2 +- .../_files/cache/lib/oyejorge.less | 1 - .../Block/Account/Dashboard/AddressTest.php | 8 +- .../Block/Account/Dashboard/HelloTest.php | 2 +- .../Block/Account/Dashboard/InfoTest.php | 2 +- .../Account/Dashboard/NewsletterTest.php | 2 +- .../Customer/Block/Account/DashboardTest.php | 2 +- .../Customer/Block/Address/BookTest.php | 6 +- .../Customer/Block/Address/EditTest.php | 4 +- .../Edit/Renderer/Attribute/GroupTest.php | 2 +- .../Block/Adminhtml/Edit/Tab/AccountTest.php | 8 +- .../Adminhtml/Edit/Tab/AddressesTest.php | 46 +- .../Block/Adminhtml/Edit/Tab/CartTest.php | 16 +- .../Block/Adminhtml/Edit/Tab/CartsTest.php | 6 +- .../Adminhtml/Edit/Tab/NewsletterTest.php | 6 +- .../Block/Adminhtml/Edit/Tab/OrdersTest.php | 8 +- .../Adminhtml/Edit/Tab/View/AccordionTest.php | 8 +- .../Adminhtml/Edit/Tab/View/CartTest.php | 8 +- .../Adminhtml/Edit/Tab/View/OrdersTest.php | 8 +- .../Adminhtml/Edit/Tab/View/SalesTest.php | 6 +- .../Block/Adminhtml/Edit/Tab/ViewTest.php | 16 +- .../Block/Adminhtml/Edit/TabsTest.php | 6 +- .../Customer/Block/Adminhtml/EditTest.php | 6 +- .../Block/Adminhtml/Group/Edit/FormTest.php | 16 +- .../Block/Adminhtml/Group/EditTest.php | 16 +- .../Customer/Block/Adminhtml/OnlineTest.php | 4 +- .../Customer/Block/Widget/GenderTest.php | 2 +- .../Customer/Block/Widget/NameTest.php | 2 +- .../Customer/Controller/AccountTest.php | 12 +- .../Customer/Controller/AddressTest.php | 22 +- .../Controller/Adminhtml/GroupTest.php | 184 +- .../Controller/Adminhtml/IndexTest.php | 74 +- .../Customer/Model/AddressRegistryTest.php | 4 +- .../Customer/Model/CustomerRegistryTest.php | 16 +- .../Customer/Model/GroupRegistryTest.php | 4 +- .../ImportExport/Export}/AddressTest.php | 17 +- .../ImportExport/Export}/CustomerTest.php | 17 +- .../ImportExport/Import}/AddressTest.php | 53 +- .../Import}/CustomerCompositeTest.php | 14 +- .../ImportExport/Import/CustomerTest.php | 288 ++ .../Import}/_files/address_import_delete.csv | 0 .../Import}/_files/address_import_update.csv | 0 .../_files/customer_composite_delete.csv | 0 .../_files/customer_composite_update.csv | 0 .../Import}/_files/customers_to_import.csv | 0 .../Group/Grid/ServiceCollectionTest.php | 4 +- .../Service/V1/CustomerAccountServiceTest.php | 615 ++- .../Service/V1/CustomerAddressServiceTest.php | 92 +- .../Service/V1/CustomerGroupServiceTest.php | 12 +- .../V1/CustomerMetadataServiceTest.php | 19 +- .../Service/V1/Data/AddressBuilderTest.php | 2 +- .../Service/V1/Data/CustomerBuilderTest.php | 7 - .../V1/Data/CustomerDetailsBuilderTest.php | 2 +- .../Data/Eav/AttributeMetadataBuilderTest.php | 2 +- .../customer_non_default_website_id.php | 107 + .../Customer/_files/customer_sample.php | 2 +- .../_files/customer_two_addresses.php | 2 +- .../_files/import_export}/customer.php | 7 +- .../customer_with_addresses.php | 9 +- .../_files/import_export}/customers.php | 9 +- .../customers_for_address_import.php | 3 - .../Adminhtml/System/Design/EditorTest.php | 2 +- .../Model/Config/QuickStylesTest.php | 11 +- .../Tools/Controls/ConfigurationTest.php | 11 +- .../DesignEditor/Model/ObserverTest.php | 34 +- .../DesignEditor/Model/Theme/ChangeTest.php | 6 +- .../Model/Translate/InlineTest.php | 2 +- .../design/frontend/vendor_test/theme.xml | 2 +- .../design/frontend/vendor_test/view.xml | 2 +- .../frontend/vendor_test_child/theme.xml | 2 +- .../frontend/vendor_test_child/view.xml | 2 +- .../Model/_files/design/themes.php | 4 +- .../_files/design_editor_active.php | 8 +- .../Dhl/Block/Adminhtml/UnitofmeasureTest.php | 6 +- .../Edit/Tab/Downloadable/LinksTest.php | 26 +- .../Edit/Tab/Downloadable/SamplesTest.php | 20 +- .../Block/Catalog/Product/LinksTest.php | 6 +- .../Downloadable/Controller/ProductTest.php | 2 +- .../Attribute/Edit/Main/AbstractTest.php | 10 +- .../Email/Model/Template/FilterTest.php | 10 +- .../Magento/Email/Model/TemplateTest.php | 22 +- .../design/adminhtml/test_default/theme.xml | 2 +- .../layout/email_template_test_handle.xml | 4 +- .../design/frontend/test_default/theme.xml | 2 +- .../Magento/Email/Model/_files/themes.php | 2 +- .../Model => Framework}/App/AreaTest.php | 34 +- .../Framework/App/Cache/State/OptionsTest.php | 2 +- .../FrontController/Plugin/InstallTest.php | 12 +- .../Framework/App/FrontControllerTest.php | 2 +- .../Cache/Backend/MongoDbTest.php | 8 +- .../{ => Framework}/Cache/CoreTest.php | 12 +- .../{ => Framework}/Code/GeneratorTest.php | 49 +- .../ParentClassWithNamespace.php | 2 +- .../SourceClassWithNamespace.php | 2 +- .../SourceClassWithNamespaceFactory.php | 12 +- .../SourceClassWithNamespaceInterceptor.php | 28 +- .../SourceClassWithNamespaceProxy.php | 16 +- .../Css/PreProcessor/Adapter/OyejorgeTest.php | 4 +- .../Css/PreProcessor/CacheTest.php | 30 +- .../_files/cache/lib/nested/import.less | 0 .../_files/cache/lib/oyejorge.less | 1 + .../PreProcessor/_files/nested/import.less | 0 .../Css/PreProcessor/_files/oyejorge.css | 0 .../Css/PreProcessor/_files/oyejorge.less | 2 +- .../DB/Adapter/InterfaceTest.php | 14 +- .../DB/Adapter/Pdo/MysqlTest.php | 12 +- .../{ => Framework}/DB/TransactionTest.php | 7 +- .../Data/Argument/Interpreter/StringTest.php | 10 +- .../Data/Form/Element/FieldsetTest.php | 12 +- .../{ => Framework}/Encryption/ModelTest.php | 8 +- .../Exception/NoSuchEntityExceptionTest.php | 60 + .../Magento/{ => Framework}/File/SizeTest.php | 7 +- .../Filesystem/Directory/ReadTest.php | 16 +- .../Filesystem/Directory/WriteTest.php | 16 +- .../Filesystem/Driver/FileTest.php | 10 +- .../Filesystem/File/ReadTest.php | 10 +- .../Filesystem/File/WriteTest.php | 14 +- .../Filesystem/FilesystemTest.php | 12 +- .../Filesystem/_files/data.csv | 0 .../_files/foo/bar/baz/file_one.txt | 0 .../Filesystem/_files/foo/bar/file_two.txt | 0 .../Filesystem/_files/foo/file_three.txt | 0 .../Filesystem/_files/popup.csv | 0 .../Gdata/Gshopping/ContentTest.php | 8 +- .../{ => Framework}/HTTP/HeaderTest.php | 6 +- .../HTTP/PhpEnvironment/RemoteAddressTest.php | 6 +- .../HTTP/PhpEnvironment/ServerAddressTest.php | 6 +- .../Image/Adapter/ConfigTest.php | 7 +- .../Image/Adapter/InterfaceTest.php | 54 +- .../Image/_files/image_adapters_test.png | Bin .../Image/_files/magento_thumbnail.jpg | Bin .../Image/_files/watermark.gif | Bin .../Image/_files/watermark.jpg | Bin .../Image/_files/watermark.png | Bin .../Interception/Fixture/Intercepted.php | 2 +- .../Fixture/Intercepted/InterfacePlugin.php | 4 +- .../Fixture/Intercepted/Plugin.php | 4 +- .../Fixture/InterceptedInterface.php | 2 +- .../Fixture/InterceptedParent.php | 2 +- .../Fixture/InterceptedParentInterface.php | 2 +- .../Interception/GeneralTest.php | 71 +- .../Less/File/Source/AggregatedTest.php | 24 +- .../{ => Framework}/Less/PreProcessorTest.php | 38 +- .../code/Magento/Other/view/frontend/3.less | 0 .../code/Magento/Third/view/frontend/3.less | 0 .../design/frontend/test_default/1.file | 0 .../test_default/Magento_Module/1.file | 0 .../test_default/Magento_Third/3.less | 0 .../design/frontend/test_default/theme.xml | 2 +- .../test_parent/Magento_Module/1.file | 0 .../test_parent/Magento_Second/1.file | 0 .../design/frontend/test_parent/theme.xml | 2 +- .../import_dir/import_in_magento_import.less | 0 .../Magento_Test/some_dir/magento_import.less | 4 + .../some_dir/magento_import.less | 0 .../Magento_Test3/import.less | 0 .../circular_dependency/import1.less | 1 + .../circular_dependency/import2.less | 1 + .../circular_dependency/import3.less | 1 + .../test_pre_process/less/import1.less | 2 +- .../less/import1/import1-1.less | 0 .../less/import1/source/import1-1.less | 1 + .../test_pre_process/less/import2.less | 0 .../import_dir/import_in_magento_import.less | 0 .../frontend/test_pre_process/source.css | 0 .../test_pre_process/source/source.less | 0 .../frontend/test_pre_process/theme.xml | 2 +- .../{ => Framework}/Less/_files/lib/1.file | 0 .../{ => Framework}/Less/_files/lib/2.file | 0 .../{ => Framework}/Less/_files/lib/3.less | 0 .../import_dir/import_in_magento_import.less | 0 .../_files/lib/some_dir/magento_import.less | 4 + .../{ => Framework}/Less/_files/themes.php | 2 +- .../{ => Framework}/Locale/ResolverTest.php | 4 +- .../Message/CollectionFactoryTest.php | 12 +- .../{ => Framework}/Message/FactoryTest.php | 12 +- .../{ => Framework}/Message/ManagerTest.php | 28 +- .../Model/Resource/Db/AbstractTest.php | 8 +- .../Resource/Db/Collection/AbstractTest.php | 14 +- .../Model/Resource/Db/ProfilerTest.php | 31 +- .../Model/Resource/Entity/TableTest.php | 10 +- .../Model/Resource/IteratorTest.php | 8 +- .../{ => Framework}/Model/ResourceTest.php | 10 +- .../{ => Framework}/Module/SetupTest.php | 16 +- .../Mview/View/ChangelogTest.php | 24 +- .../Object/Copy/Config/ReaderTest.php | 31 +- .../_files/Magento/Test/etc}/fieldset.xml | 2 +- .../Config/_files/Magento/Test/etc/module.xml | 2 +- .../Copy/Config/_files/expectedArray.php | 0 .../Config/_files/partialFieldsetFirst.xml | 2 +- .../Config/_files/partialFieldsetSecond.xml | 2 +- .../{ => Framework}/Object/CopyTest.php | 15 +- .../ObjectManager/Config/Reader/DomTest.php | 14 +- .../ObjectManager/ObjectManagerTest.php | 42 +- .../ObjectManager/TestAsset/Basic.php | 2 +- .../ObjectManager/TestAsset/BasicAlias.php | 2 +- .../TestAsset/BasicInjection.php | 8 +- .../TestAsset/ConstructorEightArguments.php | 38 +- .../TestAsset/ConstructorFiveArguments.php | 26 +- .../TestAsset/ConstructorFourArguments.php | 22 +- .../TestAsset/ConstructorNineArguments.php | 66 + .../TestAsset/ConstructorNoArguments.php | 2 +- .../TestAsset/ConstructorOneArgument.php | 8 +- .../TestAsset/ConstructorSevenArguments.php | 34 +- .../TestAsset/ConstructorSixArguments.php | 30 +- .../TestAsset/ConstructorTenArguments.php | 70 + .../TestAsset/ConstructorThreeArguments.php | 18 +- .../TestAsset/ConstructorTwoArguments.php | 14 +- .../TestAsset/InterfaceImplementation.php | 4 +- .../TestAsset/InterfaceInjection.php | 8 +- .../TestAsset/TestAssetInterface.php | 2 +- .../ObjectManager/_files/config_merged.xml | 8 +- .../ObjectManager/_files/config_one.xml | 6 +- .../ObjectManager/_files/config_two.xml | 8 +- .../Driver/Standard/Output/CsvfileTest.php | 8 +- .../Driver/Standard/Output/FirebugTest.php | 8 +- .../Driver/Standard/Output/HtmlTest.php | 8 +- .../Driver/Standard/Output/_files/output.html | 2 +- .../Standard/Output/_files/output_custom.csv | 0 .../Standard/Output/_files/output_default.csv | 0 .../Driver/Standard/Output/_files/timers.php | 2 +- .../Magento/{ => Framework}/ProfilerTest.php | 26 +- .../{ => Framework}/Session/ConfigTest.php | 14 +- .../Session/SaveHandler/DbTableTest.php | 12 +- .../Session/SessionManagerTest.php | 22 +- .../Session/SidResolverTest.php | 18 +- .../{ => Framework}/Translate/InlineTest.php | 14 +- .../_files/_inline_page_expected.html | 0 .../_files/_inline_page_original.html | 0 .../Translate/_files/_translation_data.php | 0 .../Magento/{ => Framework}/TranslateTest.php | 54 +- .../Magento/{ => Framework}/UrlTest.php | 22 +- .../{ => Framework}/View/Asset/MergedTest.php | 22 +- .../FileResolution/Strategy/FallbackTest.php | 10 +- .../View/Design/Theme/LabelTest.php | 10 +- .../View/Design/Theme/ValidatorTest.php | 14 +- .../View/Element/AbstractBlockTest.php | 119 +- .../View/Element/TemplateTest.php | 20 +- .../View/Element/Text/ListTest.php | 22 +- .../{ => Framework}/View/Element/TextTest.php | 8 +- .../frontend/Magento/plushe}/css/wrong.css | 0 .../{ => Framework}/View/FileSystemTest.php | 12 +- .../View/Layout/ElementTest.php | 6 +- .../View/Layout/_files/_layout_update.xml | 10 +- .../View/LayoutArgumentObjectUpdater.php | 8 +- .../View/LayoutArgumentSimpleUpdater.php | 4 +- .../View/LayoutDirectivesTest.php | 42 +- .../{ => Framework}/View/LayoutTest.php | 125 +- .../{ => Framework}/View/PublicationTest.php | 70 +- .../{ => Framework}/View/RelatedFileTest.php | 4 +- .../{ => Framework}/View/Utility/Layout.php | 36 +- .../View/Utility/LayoutTest.php | 14 +- .../View/Utility/_files/layout/handle_one.xml | 4 +- .../Utility/_files/layout/handle_three.xml | 2 +- .../View/Utility/_files/layout/handle_two.xml | 2 +- .../_files/layout_merged/multiple_handles.xml | 2 +- .../_files/layout_merged/single_handle.xml | 0 .../view/adminhtml/product/product.css | 0 .../images/gallery-image-base-label.png | Bin .../view/adminhtml/images/allinone.png | Bin .../ModuleC/view/adminhtml/images/logo.png | Bin .../Magento/ModuleC/view/adminhtml/styles.css | 0 .../design/adminhtml/vendor_test/theme.xml | 2 +- .../design/area_two/vendor_theme_one/file | 0 .../area_two/vendor_theme_one/theme.xml | 2 +- .../design/design_area/vendor_theme_one/file | 0 .../design_area/vendor_theme_one/theme.xml | 2 +- .../design/frontend/access_violation.php | 0 .../frontend/magento_default}/theme.xml | 6 +- .../frontend/magento_default_iphone/theme.xml | 2 +- .../layout_test_handle.xml | 2 +- .../frontend/test_cache_test_theme/theme.xml | 2 +- .../Magento_Catalog/catalog_category_view.xml | 2 +- .../catalog_category_view_type_default.xml | 2 +- .../Magento_Catalog/catalog_product_view.xml | 2 +- .../catalog_product_view_type_simple.xml | 2 +- .../Magento_Catalog/theme_file.txt | 0 .../theme_file_with_2_dots..txt | 0 .../Magento_Catalog/theme_template.phtml | 0 .../Magento_Cms/layout_test_handle_extra.xml | 2 +- .../Magento_Core/layout_test_handle_main.xml | 4 +- .../layout_test_handle_sample.xml | 8 +- .../test_default/Magento_Core/test.phtml | 0 .../test_default/Namespace_Module/favicon.ico | 0 .../frontend/test_default/css/styles.css | 0 .../frontend/test_default/i18n/en_US.csv | 0 .../frontend/test_default/i18n/fr_FR/logo.gif | 0 .../frontend/test_default/images/logo.gif | 0 .../test_default/images/logo_email.gif | 0 .../design/frontend/test_default/js/tabs.js | 0 .../design/frontend/test_default}/theme.xml | 2 +- .../design/frontend/test_default/view.xml | 2 +- .../test_publication/images/rectangle.gif | Bin .../test_publication/images/square.gif | Bin .../frontend/test_publication/style.css | 0 .../design/frontend/test_publication/sub.css | 0 .../frontend/test_publication}/theme.xml | 2 +- .../test_test_theme/layout_test_handle.xml | 2 +- .../design/frontend/test_test_theme/theme.xml | 2 +- .../Fixture_Module/fixture_script.js | 0 .../frontend/vendor_custom_theme/theme.xml | 6 +- .../absolute_valid_module.gif | Bin .../vendor_default/access_violation.php | 0 .../design/frontend/vendor_default/css/1.gif | Bin .../frontend/vendor_default/css/base64.css | 0 .../frontend/vendor_default/css/body.gif | Bin .../vendor_default/css/deep/recursive.css | 0 .../frontend/vendor_default/css/exception.css | 0 .../frontend/vendor_default/css/file.css | 0 .../design/frontend/vendor_default/h1.gif | Bin .../frontend/vendor_default/images/h2.gif | Bin .../frontend/vendor_default/recursive.css | 0 .../frontend/vendor_default/recursive.gif | Bin .../frontend/vendor_default/recursive2.gif | Bin .../design/frontend/vendor_default/scripts.js | 0 .../design/frontend/vendor_default}/theme.xml | 2 +- .../View/_files/design/themes.php | 2 +- .../Fixture_Module/fixture_script_two.js | 0 .../Fixture_Module/fixture_template_two.phtml | 0 .../vendor_custom_theme/fixture_script_two.js | 0 .../fixture_template_two.phtml | 0 .../vendor_custom_theme/i18n/en_US.csv | 0 .../vendor_custom_theme/mage/script.js | 0 .../frontend/vendor_custom_theme/theme.xml | 6 +- .../frontend/vendor_custom_theme2/theme.xml | 2 +- .../Fixture_Module/fixture_script.js | 0 .../Fixture_Module/fixture_template.phtml | 0 .../frontend/vendor_default/fixture_script.js | 0 .../vendor_default/fixture_template.phtml | 0 .../frontend/vendor_default/i18n/en_US.csv | 0 .../ru_RU/Fixture_Module/fixture_script.js | 0 .../i18n/ru_RU/fixture_script.js | 0 .../design/frontend/vendor_default/theme.xml | 31 + .../vendor_standalone_theme/theme.xml | 2 +- .../_files/fallback/pub/lib/mage/script.js | 0 .../View/_files/layout/cacheable.xml | 4 +- .../_files/layout/container_attributes.xml | 10 +- .../View/_files/layout/non_cacheable.xml | 4 +- .../action_for_anonymous_parent_block.xml | 10 +- .../layout_directives_test/arguments.xml | 4 +- .../arguments_complex_values.xml | 4 +- .../arguments_object_type.xml | 14 +- .../arguments_object_type_updaters.xml | 14 +- .../arguments_url_type.xml | 4 +- .../layout_directives_test/get_block.xml | 6 +- .../get_block_exception.xml | 4 +- .../_files/layout_directives_test/group.xml | 10 +- .../layout_directives_test/ifconfig.xml | 10 +- .../_files/layout_directives_test/move.xml | 14 +- .../move_alias_broken.xml | 4 +- .../layout_directives_test/move_broken.xml | 2 +- .../layout_directives_test/move_new_alias.xml | 4 +- .../move_the_same_alias.xml | 4 +- .../_files/layout_directives_test/remove.xml | 8 +- .../layout_directives_test/remove_broken.xml | 6 +- .../_files/layout_directives_test/render.xml | 6 +- .../sort_after_after.xml | 8 +- .../sort_after_previous.xml | 8 +- .../sort_before_after.xml | 8 +- .../sort_before_before.xml | 8 +- .../GiftMessage/Block/Message/InlineTest.php | 4 +- .../Block/Adminhtml/Items/ProductTest.php | 14 +- .../Model/Attribute/PriceTest.php | 58 + .../GoogleShopping/Model/ObserverTest.php | 2 +- .../Model/_files/flag_expired.php | 4 +- .../Model/Product/Type/GroupedTest.php | 2 +- .../AssociatedProductsCollectionTest.php | 2 +- .../Block/Adminhtml/Export/Edit/FormTest.php | 8 +- .../Block/Adminhtml/Export/FilterTest.php | 6 +- .../Block/Adminhtml/Import/Edit/FormTest.php | 12 +- .../Model/Export/Entity/AbstractEavTest.php | 2 +- .../Model/Export/Entity/ProductTest.php | 2 +- .../Model/Export/EntityAbstractTest.php | 2 +- .../Magento/ImportExport/Model/ExportTest.php | 6 +- .../Import/Entity/Eav/CustomerImportTest.php | 179 - .../Model/Import/Entity/Eav/CustomerTest.php | 211 - .../Model/Import/Entity/ProductTest.php | 10 +- .../_files/customers_for_validation_test.csv | 0 .../Model/Import/EntityAbstractTest.php | 4 +- .../Magento/ImportExport/Model/ImportTest.php | 6 +- .../Model/Resource/Import/DataTest.php | 8 +- .../ImportExport/_files/import_data.php | 4 +- .../Magento/Index/Model/Process/FileTest.php | 2 +- .../Magento/Index/Model/ProcessTest.php | 2 +- .../Magento/Install/Block/AdminTest.php | 6 +- .../Magento/Install/Model/ConfigTest.php | 20 +- .../Install/Model/Installer/ConfigTest.php | 6 +- .../Magento/Install/Model/InstallerTest.php | 8 +- .../Model/_files/Magento/Test/etc/module.xml | 2 +- .../Controller/Adminhtml/IntegrationTest.php | 4 +- .../Integration/Model/Config/ReaderTest.php | 2 +- .../Magento_Test/some_dir/magento_import.less | 4 - .../circular_dependency/import1.less | 1 - .../circular_dependency/import2.less | 1 - .../circular_dependency/import3.less | 1 - .../less/import1/source/import1-1.less | 1 - .../_files/lib/some_dir/magento_import.less | 4 - .../testsuite/Magento/MemoryUsageTest.php | 2 +- .../Block/Checkout/AddressesTest.php | 2 +- .../Block/Checkout/OverviewTest.php | 8 +- .../Multishipping/Controller/CheckoutTest.php | 2 +- .../Block/Adminhtml/Queue/Edit/FormTest.php | 8 +- .../Block/Adminhtml/SubscriberTest.php | 10 +- .../Adminhtml/NewsletterQueueTest.php | 4 +- .../Adminhtml/NewsletterTemplateTest.php | 16 +- .../Newsletter/Controller/ManageTest.php | 12 +- .../Newsletter/Controller/SubscriberTest.php | 2 +- .../Magento/Newsletter/Model/QueueTest.php | 12 +- .../TestAsset/ConstructorNineArguments.php | 66 - .../TestAsset/ConstructorTenArguments.php | 70 - .../Model/System/Config/Backend/TtlTest.php | 2 +- .../PayPalRecurringPayment/Model/IpnTest.php | 8 +- .../Magento/Payment/Block/InfoTest.php | 8 +- .../Payment/Model/Config/ReaderTest.php | 4 +- .../Magento/Payment/Model/ConfigTest.php | 2 +- .../Magento/Payment/Model/ObserverTest.php | 9 +- .../Paypal/Adminhtml/Paypal/ReportsTest.php | 2 +- .../Block/Billing/Agreement/ViewTest.php | 2 +- .../Paypal/Block/Express/ReviewTest.php | 2 +- .../Payment/Form/Billing/AgreementTest.php | 8 +- .../Controller/Billing/AgreementTest.php | 2 +- .../Magento/Paypal/Controller/ExpressTest.php | 4 +- .../Paypal/Model/Express/CheckoutTest.php | 15 +- .../Magento/Paypal/Model/IpnTest.php | 8 +- .../Paypal/Model/Report/SettlementTest.php | 2 +- .../Magento/Paypal/Model/VoidTest.php | 16 +- .../Block/Header/AdditionalTest.php | 102 + .../Persistent/Model/Observer/SessionTest.php | 55 +- .../Magento/Persistent/Model/ObserverTest.php | 206 + .../Model/Persistent/ConfigTest.php | 2 +- .../Magento/Persistent/_files/persistent.php} | 16 +- .../ProductAlert/Block/Email/StockTest.php | 4 +- .../Magento/ProductAlert/Model/EmailTest.php | 107 + .../ProductAlert/Model/ObserverTest.php | 103 + .../ProductAlert/_files/product_alert.php | 51 +- .../Catalog/Product/View/PaymentTest.php | 12 +- .../Block/Payment/ViewTest.php | 12 +- .../Controller/RecurringPaymentTest.php | 2 +- .../Block/Adminhtml/Filter/FormTest.php | 4 +- .../Adminhtml/Sales/Bestsellers/GridTest.php | 2 +- .../Adminhtml/Sales/Coupons/GridTest.php | 4 +- .../Adminhtml/Sales/Invoiced/GridTest.php | 4 +- .../Adminhtml/Sales/Refunded/GridTest.php | 4 +- .../Block/Adminhtml/Sales/Sales/GridTest.php | 4 +- .../Adminhtml/Sales/Shipping/GridTest.php | 4 +- .../Block/Adminhtml/Sales/Tax/GridTest.php | 4 +- .../Reports/_files/viewed_products.php | 12 +- .../Review/Block/Adminhtml/Edit/FormTest.php | 4 +- .../Block/Adminhtml/Edit/Tab/FormTest.php | 2 +- .../Review/Block/Adminhtml/MainTest.php | 8 +- .../Magento/Review/Block/FormTest.php | 4 +- .../Magento/Review/_files/customer_review.php | 2 +- .../Magento/Rss/Block/Order/StatusTest.php | 6 +- .../Magento/Rss/Block/WishlistTest.php | 6 +- .../Magento/Rss/Controller/CatalogTest.php | 2 +- .../Magento/Rss/Helper/WishlistRssTest.php | 2 +- .../Rule/Model/Condition/AbstractTest.php | 6 +- .../Block/Adminhtml/Items/AbstractTest.php | 17 +- .../Order/Create/Form/AbstractTest.php | 10 +- .../Order/Create/Form/AccountTest.php | 4 +- .../Order/Create/Form/AddressTest.php | 16 +- .../Block/Adminhtml/Order/Create/FormTest.php | 6 +- .../Order/Create/Giftmessage/FormTest.php | 2 +- .../Block/Adminhtml/Order/View/InfoTest.php | 10 +- .../Report/Filter/Form/CouponTest.php | 6 +- .../Sales/Block/Order/CommentsTest.php | 4 +- .../Block/Order/Creditmemo/ItemsTest.php | 8 +- .../Sales/Block/Order/Invoice/ItemsTest.php | 8 +- .../Block/Order/PrintOrder/CreditmemoTest.php | 8 +- .../Block/Order/PrintOrder/InvoiceTest.php | 8 +- .../Magento/Sales/Block/Order/TotalsTest.php | 16 +- .../Sales/Model/AdminOrder/CreateTest.php | 18 +- .../Quote/Address/CollectTotalsTest.php | 8 +- .../Sales/Model/Order/CreditmemoTest.php | 2 +- .../Magento/Sales/Model/Order/InvoiceTest.php | 2 +- .../Magento/Sales/Model/Order/OrderTest.php | 2 +- .../Magento/Sales/Model/Quote/AddressTest.php | 2 +- .../Magento/Sales/Model/QuoteTest.php | 16 +- .../Magento/Sales/Model/Service/QuoteTest.php | 2 +- .../Magento/Sales/_files/invoice.php | 2 +- .../_files/invoice_fixture_store_order.php | 2 +- .../Sales/_files/invoice_payflowpro.php | 2 +- .../Magento/Sales/_files/order_info.php | 2 +- .../Promo/Quote/Edit/Tab/LabelsTest.php | 2 +- .../Promo/Quote/Edit/Tab/MainTest.php | 8 +- .../_files/cart_rule_40_percent_off.php | 2 +- .../_files/cart_rule_50_percent_off.php | 2 +- .../Magento/Sendfriend/Block/SendTest.php | 114 + .../Magento/Shipping/Block/ItemsTest.php | 6 +- .../Sitemap/_files/sitemap_products.php | 2 +- .../Model/Resource/Store/CollectionTest.php | 12 +- .../Magento/Store/Model/StoreTest.php | 112 +- .../Magento/Store/Model/WebsiteTest.php | 2 +- .../Block/Adminhtml/Rate/ImportExportTest.php | 5 +- .../Tax/Model/Calculation/RuleTest.php | 10 +- .../testsuite/Magento/Tax/Model/ClassTest.php | 16 +- .../Tax/Model/Rate/CsvImportHandlerTest.php | 2 +- .../Calculation/Rule/CollectionTest.php | 2 +- .../Tax/Model/Resource/CalculationTest.php | 8 +- .../Magento/Tax/_files/tax_classes.php | 4 +- .../Magento/Test/Integrity/LayoutTest.php | 77 +- .../Integrity/Magento/Payment/MethodsTest.php | 6 +- .../Magento/Widget/SkinFilesTest.php | 2 +- .../Magento/Widget/TemplateFilesTest.php | 10 +- .../Integrity/Modular/AclConfigFilesTest.php | 4 +- .../Modular/BlockInstantiationTest.php | 10 +- .../Test/Integrity/Modular/CacheFilesTest.php | 8 +- .../Modular/CarrierConfigFilesTest.php | 2 +- .../Modular/CrontabConfigFilesTest.php | 6 +- .../Integrity/Modular/DiConfigFilesTest.php | 23 +- .../Modular/EavAttributesConfigFilesTest.php | 6 +- .../Modular/EventConfigFilesTest.php | 4 +- .../Modular/ExportConfigFilesTest.php | 6 +- .../Modular/FieldsetConfigFilesTest.php | 4 +- .../Modular/ImportConfigFilesTest.php | 6 +- .../Modular/IndexerConfigFilesTest.php | 6 +- .../Integrity/Modular/LayoutFilesTest.php | 8 +- .../Catalog/AttributeConfigFilesTest.php | 2 +- .../Customer/AddressFormatsFilesTest.php | 2 +- .../Email/EmailTemplateConfigFilesTest.php | 4 +- .../Magento/Sales/PdfConfigFilesTest.php | 4 +- .../Integrity/Modular/MenuConfigFilesTest.php | 2 +- .../Modular/MviewConfigFilesTest.php | 4 +- .../Modular/NewIndexerConfigFilesTest.php | 2 +- .../Modular/ProductOptionsConfigFilesTest.php | 6 +- .../Modular/ProductTypesConfigFilesTest.php | 6 +- .../Modular/ResourcesConfigFilesTest.php | 6 +- .../Modular/RouteConfigFilesTest.php | 6 +- .../Modular/SalesConfigFilesTest.php | 6 +- .../Modular/SystemConfigFilesTest.php | 4 +- .../Integrity/Modular/TemplateFilesTest.php | 16 +- .../Integrity/Modular/ViewConfigFilesTest.php | 6 +- .../Test/Integrity/Modular/ViewFilesTest.php | 14 +- .../Integrity/Theme/TemplateFilesTest.php | 6 +- .../Test/Integrity/Theme/ViewFilesTest.php | 26 +- .../Test/Integrity/Theme/XmlFilesTest.php | 6 +- .../Test/Integrity/ViewFileReferenceTest.php | 27 +- .../code/Magento/FirstModule/etc/module.xml | 2 +- .../Test/Tools/Dependency/_files/config1.xml | 2 +- .../Test/Tools/Dependency/_files/config2.xml | 2 +- .../Test/Tools/Dependency/_files/config3.xml | 2 +- .../Test/Tools/Dependency/_files/config4.xml | 2 +- .../Test/Tools/Dependency/_files/config5.xml | 2 +- .../Tools/I18n/Code/Pack/GeneratorTest.php | 2 +- .../Tools/Layout/Reference/ProcessorTest.php | 2 +- .../Layout/Reference/_files/layoutInvalid.xml | 6 +- .../Layout/Reference/_files/layoutValid.xml | 4 +- .../_files/layoutValidExpectUpdated.xml | 4 +- .../Design/Theme/Edit/Tab/GeneralTest.php | 12 +- .../Theme/Block/Html/BreadcrumbsTest.php | 2 +- .../Magento/Theme/Block/Html/FooterTest.php | 7 +- .../Magento/Theme/Block/Html/HeadTest.php | 4 +- .../Magento/Theme/Block/HtmlTest.php | 16 +- .../System/Design/ThemeControllerTest.php | 4 +- .../Theme/Model/Layout/Config/ReaderTest.php | 4 +- .../Magento/Theme/Model/Layout/ConfigTest.php | 2 +- .../Theme/Model/Wysiwyg/StorageTest.php | 12 +- .../Magento/Tools/View/GeneratorTest.php | 10 +- .../Translation/Model/InlineParserTest.php | 11 +- .../_files/db_translate_admin_store.php | 2 +- .../UrlRewrite/Helper/UrlRewriteTest.php | 4 +- .../Magento/User/Block/Role/Grid/UserTest.php | 4 +- .../User/Block/User/Edit/Tab/MainTest.php | 4 +- .../User/Controller/Adminhtml/AuthTest.php | 10 +- .../User/Controller/Adminhtml/UserTest.php | 4 +- .../testsuite/Magento/User/Model/UserTest.php | 16 +- .../frontend/test_publication/theme.xml | 31 - .../Model/Config/Integration/ReaderTest.php | 2 +- .../Webapi/Model/Config/ReaderTest.php | 2 +- .../Webapi/Model/PathProcessorTest.php | 4 +- .../Magento/Webapi/Model/Soap/ServerTest.php | 6 +- .../AssociativeArrayDataObjectBuilder.php | 2 +- .../DataObjectArrayDataObjectBuilder.php | 2 +- .../Entity/NestedDataObjectBuilder.php | 2 +- .../Entity/SimpleArrayDataObjectBuilder.php | 2 +- .../Entity/SimpleDataObjectBuilder.php | 2 +- .../Magento/Weee/Model/ObserverTest.php | 12 +- .../testsuite/Magento/Weee/Model/TaxTest.php | 11 +- .../Instance/Edit/Chooser/ContainerTest.php | 2 +- .../Edit/Chooser/DesignAbstractionTest.php | 8 +- .../Instance/Edit/Chooser/LayoutTest.php | 4 +- .../Instance/Edit/Tab/Main/LayoutTest.php | 8 +- .../Widget/Instance/Edit/Tab/MainTest.php | 11 +- .../Adminhtml/Widget/Instance/EditTest.php | 6 +- .../Adminhtml/Widget/InstanceTest.php | 2 +- .../Magento/Widget/Model/Config/DataTest.php | 21 +- .../Widget/Model/Config/FileResolverTest.php | 4 +- .../Widget/Model/Config/ReaderTest.php | 21 +- .../_files/code/Magento/Test/etc/module.xml | 2 +- .../Widget/Model/Widget/ConfigTest.php | 6 +- .../Widget/Model/Widget/InstanceTest.php | 2 +- .../Magento/Widget/Model/WidgetTest.php | 2 +- .../design/adminhtml/magento_basic/theme.xml | 2 +- .../Magento/Widget/_files/themes.php | 2 +- .../Magento/Wishlist/Block/AbstractTest.php | 4 +- .../Customer/Wishlist/Item/ColumnTest.php | 6 +- .../Customer/Wishlist/Item/OptionsTest.php | 6 +- .../Block/Customer/Wishlist/ItemsTest.php | 12 +- .../Magento/Wishlist/Controller/IndexTest.php | 66 +- .../Magento/Wishlist/Helper/DataTest.php | 2 +- .../Magento/Wishlist/_files/wishlist.php | 2 +- .../wishlist_with_product_qty_increments.php | 2 +- dev/tests/js/jsTestDriver.php.dist | 2 +- dev/tests/js/run_js_tests.php | 4 +- .../testsuite/mage/calendar/calendar-qunit.js | 97 + .../js/testsuite/mage/calendar/calendar.html | 49 + .../js/testsuite/mage/dropdown/index.html | 48 + .../testsuite/mage/dropdown/test-dropdown.js | 290 ++ .../js/testsuite/mage/validation/index.html | 53 + .../mage/validation/test-validation.js | 528 +++ .../mage/validation/validate-test.js | 509 --- .../Magento/TestFramework/Application.php | 26 +- .../TestFramework/Helper/Categories.php | 4 +- .../TestFramework/Performance/Bootstrap.php | 8 +- .../TestFramework/Performance/Config.php | 10 +- .../Performance/Scenario/FailureException.php | 2 +- .../Scenario/Handler/FileFormat.php | 6 +- .../Performance/Scenario/Handler/Jmeter.php | 10 +- .../Performance/Scenario/Handler/Php.php | 10 +- dev/tests/performance/framework/bootstrap.php | 2 +- .../tests/unit/framework/bootstrap.php | 2 +- .../Magento/Test/ApplicationTest.php | 6 +- .../Test/Performance/BootstrapTest.php | 2 +- .../Magento/Test/Performance/ConfigTest.php | 2 +- .../Scenario/Handler/FileFormatTest.php | 2 +- .../Scenario/Handler/JmeterTest.php | 6 +- .../Performance/Scenario/Handler/PhpTest.php | 6 +- .../Test/Performance/TestsuiteTest.php | 2 +- dev/tests/performance/run_scenarios.php | 2 +- .../Integrity/AbstractConfig.php | 6 +- .../Magento/TestFramework/Utility/Classes.php | 2 +- .../Magento/TestFramework/Utility/Files.php | 26 +- dev/tests/static/framework/bootstrap.php | 2 +- .../Magento/Test/Integrity/DependencyTest.php | 32 +- .../Test/Integrity/Di/CompilerTest.php | 70 +- .../Test/Integrity/Layout/HandlesTest.php | 2 +- .../Test/Integrity/Library/DependencyTest.php | 4 +- .../Integrity/Library/_files/blacklist.txt | 125 +- .../Magento/Backend/SystemConfigTest.php | 2 +- .../Model/Fieldset/FieldsetConfigTest.php | 20 +- .../Core/Model/Fieldset/_files/fieldset.xml | 2 +- .../Model/Fieldset/_files/fieldset_file.xml | 2 +- .../Fieldset/_files/invalid_fieldset.xml | 2 +- .../Magento/Widget/WidgetConfigTest.php | 4 +- .../Integrity/_files/blacklist/namespace.txt | 46 +- .../Magento/Test/Legacy/LayoutTest.php | 5 +- .../Magento/Core/Block/AbstractBlockTest.php | 2 +- .../ObjectManager/DiConfigTest.php | 2 +- .../Magento/Test/Legacy/ObsoleteCodeTest.php | 80 +- .../Legacy/_files/blacklist/obsolete_mage.php | 4 +- .../Test/Legacy/_files/obsolete_classes.php | 623 +-- .../Legacy/_files/obsolete_config_nodes.php | 8 +- .../Test/Legacy/_files/obsolete_constants.php | 186 +- .../Test/Legacy/_files/obsolete_methods.php | 469 +-- .../Legacy/_files/obsolete_namespaces.php | 59 +- .../Test/Legacy/_files/obsolete_paths.php | 245 ++ .../Legacy/_files/obsolete_properties.php | 164 +- .../Test/Php/_files/blacklist/common.txt | 174 +- .../Php/_files/phpcpd/blacklist/common.txt | 14 +- .../Php/_files/phpcs/blacklist/common.txt | 6 +- .../Test/Php/_files/whitelist/common.txt | 32 +- .../Magento/Test/Block/Adminhtml.php | 40 +- .../TestFramework/Helper/ObjectManager.php | 16 +- dev/tests/unit/framework/bootstrap.php | 6 +- .../tests/unit/framework/bootstrap.php | 2 +- .../Helper/ObjectManagerTest.php | 30 +- .../Model/NotificationServiceTest.php | 2 +- .../Model/System/Message/BaseurlTest.php | 2 +- .../System/Message/CacheOutdatedTest.php | 4 +- .../Model/System/Message/SecurityTest.php | 4 +- .../Model/Authorizenet/CardsTest.php | 18 +- .../Model/Directpost/ObserverTest.php | 10 +- .../Authz/Service/AuthorizationV1Test.php | 6 +- .../Backend/Block/System/Config/EditTest.php | 2 +- .../Form/Field/FieldArray/AbstractTest.php | 4 +- .../Form/Field/Select/AllowspecificTest.php | 4 +- .../Block/System/Config/Form/FieldTest.php | 2 +- .../Block/System/Config/Form/FieldsetTest.php | 27 +- .../Backend/Block/System/Config/FormTest.php | 23 +- .../Backend/Block/Widget/ButtonTest.php | 2 +- .../Block/Widget/Form/ContainerTest.php | 4 +- .../Grid/Column/Renderer/CurrencyTest.php | 6 +- .../Column/Renderer/Radio/ExtendedTest.php | 2 +- .../Widget/Grid/Column/Renderer/RadioTest.php | 2 +- .../Block/Widget/Grid/ColumnSetTest.php | 66 +- .../Backend/Block/Widget/Grid/ColumnTest.php | 4 +- .../Block/Widget/Grid/MassactionTest.php | 12 +- .../Block/Widget/Grid/SerializerTest.php | 4 +- .../Magento/Backend/Block/Widget/GridTest.php | 2 +- .../Controller/Adminhtml/CacheTest.php | 12 +- .../Controller/Adminhtml/DashboardTest.php | 12 +- .../Adminhtml/System/AccountTest.php | 18 +- .../Adminhtml/System/Config/SaveTest.php | 6 +- .../Magento/Backend/Helper/DataTest.php | 4 +- .../Backend/Model/Auth/SessionTest.php | 12 +- .../Magento/Backend/Model/AuthTest.php | 4 +- .../Model/Config/Backend/BaseurlTest.php | 14 +- .../Model/Config/Backend/EncryptedTest.php | 14 +- .../Model/Config/Backend/SecureTest.php | 14 +- .../Backend/Model/Config/LoaderTest.php | 2 +- .../Model/Config/SchemaLocatorTest.php | 2 +- .../Model/Config/Source/Admin/PageTest.php | 2 +- .../Config/Source/Email/TemplateTest.php | 4 +- .../Config/Structure/Element/FieldTest.php | 28 +- .../Element/FlyweightFactoryTest.php | 2 +- .../Structure/Element/Group/ProxyTest.php | 2 +- .../Config/Structure/Element/GroupTest.php | 4 +- .../Config/Structure/Element/SectionTest.php | 2 +- .../Magento/Backend/Model/ConfigTest.php | 14 +- .../Backend/Model/Locale/ManagerTest.php | 8 +- .../Backend/Model/Menu/BuilderTest.php | 2 +- .../Model/Menu/Config/SchemaLocatorTest.php | 2 +- .../Magento/Backend/Model/Menu/ConfigTest.php | 4 +- .../Model/Menu/Director/DirectorTest.php | 2 +- .../Model/Menu/Filter/IteratorTest.php | 2 +- .../Magento/Backend/Model/Menu/ItemTest.php | 8 +- .../Magento/Backend/Model/MenuTest.php | 4 +- .../Magento/Backend/Model/UrlTest.php | 13 +- .../Magento/Backend/Model/ViewTest.php | 6 +- .../Model/Widget/Grid/AbstractTotalsTest.php | 18 +- .../Widget/Grid/Row/UrlGeneratorTest.php | 2 +- .../Model/Widget/Grid/SubTotalsTest.php | 16 +- .../Backend/Model/Widget/Grid/TotalsTest.php | 44 +- .../Magento/Backend/Model/_files/acl.xml | 2 +- .../Magento/Backend/Model/_files/acl_1.xml | 2 +- .../Magento/Backend/Model/_files/acl_2.xml | 2 +- .../Backend/Model/_files/acl_merged.xml | 2 +- .../Model/_files/session_backend_mock.php | 2 +- .../Backup/Model/BackupFactoryTest.php | 6 +- .../Backup/Model/Fs/CollectionTest.php | 2 +- .../Product/Edit/Tab/Bundle/OptionTest.php | 6 +- .../Product/View/Type/Bundle/OptionTest.php | 18 +- .../Catalog/Product/View/Type/BundleTest.php | 8 +- .../Bundle/Model/Product/CatalogPriceTest.php | 2 +- .../Bundle/Model/Product/PriceTest.php | 4 +- .../Pricing/Adjustment/CalculatorTest.php | 18 +- .../Bundle/Pricing/Price/BasePriceTest.php | 14 +- .../Price/BundleSelectionFactoryTest.php | 12 +- .../Price/BundleSelectionPriceTest.php | 14 +- .../Bundle/Pricing/Price/FinalPriceTest.php | 8 +- .../Bundle/Pricing/Price/GroupPriceTest.php | 8 +- .../Bundle/Pricing/Price/SpecialPriceTest.php | 12 +- .../Bundle/Pricing/Price/TierPriceTest.php | 6 +- .../Pricing/Render/FinalPriceBoxTest.php | 6 +- .../Captcha/Helper/Adminhtml/DataTest.php | 2 +- .../Magento/Captcha/Helper/DataTest.php | 4 +- .../Captcha/Model/CaptchaFactoryTest.php | 2 +- .../Magento/Captcha/Model/CronTest.php | 6 +- .../Magento/Captcha/Model/DefaultTest.php | 4 +- .../Magento/Captcha/Model/ObserverTest.php | 30 +- .../Adminhtml/Product/Attribute/GridTest.php | 2 +- .../Composite/Fieldset/OptionsTest.php | 6 +- .../Product/Helper/Form/WeightTest.php | 14 +- .../Magento/Catalog/Block/Layer/ViewTest.php | 2 +- .../Block/Product/AbstractProductTest.php | 10 +- .../Block/Product/Compare/ListCompareTest.php | 8 +- .../Catalog/Block/Product/ListProductTest.php | 4 +- .../Catalog/Block/Product/ListTest.php | 2 +- .../Block/Product/ProductList/ToolbarTest.php | 6 +- .../Block/Product/View/OptionsTest.php | 6 +- .../Catalog/Block/Product/View/TabsTest.php | 4 +- .../Catalog/Block/Product/ViewTest.php | 2 +- .../Block/Product/Widget/NewWidgetTest.php | 8 +- .../Adminhtml/Product/BuilderTest.php | 4 +- .../Helper/HandlerFactoryTest.php | 6 +- .../Controller/Adminhtml/ProductTest.php | 14 +- .../Catalog/Controller/CategoryTest.php | 18 +- .../Catalog/Helper/Product/CompareTest.php | 4 +- .../Helper/Product/Flat/IndexerTest.php | 17 +- .../Model/Attribute/Config/ReaderTest.php | 16 +- .../Attribute/Config/SchemaLocatorTest.php | 10 +- .../Model/Attribute/Config/XsdTest.php | 2 +- .../Attribute/LockValidatorCompositeTest.php | 2 +- .../Category/Attribute/Backend/SortbyTest.php | 2 +- .../Magento/Catalog/Model/CategoryTest.php | 4 +- .../Product/Plugin/MviewStateTest.php | 32 +- .../Indexer/Product/Flat/Action/RowTest.php | 2 +- .../Flat/Action/Rows/TableDataTest.php | 6 +- .../Indexer/Product/Flat/Action/RowsTest.php | 2 +- .../Indexer/Product/Flat/TableDataTest.php | 4 +- .../Indexer/Product/Price/ObserverTest.php | 12 +- .../Price/System/Config/PriceScopeTest.php | 4 +- .../Model/Layer/Filter/FactoryTest.php | 6 +- .../Catalog/Model/Layer/FilterListTest.php | 2 +- .../Catalog/Model/Observer/ReindexTest.php | 14 +- .../Attribute/Backend/CategoryTest.php | 6 +- .../Backend/Groupprice/AbstractTest.php | 4 +- .../Product/Attribute/Backend/MediaTest.php | 6 +- .../Product/Attribute/Backend/StockTest.php | 10 +- .../Product/CopyConstructorFactoryTest.php | 6 +- .../Model/Product/Option/Type/FactoryTest.php | 6 +- .../Product/PriceModifier/CompositeTest.php | 2 +- .../Model/Product/ProductList/ToolbarTest.php | 4 +- .../Catalog/Model/Product/Type/SimpleTest.php | 6 +- .../Model/Product/Type/VirtualTest.php | 6 +- .../Magento/Catalog/Model/Product/UrlTest.php | 4 +- .../Catalog/Model/Product/ValidatorTest.php | 2 +- .../Magento/Catalog/Model/ProductTest.php | 16 +- .../ProductTypes/Config/SchemaLocatorTest.php | 2 +- .../Catalog/Model/ProductTypes/ConfigTest.php | 2 +- .../Catalog/Model/Resource/AbstractTest.php | 6 +- .../Category/Collection/FactoryTest.php | 2 +- .../Model/Resource/Category/TreeTest.php | 4 +- .../Model/Resource/Eav/AttributeTest.php | 20 +- .../Model/Resource/Product/LinkTest.php | 8 +- .../Product/Option/CollectionTest.php | 17 +- .../Resource/Product/Option/MysqlStub.php | 4 +- .../Model/Resource/Product/Option/Stub.php | 2 +- .../Resource/Product/Option/ValueStub.php | 4 +- .../Resource/Product/Option/ValueTest.php | 6 +- .../Model/Template/Filter/FactoryTest.php | 12 +- .../Catalog/Pricing/Price/BasePriceTest.php | 8 +- .../Catalog/Pricing/Price/FinalPriceTest.php | 10 +- .../Catalog/Pricing/Price/GroupPriceTest.php | 4 +- .../Catalog/Pricing/Price/MsrpPriceTest.php | 10 +- .../Catalog/Pricing/Price/OptionPriceTest.php | 16 +- .../Pricing/Price/RegularPriceTest.php | 12 +- .../Pricing/Price/SpecialPriceTest.php | 6 +- .../Catalog/Pricing/Price/TierPriceTest.php | 10 +- .../Pricing/Render/FinalPriceBoxTest.php | 28 +- .../Catalog/Pricing/Render/PriceBoxTest.php | 6 +- .../Magento/Catalog/Pricing/RenderTest.php | 16 +- .../Block/Adminhtml/Form/Field/StockTest.php | 26 +- .../Block/QtyincrementsTest.php | 4 +- .../Block/Stockqty/DefaultStockqtyTest.php | 4 +- .../Model/Adminhtml/Stock/ItemTest.php | 2 +- .../Initializer/OptionTest.php | 4 +- .../CatalogInventory/Model/Stock/ItemTest.php | 6 +- .../CatalogRule/Model/Rule/JobTest.php | 2 +- .../Pricing/Price/CatalogRulePriceTest.php | 20 +- .../CatalogSearch/Block/ResultTest.php | 4 +- .../Magento/Centinel/Model/ServiceTest.php | 6 +- .../Magento/Centinel/Model/State/JcbTest.php | 14 +- .../Centinel/Model/StateFactoryTest.php | 4 +- .../Checkout/Block/Cart/AbstractTest.php | 18 +- .../Magento/Checkout/Block/Cart/LinkTest.php | 6 +- .../Checkout/Block/Cart/SidebarTest.php | 8 +- .../Magento/Checkout/Block/LinkTest.php | 6 +- .../Checkout/Block/Onepage/SuccessTest.php | 2 +- .../Magento/Checkout/Helper/DataTest.php | 397 +- .../Checkout/Helper/ExpressRedirectTest.php | 2 +- .../Agreements/AgreementsValidatorTest.php | 99 + .../Model/Config/Source/Cart/SummaryTest.php | 52 - .../Model/Layout/DepersonalizePluginTest.php | 12 +- .../Magento/Checkout/Model/ObserverTest.php | 12 +- .../Magento/Checkout/Model/SessionTest.php | 111 +- .../Checkout/Model/Type/OnepageTest.php | 472 +++ .../Magento/Cms/Controller/NorouteTest.php | 2 +- .../Magento/Cms/Model/Page/UrlrewriteTest.php | 4 +- .../Cms/Model/Template/FilterProviderTest.php | 4 +- .../Cms/Model/Wysiwyg/Images/StorageTest.php | 22 +- .../Edit/Tab/Super/Config/MatrixTest.php | 6 +- .../Cart/Item/Renderer/ConfigurableTest.php | 6 +- .../Configurable/AttributeSelectorTest.php | 2 +- .../Model/Product/Type/ConfigurableTest.php | 6 +- .../Model/Product/Validator/PluginTest.php | 4 +- .../Core/App/Action/FormKeyValidatorTest.php | 8 +- .../Core/App/Action/Plugin/DesignTest.php | 2 +- .../Core/App/Action/Plugin/LastUrlTest.php | 4 +- .../FrontController/Plugin/InstallTest.php | 8 +- .../testsuite/Magento/Core/App/MediaTest.php | 12 +- .../Magento/Core/Controller/NorouteTest.php | 2 +- .../Core/Controller/Response/HttpTest.php | 4 +- .../Magento/Core/Helper/DataTest.php | 6 +- .../Magento/Core/Helper/PostDataTest.php | 6 +- .../Magento/Core/Helper/ThemeTest.php | 34 +- .../Magento/Core/Model/App/StateTest.php | 4 +- .../Magento/Core/Model/DesignLoaderTest.php | 10 +- .../Core/Model/File/Storage/ConfigTest.php | 4 +- .../File/Storage/Directory/DatabaseTest.php | 22 +- .../Core/Model/File/Storage/MediaTest.php | 4 +- .../File/Storage/SynchronizationTest.php | 4 +- .../Model/Layout/DepersonalizePluginTest.php | 20 +- .../Magento/Core/Model/Layout/MergeTest.php | 24 +- .../Core/Model/Layout/TranslatorTest.php | 2 +- .../Model/Layout/Update/ValidatorTest.php | 8 +- .../Magento/Core/Model/Layout/UpdateTest.php | 2 +- .../Core/Model/Layout/_files/arguments.xml | 2 +- .../_files/layout/fixture_handle_one.xml | 2 +- .../_files/layout/fixture_handle_two.xml | 2 +- .../Core/Model/Layout/_files/merged.xml | 4 +- .../Core/Model/NoRouteHandlerListTest.php | 4 +- .../Magento/Core/Model/ObserverTest.php | 22 +- .../Core/Model/Resource/Db/AbstractTest.php | 12 +- .../Model/Resource/File/Storage/FileTest.php | 6 +- .../Resource/Layout/AbstractTestCase.php | 8 +- .../Resource/Layout/Link/CollectionTest.php | 8 +- .../Resource/Layout/Update/CollectionTest.php | 8 +- .../Core/Model/Resource/SessionTest.php | 8 +- .../Magento/Core/Model/Route/Wrapper.php | 2 +- .../Decorator/DebugHintsTest.php | 4 +- .../TemplateEngine/Plugin/DebugHintsTest.php | 16 +- .../Core/Model/Theme/Domain/PhysicalTest.php | 2 +- .../Core/Model/Theme/Domain/VirtualTest.php | 6 +- .../Core/Model/Theme/Image/PathTest.php | 4 +- .../Magento/Core/Model/Theme/ResolverTest.php | 10 +- .../Core/Model/Theme/ThemeProviderTest.php | 2 +- .../Core/Model/Theme/ValidationTest.php | 8 +- .../Magento/Core/Model/ThemeTest.php | 6 +- .../Core/Model/Url/ScopeResolverTest.php | 4 +- .../Core/Model/Validator/FactoryTest.php | 48 +- .../_files/frontend/magento_iphone/theme.xml | 2 +- .../frontend/magento_iphone/theme_invalid.xml | 2 +- .../Plugin/ApplicationInitializerTest.php | 8 +- .../Magento/Cron/Model/Config/DataTest.php | 2 +- .../Cron/Model/Config/Reader/XmlTest.php | 2 +- .../Cron/Model/Config/SchemaLocatorTest.php | 2 +- .../Magento/Cron/Model/ObserverTest.php | 8 +- .../Block/Account/AuthorizationLinkTest.php | 2 +- .../Customer/Block/Account/CustomerTest.php | 4 +- .../Block/Account/Dashboard/InfoTest.php | 89 +- .../Customer/Block/Account/LinkTest.php | 2 +- .../Block/Account/RegisterLinkTest.php | 4 +- .../Customer/Block/Form/RegisterTest.php | 28 +- .../Block/Widget/AbstractWidgetTest.php | 2 +- .../Magento/Customer/Block/Widget/DobTest.php | 94 +- .../Customer/Block/Widget/GenderTest.php | 30 +- .../Customer/Block/Widget/NameTest.php | 112 +- .../Customer/Block/Widget/TaxvatTest.php | 28 +- .../Customer/Controller/AccountTest.php | 12 +- .../Controller/Adminhtml/IndexTest.php | 22 +- .../Magento/Customer/Helper/AddressTest.php | 4 +- .../Model/Address/Config/ReaderTest.php | 16 +- .../Address/Config/SchemaLocatorTest.php | 10 +- .../Customer/Model/Address/Config/XsdTest.php | 2 +- .../Customer/Model/Address/ConfigTest.php | 8 +- .../Customer/Model/AddressRegistryTest.php | 2 +- .../Customer/Model/Backend/CustomerTest.php | 2 +- .../Config/Source/Group/MultiselectTest.php | 2 +- .../Model/Config/Source/GroupTest.php | 2 +- .../Magento/Customer/Model/ConverterTest.php | 20 +- .../Customer/Model/CustomerRegistryTest.php | 20 +- .../Magento/Customer/Model/CustomerTest.php | 18 +- .../Customer/Model/GroupRegistryTest.php | 2 +- .../ImportExport/Export}/AddressTest.php | 41 +- .../ImportExport/Export}/CustomerTest.php | 27 +- .../Import}/AbstractCustomerTest.php | 102 +- .../ImportExport/Import}/AddressTest.php | 101 +- .../Import}/CustomerCompositeTest.php | 457 +-- .../ImportExport/Import/CustomerTest.php | 233 ++ .../customer_composite_prepare_row_for_db.csv | 0 .../_files/row_data_abstract_empty_email.php | 3 - .../row_data_abstract_empty_website.php | 3 - .../row_data_abstract_invalid_email.php | 3 - .../row_data_abstract_invalid_website.php | 3 - .../_files/row_data_abstract_no_email.php | 3 - .../_files/row_data_abstract_no_website.php | 3 - .../_files/row_data_abstract_valid.php | 3 - ..._data_address_delete_address_not_found.php | 3 - ...w_data_address_delete_empty_address_id.php | 3 - .../row_data_address_delete_no_customer.php | 3 - .../_files/row_data_address_delete_valid.php | 3 - ...dress_update_absent_required_attribute.php | 3 - ...w_data_address_update_empty_address_id.php | 3 - ...row_data_address_update_invalid_region.php | 3 - .../row_data_address_update_no_customer.php | 3 - .../_files/row_data_address_update_valid.php | 3 - .../Model/Layout/DepersonalizePluginTest.php | 24 +- .../Model/Metadata/ElementFactoryTest.php | 6 +- .../Model/Metadata/Form/AbstractDataTest.php | 16 +- .../Metadata/Form/AbstractFormTestCase.php | 12 +- .../Customer/Model/Metadata/Form/TextTest.php | 4 +- .../Customer/Model/Metadata/ValidatorTest.php | 4 +- .../Customer/Model/Renderer/RegionTest.php | 20 +- .../Group/Grid/ServiceCollectionTest.php | 16 +- .../Import}/Customer/StorageTest.php | 68 +- .../Import/CustomerComposite/DataTest.php | 233 ++ .../Magento/Customer/Model/SessionTest.php | 2 +- .../Service/V1/CustomerAccountServiceTest.php | 803 ++-- .../Service/V1/CustomerAddressServiceTest.php | 44 +- .../Service/V1/CustomerCurrentServiceTest.php | 8 +- .../V1/CustomerMetadataServiceTest.php | 24 +- .../Service/V1/Data/AddressConverterTest.php | 81 +- .../Customer/Service/V1/Data/AddressTest.php | 83 +- .../Service/V1/Data/CustomerBuilderTest.php | 257 +- .../Customer/Service/V1/Data/CustomerTest.php | 54 +- .../Block/Adminhtml/Editor/ContainerTest.php | 4 +- .../Editor/Toolbar/Buttons/SaveTest.php | 16 +- .../Editor/Tools/Code/CustomTest.php | 14 +- .../Adminhtml/Editor/Tools/Code/JsTest.php | 12 +- .../Selector/SelectorList/AbstractTest.php | 4 +- .../Adminhtml/System/Design/EditorTest.php | 34 +- .../DesignEditor/Model/AreaEmulatorTest.php | 4 +- .../Model/Config/Control/QuickStylesTest.php | 4 +- .../Model/Editor/QuickStyles/RendererTest.php | 2 +- .../Magento/DesignEditor/Model/StateTest.php | 10 +- .../DesignEditor/Model/Theme/ContextTest.php | 16 +- .../Model/Translate/Inline/ProviderTest.php | 6 +- .../DesignEditor/Model/Url/FactoryTest.php | 10 +- .../Model/Url/NavigationModeTest.php | 2 +- .../Magento/Dhl/Model/CarrierTest.php | 10 +- .../Magento/Directory/Block/CurrencyTest.php | 27 +- .../Magento/Directory/Helper/DataTest.php | 10 +- .../Model/Currency/Import/FactoryTest.php | 4 +- .../Directory/Model/PriceCurrencyTest.php | 6 +- .../Model/Resource/Country/CollectionTest.php | 14 +- .../Edit/Tab/Downloadable/LinksTest.php | 4 +- .../Edit/Tab/Downloadable/SamplesTest.php | 4 +- .../Block/Catalog/Product/LinksTest.php | 14 +- .../Downloadable/Helper/DownloadTest.php | 20 +- .../Downloadable/Model/Product/TypeTest.php | 6 +- .../Sales/Order/Pdf/Items/CreditmemoTest.php | 20 +- .../Pricing/Price/LinkPriceTest.php | 8 +- .../testsuite/Magento/Eav/Helper/DataTest.php | 4 +- .../Eav/Model/Attribute/Data/TextTest.php | 22 +- .../Eav/Model/AttributeFactoryTest.php | 4 +- .../Magento/Eav/Model/Entity/AbstractTest.php | 18 +- .../Entity/Attribute/Backend/AbstractTest.php | 2 +- .../Entity/Attribute/Backend/ArrayTest.php | 4 +- .../Collection/AbstractCollectionStub.php | 4 +- .../Collection/AbstractCollectionTest.php | 28 +- .../Magento/Eav/Model/Entity/TypeTest.php | 8 +- .../testsuite/Magento/Eav/Model/FormTest.php | 8 +- .../Attribute/Option/CollectionTest.php | 26 +- .../Model/Resource/Entity/AttributeTest.php | 25 +- .../Model/Validator/Attribute/DataTest.php | 32 +- .../Block/Adminhtml/Template/EditTest.php | 22 +- .../Email/Model/AbstractTemplateTest.php | 6 +- .../Template/Config/FileIteratorTest.php | 16 +- .../Model/Template/Config/ReaderTest.php | 24 +- .../Template/Config/SchemaLocatorTest.php | 10 +- .../Email/Model/Template/Config/XsdTest.php | 2 +- .../Email/Model/Template/ConfigTest.php | 10 +- .../Magento/Email/Model/TemplateTest.php | 8 +- .../Magento/Exception/InputExceptionTest.php | 83 - .../{ => Framework}/Acl/BuilderTest.php | 18 +- .../Acl/Loader/DefaultTest.php | 8 +- .../Acl/Loader/ResourceTest.php | 30 +- .../Acl/Resource/Config/Converter/DomTest.php | 6 +- .../Converter/_files/converted_valid_acl.php | 0 .../Config/Converter/_files/valid_acl.xml | 2 +- .../Acl/Resource/Config/XsdTest.php | 6 +- .../Config/_files/invalidAclXmlArray.php | 0 .../Acl/Resource/Config/_files/valid_acl.xml | 2 +- .../Acl/Resource/ProviderTest.php | 16 +- .../Acl/Resource/TreeBuilderTest.php | 6 +- .../Acl/ResourceFactoryTest.php | 18 +- .../Framework/App/Action/ForwardTest.php | 2 +- .../Magento/Framework/App/AreaListTest.php | 2 +- .../App/Arguments/ArgumentInterpreterTest.php | 8 +- .../Arguments/FileResolver/PrimaryTest.php | 10 +- .../App/Cache/Frontend/FactoryTest.php | 12 +- .../FactoryTest/CacheDecoratorDummy.php | 6 +- .../Framework/App/Cache/Frontend/PoolTest.php | 6 +- .../Magento/Framework/App/Cache/StateTest.php | 4 +- .../App/Cache/Type/AccessProxyTest.php | 2 +- .../App/Cache/Type/FrontendPoolTest.php | 6 +- .../Framework/App/Cache/Type/GenericTest.php | 2 +- .../Magento/Framework/App/CacheTest.php | 9 +- .../App/Config/Data/BackendModelPoolTest.php | 4 +- .../Framework/App/Config/FileResolverTest.php | 10 +- .../App/Config/Initial/ReaderTest.php | 10 +- .../App/Config/Initial/_files/config.xml | 2 +- .../Config/Initial/_files/initial_config1.xml | 2 +- .../Config/Initial/_files/initial_config2.xml | 2 +- .../Config/Initial/_files/valid_config.xml | 2 +- .../Framework/App/Config/ScopePoolTest.php | 4 +- .../App/Config/_files/valid_routes.xml | 2 +- .../Magento/Framework/App/CronTest.php | 2 +- .../App/EntryPoint/EntryPointTest.php | 2 +- .../Framework/App/Error/HandlerTest.php | 12 +- .../DirectoryList/ConfigurationTest.php | 6 +- .../DirectoryList/VerificationTest.php | 12 +- .../Magento/Framework/App/FilesystemTest.php | 12 +- .../Magento/Framework/App/HttpTest.php | 9 +- .../App/ObjectManager/ConfigCacheTest.php | 2 +- .../App/ObjectManager/ConfigLoaderTest.php | 10 +- .../Framework/App/PageCache/FormKeyTest.php | 4 +- .../Framework/App/PageCache/KernelTest.php | 8 +- .../Framework/App/PageCache/VersionTest.php | 4 +- .../App/Resource/Config/ReaderTest.php | 4 +- .../App/Resource/Config/_files/resources.xml | 2 +- .../Config/_files/valid_resources.xml | 2 +- .../Framework/App/Resource/ConfigTest.php | 4 +- .../Magento/Framework/App/ResourceTest.php | 18 +- .../App/Response/Http/FileFactoryTest.php | 4 +- .../Framework/App/Response/HttpTest.php | 4 +- .../Framework/App/ResponseFactoryTest.php | 2 +- .../App/Route/Config/_files/routes.xml | 2 +- .../Framework/App/Route/ConfigTest.php | 4 +- .../Magento/Framework/App/RouterListTest.php | 4 +- .../Framework/App/ScopeResolverPoolTest.php | 2 +- .../Magento/Framework/App/StateTest.php | 8 +- .../Magento/Framework/App/ViewTest.php | 8 +- .../Authorization/Policy/AclTest.php | 10 +- .../Authorization/Policy/DefaultTest.php | 6 +- .../{ => Framework}/AuthorizationTest.php | 12 +- .../{ => Framework}/Autoload/ClassMapTest.php | 12 +- .../Autoload/ClassMapTest/TestMap.php | 2 +- .../Autoload/IncludePathTest.php | 14 +- .../Autoload/IncludePathTest/Ns/TestClass.php | 2 +- .../Autoload/IncludePathTest/TestClass.php | 2 +- .../Autoload/IncludePathTest/constant.php | 0 .../{ => Framework}/Backup/FactoryTest.php | 12 +- .../{ => Framework}/Backup/MediaTest.php | 13 +- .../{ => Framework}/Backup/NomediaTest.php | 13 +- .../{ => Framework}/Backup/SnapshotTest.php | 8 +- .../{ => Framework}/Backup/_files/Fs.php | 6 +- .../{ => Framework}/Backup/_files/Ftp.php | 6 +- .../{ => Framework}/Backup/_files/Gz.php | 2 +- .../{ => Framework}/Backup/_files/Helper.php | 2 +- .../{ => Framework}/Backup/_files/Tar.php | 2 +- .../Backup/_files/data/code/.gitignore | 0 .../Backup/_files/data/media/.gitignore | 0 .../Backup/_files/data/pub/media/.gitignore | 0 .../Backup/_files/data/var/log/.gitignore | 0 .../{ => Framework}/Backup/_files/io.php | 16 +- .../Backend/Decorator/CompressionTest.php | 32 +- .../Decorator/DecoratorAbstractTest.php | 17 +- .../Cache/Backend/MongoDbTest.php | 24 +- .../Cache/Backend/_files/MongoBinData.txt | 0 .../Cache/Config/ConverterTest.php | 6 +- .../Cache/Config/_files/cache_config.php | 0 .../Cache/Config/_files/cache_config.xml | 2 +- .../{ => Framework}/Cache/ConfigTest.php | 10 +- .../{ => Framework}/Cache/CoreTest.php | 14 +- .../Cache/Frontend/Adapter/ZendTest.php | 8 +- .../Cache/Frontend/Decorator/BareTest.php | 6 +- .../Cache/Frontend/Decorator/ProfilerTest.php | 26 +- .../Cache/Frontend/Decorator/TagScopeTest.php | 8 +- .../Code/Generator/CodeGenerator/ZendTest.php | 6 +- .../Code/Generator/EntityAbstractTest.php | 62 +- .../{ => Framework}/Code/Generator/IoTest.php | 14 +- .../Code/Generator/TestAsset/ParentClass.php | 2 +- .../Code/Generator/TestAsset/SourceClass.php | 2 +- .../TestAsset/TestGenerationClass.php | 10 +- .../{ => Framework}/Code/GeneratorTest.php | 58 +- .../Code/Minifier/Adapter/Js/JsminTest.php | 4 +- .../Code/Minifier/Strategy/GenerateTest.php | 31 +- .../Code/Minifier/Strategy/LiteTest.php | 31 +- .../Code/Minifier/_files/js/original.js | 0 .../{ => Framework}/Code/MinifierTest.php | 14 +- .../Validator/NotProtectedExtensionTest.php | 2 +- .../{ => Framework}/Code/NameBuilderTest.php | 6 +- .../Code/Reader/ArgumentsReaderTest.php | 6 +- .../_files/ClassesForArgumentsReader.php | 0 .../Code/Validator/ArgumentSequenceTest.php | 8 +- .../Validator/ConstructorIntegrityTest.php | 16 +- .../Code/Validator/ContextAggregationTest.php | 10 +- .../Code/Validator/TypeDuplicationTest.php | 8 +- .../_files/ClassesForArgumentSequence.php | 2 +- .../_files/ClassesForConstructorIntegrity.php | 2 +- .../_files/ClassesForContextAggregation.php | 2 +- .../_files/ClassesForTypeDuplication.php | 0 .../SomeModule/Model/ElementFactory.php | 0 .../Magento/SomeModule/Model/Five/Test.php | 0 .../Magento/SomeModule/Model/Four/Test.php | 0 .../Magento/SomeModule/Model/One/Test.php | 0 .../code/Magento/SomeModule/Model/Proxy.php | 0 .../Magento/SomeModule/Model/Six/Test.php | 0 .../Magento/SomeModule/Model/Three/Test.php | 0 .../Magento/SomeModule/Model/Two/Test.php | 0 .../Config/Converter/Dom/FlatTest.php | 10 +- .../Config/Converter/DomTest.php | 2 +- .../Config/Data/ScopedTest.php | 12 +- .../Config/Dom/ArrayNodeConfigTest.php | 4 +- .../Config/Dom/NodeMergingConfigTest.php | 4 +- .../Config/Dom/NodePathMatcherTest.php | 2 +- .../{ => Framework}/Config/DomTest.php | 16 +- .../Config/FileIteratorTest.php | 10 +- .../Config/Reader/FilesystemTest.php | 20 +- .../{ => Framework}/Config/ScopeTest.php | 4 +- .../{ => Framework}/Config/ThemeTest.php | 18 +- .../Config/ValidationStateTest.php | 2 +- .../{ => Framework}/Config/ViewTest.php | 12 +- .../{ => Framework}/Config/XsdTest.php | 4 +- .../_files/area/default_default/theme.xml | 2 +- .../Config/_files/area/default_test/theme.xml | 2 +- .../_files/area/default_test2/theme.xml | 2 +- .../Config/_files/area/test_default/theme.xml | 2 +- .../theme.xml | 2 +- .../_files/converter/dom/attributes.php | 0 .../_files/converter/dom/attributes.xml | 0 .../Config/_files/converter/dom/cdata.php | 0 .../Config/_files/converter/dom/cdata.xml | 0 .../_files/converter/dom/flat/result.php | 0 .../_files/converter/dom/flat/source.xml | 0 .../converter/dom/flat/source_notuniq.xml | 0 .../converter/dom/flat/source_wrongarray.xml | 0 .../Config/_files/dom/ambiguous_merged.xml | 0 .../Config/_files/dom/ambiguous_new_one.xml | 0 .../Config/_files/dom/ambiguous_new_two.xml | 0 .../Config/_files/dom/ambiguous_one.xml | 0 .../Config/_files/dom/ambiguous_two.xml | 0 .../Config/_files/dom/attributes.xml | 0 .../Config/_files/dom/attributes_merged.xml | 0 .../Config/_files/dom/attributes_new.xml | 0 .../Config/_files/dom/converter/cdata.php | 0 .../Config/_files/dom/converter/cdata.xml | 0 .../_files/dom/converter/no_attributes.php | 0 .../_files/dom/converter/no_attributes.xml | 0 .../_files/dom/converter/with_attributes.php | 0 .../_files/dom/converter/with_attributes.xml | 0 .../{ => Framework}/Config/_files/dom/ids.xml | 0 .../Config/_files/dom/ids_merged.xml | 0 .../Config/_files/dom/ids_new.xml | 0 .../Config/_files/dom/namespaced.xml | 0 .../Config/_files/dom/namespaced_merged.xml | 0 .../Config/_files/dom/namespaced_new.xml | 0 .../Config/_files/dom/no_ids.xml | 0 .../Config/_files/dom/no_ids_merged.xml | 0 .../Config/_files/dom/no_ids_new.xml | 0 .../Config/_files/dom/override_node.xml | 0 .../_files/dom/override_node_merged.xml | 0 .../Config/_files/dom/override_node_new.xml | 0 .../Config/_files/dom/recursive.xml | 0 .../Config/_files/dom/recursive_deep.xml | 0 .../_files/dom/recursive_deep_merged.xml | 0 .../Config/_files/dom/recursive_deep_new.xml | 0 .../Config/_files/dom/recursive_merged.xml | 0 .../Config/_files/dom/recursive_new.xml | 0 .../Config/_files/dom/text_node.xml | 0 .../Config/_files/dom/text_node_merged.xml | 0 .../Config/_files/dom/text_node_new.xml | 0 .../Config/_files/dom/types.xml | 0 .../Config/_files/dom/types_merged.xml | 0 .../Config/_files/dom/types_new.xml | 0 .../Config/_files/reader/config.xml | 0 .../Config/_files/reader/schema.xsd | 0 .../{ => Framework}/Config/_files/sample.xsd | 0 .../Config/_files/theme_invalid.xml | 2 +- .../Config/_files/view_invalid.xml | 2 +- .../Config/_files/view_one.xml | 2 +- .../Config/_files/view_two.xml | 2 +- .../Controller/Router/Route/FactoryTest.php | 10 +- .../Convert/ConvertArrayTest.php | 4 +- .../{ => Framework}/Convert/ExcelTest.php | 37 +- .../{ => Framework}/Convert/ObjectTest.php | 16 +- .../{ => Framework}/Convert/XmlTest.php | 6 +- .../{ => Framework}/Convert/_files/output.txt | 0 .../PreProcessor/Cache/Import/CacheTest.php | 50 +- .../Cache/Import/ImportEntityTest.php | 18 +- .../Cache/Import/Map/StorageTest.php | 16 +- .../PreProcessor/Cache/Plugin/LessTest.php | 42 +- .../Css/PreProcessor/CompositeTest.php | 35 +- .../DB/Adapter/Pdo/MysqlTest.php | 30 +- .../{ => Framework}/DB/Ddl/TriggerTest.php | 32 +- .../{ => Framework}/DB/ProfilerTest.php | 14 +- .../Magento/{ => Framework}/DB/SelectTest.php | 14 +- .../Argument/Interpreter/ArrayTypeTest.php | 6 +- .../Data/Argument/Interpreter/BooleanTest.php | 4 +- .../Argument/Interpreter/CompositeTest.php | 18 +- .../Argument/Interpreter/ConstantTest.php | 2 +- .../Argument/Interpreter/NullTypeTest.php | 2 +- .../Data/Argument/Interpreter/NumberTest.php | 2 +- .../{ => Framework}/Data/Argument/XsdTest.php | 2 +- .../Argument/_files/typesInvalidArray.php | 0 .../Data/Argument/_files/types_schema.xsd | 2 +- .../Data/Argument/_files/types_valid.xml | 2 +- .../Collection/Db/FetchStrategy/CacheTest.php | 12 +- .../Collection/Db/FetchStrategy/QueryTest.php | 4 +- .../Data/Collection/DbTest.php | 73 +- .../{ => Framework}/Data/CollectionTest.php | 14 +- .../Form/Element/EditablemultiselectTest.php | 8 +- .../Data/Form/Element/FactoryTest.php | 18 +- .../Data/Form/Element/MultiselectTest.php | 10 +- .../{ => Framework}/Data/FormFactoryTest.php | 18 +- .../Magento/{ => Framework}/Data/FormTest.php | 18 +- .../{ => Framework}/Data/GraphTest.php | 30 +- .../{ => Framework}/Data/StructureTest.php | 120 +- .../Encryption/Crypt/_files/_cipher_info.php | 0 .../Crypt/_files/_crypt_fixtures.php | 0 .../{ => Framework}/Encryption/CryptTest.php | 33 +- .../Encryption/EncryptorTest.php | 16 +- .../Encryption/UrlCoderTest.php | 8 +- .../Magento/Framework/Error/HandlerTest.php | 117 + .../Magento/{ => Framework}/EscaperTest.php | 14 +- .../Event/Config/ConverterTest.php | 6 +- .../{ => Framework}/Event/Config/DataTest.php | 12 +- .../Event/Config/SchemaLocatorTest.php | 10 +- .../{ => Framework}/Event/Config/XsdTest.php | 4 +- .../Event/Config/_files/event_config.php | 0 .../Event/Config/_files/event_config.xml | 2 +- .../Config/_files/event_invalid_config.xml | 2 +- .../Config/_files/invalidEventsXmlArray.php | 0 .../Event/Config/_files/valid_events.xml | 2 +- .../Event/Invoker/InvokerDefaultTest.php | 18 +- .../{ => Framework}/Event/ManagerStub.php | 4 +- .../{ => Framework}/Event/ManagerTest.php | 10 +- .../Event/Observer/CollectionTest.php | 141 + .../Framework/Event/Observer/CronTest.php | 136 + .../Framework/Event/Observer/RegexTest.php | 71 + .../{Event => Framework}/EventFactoryTest.php | 14 +- .../Exception/AuthorizationExceptionTest.php | 10 +- .../Framework/Exception/ErrorMessageTest.php | 112 + .../Exception/InputExceptionTest.php | 183 + .../Exception/LocalizedExceptionTest.php | 94 + .../Filesystem/Directory/ReadTest.php | 24 +- .../Filesystem/Directory/WriteTest.php | 26 +- .../Filesystem/DirectoryListTest.php | 6 +- .../Filesystem/Driver/HttpTest.php | 6 +- .../Filesystem/DriverFactoryTest.php | 74 + .../Filesystem/File/ReadFactoryTest.php | 83 + .../Framework/Filesystem/File/ReadTest.php | 192 + .../Filesystem/File/WriteFactoryTest.php | 81 + .../Framework/Filesystem/File/WriteTest.php | 200 + .../Framework/Filesystem/Stub/Wrapper.php | 44 + .../Filesystem/WrapperFactoryTest.php | 64 + .../Filesystem/_files/http_mock.php | 4 +- .../{ => Framework}/FilesystemTest.php | 26 +- .../Filter/AbstractFactoryTest.php | 33 +- .../Filter/FilterManager/ConfigTest.php | 12 +- .../Filter/FilterManagerTest.php | 34 +- .../Filter/RemoveAccentsTest.php | 4 +- .../{ => Framework}/Filter/RemoveTagsTest.php | 8 +- .../{ => Framework}/Filter/SplitWordsTest.php | 6 +- .../{ => Framework}/Filter/StripTagsTest.php | 6 +- .../Filter/Template/SimpleTest.php | 6 +- .../{ => Framework}/Filter/TranslitTest.php | 8 +- .../Filter/TranslitUrlTest.php | 6 +- .../{ => Framework}/Filter/TruncateTest.php | 13 +- .../HTTP}/AuthenticationTest.php | 8 +- .../{Http => Framework/HTTP}/HeaderTest.php | 22 +- .../PhpEnvironment/RemoteAddressTest.php | 4 +- .../PhpEnvironment/ServerAddressTest.php | 6 +- .../Image/Adapter/AbstractTest.php | 20 +- .../{ => Framework}/Image/Adapter/Gd2Test.php | 10 +- .../Image/Adapter/ImageMagickTest.php | 13 +- .../Image/Adapter/_files/invalid_image.jpg | 0 .../Image/AdapterFactoryTest.php | 36 +- .../Interception/Chain/ChainTest.php | 36 +- .../Code/Generator/InterceptorTest.php | 17 +- .../Code/InterfaceValidatorTest.php | 150 + .../Interception/Config/ConfigTest.php | 70 +- .../Module/Model/InterfaceValidator/Item.php | 2 +- .../ItemPlugin/ExtraParameters.php | 6 +- .../ItemPlugin/IncompatibleArgumentsCount.php | 6 +- .../ItemPlugin/IncompatibleArgumentsType.php | 6 +- .../ItemPlugin/IncompatibleInterface.php | 2 +- .../ItemPlugin/IncorrectSubject.php | 6 +- .../ItemPlugin/InvalidProceed.php | 6 +- .../ItemPlugin/ValidPlugin.php | 14 +- .../InterfaceValidator/ItemWithArguments.php | 2 +- .../Interception/Custom/Module/Model/Item.php | 2 +- .../Custom/Module/Model/Item/Enhanced.php | 4 +- .../Custom/Module/Model/ItemContainer.php | 2 +- .../Module/Model/ItemContainer/Enhanced.php | 4 +- .../Model/ItemContainerPlugin/Simple.php | 2 +- .../Module/Model/ItemPlugin/Advanced.php | 2 +- .../Custom/Module/Model/ItemPlugin/Simple.php | 2 +- .../Interception/Definition/CompiledTest.php | 8 +- .../Interception/ObjectManager/ConfigTest.php | 6 +- .../PluginList/PluginListTest.php | 67 +- .../Interception/_files/reader_mock_map.php | 18 +- .../Less/File/FileList/CollatorTest.php | 14 +- .../{ => Framework}/Less/_files/invalid.less | 0 .../{ => Framework}/Less/_files/valid.less | 0 .../Locale/Hierarchy/Config/ConverterTest.php | 6 +- .../Hierarchy/Config/FileResolverTest.php | 25 +- .../Config/_files/custom/hierarchy_config.xml | 0 .../_files/default/hierarchy_config.xml | 0 .../Locale/Hierarchy/ConfigTest.php | 20 +- .../{ => Framework}/Locale/ValidatorTest.php | 10 +- .../{ => Framework}/Mail/MessageTest.php | 12 +- .../Mail/Template/FactoryTest.php | 16 +- .../Mail/Template/TransportBuilderTest.php | 42 +- .../{ => Framework}/Mail/TransportTest.php | 16 +- .../{ => Framework}/Math/CalculatorTest.php | 10 +- .../{ => Framework}/Math/DivisionTest.php | 4 +- .../{ => Framework}/Math/RandomTest.php | 20 +- .../Message/AbstractMessageTest.php | 22 +- .../Message/CollectionTest.php | 104 +- .../{ => Framework}/Message/ErrorTest.php | 8 +- .../{ => Framework}/Message/FactoryTest.php | 22 +- .../{ => Framework}/Message/ManagerTest.php | 67 +- .../{ => Framework}/Message/NoticeTest.php | 8 +- .../{ => Framework}/Message/SuccessTest.php | 8 +- .../{ => Framework}/Message/WarningTest.php | 8 +- .../Model/AbstractModelTest.php | 46 +- .../ActionValidator/RemoveActionTest.php | 13 +- .../Module/Declaration/Converter/DomTest.php | 6 +- .../_files/converted_valid_module.php | 0 .../Converter/_files/valid_module.xml | 2 +- .../app/code/Module/Four/etc/module.xml | 2 +- .../_files/app/code/Module/One/etc/module.xml | 2 +- .../app/code/Module/Three/etc/module.xml | 2 +- .../_files/app/code/Module/Two/etc/module.xml | 2 +- .../_files/app/etc/custom/module.xml | 2 +- .../Module/Declaration/FileResolverTest.php | 10 +- .../Declaration/Reader/FilesystemTest.php | 30 +- .../Module/DependencyManagerTest.php | 6 +- .../{ => Framework}/Module/Dir/ReaderTest.php | 20 +- .../Module/Dir/ReverseResolverTest.php | 14 +- .../{ => Framework}/Module/DirTest.php | 21 +- .../{ => Framework}/Module/ManagerTest.php | 12 +- .../{ => Framework}/Module/ModuleListTest.php | 12 +- .../Module/ResourceResolverTest.php | 8 +- .../Module/Setup/MigrationTest.php | 94 +- .../Setup/_files/data_content_plain_model.php | 8 +- .../_files/data_content_plain_pk_fields.php | 6 +- .../_files/data_content_plain_resource.php | 6 +- .../Setup/_files/data_content_serialized.php | 6 +- .../Module/Setup/_files/data_content_wiki.php | 6 +- .../Module/Setup/_files/data_content_xml.php | 6 +- .../Module/Updater/SetupFactoryTest.php | 8 +- .../{ => Framework}/Module/UpdaterTest.php | 24 +- .../Module/data/module_first_setup/.gitignore | 0 .../data/module_second_setup/.gitignore | 0 .../Module/sql/module_first_setup/.gitignore | 0 .../Mview/ActionFactoryTest.php | 25 +- .../Mview/Config/ConverterTest.php | 6 +- .../Mview/Config/Data/ProxyTest.php | 28 +- .../{ => Framework}/Mview/Config/DataTest.php | 24 +- .../Mview/Config/ReaderTest.php | 16 +- .../{ => Framework}/Mview/ConfigTest.php | 8 +- .../{ => Framework}/Mview/ProcessorTest.php | 18 +- .../Mview/View/ChangelogTest.php | 27 +- .../Mview/View/CollectionTest.php | 30 +- .../Mview/View/SubscriptionFactoryTest.php | 12 +- .../Mview/View/SubscriptionTest.php | 42 +- .../{ => Framework}/Mview/ViewTest.php | 120 +- .../Magento/{ => Framework}/Mview/XsdTest.php | 4 +- .../Mview/_files/invalidMviewXmlArray.php | 0 .../Mview/_files/mview_config.php | 0 .../Mview/_files/mview_merged_one.xml | 2 +- .../Mview/_files/mview_merged_two.xml | 2 +- .../Mview/_files/mview_one.xml | 2 +- .../Mview/_files/mview_three.xml | 2 +- .../Mview/_files/mview_two.xml | 2 +- .../Mview/_files/valid_mview.xml | 2 +- .../{ => Framework}/Object/CacheTest.php | 10 +- .../Object/Copy/Config/ConverterTest.php | 8 +- .../Object/Copy/Config/SchemaLocatorTest.php | 11 +- .../Object/Copy/Config/_files}/fieldset.xml | 2 +- .../Copy/Config/_files/fieldset_config.php | 0 .../Object/Copy/ConfigTest.php | 18 +- .../{ => Framework}/Object/CopyTest.php | 14 +- .../{ => Framework}/Object/MapperTest.php | 10 +- .../Code/Generator/FactoryTest.php | 11 +- .../Code/Generator/ProxyTest.php | 11 +- .../Code/Generator/_files/Sample.php | 4 +- .../Code/Generator/_files/SampleFactory.txt | 12 +- .../Code/Generator/_files/SampleProxy.txt | 16 +- .../ObjectManager/Config/ConfigTest.php | 6 +- .../Config/Mapper/ArgumentParserTest.php | 2 +- .../ObjectManager/Config/Mapper/DomTest.php | 10 +- .../Config/Mapper/_files/argument_parser.xml | 0 .../Mapper/_files/mapped_simple_di_config.php | 18 +- .../Config/Mapper/_files/simple_di_config.xml | 6 +- .../ObjectManager/Config/Reader/DomTest.php | 22 +- .../Config/Reader/_files/ConfigDomMock.php | 0 .../ObjectManager/Config/XsdTest.php | 6 +- .../Config/_files/invalidConfigXmlArray.php | 0 .../Config/_files/valid_config.xml | 2 +- .../Definition/Compiled/BinaryTest.php | 4 +- .../Definition/Compiled/SerializedTest.php | 8 +- .../ObjectManager/DefinitionFactoryTest.php | 55 +- .../ObjectManager/Factory/FactoryTest.php | 45 +- .../Factory/Fixture/CircularOne.php | 2 +- .../Factory/Fixture/CircularThree.php | 2 +- .../Factory/Fixture/CircularTwo.php | 2 +- .../Factory/Fixture/OneScalar.php | 2 +- .../Factory/Fixture/Polymorphous.php | 2 +- .../ObjectManager/Factory/Fixture/Two.php | 2 +- .../ObjectManager/ObjectManagerTest.php | 30 +- .../ObjectManager/Relations/CompiledTest.php | 6 +- .../ObjectManager/Relations/RuntimeTest.php | 8 +- .../Magento/{ => Framework}/ObjectTest.php | 76 +- .../Phrase/Renderer/CompositeTest.php | 10 +- .../Phrase/Renderer/InlineTest.php | 18 +- .../Phrase/Renderer/PlaceholderTest.php | 4 +- .../Phrase/Renderer/TranslateTest.php | 10 +- .../Magento/{ => Framework}/PhraseTest.php | 22 +- .../Pricing/Adjustment/CalculatorTest.php | 21 +- .../Pricing/Adjustment/CollectionTest.php | 21 +- .../Pricing/Adjustment/FactoryTest.php | 23 +- .../Pricing/Adjustment/PoolTest.php | 19 +- .../Pricing/Amount/AmountFactoryTest.php | 14 +- .../Pricing/Amount/BaseTest.php | 9 +- .../Pricing/Price/FactoryTest.php | 32 +- .../Pricing/PriceCompositeTest.php | 19 +- .../Pricing/PriceInfo/BaseTest.php | 45 +- .../Pricing/PriceInfo/FactoryTest.php | 21 +- .../Pricing/Render/AbstractAdjustmentTest.php | 22 +- .../Pricing/Render/AmountTest.php | 31 +- .../Pricing/Render/LayoutTest.php | 27 +- .../Pricing/Render/PriceBoxTest.php | 39 +- .../Pricing/Render/RendererPoolTest.php | 81 +- .../{ => Framework}/Pricing/RenderTest.php | 38 +- .../Profiler/Driver/FactoryTest.php | 35 +- .../Driver/Standard/Output/CsvfileTest.php | 6 +- .../Driver/Standard/Output/FactoryTest.php | 26 +- .../Driver/Standard/Output/FirebugTest.php | 8 +- .../Driver/Standard/OutputAbstractTest.php | 26 +- .../Profiler/Driver/Standard/StatTest.php | 98 +- .../Profiler/Driver/StandardTest.php | 39 +- .../Magento/{ => Framework}/ProfilerTest.php | 166 +- .../Service/Data/Eav/AttributeValueTest.php} | 13 +- .../Service/DataObjectConverterTest.php | 4 +- .../{ => Framework}/Session/ConfigTest.php | 22 +- .../Session/SaveHandler/DbTableTest.php | 42 +- .../Session/SaveHandlerFactoryTest.php | 14 +- .../Shell/CommandRendererBackgroundTest.php | 6 +- .../Shell/CommandRendererTest.php | 2 +- .../Magento/{ => Framework}/ShellTest.php | 23 +- .../{ => Framework}/Simplexml/ConfigTest.php | 4 +- .../{ => Framework}/Simplexml/ElementTest.php | 24 +- .../{ => Framework}/Simplexml/_files/data.xml | 0 .../Simplexml/_files/mixed_data.xml | 0 .../{ => Framework}/Stdlib/ArrayUtilsTest.php | 24 +- .../Stdlib/BooleanUtilsTest.php | 2 +- .../Stdlib/DateTime/Filter/DateTest.php | 6 +- .../Stdlib/DateTime/Filter/DateTimeTest.php | 6 +- .../DateTime/Timezone/ValidatorTest.php | 12 +- .../{ => Framework}/Stdlib/DateTimeTest.php | 23 +- .../{ => Framework}/Stdlib/StringTest.php | 14 +- .../Translate/AdapterAbstractTest.php | 10 +- .../{ => Framework}/Translate/AdapterTest.php | 8 +- .../Translate/Inline/ProxyTest.php | 26 +- .../Translate/Inline/StateTest.php | 2 +- .../{ => Framework}/Translate/InlineTest.php | 40 +- .../Magento/{ => Framework}/TranslateTest.php | 46 +- .../Url/QueryParamsResolverTest.php | 6 +- .../Url/RouteParamsResolverFactoryTest.php | 16 +- .../{ => Framework}/Url/ValidatorTest.php | 6 +- .../Magento/{ => Framework}/UrlTest.php | 67 +- .../{ => Framework}/Validator/BuilderTest.php | 110 +- .../{ => Framework}/Validator/ConfigTest.php | 70 +- .../Constraint/Option/CallbackTest.php | 22 +- .../Validator/Constraint/OptionTest.php | 11 +- .../Validator/Constraint/PropertyTest.php | 32 +- .../Validator/ConstraintTest.php | 21 +- .../Validator/Entity/PropertiesTest.php | 35 +- .../Validator/ExceptionTest.php | 13 +- .../{ => Framework}/Validator/ObjectTest.php | 14 +- .../Validator/StringLengthTest.php | 13 +- .../Framework/Validator/Test/Alnum.php | 32 + .../Validator/Test/Callback.php | 7 +- .../Magento/Framework/Validator/Test/Int.php | 32 + .../Validator/Test/NotEmpty.php | 9 +- .../Validator/Test/StringLength.php | 9 +- .../{ => Framework}/Validator/Test/True.php | 9 +- .../Validator/ValidatorAbstractTest.php | 33 +- .../negative/invalid_builder_class.xml | 7 +- .../negative/invalid_builder_instance.xml | 9 +- .../negative/invalid_child_for_option.xml | 7 +- .../negative/invalid_constraint.xml | 5 +- .../negative/invalid_content_for_callback.xml | 5 +- .../negative/invalid_entity_callback.xml | 5 +- .../validation/negative/invalid_method.xml | 7 +- .../negative/invalid_method_callback.xml | 7 +- .../multiple_callback_in_argument.xml | 11 +- .../negative/no_class_for_constraint.xml | 5 +- .../validation/negative/no_constraint.xml | 5 +- .../negative/no_name_for_entity.xml | 7 +- .../validation/negative/no_name_for_group.xml | 7 +- .../validation/negative/no_name_for_rule.xml | 9 +- .../negative/no_rule_for_reference.xml | 7 +- .../validation/negative/not_unique_use.xml | 7 +- .../positive/builder/validation.xml | 15 +- .../positive/module_a/validation.xml | 15 +- .../positive/module_b/validation.xml | 9 +- .../Magento/{ => Framework}/ValidatorTest.php | 45 +- .../View/Asset/CollectionTest.php | 14 +- .../View/Asset/GroupedCollectionTest.php | 36 +- .../View/Asset/MergeServiceTest.php | 56 +- .../View/Asset/MergeStrategy/ChecksumTest.php | 12 +- .../View/Asset/MergeStrategy/DirectTest.php | 17 +- .../Asset/MergeStrategy/FileExistsTest.php | 15 +- .../{ => Framework}/View/Asset/MergedTest.php | 38 +- .../View/Asset/MinifiedTest.php | 33 +- .../View/Asset/MinifyServiceTest.php | 48 +- .../View/Asset/PreProcessor/CompositeTest.php | 44 +- .../View/Asset/PropertyGroupTest.php | 6 +- .../View/Asset/PublicFileTest.php | 10 +- .../{ => Framework}/View/Asset/RemoteTest.php | 6 +- .../View/Asset/ViewFileTest.php | 12 +- .../View/DeployedFilesManagerTest.php | 4 +- .../View/Design/Fallback/FactoryTest.php | 14 +- .../Design/Fallback/Rule/CompositeTest.php | 8 +- .../Fallback/Rule/ModularSwitchTest.php | 12 +- .../View/Design/Fallback/Rule/SimpleTest.php | 4 +- .../View/Design/Fallback/Rule/ThemeTest.php | 12 +- .../Strategy/Fallback/CachingProxyTest.php | 24 +- .../FileResolution/Strategy/FallbackTest.php | 26 +- .../FileResolution/StrategyPoolTest.php | 12 +- .../Theme/Customization/AbstractFileTest.php | 52 +- .../Design/Theme/Customization/PathTest.php | 20 +- .../View/Design/Theme/CustomizationTest.php | 37 +- .../View/Design/Theme/Domain/FactoryTest.php | 20 +- .../Design/Theme/FlyweightFactoryTest.php | 10 +- .../View/Design/Theme/Image/UploaderTest.php | 26 +- .../View/Design/Theme/ImageTest.php | 40 +- .../View/Element/AbstractBlockTest.php | 20 +- .../View/Element/Html/Link/CurrentTest.php | 20 +- .../View/Element/Html/LinksTest.php | 20 +- .../View/Element/TemplateTest.php | 20 +- .../{ => Framework}/View/FileSystemTest.php | 51 +- .../{ => Framework}/View/Helper/JsTest.php | 6 +- .../Interpreter/Decorator/UpdaterTest.php | 24 +- .../Argument/Interpreter/HelperMethodTest.php | 10 +- .../Argument/Interpreter/NamedParamsTest.php | 6 +- .../Argument/Interpreter/ObjectTest.php | 12 +- .../Argument/Interpreter/OptionsTest.php | 12 +- .../Layout/Argument/Interpreter/UrlTest.php | 10 +- .../View/Layout/Argument/ParserTest.php | 4 +- .../View/Layout/Argument/_files/arguments.xml | 0 .../View/Layout/ElementTest.php | 8 +- .../View/Layout/File/FactoryTest.php | 14 +- .../Layout/File/FileList/CollatorTest.php | 14 +- .../View/Layout/File/FileList/FactoryTest.php | 25 +- .../View/Layout/File/FileListTest.php | 20 +- .../View/Layout/File/Source/AggregateTest.php | 46 +- .../View/Layout/File/Source/BaseTest.php | 14 +- .../Source/Decorator/ModuleDependencyTest.php | 22 +- .../Source/Decorator/ModuleOutputTest.php | 18 +- .../Layout/File/Source/Override/BaseTest.php | 16 +- .../Layout/File/Source/Override/ThemeTest.php | 32 +- .../View/Layout/File/Source/ThemeTest.php | 20 +- .../{ => Framework}/View/Layout/FileTest.php | 8 +- .../View/Layout/ScheduledStructureTest.php | 58 +- .../{ => Framework}/View/LayoutTest.php | 28 +- .../View/Publisher/CssFileTest.php | 40 +- .../View/Publisher/FileAbstractTest.php | 22 +- .../View/Publisher/FileFactoryTest.php | 14 +- .../View/Publisher/FileTest.php | 40 +- .../{ => Framework}/View/PublisherTest.php | 43 +- .../View/TemplateEngine/PhpTest.php | 14 +- .../View/TemplateEngine/_files/simple.phtml | 0 .../View/TemplateEngineFactoryTest.php | 8 +- .../View/TemplateEnginePoolTest.php | 6 +- .../View/Url/CssResolverTest.php | 117 +- .../View/Url/_files/result.css | 0 .../View/Url/_files/source.css | 0 .../Magento/{ => Framework}/View/UrlTest.php | 30 +- .../_files/Acl/Resource/resourceList.php | 0 .../_files/Acl/Resource/result.php | 0 .../GiftMessage/Helper/MessageTest.php | 6 +- .../Magento/GoogleAdwords/Helper/DataTest.php | 2 +- .../Model/Config/Source/LanguageTest.php | 8 +- .../GoogleAdwords/Model/ObserverTest.php | 6 +- .../Model/Validator/FactoryTest.php | 24 +- .../Block/Code/CategoryTest.php | 4 +- .../Block/Code/ProductTest.php | 4 +- .../GoogleOptimizer/Helper/FormTest.php | 10 +- .../Model/Observer/Block/Category/TabTest.php | 8 +- .../Model/Observer/Category/DeleteTest.php | 4 +- .../Model/Observer/Category/SaveTest.php | 4 +- .../Model/Observer/CmsPage/DeleteTest.php | 4 +- .../Model/Observer/CmsPage/SaveTest.php | 4 +- .../Model/Observer/Product/DeleteTest.php | 4 +- .../Model/Observer/Product/SaveTest.php | 4 +- .../Block/SiteVerificationTest.php | 4 +- .../Model/AttributeFactoryTest.php | 12 +- .../GoogleShopping/Model/ServiceTest.php | 8 +- .../Adminhtml/Order/Create/SidebarTest.php | 2 +- .../Composite/Fieldset/GroupedTest.php | 4 +- .../ListAssociatedProductsTest.php | 4 +- .../Block/Product/View/Type/GroupedTest.php | 10 +- .../Block/Stockqty/Type/GroupedTest.php | 4 +- .../Controller/Adminhtml/EditTest.php | 2 +- .../Model/Product/Type/GroupedTest.php | 8 +- .../Model/Product/Type/PluginTest.php | 2 +- .../Pricing/Price/FinalPriceTest.php | 14 +- .../Model/Export/Config/SchemaLocatorTest.php | 2 +- .../ImportExport/Model/Export/ConfigTest.php | 2 +- .../Model/Export/Entity/AbstractEavTest.php | 4 +- .../Magento/ImportExport/Model/ExportTest.php | 4 +- .../Model/Import/Config/SchemaLocatorTest.php | 2 +- .../ImportExport/Model/Import/ConfigTest.php | 2 +- .../Model/Import/Entity/AbstractTest.php | 6 +- .../Model/Import/Entity/Eav/CustomerTest.php | 257 -- .../Model/Import/Entity/EavAbstractTest.php | 4 +- .../Import/Entity/Product/OptionTest.php | 12 +- .../Model/Import/Entity/ProductTest.php | 16 +- .../Model/Import/EntityAbstractTest.php | 10 +- .../Model/Import/Source/CsvTest.php | 28 +- .../CollectionByPagesIteratorTest.php | 10 +- .../Import/CustomerComposite/DataTest.php | 259 -- .../Magento/Index/App/IndexerTest.php | 2 +- .../Indexer/Config/SchemaLocatorTest.php | 2 +- .../Index/Model/Indexer/ConfigTest.php | 4 +- .../Magento/Index/Model/Lock/StorageTest.php | 6 +- .../Index/Model/Process/FileFactoryTest.php | 2 +- .../Magento/Index/Model/ProcessTest.php | 6 +- .../Magento/Indexer/App/IndexerTest.php | 12 +- .../Indexer/Model/ActionFactoryTest.php | 4 +- .../Magento/Indexer/Model/Config/DataTest.php | 4 +- .../Indexer/Model/Config/ReaderTest.php | 10 +- .../Indexer/Model/Indexer/CollectionTest.php | 2 +- .../Magento/Indexer/Model/IndexerTest.php | 4 +- .../Model/Processor/InvalidateCacheTest.php | 8 +- .../Magento/Indexer/Model/ProcessorTest.php | 4 +- .../Install/App/Action/Plugin/DirTest.php | 6 +- .../Install/App/Action/Plugin/InstallTest.php | 2 +- .../Magento/Install/App/ConsoleTest.php | 4 +- .../Magento/Install/Block/BeginTest.php | 2 +- .../Magento/Install/Controller/WizardTest.php | 22 +- .../Install/Model/Installer/ConfigTest.php | 20 +- .../Install/Model/Installer/Db/Mysql4Test.php | 8 +- .../Magento/Install/Model/WizardTest.php | 4 +- .../Controller/Adminhtml/IntegrationTest.php | 48 +- .../Integration/Helper/Oauth/ConsumerTest.php | 20 +- .../Integration/Helper/Oauth/OauthTest.php | 16 +- .../Integration/Helper/Oauth/RequestTest.php | 28 +- .../Integration/Model/Config/XsdTest.php | 2 +- .../Model/Integration/FactoryTest.php | 4 +- .../Magento/Integration/Model/ManagerTest.php | 4 +- .../Magento/Integration/Oauth/OauthTest.php | 246 +- .../Integration/Service/OauthV1Test.php | 18 +- .../Code/InterfaceValidatorTest.php | 148 - .../Block/NavigationTest.php | 4 +- .../unit/testsuite/Magento/Log/LoggerTest.php | 30 +- .../Log/Model/Shell/Command/FactoryTest.php | 2 +- .../Magento/Log/Model/VisitorTest.php | 8 +- .../Newsletter/Controller/ManageTest.php | 14 +- .../Model/Queue/TransportBuilderTest.php | 10 +- .../Magento/Newsletter/Model/TemplateTest.php | 8 +- .../Model/BanktransferTest.php | 10 +- .../Model/CashondeliveryTest.php | 10 +- .../Block/Adminhtml/Form/Field/ExportTest.php | 4 +- .../Block/Adminhtml/Form/Field/ImportTest.php | 2 +- .../testsuite/Magento/Ogone/Model/ApiTest.php | 10 +- .../App}/CacheIdentifierPluginTest.php | 16 +- .../PageCache/Block/Controller/StubBlock.php | 4 +- .../System/Config/Form/Field/ExportTest.php | 8 +- .../System/Config/Form/Field/StubExport.php | 4 +- .../PageCache/Controller/BlockTest.php | 6 +- .../Magento/PageCache/Helper/DataTest.php | 6 +- .../App/FrontController/MessageBoxTest.php | 8 +- .../Magento/PageCache/Model/ConfigTest.php | 8 +- .../Model/Layout/LayoutPluginTest.php | 4 +- .../Magento/PageCache/Model/ObserverTest.php | 32 +- .../Payment/Block/Form/ContainerTest.php | 4 +- .../Block/Info/ContainerAbstractTest.php | 10 +- .../Payment/Block/Info/InstructionsTest.php | 4 +- .../Payment/Block/Info/SubstitutionTest.php | 10 +- .../Magento/Payment/Block/InfoTest.php | 2 +- .../Magento/Payment/Helper/DataTest.php | 2 +- .../Model/Cart/SalesModel/FactoryTest.php | 4 +- .../Model/Cart/SalesModel/OrderTest.php | 12 +- .../Model/Cart/SalesModel/QuoteTest.php | 2 +- .../Magento/Payment/Model/CartTest.php | 14 +- .../Payment/Model/Method/FactoryTest.php | 6 +- .../Method/Specification/FactoryTest.php | 4 +- .../Magento/Paypal/Block/Express/FormTest.php | 15 +- .../Paypal/Block/Express/ReviewTest.php | 4 +- .../Paypal/Block/Payflow/Link/IframeTest.php | 2 +- .../Paypal/Block/PayflowExpress/FormTest.php | 15 +- .../Controller/Billing/AgreementTest.php | 12 +- .../Billing/Agreement/OrdersUpdaterTest.php | 4 +- .../Magento/Paypal/Model/CartTest.php | 33 +- .../Magento/Paypal/Model/ObserverTest.php | 16 +- .../Paypal/Model/PayflowadvancedTest.php | 4 +- .../Magento/Paypal/Model/PayflowlinkTest.php | 4 +- .../Magento/Persistent/Helper/DataTest.php | 4 +- .../Magento/Persistent/Model/FactoryTest.php | 4 +- .../Magento/Persistent/Model/ObserverTest.php | 14 +- .../Magento/Persistent/Model/SessionTest.php | 25 +- .../Block/Product/View/PriceTest.php | 8 +- .../Block/Product/View/StockTest.php | 8 +- .../Product/Edit/Tab/Price/RecurringTest.php | 22 +- .../Block/Checkout/Onepage/SuccessTest.php | 2 +- .../Block/Payment/GridTest.php | 10 +- .../Block/Payment/Related/Orders/GridTest.php | 8 +- .../Block/Payment/View/AddressTest.php | 8 +- .../Block/Payment/View/DataTest.php | 4 +- .../Block/Payment/View/FeesTest.php | 4 +- .../Block/Payment/View/ItemTest.php | 4 +- .../Block/Payment/View/ReferenceTest.php | 4 +- .../Block/Payment/View/ScheduleTest.php | 4 +- .../Observer/CheckoutManagerObserverTest.php | 8 +- .../PaymentAvailabilityObserverTest.php | 4 +- .../RecurringPayment/Model/ObserverTest.php | 22 +- .../Model/Resource/Report/CollectionTest.php | 4 +- .../Review/Block/Adminhtml/MainTest.php | 2 +- .../Review/Block/Customer/RecentTest.php | 6 +- .../Review/Summary/CollectionTest.php | 16 +- .../Rss/Block/Catalog/AbstractCatalogTest.php | 6 +- .../Adminhtml/Items/AbstractItemsTest.php | 4 +- .../Block/Adminhtml/Items/AbstractTest.php | 6 +- .../Create/Search/Grid/Renderer/QtyTest.php | 2 +- .../Create/Sidebar/AbstractSidebarTest.php | 2 +- .../Block/Adminhtml/Order/Totals/TaxTest.php | 2 +- .../Adminhtml/Order/View/GiftmessageTest.php | 4 +- .../Magento/Sales/Block/Guest/LinkTest.php | 2 +- .../Sales/Block/Items/AbstractTest.php | 20 +- .../Adminhtml/Order/CreditmemoTest.php | 22 +- .../Sales/Controller/Adminhtml/OrderTest.php | 4 +- .../Sales/Controller/Adminhtml/Stub/Order.php | 2 +- .../Magento/Sales/Helper/AdminTest.php | 321 ++ .../Magento/Sales/Helper/DataTest.php | 294 ++ .../Magento/Sales/Helper/GuestTest.php | 188 + .../Magento/Sales/Helper/ReorderTest.php | 229 ++ .../Sales/Model/AdminOrder/CreateTest.php | 12 +- .../Magento/Sales/Model/Config/ReaderTest.php | 2 +- .../Sales/Model/Config/SchemaLocatorTest.php | 2 +- .../Magento/Sales/Model/Convert/QuoteTest.php | 4 +- .../Sales/Model/Email/TemplateTest.php | 87 + .../Sales/Model/Email/_files/test_include.php | 24 + .../Grid/Child/CollectionUpdaterTest.php | 2 +- .../Model/Grid/CollectionUpdaterTest.php | 2 +- .../Backend/CatalogProductQuoteTest.php | 4 +- .../Observer/Backend/CustomerQuoteTest.php | 215 ++ .../Quote/Address/CollectTotalsTest.php | 182 +- .../Quote/Address/VatValidatorTest.php | 4 +- .../Magento/Sales/Model/ObserverTest.php | 456 +++ .../Order/Invoice/Total/ShippingTest.php | 12 +- .../Magento/Sales/Model/Order/InvoiceTest.php | 8 +- .../Sales/Model/Order/Pdf/AbstractTest.php | 33 +- .../Model/Order/Pdf/Config/ReaderTest.php | 16 +- .../Order/Pdf/Config/SchemaLocatorTest.php | 10 +- .../Sales/Model/Order/Pdf/Config/XsdTest.php | 2 +- .../Sales/Model/Order/Pdf/ConfigTest.php | 4 +- .../Sales/Model/Order/Pdf/InvoiceTest.php | 9 +- .../Model/Order/Pdf/Total/FactoryTest.php | 6 +- .../Sales/Model/Order/Shipment/TrackTest.php | 2 +- .../Magento/Sales/Model/Order/StatusTest.php | 4 +- .../Model/Order/Total/Config/BaseTest.php | 6 +- .../Model/Payment/Method/ConverterTest.php | 173 + .../Magento/Sales/Model/Quote/ItemTest.php | 1099 +++++- .../Sales/Model/Resource/QuoteTest.php | 10 +- .../Sales/Model/Status/ListStatusTest.php | 109 + .../Magento/SalesRule/Model/ObserverTest.php | 8 +- .../Model/Resource/Report/RuleTest.php | 18 +- .../Rule/Action/Discount/CartFixedTest.php | 2 +- .../Block/Adminhtml/Order/TrackingTest.php | 4 +- .../Magento/Shipping/Helper/CarrierTest.php | 2 +- .../Magento/Sitemap/Model/SitemapTest.php | 39 +- .../App/Action/Plugin/ContextTest.php} | 12 +- .../App/Action/Plugin/StoreCheckTest.php | 41 +- .../Plugin/RequestPreprocessorTest.php | 2 +- .../Magento/Store/Helper/CookieTest.php | 2 +- .../Model/Config/Reader/DefaultReaderTest.php | 4 +- .../Store/Model/Config/Reader/StoreTest.php | 34 +- .../Store/Model/Config/Reader/WebsiteTest.php | 4 +- .../Store/Model/Resolver/StoreTest.php | 87 + .../Store/Model/Resolver/WebsiteTest.php | 87 + .../Magento/Store/Model/Storage/DbTest.php | 410 ++ ...DefaultTest.php => DefaultStorageTest.php} | 25 +- .../Store/Model/StorageFactoryTest.php | 318 +- .../Magento/Store/Model/StoreManagerTest.php | 34 +- .../Magento/Store/Model/StoreTest.php | 489 +++ .../Tax/Model/TaxClass/FactoryTest.php | 6 +- .../Tax/Model/TaxClass/Type/CustomerTest.php | 8 +- .../Tax/Model/TaxClass/Type/ProductTest.php | 2 +- .../Magento/Tax/Pricing/AdjustmentTest.php | 6 +- .../Tax/Pricing/Render/AdjustmentTest.php | 26 +- .../Report/Writer/Csv/AbstractWriterTest.php | 4 +- .../Magento/SomeModule/ElementFactory.php | 6 +- .../app/code/Magento/SomeModule/etc/di.xml | 2 +- .../Tools/Di/_files/app/etc/di/config.xml | 4 +- .../Migration/Acl/Db/Adapter/FactoryTest.php | 12 +- .../Namespace/Module/etc/adminhtml.xml | 2 +- .../core/ANamespace/Module/etc/adminhtml.xml | 2 +- .../core/BNamespace/Module/etc/adminhtml.xml | 2 +- .../local/Namespace/Module/etc/adminhtml.xml | 2 +- .../Acl/_files/parse_node_source.xml | 2 +- .../Migration/Acl/_files/remove/empty.xml | 2 +- .../Migration/Acl/_files/remove/not_empty.xml | 2 +- .../Migration/Acl/_files/save/adminhtml.xml | 2 +- .../_files/update_child_acl_nodes_result.xml | 2 +- .../_files/update_child_acl_nodes_source.xml | 2 +- .../_files/update_menu_attributes_result.xml | 2 +- .../_files/update_menu_attributes_source.xml | 2 +- .../Test/Tools/View/Generator/ConfigTest.php | 6 +- .../Tools/View/Generator/CopyRuleTest.php | 8 +- .../View/Generator/ThemeDeploymentTest.php | 26 +- .../View/Generator/_files/fixture_themes.php | 8 +- .../Theme/Edit/Form/Element/FileTest.php | 2 +- .../System/Design/Theme/Tab/CssTest.php | 12 +- .../System/Design/Theme/Tab/JsTest.php | 4 +- .../System/Design/Theme/TabAbstractTest.php | 6 +- .../Magento/Theme/Block/Html/HeadTest.php | 20 +- .../Magento/Theme/Block/Html/HeaderTest.php | 4 +- .../Adminhtml/System/Design/ThemeTest.php | 12 +- .../Magento/Theme/Helper/StorageTest.php | 74 +- .../Theme/Model/Config/CustomizationTest.php | 22 +- .../Magento/Theme/Model/ConfigTest.php | 14 +- .../Magento/Theme/Model/CopyServiceTest.php | 22 +- .../Theme/Model/Uploader/ServiceTest.php | 18 +- .../Theme/Model/Wysiwyg/StorageTest.php | 30 +- .../UrlRewrite/Helper/UrlRewriteTest.php | 2 +- .../User/Model/Acl/Loader/RoleTest.php | 8 +- .../User/Model/Acl/Loader/RuleTest.php | 10 +- .../testsuite/Magento/User/Model/UserTest.php | 22 +- .../Magento/Usps/Helper/DataTest.php | 2 +- .../Magento/Usps/Model/CarrierTest.php | 4 +- .../testsuite/Magento/Validator/Test/Int.php | 35 - .../Webapi/Controller/ErrorProcessorTest.php | 110 +- .../Rest/Request/Deserializer/FactoryTest.php | 8 +- .../Rest/Request/Deserializer/XmlTest.php | 2 +- .../Webapi/Controller/Rest/RequestTest.php | 2 +- .../Rest/Response/Renderer/FactoryTest.php | 6 +- .../Rest/Response/Renderer/XmlTest.php | 6 +- .../Webapi/Controller/Rest/ResponseTest.php | 6 +- .../Webapi/Controller/Rest/RouterTest.php | 2 +- .../Magento/Webapi/Controller/RestTest.php | 163 +- .../Controller/Soap/Request/HandlerTest.php | 10 +- .../Webapi/Controller/Soap/RequestTest.php | 2 +- .../Magento/Webapi/Controller/SoapTest.php | 12 +- .../Model/Config/Integration/XsdTest.php | 2 +- .../Magento/Webapi/Model/Plugin/SetupTest.php | 4 +- .../Magento/Webapi/Model/Soap/ConfigTest.php | 15 +- .../Magento/Webapi/Model/Soap/FaultTest.php | 2 +- .../Magento/Webapi/Model/Soap/ServerTest.php | 6 +- .../Webapi/Model/Soap/Wsdl/FactoryTest.php | 2 +- .../Magento/Webapi/Model/_files/acl.xml | 2 +- .../Service/Entity/AssociativeArrayData.php | 2 +- .../Entity/AssociativeArrayDataBuilder.php | 2 +- .../Webapi/Service/Entity/DataArrayData.php | 2 +- .../Service/Entity/DataArrayDataBuilder.php | 2 +- .../Service/Entity/DataFromArrayTest.php | 4 +- .../Webapi/Service/Entity/NestedData.php | 2 +- .../Service/Entity/NestedDataBuilder.php | 2 +- .../Webapi/Service/Entity/SimpleArrayData.php | 2 +- .../Service/Entity/SimpleArrayDataBuilder.php | 2 +- .../Webapi/Service/Entity/SimpleData.php | 2 +- .../Service/Entity/SimpleDataBuilder.php | 2 +- .../Service/Entity/WebapiObjectManager.php | 2 +- .../Magento/Webapi/_files/test_interfaces.php | 4 +- .../Magento/Weee/Pricing/AdjustmentTest.php | 6 +- .../Weee/Pricing/Render/AdjustmentTest.php | 50 +- .../Widget/Model/Widget/InstanceTest.php | 12 +- .../Wishlist/Block/Item/ConfigureTest.php | 6 +- .../Magento/Wishlist/Controller/IndexTest.php | 22 +- .../Magento/Wishlist/Helper/DataTest.php | 2 +- .../Magento/_files/Child/Interceptor.php | 14 +- .../Magento/Tools/Dependency/Circular.php | 4 +- .../Report/Writer/Csv/AbstractWriter.php | 4 +- .../Tools/Dependency/ServiceLocator.php | 6 +- .../Tools/Dependency/generate/bootstrap.php | 8 +- .../Magento/Tools/Di/Compiler/Directory.php | 10 +- dev/tools/Magento/Tools/Di/compiler.php | 40 +- .../Magento/Tools/Di/entity_generator.php | 18 +- dev/tools/Magento/Tools/Layout/xmlUpdater.php | 2 +- .../Migration/Acl/Db/Adapter/Factory.php | 6 +- dev/tools/Magento/Tools/Migration/Acl/db.php | 4 +- .../aliases_map/composite_modules_ce.php | 2 +- .../Magento/Tools/Migration/system_config.php | 54 +- .../Magento/Tools/Migration/themes_view.php | 8 +- .../Magento/Tools/View/Generator/Config.php | 8 +- .../Magento/Tools/View/Generator/CopyRule.php | 8 +- .../Tools/View/Generator/ThemeDeployment.php | 44 +- .../Tools/View/Generator/ThemeLight.php | 4 +- dev/tools/Magento/Tools/View/generator.php | 8 +- dev/tools/bootstrap.php | 2 +- dev/tools/layout/xml-updater.php | 2 +- downloader/app/Magento/Downloader/Connect.php | 53 +- .../Magento/Downloader/Connect/Frontend.php | 2 +- .../app/Magento/Downloader/Controller.php | 55 +- .../Model/Config/AbstractConfig.php | 2 +- .../Downloader/Model/Config/Community.php | 6 +- .../Model/Config/ConfigInterface.php | 4 +- .../app/Magento/Downloader/Model/Connect.php | 4 +- .../app/Magento/Downloader/Model/Session.php | 2 +- downloader/index.php | 4 +- .../lib/Magento/{ => Framework}/Archive.php | 8 +- .../Archive/AbstractArchive.php | 10 +- .../Framework}/Archive/ArchiveInterface.php | 2 +- .../lib/Magento/Framework}/Archive/Bz.php | 12 +- .../lib/Magento/Framework}/Archive/Gz.php | 12 +- .../{ => Framework}/Archive/Helper/File.php | 28 +- .../Archive/Helper/File/Bz.php | 16 +- .../Archive/Helper/File/Gz.php | 18 +- .../Magento/{ => Framework}/Archive/Tar.php | 52 +- .../{ => Framework}/Autoload/Simple.php | 2 +- .../lib/Magento/{ => Framework}/Backup.php | 9 +- .../{ => Framework}/Backup/AbstractBackup.php | 20 +- .../{ => Framework}/Backup/Archive/Tar.php | 16 +- .../Framework}/Backup/BackupException.php | 4 +- .../Backup/BackupInterface.php | 10 +- .../lib/Magento/{ => Framework}/Backup/Db.php | 14 +- .../Backup/Db/BackupDbInterface.php | 4 +- .../Framework}/Backup/Db/BackupFactory.php | 12 +- .../Backup/Db/BackupInterface.php | 16 +- .../Backup/Exception/CantLoadSnapshot.php | 4 +- .../Backup/Exception/FtpConnectionFailed.php | 4 +- .../Backup/Exception/FtpValidationFailed.php | 4 +- .../Backup/Exception/NotEnoughFreeSpace.php | 4 +- .../Backup/Exception/NotEnoughPermissions.php | 4 +- .../{ => Framework}/Backup/Factory.php | 16 +- .../{ => Framework}/Backup/Filesystem.php | 44 +- .../Framework}/Backup/Filesystem/Helper.php | 8 +- .../Backup/Filesystem/Iterator/File.php | 2 +- .../Backup/Filesystem/Iterator/Filter.php | 2 +- .../Filesystem/Rollback/AbstractRollback.php | 8 +- .../Backup/Filesystem/Rollback/Fs.php | 26 +- .../Backup/Filesystem/Rollback/Ftp.php | 40 +- .../Magento/{ => Framework}/Backup/Media.php | 12 +- .../{ => Framework}/Backup/Nomedia.php | 8 +- .../{ => Framework}/Backup/Snapshot.php | 26 +- .../Connect/Channel/Generator.php | 10 +- .../Connect/Channel/Parser.php | 0 .../{ => Framework}/Connect/Channel/VO.php | 4 +- .../{ => Framework}/Connect/Command.php | 38 +- .../Connect/Command/Channels.php | 4 +- .../Connect/Command/Channels_Header.php | 0 .../Connect/Command/Config.php | 4 +- .../Connect/Command/Config_Header.php | 0 .../Connect/Command/Install.php | 30 +- .../Connect/Command/Install_Header.php | 0 .../Connect/Command/Package.php | 10 +- .../Connect/Command/Package_Header.php | 0 .../Connect/Command/Registry.php | 16 +- .../Connect/Command/Registry_Header.php | 0 .../Connect/Command/Remote.php | 10 +- .../Connect/Command/Remote_Header.php | 0 .../{ => Framework}/Connect/Config.php | 4 +- .../{ => Framework}/Connect/Converter.php | 32 +- .../{ => Framework}/Connect/Frontend.php | 16 +- .../{ => Framework}/Connect/Frontend/CLI.php | 12 +- .../Magento/{ => Framework}/Connect/Ftp.php | 2 +- .../{ => Framework}/Connect/Loader.php | 8 +- .../{ => Framework}/Connect/Loader/Ftp.php | 8 +- .../{ => Framework}/Connect/Package.php | 46 +- .../Connect/Package/Hotfix.php | 4 +- .../Connect/Package/Reader.php | 16 +- .../Connect/Package/Target.php | 2 +- .../Magento/Framework}/Connect/Package/VO.php | 2 +- .../Connect/Package/Writer.php | 12 +- .../{ => Framework}/Connect/Packager.php | 124 +- .../Magento/{ => Framework}/Connect/Rest.php | 24 +- .../{ => Framework}/Connect/Singleconfig.php | 20 +- .../Connect/Structures/Graph.php | 6 +- .../Connect/Structures/Node.php | 6 +- .../{ => Framework}/Connect/Validator.php | 4 +- .../lib/Magento/{ => Framework}/Exception.php | 2 +- .../Magento/{ => Framework}/HTTP/Client.php | 4 +- .../{ => Framework}/HTTP/Client/Curl.php | 8 +- .../{ => Framework}/HTTP/Client/Socket.php | 6 +- .../Magento/{ => Framework}/HTTP/IClient.php | 2 +- .../Magento/{ => Framework}/System/Args.php | 2 +- .../Magento/{ => Framework}/System/Dirs.php | 4 +- .../Magento/{ => Framework}/System/Ftp.php | 15 +- .../lib/Magento/{ => Framework}/Util.php | 2 +- .../Magento/{ => Framework}/Xml/Generator.php | 4 +- .../Magento/{ => Framework}/Xml/Parser.php | 4 +- downloader/mage.php | 38 +- lib/Magento/Exception/InputException.php | 120 - .../Exception/NoSuchEntityException.php | 54 - lib/Magento/Filter/Factory.php | 70 - lib/Magento/{ => Framework}/Acl.php | 6 +- lib/Magento/{ => Framework}/Acl/Builder.php | 30 +- lib/Magento/{ => Framework}/Acl/Cache.php | 16 +- .../{ => Framework}/Acl/CacheInterface.php | 8 +- .../Acl/Loader/DefaultLoader.php | 8 +- .../{ => Framework}/Acl/Loader/Resource.php | 12 +- .../{ => Framework}/Acl/LoaderInterface.php | 6 +- lib/Magento/{ => Framework}/Acl/Resource.php | 2 +- .../Acl/Resource/Config/Converter/Dom.php | 4 +- .../Acl/Resource/Config/Reader/Filesystem.php | 22 +- .../Acl/Resource/Config/SchemaLocator.php | 4 +- .../{ => Framework}/Acl/Resource/Provider.php | 8 +- .../Acl/Resource/ProviderInterface.php | 2 +- .../Acl/Resource/TreeBuilder.php | 2 +- .../{ => Framework}/Acl/ResourceFactory.php | 6 +- .../{ => Framework}/Acl/Role/Registry.php | 2 +- .../{ => Framework}/Acl/RootResource.php | 2 +- lib/Magento/{ => Framework}/Acl/etc/acl.xsd | 0 lib/Magento/{ => Framework}/AclFactory.php | 12 +- lib/Magento/Framework/App/AbstractShell.php | 2 +- lib/Magento/Framework/App/Action/Action.php | 20 +- lib/Magento/Framework/App/Action/Context.php | 34 +- lib/Magento/Framework/App/ActionFactory.php | 6 +- .../Magento/Framework}/App/Area.php | 88 +- .../App/Area/FrontNameResolverFactory.php | 6 +- lib/Magento/Framework/App/AreaList.php | 8 +- lib/Magento/Framework/App/AreaList/Proxy.php | 12 +- .../App/Arguments/ArgumentInterpreter.php | 6 +- .../App/Arguments/FileResolver/Primary.php | 12 +- .../Framework/App/Arguments/Loader.php | 8 +- .../App/Arguments/ValidationState.php | 2 +- lib/Magento/Framework/App/Cache.php | 6 +- .../Framework/App/Cache/Frontend/Factory.php | 33 +- .../Framework/App/Cache/Frontend/Pool.php | 6 +- .../Framework/App/Cache/InstanceFactory.php | 10 +- lib/Magento/Framework/App/Cache/Proxy.php | 6 +- lib/Magento/Framework/App/Cache/State.php | 2 +- .../Framework/App/Cache/State/Options.php | 2 +- .../Framework/App/Cache/Type/AccessProxy.php | 6 +- .../Framework/App/Cache/Type/Block.php | 2 +- .../Framework/App/Cache/Type/Collection.php | 2 +- .../Framework/App/Cache/Type/Config.php | 5 +- .../Framework/App/Cache/Type/FrontendPool.php | 10 +- .../Framework/App/Cache/Type/Layout.php | 2 +- .../Framework/App/Cache/Type/Translate.php | 2 +- lib/Magento/Framework/App/Cache/TypeList.php | 12 +- lib/Magento/Framework/App/CacheInterface.php | 2 +- lib/Magento/Framework/App/Config/Base.php | 4 +- .../Framework/App/Config/BaseFactory.php | 8 +- .../App/Config/Data/ProcessorFactory.php | 6 +- .../Framework/App/Config/DataFactory.php | 6 +- lib/Magento/Framework/App/Config/Element.php | 2 +- .../Framework/App/Config/FileResolver.php | 14 +- .../App/Config/Initial/Converter.php | 2 +- .../Framework/App/Config/Initial/Reader.php | 26 +- .../App/Config/Initial/SchemaLocator.php | 6 +- .../Framework/App/Config/Scope/Converter.php | 2 +- .../Framework/App/Config/ScopePool.php | 10 +- lib/Magento/Framework/App/Config/Value.php | 20 +- .../Framework/App/Config/ValueFactory.php | 6 +- lib/Magento/Framework/App/Cron.php | 5 +- lib/Magento/Framework/App/DesignInterface.php | 47 + .../Framework/App/EntryPoint/EntryPoint.php | 8 +- lib/Magento/Framework/App/Error/Handler.php | 8 +- lib/Magento/Framework/App/Filesystem.php | 2 +- .../App/Filesystem/DirectoryList.php | 2 +- .../DirectoryList/Configuration.php | 2 +- .../Filesystem/DirectoryList/Verification.php | 4 +- lib/Magento/Framework/App/FrontController.php | 4 +- .../Framework/App/Helper/AbstractHelper.php | 20 +- lib/Magento/Framework/App/Helper/Context.php | 66 +- lib/Magento/Framework/App/Http.php | 10 +- lib/Magento/Framework/App/ObjectManager.php | 14 +- .../App/ObjectManager/ConfigCache.php | 8 +- .../App/ObjectManager/ConfigLoader.php | 12 +- .../Framework/App/ObjectManagerFactory.php | 123 +- .../Framework/App/PageCache/FormKey.php | 6 +- .../Framework/App/PageCache/Version.php | 6 +- lib/Magento/Framework/App/RequestFactory.php | 6 +- lib/Magento/Framework/App/Resource.php | 6 +- lib/Magento/Framework/App/Resource/Config.php | 10 +- .../App/Resource/Config/Converter.php | 2 +- .../Framework/App/Resource/Config/Reader.php | 12 +- .../App/Resource/Config/SchemaLocator.php | 2 +- .../Resource/ConnectionAdapterInterface.php | 2 +- .../App/Resource/ConnectionFactory.php | 12 +- lib/Magento/Framework/App/Response/Http.php | 6 +- lib/Magento/Framework/App/ResponseFactory.php | 6 +- lib/Magento/Framework/App/Route/Config.php | 12 +- .../Framework/App/Route/Config/Converter.php | 2 +- .../Framework/App/Route/Config/Reader.php | 10 +- .../App/Route/Config/SchemaLocator.php | 2 +- .../App/Router/NoRouteHandlerList.php | 6 +- lib/Magento/Framework/App/RouterList.php | 6 +- lib/Magento/Framework/App/ScopeInterface.php | 7 + lib/Magento/Framework/App/State.php | 19 +- lib/Magento/Framework/App/View.php | 58 +- lib/Magento/Framework/App/ViewInterface.php | 2 +- lib/Magento/Framework/AppInterface.php | 2 +- lib/Magento/{ => Framework}/Archive.php | 12 +- .../Archive/AbstractArchive.php | 6 +- .../Framework}/Archive/ArchiveInterface.php | 2 +- .../Magento/Framework}/Archive/Bz.php | 12 +- .../Magento/Framework}/Archive/Gz.php | 12 +- .../{ => Framework}/Archive/Helper/File.php | 28 +- .../Archive/Helper/File/Bz.php | 10 +- .../Archive/Helper/File/Gz.php | 8 +- lib/Magento/{ => Framework}/Archive/Tar.php | 20 +- lib/Magento/{ => Framework}/Authorization.php | 16 +- .../{ => Framework}/Authorization/Factory.php | 10 +- .../{ => Framework}/Authorization/Policy.php | 2 +- .../Authorization/Policy/Acl.php | 8 +- .../Authorization/Policy/DefaultPolicy.php | 4 +- .../Authorization/RoleLocator.php | 6 +- .../RoleLocator/DefaultRoleLocator.php | 4 +- .../AuthorizationInterface.php | 2 +- .../{ => Framework}/Autoload/ClassMap.php | 2 +- .../{ => Framework}/Autoload/IncludePath.php | 2 +- .../{ => Framework}/Autoload/Simple.php | 2 +- .../{ => Framework}/Backup/AbstractBackup.php | 6 +- .../{ => Framework}/Backup/Archive/Tar.php | 14 +- .../Framework}/Backup/BackupException.php | 4 +- .../Backup/BackupInterface.php | 2 +- lib/Magento/{ => Framework}/Backup/Db.php | 12 +- .../Backup/Db/BackupDbInterface.php | 4 +- .../Framework}/Backup/Db/BackupFactory.php | 12 +- .../Backup/Db/BackupInterface.php | 2 +- .../Backup/Exception/CantLoadSnapshot.php | 4 +- .../Backup/Exception/FtpConnectionFailed.php | 4 +- .../Backup/Exception/FtpValidationFailed.php | 4 +- .../Backup/Exception/NotEnoughFreeSpace.php | 4 +- .../Backup/Exception/NotEnoughPermissions.php | 4 +- .../{ => Framework}/Backup/Factory.php | 14 +- .../{ => Framework}/Backup/Filesystem.php | 32 +- .../Framework}/Backup/Filesystem/Helper.php | 8 +- .../Backup/Filesystem/Iterator/File.php | 2 +- .../Backup/Filesystem/Iterator/Filter.php | 2 +- .../Filesystem/Rollback/AbstractRollback.php | 8 +- .../Backup/Filesystem/Rollback/Fs.php | 22 +- .../Backup/Filesystem/Rollback/Ftp.php | 36 +- lib/Magento/{ => Framework}/Backup/Media.php | 6 +- .../{ => Framework}/Backup/Nomedia.php | 4 +- .../{ => Framework}/Backup/Snapshot.php | 2 +- .../{ => Framework}/BootstrapException.php | 6 +- .../Cache/Backend/Database.php | 2 +- .../Backend/Decorator/AbstractDecorator.php | 2 +- .../Cache/Backend/Decorator/Compression.php | 6 +- .../Cache/Backend/Eaccelerator.php | 8 +- .../Cache/Backend/Memcached.php | 6 +- .../{ => Framework}/Cache/Backend/MongoDb.php | 2 +- lib/Magento/{ => Framework}/Cache/Config.php | 8 +- .../Cache/Config/Converter.php | 4 +- .../{ => Framework}/Cache/Config/Data.php | 16 +- .../{ => Framework}/Cache/Config/Reader.php | 18 +- .../Cache/Config/SchemaLocator.php | 4 +- .../{ => Framework}/Cache/ConfigInterface.php | 2 +- lib/Magento/{ => Framework}/Cache/Core.php | 8 +- .../Cache/Frontend/Adapter/Zend.php | 4 +- .../Cache/Frontend/Decorator/Bare.php | 12 +- .../Cache/Frontend/Decorator/Profiler.php | 28 +- .../Cache/Frontend/Decorator/TagScope.php | 8 +- .../Cache/FrontendInterface.php | 2 +- .../{ => Framework}/Cache/etc/cache.xsd | 0 .../{ => Framework}/Code/Generator.php | 24 +- .../Code/Generator/Autoloader.php | 12 +- .../CodeGenerator/CodeGeneratorInterface.php | 14 +- .../Code/Generator/CodeGenerator/Zend.php | 4 +- .../Code/Generator/EntityAbstract.php | 8 +- .../{ => Framework}/Code/Generator/Io.php | 20 +- lib/Magento/{ => Framework}/Code/Minifier.php | 10 +- .../Code/Minifier/Adapter/Js/Jsmin.php | 6 +- .../Code/Minifier/AdapterInterface.php | 2 +- .../Code/Minifier/Strategy/Generate.php | 25 +- .../Code/Minifier/Strategy/Lite.php | 26 +- .../Code/Minifier/StrategyInterface.php | 2 +- .../{ => Framework}/Code/NameBuilder.php | 4 +- .../Code/Reader/ArgumentsReader.php | 2 +- .../Code/Reader/ClassReader.php | 2 +- .../Code/ValidationException.php | 2 +- .../{ => Framework}/Code/Validator.php | 4 +- .../Code/Validator/ArgumentSequence.php | 16 +- .../Code/Validator/ConstructorIntegrity.php | 20 +- .../Code/Validator/ContextAggregation.php | 16 +- .../Code/Validator/TypeDuplication.php | 14 +- .../Code/ValidatorInterface.php | 4 +- .../{ => Framework}/Config/AbstractXml.php | 20 +- .../{ => Framework}/Config/CacheInterface.php | 4 +- .../{ => Framework}/Config/Converter/Dom.php | 4 +- .../Config/Converter/Dom/Flat.php | 4 +- .../Config/ConverterInterface.php | 2 +- lib/Magento/{ => Framework}/Config/Data.php | 16 +- .../{ => Framework}/Config/Data/Scoped.php | 22 +- .../{ => Framework}/Config/DataInterface.php | 2 +- lib/Magento/{ => Framework}/Config/Dom.php | 10 +- .../Config/Dom/ArrayNodeConfig.php | 2 +- .../Config/Dom/NodeMergingConfig.php | 2 +- .../Config/Dom/NodePathMatcher.php | 2 +- .../Config/Dom/ValidationException.php | 2 +- .../{ => Framework}/Config/DomFactory.php | 12 +- .../{ => Framework}/Config/FileIterator.php | 8 +- .../Config/FileIteratorFactory.php | 8 +- .../Config/FileResolverInterface.php | 2 +- .../Config/Reader/Filesystem.php | 40 +- .../Config/ReaderInterface.php | 2 +- .../Config/SchemaLocatorInterface.php | 2 +- lib/Magento/{ => Framework}/Config/Scope.php | 4 +- .../{ => Framework}/Config/ScopeInterface.php | 2 +- .../Config/ScopeListInterface.php | 2 +- lib/Magento/{ => Framework}/Config/Theme.php | 2 +- .../Config/ValidationStateInterface.php | 2 +- lib/Magento/{ => Framework}/Config/View.php | 6 +- .../{ => Framework}/Config/etc/theme.xsd | 0 .../{ => Framework}/Config/etc/view.xsd | 0 .../Connect/Channel/Generator.php | 4 +- .../Connect/Channel/Parser.php | 0 .../{ => Framework}/Connect/Channel/VO.php | 4 +- .../{ => Framework}/Connect/Command.php | 14 +- .../Connect/Command/Channels.php | 4 +- .../Connect/Command/Channels_Header.php | 0 .../Connect/Command/Config.php | 4 +- .../Connect/Command/Config_Header.php | 0 .../Connect/Command/Install.php | 8 +- .../Connect/Command/Install_Header.php | 0 .../Connect/Command/Package.php | 8 +- .../Connect/Command/Package_Header.php | 0 .../Connect/Command/Registry.php | 4 +- .../Connect/Command/Registry_Header.php | 0 .../Connect/Command/Remote.php | 10 +- .../Connect/Command/Remote_Header.php | 0 .../{ => Framework}/Connect/Config.php | 2 +- .../{ => Framework}/Connect/Converter.php | 32 +- .../{ => Framework}/Connect/Frontend.php | 4 +- .../{ => Framework}/Connect/Frontend/CLI.php | 12 +- lib/Magento/{ => Framework}/Connect/Ftp.php | 4 +- .../{ => Framework}/Connect/Loader.php | 8 +- .../{ => Framework}/Connect/Loader/Ftp.php | 4 +- .../{ => Framework}/Connect/Package.php | 42 +- .../Connect/Package/Hotfix.php | 4 +- .../Connect/Package/Reader.php | 18 +- .../Connect/Package/Target.php | 2 +- .../Magento/Framework}/Connect/Package/VO.php | 2 +- .../Connect/Package/Writer.php | 10 +- .../{ => Framework}/Connect/Packager.php | 36 +- lib/Magento/{ => Framework}/Connect/Rest.php | 24 +- .../{ => Framework}/Connect/Singleconfig.php | 2 +- .../Connect/Structures/Graph.php | 6 +- .../Connect/Structures/Node.php | 6 +- .../{ => Framework}/Connect/Validator.php | 2 +- .../Controller/Router/Route/Factory.php | 8 +- .../{ => Framework}/Convert/ConvertArray.php | 4 +- lib/Magento/{ => Framework}/Convert/Excel.php | 4 +- .../{ => Framework}/Convert/Object.php | 10 +- lib/Magento/{ => Framework}/Convert/Xml.php | 2 +- .../PreProcessor/Adapter/AdapterException.php | 2 +- .../Css/PreProcessor/Adapter/Oyejorge.php | 4 +- .../Css/PreProcessor/AdapterInterface.php | 2 +- .../Css/PreProcessor/Cache/CacheFactory.php | 16 +- .../Css/PreProcessor/Cache/CacheInterface.php | 8 +- .../Css/PreProcessor/Cache/CacheManager.php | 6 +- .../Css/PreProcessor/Cache/Import/Cache.php | 32 +- .../Cache/Import/ImportEntity.php | 4 +- .../Cache/Import/ImportEntityFactory.php | 18 +- .../Cache/Import/ImportEntityInterface.php | 2 +- .../PreProcessor/Cache/Import/Map/Storage.php | 4 +- .../Cache/Plugin/ImportCleaner.php | 8 +- .../Cache/Plugin/InstructionPreProcessor.php | 10 +- .../Css/PreProcessor/Cache/Plugin/Less.php | 28 +- .../Css/PreProcessor/Composite.php | 14 +- .../{ => Framework}/Css/PreProcessor/Less.php | 32 +- .../Css/PreProcessor/UrlResolver.php | 46 +- lib/Magento/{ => Framework}/Currency.php | 4 +- .../{ => Framework}/CurrencyFactory.php | 10 +- .../{ => Framework}/CurrencyInterface.php | 72 +- .../DB/Adapter/AdapterInterface.php | 86 +- .../{ => Framework}/DB/Adapter/Pdo/Mysql.php | 60 +- .../{ => Framework}/DB/DBException.php | 4 +- lib/Magento/{ => Framework}/DB/Ddl/Table.php | 4 +- .../{ => Framework}/DB/Ddl/Trigger.php | 12 +- .../{ => Framework}/DB/Ddl/TriggerFactory.php | 12 +- .../DB/ExpressionConverter.php | 2 +- lib/Magento/{ => Framework}/DB/Helper.php | 24 +- .../DB/Helper/AbstractHelper.php | 52 +- lib/Magento/{ => Framework}/DB/Profiler.php | 6 +- lib/Magento/{ => Framework}/DB/Select.php | 42 +- .../DB/Statement/Parameter.php | 12 +- .../DB/Statement/Pdo/Mysql.php | 4 +- .../{ => Framework}/DB/Transaction.php | 6 +- lib/Magento/{ => Framework}/DB/Tree.php | 12 +- lib/Magento/{ => Framework}/DB/Tree/Node.php | 4 +- .../DB/Tree/Node/NodeException.php | 4 +- .../{ => Framework}/DB/Tree/NodeSet.php | 2 +- .../DB/Tree/NodeSet/NodeSetException.php | 4 +- .../{ => Framework}/DB/Tree/TreeException.php | 4 +- .../Data/Argument/Interpreter/ArrayType.php | 4 +- .../Data/Argument/Interpreter/Boolean.php | 6 +- .../Data/Argument/Interpreter/Composite.php | 6 +- .../Data/Argument/Interpreter/Constant.php | 4 +- .../Data/Argument/Interpreter/NullType.php | 4 +- .../Data/Argument/Interpreter/Number.php | 4 +- .../Data/Argument/Interpreter/Object.php | 8 +- .../Data/Argument/Interpreter/String.php | 6 +- .../Data/Argument/InterpreterInterface.php | 2 +- .../MissingOptionalValueException.php | 2 +- .../{ => Framework}/Data/Collection.php | 48 +- .../{ => Framework}/Data/Collection/Db.php | 18 +- .../Collection/Db/FetchStrategy/Cache.php | 18 +- .../Collection/Db/FetchStrategy/Query.php | 4 +- .../Collection/Db/FetchStrategyInterface.php | 2 +- .../Collection/EntityFactoryInterface.php | 2 +- .../Data/Collection/Filesystem.php | 8 +- .../{ => Framework}/Data/DataArray.php | 4 +- lib/Magento/{ => Framework}/Data/Form.php | 18 +- .../Data/Form/AbstractForm.php | 16 +- .../Data/Form/Element/AbstractElement.php | 14 +- .../Data/Form/Element/Button.php | 4 +- .../Data/Form/Element/Checkbox.php | 4 +- .../Data/Form/Element/Checkboxes.php | 4 +- .../Data/Form/Element/Collection.php | 6 +- .../Data/Form/Element/CollectionFactory.php | 6 +- .../Data/Form/Element/Column.php | 16 +- .../Data/Form/Element/Date.php | 28 +- .../Data/Form/Element/Editablemultiselect.php | 4 +- .../Data/Form/Element/Editor.php | 8 +- .../Data/Form/Element/Factory.php | 8 +- .../Data/Form/Element/Fieldset.php | 6 +- .../Data/Form/Element/File.php | 16 +- .../Data/Form/Element/Gallery.php | 4 +- .../Data/Form/Element/Hidden.php | 4 +- .../Data/Form/Element/Image.php | 22 +- .../Data/Form/Element/Imagefile.php | 16 +- .../Data/Form/Element/Label.php | 16 +- .../Data/Form/Element/Link.php | 4 +- .../Data/Form/Element/Multiline.php | 4 +- .../Data/Form/Element/Multiselect.php | 4 +- .../Data/Form/Element/Note.php | 4 +- .../Data/Form/Element/Obscure.php | 4 +- .../Data/Form/Element/Password.php | 4 +- .../Data/Form/Element/Radio.php | 16 +- .../Data/Form/Element/Radios.php | 6 +- .../Element/Renderer/RendererInterface.php | 6 +- .../Data/Form/Element/Reset.php | 16 +- .../Data/Form/Element/Select.php | 4 +- .../Data/Form/Element/Submit.php | 4 +- .../Data/Form/Element/Text.php | 4 +- .../Data/Form/Element/Textarea.php | 4 +- .../Data/Form/Element/Time.php | 4 +- .../Data/Form/ElementFactory.php | 10 +- .../{ => Framework}/Data/Form/Filter/Date.php | 12 +- .../Data/Form/Filter/Escapehtml.php | 4 +- .../Data/Form/Filter/FilterInterface.php | 2 +- .../Data/Form/Filter/Striptags.php | 4 +- .../{ => Framework}/Data/Form/FormKey.php | 16 +- .../{ => Framework}/Data/FormFactory.php | 18 +- lib/Magento/{ => Framework}/Data/Graph.php | 2 +- .../Data/OptionSourceInterface.php | 2 +- lib/Magento/{ => Framework}/Data/Schema.php | 4 +- .../{ => Framework}/Data/Structure.php | 4 +- lib/Magento/{ => Framework}/Data/Tree.php | 8 +- lib/Magento/{ => Framework}/Data/Tree/Db.php | 12 +- lib/Magento/{ => Framework}/Data/Tree/Dbp.php | 18 +- .../{ => Framework}/Data/Tree/Node.php | 10 +- .../Data/Tree/Node/Collection.php | 6 +- .../Data/etc/argument/types.xsd | 0 lib/Magento/{ => Framework}/Debug.php | 8 +- .../{ => Framework}/DomDocument/Factory.php | 8 +- .../{ => Framework}/Encryption/Crypt.php | 6 +- .../Encryption/CryptFactory.php | 12 +- .../{ => Framework}/Encryption/Encryptor.php | 20 +- .../Encryption/EncryptorInterface.php | 4 +- .../{ => Framework}/Encryption/UrlCoder.php | 8 +- lib/Magento/{ => Framework}/Error/Handler.php | 2 +- .../Error/HandlerInterface.php | 2 +- lib/Magento/{ => Framework}/Escaper.php | 4 +- lib/Magento/{ => Framework}/Event.php | 14 +- .../{ => Framework}/Event/Collection.php | 4 +- lib/Magento/{ => Framework}/Event/Config.php | 4 +- .../Event/Config/Converter.php | 4 +- .../{ => Framework}/Event/Config/Data.php | 16 +- .../{ => Framework}/Event/Config/Reader.php | 22 +- .../Event/Config/SchemaLocator.php | 4 +- .../{ => Framework}/Event/ConfigInterface.php | 2 +- .../Event/Invoker/InvokerDefault.php | 12 +- .../Event/InvokerInterface.php | 6 +- lib/Magento/{ => Framework}/Event/Manager.php | 12 +- .../Event/ManagerInterface.php | 2 +- .../{ => Framework}/Event/Observer.php | 18 +- .../Event/Observer/Collection.php | 12 +- .../{ => Framework}/Event/Observer/Cron.php | 8 +- .../{ => Framework}/Event/Observer/Regex.php | 8 +- .../{ => Framework}/Event/ObserverFactory.php | 8 +- .../{ => Framework}/Event/WrapperFactory.php | 12 +- .../{ => Framework}/Event/etc/events.xsd | 0 lib/Magento/{ => Framework}/EventFactory.php | 8 +- lib/Magento/{ => Framework}/Exception.php | 16 +- .../Exception/AbstractAggregateException.php | 131 + .../Exception/AuthenticationException.php | 10 +- .../Exception/AuthorizationException.php | 8 +- .../Exception/EmailNotConfirmedException.php | 34 + .../Framework/Exception/ErrorMessage.php | 103 + .../{ => Framework}/Exception/Exception.php | 2 +- .../Framework/Exception/InputException.php | 77 + .../InvalidEmailOrPasswordException.php | 33 + .../Exception/LocalizedException.php | 84 + .../Exception/NoSuchEntityException.php | 85 + .../Exception/State/ExpiredException.php | 31 + .../State/InputMismatchException.php | 31 + .../State/InvalidTransitionException.php | 31 + .../Exception/StateException.php | 14 +- lib/Magento/{ => Framework}/File/Csv.php | 8 +- lib/Magento/{ => Framework}/File/CsvMulty.php | 4 +- lib/Magento/{ => Framework}/File/Size.php | 2 +- .../File/Transfer/Adapter/Http.php | 2 +- lib/Magento/{ => Framework}/File/Uploader.php | 10 +- .../{ => Framework}/File/UploaderFactory.php | 10 +- lib/Magento/{ => Framework}/Filesystem.php | 40 +- .../Filesystem/Directory/Read.php | 28 +- .../Filesystem/Directory/ReadFactory.php | 13 +- .../Filesystem/Directory/ReadInterface.php | 6 +- .../Filesystem/Directory/Write.php | 24 +- .../Filesystem/Directory/WriteFactory.php | 17 +- .../Filesystem/Directory/WriteInterface.php | 20 +- .../Filesystem/DirectoryList.php | 12 +- .../Filesystem/Driver/File.php | 6 +- .../Filesystem/Driver/Http.php | 6 +- .../Filesystem/Driver/Https.php | 4 +- .../Filesystem/Driver/Zlib.php | 2 +- .../Filesystem/DriverFactory.php | 18 +- .../Filesystem/DriverInterface.php | 16 +- .../{ => Framework}/Filesystem/File/Read.php | 10 +- .../Filesystem/File/ReadFactory.php | 25 +- .../Filesystem/File/ReadInterface.php | 2 +- .../{ => Framework}/Filesystem/File/Write.php | 8 +- .../Filesystem/File/WriteFactory.php | 25 +- .../Filesystem/File/WriteInterface.php | 8 +- .../Filesystem/FilesystemException.php | 2 +- .../Filesystem/WrapperFactory.php | 8 +- .../Filesystem/WrapperInterface.php | 2 +- .../Filter/AbstractFactory.php | 8 +- .../{ => Framework}/Filter/ArrayFilter.php | 2 +- .../{ => Framework}/Filter/Decrypt.php | 6 +- lib/Magento/{ => Framework}/Filter/Email.php | 2 +- .../{ => Framework}/Filter/Encrypt.php | 6 +- .../Filter/Encrypt/AdapterInterface.php | 2 +- .../{ => Framework}/Filter/Encrypt/Basic.php | 8 +- lib/Magento/Framework/Filter/Factory.php | 70 + .../Filter/FactoryInterface.php | 2 +- .../{ => Framework}/Filter/FilterManager.php | 8 +- .../Filter/FilterManager/Config.php | 4 +- .../Filter/FilterManager/ConfigInterface.php | 2 +- .../{ => Framework}/Filter/GridArray/Grid.php | 4 +- lib/Magento/{ => Framework}/Filter/Input.php | 12 +- .../Filter/Input/MaliciousCode.php | 2 +- lib/Magento/{ => Framework}/Filter/Money.php | 2 +- lib/Magento/{ => Framework}/Filter/Object.php | 16 +- .../{ => Framework}/Filter/Object/Grid.php | 6 +- .../{ => Framework}/Filter/RemoveAccents.php | 2 +- .../{ => Framework}/Filter/RemoveTags.php | 2 +- .../{ => Framework}/Filter/SplitWords.php | 2 +- .../{ => Framework}/Filter/Sprintf.php | 2 +- .../{ => Framework}/Filter/StripTags.php | 8 +- .../{ => Framework}/Filter/Template.php | 20 +- .../Filter/Template/Simple.php | 4 +- .../Template/Tokenizer/AbstractTokenizer.php | 2 +- .../Filter/Template/Tokenizer/Parameter.php | 4 +- .../Filter/Template/Tokenizer/Variable.php | 4 +- .../{ => Framework}/Filter/Translit.php | 4 +- .../{ => Framework}/Filter/TranslitUrl.php | 2 +- .../{ => Framework}/Filter/Truncate.php | 8 +- .../{ => Framework}/Filter/ZendFactory.php | 2 +- lib/Magento/{ => Framework}/Flag.php | 24 +- lib/Magento/{ => Framework}/Flag/Resource.php | 4 +- lib/Magento/{ => Framework}/FlagFactory.php | 16 +- .../Gdata/Gshopping/Content.php | 6 +- .../{ => Framework}/Gdata/Gshopping/Entry.php | 26 +- .../Gdata/Gshopping/Extension/Attribute.php | 4 +- .../Gdata/Gshopping/Extension/Control.php | 4 +- .../Gdata/Gshopping/Extension/Shipping.php | 4 +- .../Gdata/Gshopping/Extension/Tax.php | 4 +- .../Gdata/Gshopping/HttpException.php | 2 +- .../Gdata/Gshopping/ItemQuery.php | 2 +- .../{ => Framework}/HTTP/Adapter/Curl.php | 4 +- .../HTTP/Adapter/FileTransferFactory.php | 2 +- .../{ => Framework}/HTTP/Authentication.php | 2 +- lib/Magento/{ => Framework}/HTTP/Client.php | 4 +- .../{ => Framework}/HTTP/Client/Curl.php | 8 +- .../{ => Framework}/HTTP/Client/Socket.php | 6 +- lib/Magento/{ => Framework}/HTTP/Header.php | 8 +- lib/Magento/{ => Framework}/HTTP/IClient.php | 2 +- .../HTTP/PhpEnvironment/RemoteAddress.php | 2 +- .../HTTP/PhpEnvironment/ServerAddress.php | 2 +- .../{ => Framework}/HTTP/ZendClient.php | 8 +- lib/Magento/{ => Framework}/Image.php | 4 +- .../Image/Adapter/AbstractAdapter.php | 12 +- .../Image/Adapter/AdapterInterface.php | 6 +- .../{ => Framework}/Image/Adapter/Config.php | 4 +- .../Image/Adapter/ConfigInterface.php | 2 +- .../{ => Framework}/Image/Adapter/Gd2.php | 8 +- .../Image/Adapter/ImageMagick.php | 8 +- .../{ => Framework}/Image/AdapterFactory.php | 14 +- lib/Magento/{ => Framework}/Image/Factory.php | 10 +- .../{ => Framework}/Interception/Chain.php | 2 +- .../Interception/Chain/Chain.php | 12 +- .../Code/Generator/Interceptor.php | 32 +- .../Interception/Code/InterfaceValidator.php | 10 +- .../Interception/Code/ValidatorException.php | 2 +- .../{ => Framework}/Interception/Config.php | 2 +- .../Interception/Config/Config.php | 38 +- .../Interception/Definition.php | 2 +- .../Interception/Definition/Compiled.php | 4 +- .../Interception/Definition/Runtime.php | 4 +- .../Interception/ObjectManager/Config.php | 10 +- .../Interception/PluginList.php | 2 +- .../Interception/PluginList/PluginList.php | 24 +- lib/Magento/{ => Framework}/Io/AbstractIo.php | 9 +- lib/Magento/{ => Framework}/Io/File.php | 2 +- lib/Magento/{ => Framework}/Io/Ftp.php | 8 +- .../{ => Framework}/Io/IoException.php | 9 +- .../{ => Framework}/Io/IoInterface.php | 8 +- lib/Magento/{ => Framework}/Io/Sftp.php | 8 +- lib/Magento/{ => Framework}/Json/Decoder.php | 4 +- .../{ => Framework}/Json/DecoderInterface.php | 4 +- lib/Magento/{ => Framework}/Json/Encoder.php | 8 +- .../{ => Framework}/Json/EncoderInterface.php | 4 +- .../Less/File/FileList/Collator.php | 10 +- .../Less/File/Source/Aggregated.php | 14 +- .../{ => Framework}/Less/File/Source/Base.php | 12 +- .../Less/File/Source/Library.php | 14 +- .../Less/File/Source/Theme.php | 12 +- .../{ => Framework}/Less/PreProcessor.php | 2 +- .../Less/PreProcessor/ErrorHandler.php | 8 +- .../PreProcessor/ErrorHandlerInterface.php | 2 +- .../Less/PreProcessor/File/FileList.php | 2 +- .../PreProcessor/File/FileListFactory.php | 14 +- .../Less/PreProcessor/File/Less.php | 12 +- .../Less/PreProcessor/File/LessFactory.php | 16 +- .../Less/PreProcessor/Instruction/Import.php | 12 +- .../Instruction/MagentoImport.php | 16 +- .../Less/PreProcessor/InstructionFactory.php | 16 +- .../Less/PreProcessorInterface.php | 2 +- lib/Magento/{ => Framework}/Locale.php | 4 +- lib/Magento/{ => Framework}/Locale/Config.php | 4 +- .../Locale/ConfigInterface.php | 2 +- .../{ => Framework}/Locale/Currency.php | 30 +- .../Locale/CurrencyInterface.php | 6 +- lib/Magento/{ => Framework}/Locale/Format.php | 8 +- .../Locale/FormatInterface.php | 2 +- .../Locale/Hierarchy/Config.php | 12 +- .../Locale/Hierarchy/Config/Converter.php | 4 +- .../Locale/Hierarchy/Config/FileResolver.php | 12 +- .../Locale/Hierarchy/Config/Reader.php | 16 +- .../Locale/Hierarchy/Config/SchemaLocator.php | 8 +- lib/Magento/{ => Framework}/Locale/Lists.php | 26 +- .../{ => Framework}/Locale/ListsInterface.php | 2 +- .../{ => Framework}/Locale/Resolver.php | 14 +- .../Locale/ResolverInterface.php | 10 +- .../{ => Framework}/Locale/Validator.php | 8 +- lib/Magento/{ => Framework}/LocaleFactory.php | 14 +- .../{ => Framework}/LocaleInterface.php | 36 +- lib/Magento/{ => Framework}/Logger.php | 4 +- .../{ => Framework}/Logger/Adapter.php | 8 +- .../{ => Framework}/Mail/Exception.php | 2 +- lib/Magento/{ => Framework}/Mail/Message.php | 2 +- .../{ => Framework}/Mail/MessageInterface.php | 2 +- .../Mail/Template/ConfigInterface.php | 2 +- .../{ => Framework}/Mail/Template/Factory.php | 12 +- .../Mail/Template/FactoryInterface.php | 4 +- .../Mail/Template/SenderResolverInterface.php | 4 +- .../Mail/Template/TransportBuilder.php | 40 +- .../Mail/TemplateInterface.php | 2 +- .../{ => Framework}/Mail/Transport.php | 12 +- .../Mail/TransportInterface.php | 4 +- .../Mail/TransportInterfaceFactory.php | 12 +- .../{ => Framework}/Math/Calculator.php | 2 +- lib/Magento/{ => Framework}/Math/Division.php | 2 +- lib/Magento/{ => Framework}/Math/Random.php | 2 +- .../Message/AbstractMessage.php | 2 +- .../{ => Framework}/Message/Collection.php | 2 +- .../Message/CollectionFactory.php | 6 +- lib/Magento/{ => Framework}/Message/Error.php | 2 +- .../{ => Framework}/Message/Factory.php | 8 +- .../{ => Framework}/Message/Manager.php | 6 +- .../Message/ManagerInterface.php | 2 +- .../Message/MessageInterface.php | 2 +- .../{ => Framework}/Message/Notice.php | 2 +- .../{ => Framework}/Message/Session.php | 4 +- .../{ => Framework}/Message/Success.php | 2 +- .../{ => Framework}/Message/Warning.php | 2 +- .../{ => Framework}/Model/AbstractModel.php | 64 +- .../Model/ActionValidator/RemoveAction.php | 12 +- .../ActionValidator/RemoveAction/Allowed.php | 8 +- lib/Magento/{ => Framework}/Model/Context.php | 28 +- .../{ => Framework}/Model/Exception.php | 8 +- .../Model/Resource/AbstractResource.php | 30 +- .../Model/Resource/Db/AbstractDb.php | 82 +- .../Db/Collection/AbstractCollection.php | 32 +- .../Model/Resource/Db/Profiler.php | 12 +- .../Model/Resource/Entity/AbstractEntity.php | 8 +- .../Model/Resource/Entity/Table.php | 4 +- .../Model/Resource/Iterator.php | 16 +- .../Model/Resource/Type/AbstractType.php | 4 +- .../Model/Resource/Type/Db.php | 6 +- .../Model/Resource/Type/Db/Pdo/Mysql.php | 24 +- .../Module/Declaration/Converter/Dom.php | 4 +- .../Module/Declaration/FileIterator.php | 4 +- .../Declaration/FileIteratorFactory.php | 4 +- .../Module/Declaration/FileResolver.php | 12 +- .../Module/Declaration/Reader/Filesystem.php | 18 +- .../Module/Declaration/SchemaLocator.php | 4 +- .../Module/DependencyManager.php | 2 +- .../Module/DependencyManagerInterface.php | 2 +- lib/Magento/{ => Framework}/Module/Dir.php | 10 +- .../{ => Framework}/Module/Dir/Reader.php | 12 +- .../Module/Dir/ReverseResolver.php | 6 +- .../Module/FrontController/Plugin/Install.php | 6 +- .../{ => Framework}/Module/Manager.php | 2 +- .../{ => Framework}/Module/ModuleList.php | 8 +- .../Module/ModuleListInterface.php | 2 +- .../{ => Framework}/Module/Output/Config.php | 4 +- .../Module/Output/ConfigInterface.php | 2 +- .../Module/ResourceInterface.php | 2 +- .../Module/ResourceResolver.php | 6 +- .../Module/ResourceResolverInterface.php | 2 +- lib/Magento/{ => Framework}/Module/Setup.php | 34 +- .../{ => Framework}/Module/Setup/Context.php | 60 +- .../Module/Setup/Migration.php | 18 +- .../Module/Setup/MigrationData.php | 2 +- .../Module/Setup/MigrationFactory.php | 16 +- .../{ => Framework}/Module/Updater.php | 12 +- .../Module/Updater/SetupFactory.php | 10 +- .../Module/Updater/SetupInterface.php | 6 +- .../Module/UpdaterInterface.php | 2 +- .../{ => Framework}/Module/etc/module.xsd | 0 .../{ => Framework}/Mview/ActionFactory.php | 10 +- .../{ => Framework}/Mview/ActionInterface.php | 2 +- lib/Magento/{ => Framework}/Mview/Config.php | 2 +- .../Mview/Config/Converter.php | 4 +- .../{ => Framework}/Mview/Config/Data.php | 20 +- .../Mview/Config/Data/Proxy.php | 18 +- .../{ => Framework}/Mview/Config/Reader.php | 18 +- .../Mview/Config/SchemaLocator.php | 10 +- .../{ => Framework}/Mview/ConfigInterface.php | 2 +- .../{ => Framework}/Mview/Processor.php | 2 +- .../Mview/ProcessorInterface.php | 2 +- lib/Magento/{ => Framework}/Mview/View.php | 16 +- .../Mview/View/AbstractFactory.php | 8 +- .../{ => Framework}/Mview/View/Changelog.php | 8 +- .../Mview/View/ChangelogInterface.php | 2 +- .../{ => Framework}/Mview/View/Collection.php | 30 +- .../Mview/View/CollectionFactory.php | 4 +- .../Mview/View/CollectionInterface.php | 8 +- .../Mview/View/State/CollectionFactory.php | 6 +- .../Mview/View/State/CollectionInterface.php | 2 +- .../Mview/View/StateInterface.php | 16 +- .../Mview/View/Subscription.php | 58 +- .../Mview/View/SubscriptionFactory.php | 4 +- .../Mview/View/SubscriptionInterface.php | 8 +- .../{ => Framework}/Mview/ViewInterface.php | 2 +- .../{ => Framework}/Mview/etc/mview.xsd | 0 .../Oauth/ConsumerInterface.php | 4 +- .../{ => Framework}/Oauth/Exception.php | 10 +- .../{ => Framework}/Oauth/Helper/Oauth.php | 10 +- .../{ => Framework}/Oauth/Helper/Request.php | 6 +- .../Oauth/NonceGeneratorInterface.php | 6 +- lib/Magento/{ => Framework}/Oauth/Oauth.php | 8 +- .../{ => Framework}/Oauth/OauthInterface.php | 14 +- .../Oauth/TokenProviderInterface.php | 18 +- lib/Magento/{ => Framework}/Object.php | 12 +- lib/Magento/{ => Framework}/Object/Cache.php | 28 +- lib/Magento/{ => Framework}/Object/Copy.php | 36 +- .../{ => Framework}/Object/Copy/Config.php | 8 +- .../Object/Copy/Config/Converter.php | 4 +- .../Object/Copy/Config/Data.php | 4 +- .../Object/Copy/Config/Reader.php | 22 +- .../Object/Copy/Config/SchemaLocator.php | 4 +- .../{ => Framework}/Object/Factory.php | 6 +- .../Object/IdentityInterface.php | 4 +- lib/Magento/{ => Framework}/Object/Mapper.php | 22 +- .../{ => Framework}/Object/etc/fieldset.xsd | 0 .../Object/etc/fieldset_file.xsd | 0 lib/Magento/{ => Framework}/ObjectManager.php | 2 +- .../ObjectManager/Code/Generator/Factory.php | 9 +- .../ObjectManager/Code/Generator/Proxy.php | 10 +- .../{ => Framework}/ObjectManager/Config.php | 2 +- .../ObjectManager/Config/Config.php | 17 +- .../Config/Mapper/ArgumentParser.php | 8 +- .../ObjectManager/Config/Mapper/Dom.php | 8 +- .../ObjectManager/Config/Reader/Dom.php | 22 +- .../ObjectManager/Config/SchemaLocator.php | 4 +- .../ObjectManager/ConfigCache.php | 2 +- .../ObjectManager/ContextInterface.php | 2 +- .../ObjectManager/Definition.php | 2 +- .../ObjectManager/Definition/Compiled.php | 4 +- .../Definition/Compiled/Binary.php | 4 +- .../Definition/Compiled/Serialized.php | 4 +- .../ObjectManager/Definition/Runtime.php | 10 +- .../ObjectManager/DefinitionFactory.php | 47 +- .../ObjectManager/DynamicConfigInterface.php | 2 +- .../{ => Framework}/ObjectManager/Factory.php | 2 +- .../ObjectManager/Factory/Factory.php | 31 +- .../ObjectManager/ObjectManager.php | 8 +- .../ObjectManager/Relations.php | 2 +- .../ObjectManager/Relations/Compiled.php | 4 +- .../ObjectManager/Relations/Runtime.php | 12 +- .../ObjectManager/etc/config.xsd | 0 .../{ => Framework}/Option/ArrayInterface.php | 4 +- .../{ => Framework}/Option/ArrayPool.php | 14 +- lib/Magento/{ => Framework}/OsInfo.php | 4 +- lib/Magento/{ => Framework}/Pear.php | 22 +- lib/Magento/{ => Framework}/Pear/Frontend.php | 11 +- lib/Magento/{ => Framework}/Pear/Package.php | 21 +- lib/Magento/{ => Framework}/Pear/Registry.php | 11 +- lib/Magento/{ => Framework}/Phrase.php | 14 +- .../Phrase/Renderer/Composite.php | 4 +- .../Phrase/Renderer/Inline.php | 16 +- .../Phrase/Renderer/Placeholder.php | 4 +- .../Phrase/Renderer/Translate.php | 12 +- .../Phrase/RendererInterface.php | 2 +- .../Adjustment/AdjustmentInterface.php | 6 +- .../Pricing/Adjustment/Calculator.php | 10 +- .../Adjustment/CalculatorInterface.php | 8 +- .../Pricing/Adjustment/Collection.php | 8 +- .../Pricing/Adjustment/Factory.php | 12 +- .../Pricing/Adjustment/Pool.php | 8 +- .../Pricing/Amount/AmountFactory.php | 16 +- .../Pricing/Amount/AmountInterface.php | 4 +- .../{ => Framework}/Pricing/Amount/Base.php | 4 +- .../Pricing/Object/SaleableInterface.php | 6 +- .../{ => Framework}/Pricing/Price/Factory.php | 14 +- .../Pricing/Price/PriceInterface.php | 6 +- .../Pricing/PriceComposite.php | 8 +- .../Pricing/PriceCurrencyInterface.php | 4 +- .../Pricing/PriceInfo/Base.php | 18 +- .../Pricing/PriceInfo/Factory.php | 18 +- .../Pricing/PriceInfoInterface.php | 8 +- .../{ => Framework}/Pricing/Render.php | 20 +- .../Pricing/Render/AbstractAdjustment.php | 16 +- .../Render/AdjustmentRenderInterface.php | 10 +- .../{ => Framework}/Pricing/Render/Amount.php | 18 +- .../Pricing/Render/AmountRenderInterface.php | 10 +- .../{ => Framework}/Pricing/Render/Layout.php | 12 +- .../Pricing/Render/PriceBox.php | 12 +- .../Render/PriceBoxRenderInterface.php | 10 +- .../Pricing/Render/RendererPool.php | 24 +- lib/Magento/{ => Framework}/Profiler.php | 6 +- .../Profiler/Driver/Factory.php | 8 +- .../Profiler/Driver/Standard.php | 12 +- .../Driver/Standard/AbstractOutput.php | 2 +- .../Driver/Standard/Output/Csvfile.php | 6 +- .../Driver/Standard/Output/Factory.php | 8 +- .../Driver/Standard/Output/Firebug.php | 8 +- .../Profiler/Driver/Standard/Output/Html.php | 8 +- .../Driver/Standard/OutputInterface.php | 2 +- .../Profiler/Driver/Standard/Stat.php | 4 +- .../Profiler/DriverInterface.php | 2 +- lib/Magento/{ => Framework}/Registry.php | 2 +- .../Service/Data/AbstractObject.php | 4 +- .../Service/Data/AbstractObjectBuilder.php | 22 +- .../Service/Data/Eav}/AbstractObject.php | 23 +- .../Data/Eav}/AbstractObjectBuilder.php | 63 +- .../Service/Data/Eav/AttributeValue.php | 12 +- .../Data/Eav/AttributeValueBuilder.php | 12 +- .../Service/DataObjectConverter.php | 27 +- .../Service/EavDataObjectConverter.php | 71 + .../Service/V1/Data/Filter.php | 4 +- .../Service/V1/Data/FilterBuilder.php | 4 +- .../Service/V1/Data/Search/FilterGroup.php | 6 +- .../V1/Data/Search/FilterGroupBuilder.php | 12 +- .../Service/V1/Data/SearchCriteria.php | 6 +- .../Service/V1/Data/SearchCriteriaBuilder.php | 10 +- .../{ => Framework}/Session/Config.php | 12 +- .../Session/Config/ConfigInterface.php | 2 +- .../{ => Framework}/Session/Exception.php | 4 +- .../{ => Framework}/Session/Generic.php | 6 +- .../{ => Framework}/Session/SaveHandler.php | 4 +- .../Session/SaveHandler/DbTable.php | 10 +- .../Session/SaveHandler/Native.php | 2 +- .../Session/SaveHandlerException.php | 4 +- .../Session/SaveHandlerFactory.php | 12 +- .../Session/SaveHandlerInterface.php | 2 +- .../Session/SessionManager.php | 16 +- .../Session/SessionManagerInterface.php | 2 +- .../{ => Framework}/Session/SidResolver.php | 10 +- .../Session/SidResolverInterface.php | 10 +- .../{ => Framework}/Session/Storage.php | 4 +- .../Session/StorageInterface.php | 2 +- .../{ => Framework}/Session/Validator.php | 8 +- .../Session/ValidatorInterface.php | 8 +- lib/Magento/{ => Framework}/Shell.php | 10 +- .../{ => Framework}/Shell/CommandRenderer.php | 4 +- .../Shell/CommandRendererBackground.php | 8 +- .../Shell/CommandRendererInterface.php | 4 +- .../{ => Framework}/ShellInterface.php | 6 +- .../{ => Framework}/Simplexml/Config.php | 38 +- .../Simplexml/Config/Cache/AbstractCache.php | 11 +- .../Simplexml/Config/Cache/File.php | 11 +- .../{ => Framework}/Simplexml/Element.php | 25 +- .../{ => Framework}/Stdlib/ArrayUtils.php | 12 +- .../{ => Framework}/Stdlib/BooleanUtils.php | 2 +- lib/Magento/{ => Framework}/Stdlib/Cookie.php | 2 +- .../{ => Framework}/Stdlib/DateTime.php | 10 +- .../{ => Framework}/Stdlib/DateTime/Date.php | 10 +- .../Stdlib/DateTime/DateFactory.php | 12 +- .../Stdlib/DateTime/DateInterface.php | 258 +- .../Stdlib/DateTime/DateTime.php | 8 +- .../Stdlib/DateTime/Filter/Date.php | 6 +- .../Stdlib/DateTime/Filter/DateTime.php | 10 +- .../Stdlib/DateTime/Timezone.php | 26 +- .../DateTime/Timezone/ValidationException.php | 4 +- .../Stdlib/DateTime/Timezone/Validator.php | 8 +- .../Stdlib/DateTime/TimezoneInterface.php | 26 +- lib/Magento/{ => Framework}/Stdlib/String.php | 4 +- lib/Magento/{ => Framework}/System/Args.php | 4 +- lib/Magento/{ => Framework}/System/Dirs.php | 4 +- lib/Magento/{ => Framework}/System/Ftp.php | 14 +- lib/Magento/{ => Framework}/Translate.php | 68 +- .../Translate/AbstractAdapter.php | 4 +- .../{ => Framework}/Translate/Adapter.php | 2 +- .../Translate/AdapterInterface.php | 2 +- .../{ => Framework}/Translate/Inline.php | 32 +- .../Translate/Inline/ConfigInterface.php | 2 +- .../Translate/Inline/ParserFactory.php | 14 +- .../Translate/Inline/ParserInterface.php | 2 +- .../Translate/Inline/Provider.php | 10 +- .../Translate/Inline/ProviderInterface.php | 4 +- .../Translate/Inline/Proxy.php | 16 +- .../Translate/Inline/State.php | 2 +- .../Translate/Inline/StateInterface.php | 2 +- .../Translate/InlineInterface.php | 4 +- .../Translate/Locale/Resolver/Plugin.php | 16 +- .../Translate/ResourceInterface.php | 2 +- .../{ => Framework}/TranslateInterface.php | 6 +- lib/Magento/{ => Framework}/Url.php | 82 +- .../Url/QueryParamsResolver.php | 4 +- .../Url/QueryParamsResolverInterface.php | 12 +- .../Url/RouteParamsResolverFactory.php | 12 +- .../Url/RouteParamsResolverInterface.php | 2 +- .../{ => Framework}/Url/ScopeInterface.php | 2 +- .../Url/ScopeResolverInterface.php | 6 +- .../Url/SecurityInfoInterface.php | 2 +- lib/Magento/{ => Framework}/Url/Validator.php | 2 +- lib/Magento/{ => Framework}/UrlFactory.php | 10 +- lib/Magento/{ => Framework}/UrlInterface.php | 10 +- lib/Magento/{ => Framework}/Util.php | 2 +- lib/Magento/{ => Framework}/Validator.php | 27 +- .../Validator/AbstractValidator.php | 20 +- .../{ => Framework}/Validator/Alnum.php | 4 +- .../{ => Framework}/Validator/Builder.php | 52 +- .../{ => Framework}/Validator/Config.php | 26 +- .../{ => Framework}/Validator/Constraint.php | 18 +- .../Validator/Constraint/Option.php | 4 +- .../Validator/Constraint/Option/Callback.php | 4 +- .../Validator/Constraint/OptionInterface.php | 2 +- .../Validator/Constraint/Property.php | 12 +- .../Validator/ConstraintFactory.php | 12 +- .../Validator/EmailAddress.php | 4 +- .../Validator/Entity/Properties.php | 14 +- .../Validator/File/Extension.php | 4 +- .../Validator/File/ImageSize.php | 4 +- .../Validator/File/IsImage.php | 4 +- .../{ => Framework}/Validator/File/Size.php | 4 +- .../{ => Framework}/Validator/Float.php | 4 +- lib/Magento/{ => Framework}/Validator/Int.php | 4 +- .../{ => Framework}/Validator/NotEmpty.php | 4 +- .../{ => Framework}/Validator/Object.php | 8 +- .../{ => Framework}/Validator/Regex.php | 4 +- .../Validator/StringLength.php | 4 +- .../Validator/UniversalFactory.php | 12 +- .../Validator/ValidatorException.php | 2 +- .../Validator/ValidatorInterface.php | 8 +- .../Validator/etc/validation.xsd | 0 .../{ => Framework}/ValidatorFactory.php | 16 +- .../View/Asset/AssetInterface.php | 2 +- .../{ => Framework}/View/Asset/Collection.php | 2 +- .../View/Asset/ConfigInterface.php | 2 +- .../View/Asset/GroupedCollection.php | 4 +- .../View/Asset/LocalInterface.php | 2 +- .../View/Asset/MergeService.php | 18 +- .../View/Asset/MergeStrategy/Checksum.php | 10 +- .../View/Asset/MergeStrategy/Direct.php | 20 +- .../View/Asset/MergeStrategy/FileExists.php | 10 +- .../View/Asset/MergeStrategyInterface.php | 2 +- .../View/Asset/MergeableInterface.php | 2 +- .../{ => Framework}/View/Asset/Merged.php | 20 +- .../{ => Framework}/View/Asset/Minified.php | 24 +- .../View/Asset/MinifyService.php | 27 +- .../View/Asset/PreProcessor/Composite.php | 14 +- .../PreProcessor/PreProcessorInterface.php | 10 +- .../View/Asset/PreProcessorFactory.php | 8 +- .../View/Asset/PropertyGroup.php | 2 +- .../View/Asset/PropertyGroupFactory.php | 10 +- .../{ => Framework}/View/Asset/PublicFile.php | 8 +- .../{ => Framework}/View/Asset/Remote.php | 2 +- .../{ => Framework}/View/Asset/ViewFile.php | 8 +- .../View/Block/IdentityInterface.php | 4 +- .../{ => Framework}/View/BlockPool.php | 12 +- lib/Magento/{ => Framework}/View/Config.php | 36 +- .../{ => Framework}/View/ConfigInterface.php | 4 +- lib/Magento/{ => Framework}/View/Context.php | 50 +- .../{ => Framework}/View/DataSourcePool.php | 6 +- .../View/DeployedFilesManager.php | 12 +- .../View/Design/Fallback/Factory.php | 12 +- .../View/Design/Fallback/Rule/Composite.php | 2 +- .../Design/Fallback/Rule/ModularSwitch.php | 2 +- .../Design/Fallback/Rule/RuleInterface.php | 2 +- .../View/Design/Fallback/Rule/Simple.php | 2 +- .../View/Design/Fallback/Rule/Theme.php | 4 +- .../FileResolution/Strategy/Fallback.php | 10 +- .../Strategy/Fallback/CachingProxy.php | 26 +- .../FileResolution/Strategy/FileInterface.php | 4 +- .../Strategy/LocaleInterface.php | 4 +- .../Strategy/View/NotifiableInterface.php | 6 +- .../FileResolution/Strategy/ViewInterface.php | 4 +- .../Design/FileResolution/StrategyPool.php | 32 +- .../View/Design/Theme/Customization.php | 38 +- .../Theme/Customization/AbstractFile.php | 52 +- .../Theme/Customization/ConfigInterface.php | 2 +- .../Design/Theme/Customization/File/Css.php | 4 +- .../Design/Theme/Customization/File/Js.php | 4 +- .../Customization/FileAssetInterface.php | 2 +- .../Theme/Customization/FileInterface.php | 20 +- .../Customization/FileServiceFactory.php | 12 +- .../View/Design/Theme/Customization/Path.php | 20 +- .../Design/Theme/CustomizationInterface.php | 6 +- .../View/Design/Theme/Domain/Factory.php | 22 +- .../Design/Theme/Domain/PhysicalInterface.php | 6 +- .../Design/Theme/Domain/StagingInterface.php | 4 +- .../Design/Theme/Domain/VirtualInterface.php | 6 +- .../Design/Theme/File/CollectionInterface.php | 8 +- .../View/Design/Theme/FileFactory.php | 12 +- .../View/Design/Theme/FileInterface.php | 10 +- .../Design/Theme/FileProviderInterface.php | 8 +- .../View/Design/Theme/FlyweightFactory.php | 20 +- .../View/Design/Theme/Image.php | 24 +- .../View/Design/Theme/Image/PathInterface.php | 2 +- .../View/Design/Theme/Image/Uploader.php | 20 +- .../View/Design/Theme/ImageFactory.php | 12 +- .../View/Design/Theme/Label.php | 6 +- .../View/Design/Theme/Label/ListInterface.php | 2 +- .../View/Design/Theme/LabelFactory.php | 14 +- .../View/Design/Theme/ListInterface.php | 4 +- .../View/Design/Theme/ResolverInterface.php | 4 +- .../Design/Theme/ThemeProviderInterface.php | 8 +- .../View/Design/Theme/Validator.php | 12 +- .../View/Design/ThemeFactory.php | 6 +- .../View/Design/ThemeInterface.php | 2 +- .../Framework/View}/DesignExceptions.php | 42 +- .../{ => Framework}/View/DesignInterface.php | 2 +- .../{ => Framework}/View/DesignLoader.php | 6 +- .../View/Element/AbstractBlock.php | 68 +- .../View/Element/BlockFactory.php | 6 +- .../View/Element/BlockInterface.php | 2 +- .../{ => Framework}/View/Element/Context.php | 116 +- .../{ => Framework}/View/Element/FormKey.php | 14 +- .../View/Element/Html/Calendar.php | 32 +- .../View/Element/Html/Date.php | 4 +- .../View/Element/Html/Link.php | 4 +- .../View/Element/Html/Link/Current.php | 10 +- .../View/Element/Html/Links.php | 10 +- .../View/Element/Html/Select.php | 4 +- .../View/Element/Js/Components.php | 4 +- .../View/Element/Js/Cookie.php | 8 +- .../{ => Framework}/View/Element/Messages.php | 60 +- .../{ => Framework}/View/Element/Redirect.php | 10 +- .../View/Element/RendererInterface.php | 2 +- .../View/Element/RendererList.php | 4 +- .../{ => Framework}/View/Element/Template.php | 28 +- .../View/Element/Template/Context.php | 80 +- .../{ => Framework}/View/Element/Text.php | 4 +- .../View/Element/Text/ListText.php | 6 +- .../View/Element/Text/TextList/Item.php | 6 +- .../View/Element/Text/TextList/Link.php | 6 +- .../{ => Framework}/View/FileSystem.php | 12 +- .../{ => Framework}/View/Helper/Js.php | 2 +- lib/Magento/{ => Framework}/View/Layout.php | 180 +- .../Interpreter/Decorator/Updater.php | 10 +- .../Argument/Interpreter/HelperMethod.php | 6 +- .../Argument/Interpreter/NamedParams.php | 4 +- .../Layout/Argument/Interpreter/Object.php | 6 +- .../Layout/Argument/Interpreter/Options.php | 8 +- .../View/Layout/Argument/Interpreter/Url.php | 6 +- .../View/Layout/Argument/Parser.php | 8 +- .../View/Layout/Argument/UpdaterInterface.php | 2 +- .../{ => Framework}/View/Layout/Element.php | 4 +- .../{ => Framework}/View/Layout/Factory.php | 12 +- .../{ => Framework}/View/Layout/File.php | 4 +- .../View/Layout/File/Factory.php | 10 +- .../View/Layout/File/FileList.php | 6 +- .../Layout/File/FileList/CollateInterface.php | 8 +- .../View/Layout/File/FileList/Collator.php | 8 +- .../View/Layout/File/FileList/Factory.php | 13 +- .../View/Layout/File/Source/Aggregated.php | 10 +- .../View/Layout/File/Source/Base.php | 12 +- .../Source/Decorator/ModuleDependency.php | 12 +- .../File/Source/Decorator/ModuleOutput.php | 14 +- .../View/Layout/File/Source/Override/Base.php | 12 +- .../Layout/File/Source/Override/Theme.php | 16 +- .../View/Layout/File/Source/Theme.php | 12 +- .../View/Layout/File/SourceInterface.php | 6 +- .../View/Layout/PageType/Config.php | 12 +- .../View/Layout/PageType/Config/Converter.php | 4 +- .../View/Layout/PageType/Config/Reader.php | 4 +- .../Layout/PageType/Config/SchemaLocator.php | 8 +- .../View/Layout/ProcessorFactory.php | 10 +- .../View/Layout/ProcessorInterface.php | 8 +- .../{ => Framework}/View/Layout/Proxy.php | 54 +- .../View/Layout/ScheduledStructure.php | 2 +- .../{ => Framework}/View/LayoutFactory.php | 12 +- .../{ => Framework}/View/LayoutInterface.php | 8 +- .../View/PublicFilesManagerInterface.php | 2 +- .../{ => Framework}/View/Publisher.php | 16 +- .../View/Publisher/CssFile.php | 2 +- .../{ => Framework}/View/Publisher/File.php | 2 +- .../View/Publisher/FileAbstract.php | 30 +- .../View/Publisher/FileFactory.php | 8 +- .../View/Publisher/FileInterface.php | 2 +- .../{ => Framework}/View/RelatedFile.php | 4 +- .../View/Render/RenderFactory.php | 10 +- .../{ => Framework}/View/RenderInterface.php | 2 +- lib/Magento/{ => Framework}/View/Service.php | 20 +- .../View/TemplateEngine/Php.php | 12 +- .../View/TemplateEngineFactory.php | 6 +- .../View/TemplateEngineInterface.php | 10 +- .../View/TemplateEnginePool.php | 8 +- lib/Magento/{ => Framework}/View/Url.php | 44 +- .../View/Url/ConfigInterface.php | 2 +- .../{ => Framework}/View/Url/CssResolver.php | 16 +- lib/Magento/{ => Framework}/Xml/Generator.php | 2 +- lib/Magento/{ => Framework}/Xml/Parser.php | 4 +- pub/errors/404.php | 2 +- pub/errors/503.php | 2 +- pub/errors/noCache.php | 2 +- pub/errors/report.php | 2 +- pub/get.php | 4 +- pub/lib/css/source/lib/lib.less | 1 + pub/lib/css/source/lib/ui-dialog.less | 33 + .../jquery-ui-timepicker-addon-1.0.1.js | 1530 ++++++++ pub/lib/jquery/jquery-ui-timepicker-addon.js | 3399 ++++++++++------- pub/lib/mage/calendar.js | 9 + .../lib/mage/dialog.js | 12 +- pub/lib/mage/dropdown.js | 233 +- pub/lib/mage/dropdown_old.js | 87 + pub/lib/mage/loader_old.js | 4 +- pub/lib/mage/tabs.js | 2 +- pub/lib/mage/tooltip.js | 32 + 6797 files changed, 58687 insertions(+), 44677 deletions(-) create mode 100644 .travis.yml delete mode 100644 app/code/Magento/CatalogSearch/Block/Autocomplete.php create mode 100644 app/code/Magento/Checkout/Model/Agreements/AgreementsProviderInterface.php rename app/code/Magento/{Store/Model/Group/Factory.php => Checkout/Model/Agreements/AgreementsValidator.php} (54%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Block/Adminhtml/Agreement.php (82%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Block/Adminhtml/Agreement/Edit.php (88%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Block/Adminhtml/Agreement/Edit/Form.php (94%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Block/Adminhtml/Agreement/Grid.php (90%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Block/Agreements.php (74%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Controller/Adminhtml/Agreement.php (88%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Model/Agreement.php (57%) create mode 100644 app/code/Magento/CheckoutAgreements/Model/AgreementsProvider.php rename app/code/Magento/{Checkout => CheckoutAgreements}/Model/Resource/Agreement.php (80%) rename app/code/Magento/{Checkout => CheckoutAgreements}/Model/Resource/Agreement/Collection.php (86%) rename app/code/Magento/{Checkout => CheckoutAgreements}/etc/adminhtml/acl.xml (74%) rename app/code/Magento/{Checkout => CheckoutAgreements}/etc/adminhtml/menu.xml (78%) rename app/code/Magento/{Checkout => CheckoutAgreements}/etc/adminhtml/routes.xml (92%) create mode 100644 app/code/Magento/CheckoutAgreements/etc/adminhtml/system.xml create mode 100644 app/code/Magento/CheckoutAgreements/etc/di.xml create mode 100644 app/code/Magento/CheckoutAgreements/etc/module.xml create mode 100644 app/code/Magento/CheckoutAgreements/sql/checkoutagreements_setup/install-1.0.0.0.php rename app/code/Magento/{Checkout => CheckoutAgreements}/view/frontend/agreements.phtml (97%) rename app/code/Magento/{CatalogSearch/view/frontend/layout/catalogsearch_ajax_suggest.xml => CheckoutAgreements/view/frontend/layout/checkout_onepage_review.xml} (83%) create mode 100644 app/code/Magento/CheckoutAgreements/view/frontend/layout/multishipping_checkout_overview.xml create mode 100644 app/code/Magento/CheckoutAgreements/view/frontend/layout/paypal_express_review.xml create mode 100644 app/code/Magento/CheckoutAgreements/view/frontend/layout/paypal_payflowexpress_review.xml rename app/code/Magento/{ImportExport/Model/Export/Entity/Eav/Customer => Customer/Model/ImportExport/Export}/Address.php (90%) rename app/code/Magento/{ImportExport/Model/Export/Entity/Eav => Customer/Model/ImportExport/Export}/Customer.php (92%) rename app/code/Magento/{ImportExport/Model/Import/Entity/Eav => Customer/Model/ImportExport/Import}/AbstractCustomer.php (93%) rename app/code/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/Address.php (96%) rename app/code/Magento/{ImportExport/Model/Import/Entity/Eav => Customer/Model/ImportExport/Import}/Customer.php (94%) rename app/code/Magento/{ImportExport/Model/Import/Entity => Customer/Model/ImportExport/Import}/CustomerComposite.php (83%) rename app/code/Magento/{ImportExport/Model/Resource => Customer/Model/Resource/ImportExport/Import}/Customer/Storage.php (91%) rename app/code/Magento/{ImportExport/Model/Resource => Customer/Model/Resource/ImportExport}/Import/CustomerComposite/Data.php (78%) rename app/code/Magento/{Persistent/etc/di.xml => Customer/etc/export.xml} (76%) create mode 100644 app/code/Magento/Customer/etc/import.xml rename app/code/Magento/{Core/Model/App/Area => PageCache/Model/App}/CacheIdentifierPlugin.php (86%) rename app/code/Magento/{Core/Model/App/Action/ContextPlugin.php => Store/App/Action/Plugin/Context.php} (91%) create mode 100644 dev/tests/integration/etc/local-mysql.travis.xml.dist create mode 100644 dev/tests/integration/framework/Magento/TestFramework/Mail/Template/TransportBuilderMock.php create mode 100644 dev/tests/integration/framework/Magento/TestFramework/Mail/TransportInterfaceMock.php delete mode 100644 dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/cache/lib/oyejorge.less rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Export/Entity/Eav/Customer => Customer/Model/ImportExport/Export}/AddressTest.php (94%) rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Export/Entity/Eav => Customer/Model/ImportExport/Export}/CustomerTest.php (94%) rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/AddressTest.php (89%) rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Import/Entity => Customer/Model/ImportExport/Import}/CustomerCompositeTest.php (93%) create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav => Customer/Model/ImportExport/Import}/_files/address_import_delete.csv (100%) rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav => Customer/Model/ImportExport/Import}/_files/address_import_update.csv (100%) rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Import/Entity => Customer/Model/ImportExport/Import}/_files/customer_composite_delete.csv (100%) rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Import/Entity => Customer/Model/ImportExport/Import}/_files/customer_composite_update.csv (100%) rename dev/tests/integration/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav => Customer/Model/ImportExport/Import}/_files/customers_to_import.csv (100%) create mode 100644 dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php rename dev/tests/integration/testsuite/Magento/{ImportExport/_files => Customer/_files/import_export}/customer.php (89%) rename dev/tests/integration/testsuite/Magento/{ImportExport/_files => Customer/_files/import_export}/customer_with_addresses.php (94%) rename dev/tests/integration/testsuite/Magento/{ImportExport/_files => Customer/_files/import_export}/customers.php (89%) rename dev/tests/integration/testsuite/Magento/{ImportExport/_files => Customer/_files/import_export}/customers_for_address_import.php (96%) rename dev/tests/integration/testsuite/Magento/{Core/Model => Framework}/App/AreaTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Cache/Backend/MongoDbTest.php (97%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Cache/CoreTest.php (81%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Code/GeneratorTest.php (75%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Code/GeneratorTest/ParentClassWithNamespace.php (98%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Code/GeneratorTest/SourceClassWithNamespace.php (98%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Code/_expected/SourceClassWithNamespaceFactory.php (76%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Code/_expected/SourceClassWithNamespaceInterceptor.php (81%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Code/_expected/SourceClassWithNamespaceProxy.php (84%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Css/PreProcessor/Adapter/OyejorgeTest.php (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Css/PreProcessor/CacheTest.php (77%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Css/PreProcessor/_files/cache/lib/nested/import.less (100%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/cache/lib/oyejorge.less rename dev/tests/integration/testsuite/Magento/{ => Framework}/Css/PreProcessor/_files/nested/import.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Css/PreProcessor/_files/oyejorge.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Css/PreProcessor/_files/oyejorge.less (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/DB/Adapter/InterfaceTest.php (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/DB/Adapter/Pdo/MysqlTest.php (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/DB/TransactionTest.php (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Data/Argument/Interpreter/StringTest.php (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Data/Form/Element/FieldsetTest.php (94%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Encryption/ModelTest.php (89%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php rename dev/tests/integration/testsuite/Magento/{ => Framework}/File/SizeTest.php (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/Directory/ReadTest.php (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/Directory/WriteTest.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/Driver/FileTest.php (87%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/File/ReadTest.php (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/File/WriteTest.php (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/FilesystemTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/_files/data.csv (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/_files/foo/bar/baz/file_one.txt (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/_files/foo/bar/file_two.txt (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/_files/foo/file_three.txt (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Filesystem/_files/popup.csv (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Gdata/Gshopping/ContentTest.php (80%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/HTTP/HeaderTest.php (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/HTTP/PhpEnvironment/RemoteAddressTest.php (86%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/HTTP/PhpEnvironment/ServerAddressTest.php (86%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Image/Adapter/ConfigTest.php (82%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Image/Adapter/InterfaceTest.php (89%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Image/_files/image_adapters_test.png (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Image/_files/magento_thumbnail.jpg (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Image/_files/watermark.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Image/_files/watermark.jpg (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Image/_files/watermark.png (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Interception/Fixture/Intercepted.php (97%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Interception/Fixture/Intercepted/InterfacePlugin.php (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Interception/Fixture/Intercepted/Plugin.php (94%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Interception/Fixture/InterceptedInterface.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Interception/Fixture/InterceptedParent.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Interception/Fixture/InterceptedParentInterface.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Interception/GeneralTest.php (61%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/File/Source/AggregatedTest.php (87%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/PreProcessorTest.php (73%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/code/Magento/Other/view/frontend/3.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/code/Magento/Third/view/frontend/3.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_default/1.file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_default/Magento_Module/1.file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_default/Magento_Third/3.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_default/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_parent/Magento_Module/1.file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_parent/Magento_Second/1.file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_parent/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less (100%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less (100%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/less/import1.less (60%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less (100%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/less/import2.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/source.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/source/source.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/design/frontend/test_pre_process/theme.xml (63%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/lib/1.file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/lib/2.file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/lib/3.less (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/lib/some_dir/import_dir/import_in_magento_import.less (100%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/magento_import.less rename dev/tests/integration/testsuite/Magento/{ => Framework}/Less/_files/themes.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Locale/ResolverTest.php (89%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Message/CollectionFactoryTest.php (77%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Message/FactoryTest.php (84%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Message/ManagerTest.php (78%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Model/Resource/Db/AbstractTest.php (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Model/Resource/Db/Collection/AbstractTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Model/Resource/Db/ProfilerTest.php (81%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Model/Resource/Entity/TableTest.php (82%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Model/Resource/IteratorTest.php (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Model/ResourceTest.php (89%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Module/SetupTest.php (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Mview/View/ChangelogTest.php (87%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Object/Copy/Config/ReaderTest.php (80%) rename dev/tests/{unit/testsuite/Magento/Object/Copy/Config/_files => integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc}/fieldset.xml (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Object/Copy/Config/_files/Magento/Test/etc/module.xml (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Object/Copy/Config/_files/expectedArray.php (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Object/Copy/Config/_files/partialFieldsetFirst.xml (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Object/Copy/Config/_files/partialFieldsetSecond.xml (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Object/CopyTest.php (87%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/Config/Reader/DomTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/ObjectManagerTest.php (69%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/Basic.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/BasicAlias.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/BasicInjection.php (80%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorEightArguments.php (50%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorFiveArguments.php (58%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorFourArguments.php (62%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorNineArguments.php rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorNoArguments.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorOneArgument.php (81%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorSevenArguments.php (53%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorSixArguments.php (54%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorTenArguments.php rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorThreeArguments.php (66%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/ConstructorTwoArguments.php (71%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/InterfaceImplementation.php (86%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/InterfaceInjection.php (78%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/TestAsset/TestAssetInterface.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/_files/config_merged.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/_files/config_one.xml (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ObjectManager/_files/config_two.xml (88%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/CsvfileTest.php (88%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/FirebugTest.php (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/HtmlTest.php (89%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/_files/output.html (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/_files/output_custom.csv (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/_files/output_default.csv (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/_files/timers.php (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/ProfilerTest.php (82%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Session/ConfigTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Session/SaveHandler/DbTableTest.php (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Session/SessionManagerTest.php (84%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Session/SidResolverTest.php (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Translate/InlineTest.php (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Translate/_files/_inline_page_expected.html (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Translate/_files/_inline_page_original.html (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/Translate/_files/_translation_data.php (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/TranslateTest.php (72%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/UrlTest.php (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Asset/MergedTest.php (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Design/FileResolution/Strategy/FallbackTest.php (97%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Design/Theme/LabelTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Design/Theme/ValidatorTest.php (87%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Element/AbstractBlockTest.php (86%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Element/TemplateTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Element/Text/ListTest.php (70%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Element/TextTest.php (91%) rename dev/tests/integration/testsuite/Magento/{View/Element/_files/frontend/magento_plushe => Framework/View/Element/_files/frontend/Magento/plushe}/css/wrong.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/FileSystemTest.php (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Layout/ElementTest.php (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Layout/_files/_layout_update.xml (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/LayoutArgumentObjectUpdater.php (83%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/LayoutArgumentSimpleUpdater.php (89%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/LayoutDirectivesTest.php (87%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/LayoutTest.php (77%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/PublicationTest.php (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/RelatedFileTest.php (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Utility/Layout.php (71%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Utility/LayoutTest.php (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Utility/_files/layout/handle_one.xml (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Utility/_files/layout/handle_three.xml (94%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Utility/_files/layout/handle_two.xml (95%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Utility/_files/layout_merged/multiple_handles.xml (94%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/Utility/_files/layout_merged/single_handle.xml (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/Magento/ModuleA/view/adminhtml/product/product.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/Magento/ModuleB/view/adminhtml/images/gallery-image-base-label.png (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/Magento/ModuleC/view/adminhtml/images/allinone.png (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/Magento/ModuleC/view/adminhtml/images/logo.png (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/Magento/ModuleC/view/adminhtml/styles.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/adminhtml/vendor_test/theme.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/area_two/vendor_theme_one/file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/area_two/vendor_theme_one/theme.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/design_area/vendor_theme_one/file (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/design_area/vendor_theme_one/theme.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/access_violation.php (100%) rename dev/tests/integration/testsuite/Magento/{View/_files/fallback/design/frontend/vendor_default => Framework/View/_files/design/frontend/magento_default}/theme.xml (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/magento_default_iphone/theme.xml (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml (94%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_cache_test_theme/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Catalog/theme_file.txt (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Catalog/theme_file_with_2_dots..txt (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml (88%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml (83%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Magento_Core/test.phtml (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/css/styles.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/i18n/en_US.csv (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/images/logo.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/images/logo_email.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/js/tabs.js (100%) rename dev/tests/integration/testsuite/Magento/{View/_files/design/frontend/magento_default => Framework/View/_files/design/frontend/test_default}/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_default/view.xml (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_publication/images/rectangle.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_publication/images/square.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_publication/style.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_publication/sub.css (100%) rename dev/tests/integration/testsuite/Magento/{View/_files/design/frontend/vendor_default => Framework/View/_files/design/frontend/test_publication}/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_test_theme/layout_test_handle.xml (94%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/test_test_theme/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js (100%) rename dev/tests/integration/testsuite/Magento/{View/_files/fallback => Framework/View/_files}/design/frontend/vendor_custom_theme/theme.xml (92%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/access_violation.php (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/css/1.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/css/base64.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/css/body.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/css/deep/recursive.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/css/exception.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/css/file.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/h1.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/images/h2.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/recursive.css (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/recursive.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/recursive2.gif (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/frontend/vendor_default/scripts.js (100%) rename dev/tests/integration/testsuite/Magento/{View/_files/design/frontend/test_default => Framework/View/_files/design/frontend/vendor_default}/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/design/themes.php (96%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script_two.js (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_template_two.phtml (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_script_two.js (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_template_two.phtml (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_custom_theme/i18n/en_US.csv (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_custom_theme/mage/script.js (100%) rename dev/tests/integration/testsuite/Magento/{View/_files => Framework/View/_files/fallback}/design/frontend/vendor_custom_theme/theme.xml (87%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_script.js (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_template.phtml (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_default/fixture_script.js (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_default/fixture_template.phtml (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_default/i18n/en_US.csv (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/fixture_script.js (100%) create mode 100644 dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/fallback/pub/lib/mage/script.js (100%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout/cacheable.xml (86%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout/container_attributes.xml (83%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout/non_cacheable.xml (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/action_for_anonymous_parent_block.xml (78%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/arguments.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/arguments_complex_values.xml (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/arguments_object_type.xml (71%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/arguments_object_type_updaters.xml (77%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/arguments_url_type.xml (91%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/get_block.xml (83%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/get_block_exception.xml (88%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/group.xml (77%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/ifconfig.xml (69%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/move.xml (71%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/move_alias_broken.xml (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/move_broken.xml (93%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/move_new_alias.xml (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/move_the_same_alias.xml (85%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/remove.xml (77%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/remove_broken.xml (83%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/render.xml (90%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/sort_after_after.xml (81%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/sort_after_previous.xml (82%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/sort_before_after.xml (81%) rename dev/tests/integration/testsuite/Magento/{ => Framework}/View/_files/layout_directives_test/sort_before_before.xml (81%) create mode 100644 dev/tests/integration/testsuite/Magento/GoogleShopping/Model/Attribute/PriceTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerTest.php rename dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/{Eav => }/_files/customers_for_validation_test.csv (100%) delete mode 100644 dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less delete mode 100644 dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less delete mode 100644 dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less delete mode 100644 dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less delete mode 100644 dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less delete mode 100644 dev/tests/integration/testsuite/Magento/Less/_files/lib/some_dir/magento_import.less delete mode 100644 dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorNineArguments.php delete mode 100644 dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorTenArguments.php create mode 100644 dev/tests/integration/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Persistent/Model/ObserverTest.php rename dev/tests/{unit/testsuite/Magento/Validator/Test/Alnum.php => integration/testsuite/Magento/Persistent/_files/persistent.php} (73%) create mode 100644 dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php create mode 100644 dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php rename app/code/Magento/Store/Model/Website/Factory.php => dev/tests/integration/testsuite/Magento/ProductAlert/_files/product_alert.php (58%) create mode 100644 dev/tests/integration/testsuite/Magento/Sendfriend/Block/SendTest.php delete mode 100644 dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/theme.xml create mode 100644 dev/tests/js/testsuite/mage/calendar/calendar-qunit.js create mode 100644 dev/tests/js/testsuite/mage/calendar/calendar.html create mode 100644 dev/tests/js/testsuite/mage/dropdown/index.html create mode 100644 dev/tests/js/testsuite/mage/dropdown/test-dropdown.js create mode 100644 dev/tests/js/testsuite/mage/validation/index.html create mode 100644 dev/tests/js/testsuite/mage/validation/test-validation.js delete mode 100644 dev/tests/js/testsuite/mage/validation/validate-test.js rename dev/tests/static/testsuite/Magento/Test/Legacy/Magento/{ => Framework}/ObjectManager/DiConfigTest.php (97%) create mode 100644 dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php create mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Model/Agreements/AgreementsValidatorTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Model/Config/Source/Cart/SummaryTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Export/Entity/Eav/Customer => Customer/Model/ImportExport/Export}/AddressTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Export/Entity/Eav => Customer/Model/ImportExport/Export}/CustomerTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav => Customer/Model/ImportExport/Import}/AbstractCustomerTest.php (60%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/AddressTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity => Customer/Model/ImportExport/Import}/CustomerCompositeTest.php (58%) create mode 100644 dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity => Customer/Model/ImportExport/Import}/_files/customer_composite_prepare_row_for_db.csv (100%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_abstract_empty_email.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_abstract_empty_website.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_abstract_invalid_email.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_abstract_invalid_website.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_abstract_no_email.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_abstract_no_website.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_abstract_valid.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_delete_address_not_found.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_delete_empty_address_id.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_delete_no_customer.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_delete_valid.php (91%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_update_absent_required_attribute.php (94%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_update_empty_address_id.php (94%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_update_invalid_region.php (94%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_update_no_customer.php (94%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Import/Entity/Eav/Customer => Customer/Model/ImportExport/Import}/_files/row_data_address_update_valid.php (94%) rename dev/tests/unit/testsuite/Magento/{ImportExport/Model/Resource => Customer/Model/Resource/ImportExport/Import}/Customer/StorageTest.php (68%) create mode 100644 dev/tests/unit/testsuite/Magento/Customer/Model/Resource/ImportExport/Import/CustomerComposite/DataTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Exception/InputExceptionTest.php rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/BuilderTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Loader/DefaultTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Loader/ResourceTest.php (70%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/Config/Converter/DomTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/Config/Converter/_files/converted_valid_acl.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/Config/Converter/_files/valid_acl.xml (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/Config/XsdTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/Config/_files/invalidAclXmlArray.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/Config/_files/valid_acl.xml (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/ProviderTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/Resource/TreeBuilderTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Acl/ResourceFactoryTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Authorization/Policy/AclTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Authorization/Policy/DefaultTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/AuthorizationTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Autoload/ClassMapTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Autoload/ClassMapTest/TestMap.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Autoload/IncludePathTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Autoload/IncludePathTest/Ns/TestClass.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Autoload/IncludePathTest/TestClass.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Autoload/IncludePathTest/constant.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/FactoryTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/MediaTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/NomediaTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/SnapshotTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/Fs.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/Ftp.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/Gz.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/Helper.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/Tar.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/data/code/.gitignore (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/data/media/.gitignore (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/data/pub/media/.gitignore (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/data/var/log/.gitignore (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Backup/_files/io.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Backend/Decorator/CompressionTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Backend/Decorator/DecoratorAbstractTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Backend/MongoDbTest.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Backend/_files/MongoBinData.txt (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Config/ConverterTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Config/_files/cache_config.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Config/_files/cache_config.xml (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/ConfigTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/CoreTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Frontend/Adapter/ZendTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Frontend/Decorator/BareTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Frontend/Decorator/ProfilerTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Cache/Frontend/Decorator/TagScopeTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Generator/CodeGenerator/ZendTest.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Generator/EntityAbstractTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Generator/IoTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Generator/TestAsset/ParentClass.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Generator/TestAsset/SourceClass.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Generator/TestAsset/TestGenerationClass.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/GeneratorTest.php (68%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Minifier/Adapter/Js/JsminTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Minifier/Strategy/GenerateTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Minifier/Strategy/LiteTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Minifier/_files/js/original.js (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/MinifierTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Model/File/Validator/NotProtectedExtensionTest.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/NameBuilderTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Reader/ArgumentsReaderTest.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Reader/_files/ClassesForArgumentsReader.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/ArgumentSequenceTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/ConstructorIntegrityTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/ContextAggregationTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/TypeDuplicationTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/_files/ClassesForArgumentSequence.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/_files/ClassesForConstructorIntegrity.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/_files/ClassesForContextAggregation.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/Validator/_files/ClassesForTypeDuplication.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/Converter/Dom/FlatTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/Converter/DomTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/Data/ScopedTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/Dom/ArrayNodeConfigTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/Dom/NodeMergingConfigTest.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/Dom/NodePathMatcherTest.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/DomTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/FileIteratorTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/Reader/FilesystemTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/ScopeTest.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/ThemeTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/ValidationStateTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/ViewTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/XsdTest.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/area/default_default/theme.xml (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/area/default_test/theme.xml (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/area/default_test2/theme.xml (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/area/test_default/theme.xml (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/area/test_external_package_descendant/theme.xml (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/attributes.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/attributes.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/cdata.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/cdata.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/flat/result.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/flat/source.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/flat/source_notuniq.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/converter/dom/flat/source_wrongarray.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ambiguous_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ambiguous_new_one.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ambiguous_new_two.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ambiguous_one.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ambiguous_two.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/attributes.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/attributes_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/attributes_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/converter/cdata.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/converter/cdata.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/converter/no_attributes.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/converter/no_attributes.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/converter/with_attributes.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/converter/with_attributes.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ids.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ids_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/ids_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/namespaced.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/namespaced_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/namespaced_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/no_ids.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/no_ids_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/no_ids_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/override_node.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/override_node_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/override_node_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/recursive.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/recursive_deep.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/recursive_deep_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/recursive_deep_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/recursive_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/recursive_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/text_node.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/text_node_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/text_node_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/types.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/types_merged.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/dom/types_new.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/reader/config.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/reader/schema.xsd (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/sample.xsd (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/theme_invalid.xml (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/view_invalid.xml (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/view_one.xml (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Config/_files/view_two.xml (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Controller/Router/Route/FactoryTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Convert/ConvertArrayTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Convert/ExcelTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Convert/ObjectTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Convert/XmlTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Convert/_files/output.txt (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/CacheTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/ImportEntityTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/Map/StorageTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Css/PreProcessor/Cache/Plugin/LessTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Css/PreProcessor/CompositeTest.php (73%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/DB/Adapter/Pdo/MysqlTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/DB/Ddl/TriggerTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/DB/ProfilerTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/DB/SelectTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/Interpreter/ArrayTypeTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/Interpreter/BooleanTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/Interpreter/CompositeTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/Interpreter/ConstantTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/Interpreter/NullTypeTest.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/Interpreter/NumberTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/XsdTest.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/_files/typesInvalidArray.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/_files/types_schema.xsd (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Argument/_files/types_valid.xml (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Collection/Db/FetchStrategy/CacheTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Collection/Db/FetchStrategy/QueryTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Collection/DbTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/CollectionTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Form/Element/EditablemultiselectTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Form/Element/FactoryTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/Form/Element/MultiselectTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/FormFactoryTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/FormTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/GraphTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Data/StructureTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Encryption/Crypt/_files/_cipher_info.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Encryption/Crypt/_files/_crypt_fixtures.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Encryption/CryptTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Encryption/EncryptorTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Encryption/UrlCoderTest.php (86%) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Error/HandlerTest.php rename dev/tests/unit/testsuite/Magento/{ => Framework}/EscaperTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/ConverterTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/DataTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/SchemaLocatorTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/XsdTest.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/_files/event_config.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/_files/event_config.xml (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/_files/event_invalid_config.xml (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/_files/invalidEventsXmlArray.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Config/_files/valid_events.xml (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/Invoker/InvokerDefaultTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/ManagerStub.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Event/ManagerTest.php (87%) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CollectionTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CronTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Event/Observer/RegexTest.php rename dev/tests/unit/testsuite/Magento/{Event => Framework}/EventFactoryTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Exception/AuthorizationExceptionTest.php (77%) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Exception/ErrorMessageTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Exception/InputExceptionTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filesystem/Directory/ReadTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filesystem/Directory/WriteTest.php (75%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filesystem/DirectoryListTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filesystem/Driver/HttpTest.php (95%) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filesystem/_files/http_mock.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/FilesystemTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/AbstractFactoryTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/FilterManager/ConfigTest.php (75%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/FilterManagerTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/RemoveAccentsTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/RemoveTagsTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/SplitWordsTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/StripTagsTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/Template/SimpleTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/TranslitTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/TranslitUrlTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Filter/TruncateTest.php (79%) rename dev/tests/unit/testsuite/Magento/{Http => Framework/HTTP}/AuthenticationTest.php (92%) rename dev/tests/unit/testsuite/Magento/{Http => Framework/HTTP}/HeaderTest.php (89%) rename dev/tests/unit/testsuite/Magento/{Http => Framework/HTTP}/PhpEnvironment/RemoteAddressTest.php (97%) rename dev/tests/unit/testsuite/Magento/{Http => Framework/HTTP}/PhpEnvironment/ServerAddressTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Image/Adapter/AbstractTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Image/Adapter/Gd2Test.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Image/Adapter/ImageMagickTest.php (75%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Image/Adapter/_files/invalid_image.jpg (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Image/AdapterFactoryTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Chain/ChainTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Code/Generator/InterceptorTest.php (80%) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Config/ConfigTest.php (64%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/Item.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleInterface.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncorrectSubject.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php (68%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/InterfaceValidator/ItemWithArguments.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/Item.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/Item/Enhanced.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/ItemContainer.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/ItemContainer/Enhanced.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/ItemContainerPlugin/Simple.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/ItemPlugin/Advanced.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Custom/Module/Model/ItemPlugin/Simple.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/Definition/CompiledTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/ObjectManager/ConfigTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/PluginList/PluginListTest.php (66%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Interception/_files/reader_mock_map.php (71%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Less/File/FileList/CollatorTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Less/_files/invalid.less (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Less/_files/valid.less (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Locale/Hierarchy/Config/ConverterTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Locale/Hierarchy/Config/FileResolverTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Locale/Hierarchy/Config/_files/custom/hierarchy_config.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Locale/Hierarchy/Config/_files/default/hierarchy_config.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Locale/Hierarchy/ConfigTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Locale/ValidatorTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mail/MessageTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mail/Template/FactoryTest.php (67%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mail/Template/TransportBuilderTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mail/TransportTest.php (74%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Math/CalculatorTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Math/DivisionTest.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Math/RandomTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/AbstractMessageTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/CollectionTest.php (56%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/ErrorTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/FactoryTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/ManagerTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/NoticeTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/SuccessTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Message/WarningTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Model/AbstractModelTest.php (72%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Model/ActionValidator/RemoveActionTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/Converter/DomTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/Converter/_files/converted_valid_module.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/Converter/_files/valid_module.xml (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml (96%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml (96%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml (96%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/FileResolverTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Declaration/Reader/FilesystemTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/DependencyManagerTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Dir/ReaderTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Dir/ReverseResolverTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/DirTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/ManagerTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/ModuleListTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/ResourceResolverTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Setup/MigrationTest.php (71%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Setup/_files/data_content_plain_model.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Setup/_files/data_content_plain_pk_fields.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Setup/_files/data_content_plain_resource.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Setup/_files/data_content_serialized.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Setup/_files/data_content_wiki.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Setup/_files/data_content_xml.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/Updater/SetupFactoryTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/UpdaterTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/_files/Module/data/module_first_setup/.gitignore (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/_files/Module/data/module_second_setup/.gitignore (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Module/_files/Module/sql/module_first_setup/.gitignore (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/ActionFactoryTest.php (68%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/Config/ConverterTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/Config/Data/ProxyTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/Config/DataTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/Config/ReaderTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/ConfigTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/ProcessorTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/View/ChangelogTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/View/CollectionTest.php (70%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/View/SubscriptionFactoryTest.php (75%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/View/SubscriptionTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/ViewTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/XsdTest.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/invalidMviewXmlArray.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/mview_config.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/mview_merged_one.xml (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/mview_merged_two.xml (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/mview_one.xml (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/mview_three.xml (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/mview_two.xml (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Mview/_files/valid_mview.xml (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Object/CacheTest.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Object/Copy/Config/ConverterTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Object/Copy/Config/SchemaLocatorTest.php (85%) rename dev/tests/{integration/testsuite/Magento/Object/Copy/Config/_files/Magento/Test/etc => unit/testsuite/Magento/Framework/Object/Copy/Config/_files}/fieldset.xml (96%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Object/Copy/Config/_files/fieldset_config.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Object/Copy/ConfigTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Object/CopyTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Object/MapperTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Code/Generator/FactoryTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Code/Generator/ProxyTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Code/Generator/_files/Sample.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Code/Generator/_files/SampleFactory.txt (58%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Code/Generator/_files/SampleProxy.txt (73%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/ConfigTest.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/Mapper/ArgumentParserTest.php (96%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/Mapper/DomTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/Mapper/_files/argument_parser.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/Mapper/_files/simple_di_config.xml (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/Reader/DomTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/Reader/_files/ConfigDomMock.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/XsdTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/_files/invalidConfigXmlArray.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Config/_files/valid_config.xml (99%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Definition/Compiled/BinaryTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Definition/Compiled/SerializedTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/DefinitionFactoryTest.php (68%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Factory/FactoryTest.php (72%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Factory/Fixture/CircularOne.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Factory/Fixture/CircularThree.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Factory/Fixture/CircularTwo.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Factory/Fixture/OneScalar.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Factory/Fixture/Polymorphous.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Factory/Fixture/Two.php (96%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/ObjectManagerTest.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Relations/CompiledTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectManager/Relations/RuntimeTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ObjectTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Phrase/Renderer/CompositeTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Phrase/Renderer/InlineTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Phrase/Renderer/PlaceholderTest.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Phrase/Renderer/TranslateTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/PhraseTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Adjustment/CalculatorTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Adjustment/CollectionTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Adjustment/FactoryTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Adjustment/PoolTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Amount/AmountFactoryTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Amount/BaseTest.php (95%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Price/FactoryTest.php (73%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/PriceCompositeTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/PriceInfo/BaseTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/PriceInfo/FactoryTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Render/AbstractAdjustmentTest.php (74%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Render/AmountTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Render/LayoutTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Render/PriceBoxTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/Render/RendererPoolTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Pricing/RenderTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Profiler/Driver/FactoryTest.php (73%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/CsvfileTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/FactoryTest.php (74%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/Output/FirebugTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/OutputAbstractTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Profiler/Driver/Standard/StatTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Profiler/Driver/StandardTest.php (73%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ProfilerTest.php (71%) rename dev/tests/unit/testsuite/Magento/{Customer/Service/V1/Data/Eav/AttributeTest.php => Framework/Service/Data/Eav/AttributeValueTest.php} (75%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Service/DataObjectConverterTest.php (99%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Session/ConfigTest.php (94%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Session/SaveHandler/DbTableTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Session/SaveHandlerFactoryTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Shell/CommandRendererBackgroundTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Shell/CommandRendererTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ShellTest.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Simplexml/ConfigTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Simplexml/ElementTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Simplexml/_files/data.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Simplexml/_files/mixed_data.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Stdlib/ArrayUtilsTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Stdlib/BooleanUtilsTest.php (98%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Stdlib/DateTime/Filter/DateTest.php (74%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Stdlib/DateTime/Filter/DateTimeTest.php (75%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Stdlib/DateTime/Timezone/ValidatorTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Stdlib/DateTimeTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Stdlib/StringTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Translate/AdapterAbstractTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Translate/AdapterTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Translate/Inline/ProxyTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Translate/Inline/StateTest.php (97%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Translate/InlineTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/TranslateTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Url/QueryParamsResolverTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Url/RouteParamsResolverFactoryTest.php (71%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Url/ValidatorTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/UrlTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/BuilderTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/ConfigTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Constraint/Option/CallbackTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Constraint/OptionTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Constraint/PropertyTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/ConstraintTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Entity/PropertiesTest.php (70%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/ExceptionTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/ObjectTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/StringLengthTest.php (86%) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Validator/Test/Alnum.php rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Test/Callback.php (91%) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Validator/Test/Int.php rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Test/NotEmpty.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Test/StringLength.php (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/Test/True.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/ValidatorAbstractTest.php (63%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_builder_class.xml (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_builder_instance.xml (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_child_for_option.xml (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_constraint.xml (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_content_for_callback.xml (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_entity_callback.xml (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_method.xml (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/invalid_method_callback.xml (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/multiple_callback_in_argument.xml (86%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/no_class_for_constraint.xml (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/no_constraint.xml (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/no_name_for_entity.xml (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/no_name_for_group.xml (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/no_name_for_rule.xml (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/no_rule_for_reference.xml (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/negative/not_unique_use.xml (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/positive/builder/validation.xml (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/positive/module_a/validation.xml (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/Validator/_files/validation/positive/module_b/validation.xml (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/ValidatorTest.php (76%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/CollectionTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/GroupedCollectionTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/MergeServiceTest.php (71%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/MergeStrategy/ChecksumTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/MergeStrategy/DirectTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/MergeStrategy/FileExistsTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/MergedTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/MinifiedTest.php (79%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/MinifyServiceTest.php (73%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/PreProcessor/CompositeTest.php (72%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/PropertyGroupTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/PublicFileTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/RemoteTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Asset/ViewFileTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/DeployedFilesManagerTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Fallback/FactoryTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Fallback/Rule/CompositeTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Fallback/Rule/ModularSwitchTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Fallback/Rule/SimpleTest.php (96%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Fallback/Rule/ThemeTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/FileResolution/Strategy/FallbackTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/FileResolution/StrategyPoolTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Theme/Customization/AbstractFileTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Theme/Customization/PathTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Theme/CustomizationTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Theme/Domain/FactoryTest.php (73%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Theme/FlyweightFactoryTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Theme/Image/UploaderTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Design/Theme/ImageTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Element/AbstractBlockTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Element/Html/Link/CurrentTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Element/Html/LinksTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Element/TemplateTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/FileSystemTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Helper/JsTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/Interpreter/Decorator/UpdaterTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/Interpreter/HelperMethodTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/Interpreter/NamedParamsTest.php (92%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/Interpreter/ObjectTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/Interpreter/OptionsTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/Interpreter/UrlTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/ParserTest.php (93%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/Argument/_files/arguments.xml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/ElementTest.php (91%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/FactoryTest.php (77%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/FileList/CollatorTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/FileList/FactoryTest.php (68%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/FileListTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/Source/AggregateTest.php (75%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/Source/BaseTest.php (85%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/Source/Decorator/ModuleDependencyTest.php (78%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/Source/Decorator/ModuleOutputTest.php (72%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/Source/Override/BaseTest.php (84%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/Source/Override/ThemeTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/File/Source/ThemeTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/FileTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Layout/ScheduledStructureTest.php (82%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/LayoutTest.php (81%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Publisher/CssFileTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Publisher/FileAbstractTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Publisher/FileFactoryTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Publisher/FileTest.php (83%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/PublisherTest.php (88%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/TemplateEngine/PhpTest.php (89%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/TemplateEngine/_files/simple.phtml (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/TemplateEngineFactoryTest.php (90%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/TemplateEnginePoolTest.php (87%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Url/CssResolverTest.php (56%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Url/_files/result.css (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/Url/_files/source.css (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/View/UrlTest.php (80%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/_files/Acl/Resource/resourceList.php (100%) rename dev/tests/unit/testsuite/Magento/{ => Framework}/_files/Acl/Resource/result.php (100%) delete mode 100644 dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Interception/Code/InterfaceValidatorTest.php rename dev/tests/unit/testsuite/Magento/{Core/Model/App/Area => PageCache/App}/CacheIdentifierPluginTest.php (90%) create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Helper/AdminTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Helper/DataTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Helper/GuestTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Helper/ReorderTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/Email/TemplateTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/Email/_files/test_include.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/Observer/Backend/CustomerQuoteTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/ObserverTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/Payment/Method/ConverterTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Sales/Model/Status/ListStatusTest.php rename dev/tests/unit/testsuite/Magento/{Core/Model/App/Action/ContextPluginTest.php => Store/App/Action/Plugin/ContextTest.php} (93%) create mode 100644 dev/tests/unit/testsuite/Magento/Store/Model/Resolver/StoreTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Store/Model/Resolver/WebsiteTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php rename dev/tests/unit/testsuite/Magento/Store/Model/Storage/{DefaultTest.php => DefaultStorageTest.php} (90%) create mode 100644 dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php delete mode 100644 dev/tests/unit/testsuite/Magento/Validator/Test/Int.php rename downloader/lib/Magento/{ => Framework}/Archive.php (95%) rename downloader/lib/Magento/{ => Framework}/Archive/AbstractArchive.php (88%) rename {lib/Magento => downloader/lib/Magento/Framework}/Archive/ArchiveInterface.php (97%) rename {lib/Magento => downloader/lib/Magento/Framework}/Archive/Bz.php (82%) rename {lib/Magento => downloader/lib/Magento/Framework}/Archive/Gz.php (82%) rename downloader/lib/Magento/{ => Framework}/Archive/Helper/File.php (85%) rename downloader/lib/Magento/{ => Framework}/Archive/Helper/File/Bz.php (79%) rename downloader/lib/Magento/{ => Framework}/Archive/Helper/File/Gz.php (77%) rename downloader/lib/Magento/{ => Framework}/Archive/Tar.php (91%) rename downloader/lib/Magento/{ => Framework}/Autoload/Simple.php (97%) rename downloader/lib/Magento/{ => Framework}/Backup.php (83%) rename downloader/lib/Magento/{ => Framework}/Backup/AbstractBackup.php (91%) rename downloader/lib/Magento/{ => Framework}/Backup/Archive/Tar.php (78%) rename {lib/Magento => downloader/lib/Magento/Framework}/Backup/BackupException.php (92%) rename downloader/lib/Magento/{ => Framework}/Backup/BackupInterface.php (88%) rename downloader/lib/Magento/{ => Framework}/Backup/Db.php (87%) rename downloader/lib/Magento/{ => Framework}/Backup/Db/BackupDbInterface.php (89%) rename {lib/Magento => downloader/lib/Magento/Framework}/Backup/Db/BackupFactory.php (83%) rename downloader/lib/Magento/{ => Framework}/Backup/Db/BackupInterface.php (78%) rename downloader/lib/Magento/{ => Framework}/Backup/Exception/CantLoadSnapshot.php (90%) rename {lib/Magento => downloader/lib/Magento/Framework}/Backup/Exception/FtpConnectionFailed.php (90%) rename {lib/Magento => downloader/lib/Magento/Framework}/Backup/Exception/FtpValidationFailed.php (90%) rename {lib/Magento => downloader/lib/Magento/Framework}/Backup/Exception/NotEnoughFreeSpace.php (90%) rename downloader/lib/Magento/{ => Framework}/Backup/Exception/NotEnoughPermissions.php (90%) rename downloader/lib/Magento/{ => Framework}/Backup/Factory.php (81%) rename downloader/lib/Magento/{ => Framework}/Backup/Filesystem.php (79%) rename {lib/Magento => downloader/lib/Magento/Framework}/Backup/Filesystem/Helper.php (92%) rename downloader/lib/Magento/{ => Framework}/Backup/Filesystem/Iterator/File.php (98%) rename downloader/lib/Magento/{ => Framework}/Backup/Filesystem/Iterator/Filter.php (97%) rename downloader/lib/Magento/{ => Framework}/Backup/Filesystem/Rollback/AbstractRollback.php (85%) rename downloader/lib/Magento/{ => Framework}/Backup/Filesystem/Rollback/Fs.php (71%) rename downloader/lib/Magento/{ => Framework}/Backup/Filesystem/Rollback/Ftp.php (78%) rename downloader/lib/Magento/{ => Framework}/Backup/Media.php (89%) rename downloader/lib/Magento/{ => Framework}/Backup/Nomedia.php (88%) rename downloader/lib/Magento/{ => Framework}/Backup/Snapshot.php (85%) rename downloader/lib/Magento/{ => Framework}/Connect/Channel/Generator.php (86%) rename downloader/lib/Magento/{ => Framework}/Connect/Channel/Parser.php (100%) rename downloader/lib/Magento/{ => Framework}/Connect/Channel/VO.php (97%) rename downloader/lib/Magento/{ => Framework}/Connect/Command.php (90%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Channels.php (98%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Channels_Header.php (100%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Config.php (98%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Config_Header.php (100%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Install.php (95%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Install_Header.php (100%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Package.php (95%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Package_Header.php (100%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Registry.php (96%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Registry_Header.php (100%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Remote.php (95%) rename downloader/lib/Magento/{ => Framework}/Connect/Command/Remote_Header.php (100%) rename downloader/lib/Magento/{ => Framework}/Connect/Config.php (99%) rename downloader/lib/Magento/{ => Framework}/Connect/Converter.php (92%) rename downloader/lib/Magento/{ => Framework}/Connect/Frontend.php (93%) rename downloader/lib/Magento/{ => Framework}/Connect/Frontend/CLI.php (96%) rename downloader/lib/Magento/{ => Framework}/Connect/Ftp.php (99%) rename downloader/lib/Magento/{ => Framework}/Connect/Loader.php (84%) rename downloader/lib/Magento/{ => Framework}/Connect/Loader/Ftp.php (94%) rename downloader/lib/Magento/{ => Framework}/Connect/Package.php (96%) rename downloader/lib/Magento/{ => Framework}/Connect/Package/Hotfix.php (97%) rename downloader/lib/Magento/{ => Framework}/Connect/Package/Reader.php (89%) rename downloader/lib/Magento/{ => Framework}/Connect/Package/Target.php (98%) rename {lib/Magento => downloader/lib/Magento/Framework}/Connect/Package/VO.php (98%) rename downloader/lib/Magento/{ => Framework}/Connect/Package/Writer.php (92%) rename downloader/lib/Magento/{ => Framework}/Connect/Packager.php (88%) rename downloader/lib/Magento/{ => Framework}/Connect/Rest.php (93%) rename downloader/lib/Magento/{ => Framework}/Connect/Singleconfig.php (97%) rename downloader/lib/Magento/{ => Framework}/Connect/Structures/Graph.php (97%) rename downloader/lib/Magento/{ => Framework}/Connect/Structures/Node.php (97%) rename downloader/lib/Magento/{ => Framework}/Connect/Validator.php (99%) rename downloader/lib/Magento/{ => Framework}/Exception.php (97%) rename downloader/lib/Magento/{ => Framework}/HTTP/Client.php (96%) rename downloader/lib/Magento/{ => Framework}/HTTP/Client/Curl.php (98%) rename downloader/lib/Magento/{ => Framework}/HTTP/Client/Socket.php (98%) rename downloader/lib/Magento/{ => Framework}/HTTP/IClient.php (99%) rename downloader/lib/Magento/{ => Framework}/System/Args.php (98%) rename downloader/lib/Magento/{ => Framework}/System/Dirs.php (97%) rename downloader/lib/Magento/{ => Framework}/System/Ftp.php (98%) rename downloader/lib/Magento/{ => Framework}/Util.php (97%) rename downloader/lib/Magento/{ => Framework}/Xml/Generator.php (98%) rename downloader/lib/Magento/{ => Framework}/Xml/Parser.php (98%) delete mode 100644 lib/Magento/Exception/InputException.php delete mode 100644 lib/Magento/Exception/NoSuchEntityException.php delete mode 100644 lib/Magento/Filter/Factory.php rename lib/Magento/{ => Framework}/Acl.php (92%) rename lib/Magento/{ => Framework}/Acl/Builder.php (73%) rename lib/Magento/{ => Framework}/Acl/Cache.php (83%) rename lib/Magento/{ => Framework}/Acl/CacheInterface.php (88%) rename lib/Magento/{ => Framework}/Acl/Loader/DefaultLoader.php (84%) rename lib/Magento/{ => Framework}/Acl/Loader/Resource.php (90%) rename lib/Magento/{ => Framework}/Acl/LoaderInterface.php (90%) rename lib/Magento/{ => Framework}/Acl/Resource.php (96%) rename lib/Magento/{ => Framework}/Acl/Resource/Config/Converter/Dom.php (96%) rename lib/Magento/{ => Framework}/Acl/Resource/Config/Reader/Filesystem.php (67%) rename lib/Magento/{ => Framework}/Acl/Resource/Config/SchemaLocator.php (91%) rename lib/Magento/{ => Framework}/Acl/Resource/Provider.php (85%) rename lib/Magento/{ => Framework}/Acl/Resource/ProviderInterface.php (96%) rename lib/Magento/{ => Framework}/Acl/Resource/TreeBuilder.php (97%) rename lib/Magento/{ => Framework}/Acl/ResourceFactory.php (91%) rename lib/Magento/{ => Framework}/Acl/Role/Registry.php (98%) rename lib/Magento/{ => Framework}/Acl/RootResource.php (97%) rename lib/Magento/{ => Framework}/Acl/etc/acl.xsd (100%) rename lib/Magento/{ => Framework}/AclFactory.php (78%) rename {app/code/Magento/Core/Model => lib/Magento/Framework}/App/Area.php (69%) create mode 100644 lib/Magento/Framework/App/DesignInterface.php rename lib/Magento/{ => Framework}/Archive.php (95%) rename lib/Magento/{ => Framework}/Archive/AbstractArchive.php (93%) rename {downloader/lib/Magento => lib/Magento/Framework}/Archive/ArchiveInterface.php (97%) rename {downloader/lib/Magento => lib/Magento/Framework}/Archive/Bz.php (82%) rename {downloader/lib/Magento => lib/Magento/Framework}/Archive/Gz.php (82%) rename lib/Magento/{ => Framework}/Archive/Helper/File.php (85%) rename lib/Magento/{ => Framework}/Archive/Helper/File/Bz.php (81%) rename lib/Magento/{ => Framework}/Archive/Helper/File/Gz.php (85%) rename lib/Magento/{ => Framework}/Archive/Tar.php (96%) rename lib/Magento/{ => Framework}/Authorization.php (77%) rename lib/Magento/{ => Framework}/Authorization/Factory.php (87%) rename lib/Magento/{ => Framework}/Authorization/Policy.php (96%) rename lib/Magento/{ => Framework}/Authorization/Policy/Acl.php (91%) rename lib/Magento/{ => Framework}/Authorization/Policy/DefaultPolicy.php (91%) rename lib/Magento/{ => Framework}/Authorization/RoleLocator.php (89%) rename lib/Magento/{ => Framework}/Authorization/RoleLocator/DefaultRoleLocator.php (89%) rename lib/Magento/{ => Framework}/AuthorizationInterface.php (97%) rename lib/Magento/{ => Framework}/Autoload/ClassMap.php (98%) rename lib/Magento/{ => Framework}/Autoload/IncludePath.php (98%) rename lib/Magento/{ => Framework}/Autoload/Simple.php (97%) rename lib/Magento/{ => Framework}/Backup/AbstractBackup.php (97%) rename lib/Magento/{ => Framework}/Backup/Archive/Tar.php (80%) rename {downloader/lib/Magento => lib/Magento/Framework}/Backup/BackupException.php (92%) rename lib/Magento/{ => Framework}/Backup/BackupInterface.php (98%) rename lib/Magento/{ => Framework}/Backup/Db.php (88%) rename lib/Magento/{ => Framework}/Backup/Db/BackupDbInterface.php (89%) rename {downloader/lib/Magento => lib/Magento/Framework}/Backup/Db/BackupFactory.php (83%) rename lib/Magento/{ => Framework}/Backup/Db/BackupInterface.php (97%) rename lib/Magento/{ => Framework}/Backup/Exception/CantLoadSnapshot.php (90%) rename {downloader/lib/Magento => lib/Magento/Framework}/Backup/Exception/FtpConnectionFailed.php (90%) rename {downloader/lib/Magento => lib/Magento/Framework}/Backup/Exception/FtpValidationFailed.php (90%) rename {downloader/lib/Magento => lib/Magento/Framework}/Backup/Exception/NotEnoughFreeSpace.php (90%) rename lib/Magento/{ => Framework}/Backup/Exception/NotEnoughPermissions.php (90%) rename lib/Magento/{ => Framework}/Backup/Factory.php (83%) rename lib/Magento/{ => Framework}/Backup/Filesystem.php (83%) rename {downloader/lib/Magento => lib/Magento/Framework}/Backup/Filesystem/Helper.php (92%) rename lib/Magento/{ => Framework}/Backup/Filesystem/Iterator/File.php (98%) rename lib/Magento/{ => Framework}/Backup/Filesystem/Iterator/Filter.php (97%) rename lib/Magento/{ => Framework}/Backup/Filesystem/Rollback/AbstractRollback.php (85%) rename lib/Magento/{ => Framework}/Backup/Filesystem/Rollback/Fs.php (76%) rename lib/Magento/{ => Framework}/Backup/Filesystem/Rollback/Ftp.php (80%) rename lib/Magento/{ => Framework}/Backup/Media.php (95%) rename lib/Magento/{ => Framework}/Backup/Nomedia.php (94%) rename lib/Magento/{ => Framework}/Backup/Snapshot.php (99%) rename lib/Magento/{ => Framework}/BootstrapException.php (89%) rename lib/Magento/{ => Framework}/Cache/Backend/Database.php (99%) rename lib/Magento/{ => Framework}/Cache/Backend/Decorator/AbstractDecorator.php (99%) rename lib/Magento/{ => Framework}/Cache/Backend/Decorator/Compression.php (95%) rename lib/Magento/{ => Framework}/Cache/Backend/Eaccelerator.php (96%) rename lib/Magento/{ => Framework}/Cache/Backend/Memcached.php (97%) rename lib/Magento/{ => Framework}/Cache/Backend/MongoDb.php (99%) rename lib/Magento/{ => Framework}/Cache/Config.php (86%) rename lib/Magento/{ => Framework}/Cache/Config/Converter.php (94%) rename lib/Magento/{ => Framework}/Cache/Config/Data.php (74%) rename lib/Magento/{ => Framework}/Cache/Config/Reader.php (73%) rename lib/Magento/{ => Framework}/Cache/Config/SchemaLocator.php (93%) rename lib/Magento/{ => Framework}/Cache/ConfigInterface.php (97%) rename lib/Magento/{ => Framework}/Cache/Core.php (95%) rename lib/Magento/{ => Framework}/Cache/Frontend/Adapter/Zend.php (96%) rename lib/Magento/{ => Framework}/Cache/Frontend/Decorator/Bare.php (87%) rename lib/Magento/{ => Framework}/Cache/Frontend/Decorator/Profiler.php (75%) rename lib/Magento/{ => Framework}/Cache/Frontend/Decorator/TagScope.php (89%) rename lib/Magento/{ => Framework}/Cache/FrontendInterface.php (98%) rename lib/Magento/{ => Framework}/Cache/etc/cache.xsd (100%) rename lib/Magento/{ => Framework}/Code/Generator.php (81%) rename lib/Magento/{ => Framework}/Code/Generator/Autoloader.php (75%) rename lib/Magento/{ => Framework}/Code/Generator/CodeGenerator/CodeGeneratorInterface.php (74%) rename lib/Magento/{ => Framework}/Code/Generator/CodeGenerator/Zend.php (97%) rename lib/Magento/{ => Framework}/Code/Generator/EntityAbstract.php (97%) rename lib/Magento/{ => Framework}/Code/Generator/Io.php (86%) rename lib/Magento/{ => Framework}/Code/Minifier.php (92%) rename lib/Magento/{ => Framework}/Code/Minifier/Adapter/Js/Jsmin.php (85%) rename lib/Magento/{ => Framework}/Code/Minifier/AdapterInterface.php (96%) rename lib/Magento/{ => Framework}/Code/Minifier/Strategy/Generate.php (79%) rename lib/Magento/{ => Framework}/Code/Minifier/Strategy/Lite.php (82%) rename lib/Magento/{ => Framework}/Code/Minifier/StrategyInterface.php (96%) rename lib/Magento/{ => Framework}/Code/NameBuilder.php (93%) rename lib/Magento/{ => Framework}/Code/Reader/ArgumentsReader.php (99%) rename lib/Magento/{ => Framework}/Code/Reader/ClassReader.php (98%) rename lib/Magento/{ => Framework}/Code/ValidationException.php (96%) rename lib/Magento/{ => Framework}/Code/Validator.php (94%) rename lib/Magento/{ => Framework}/Code/Validator/ArgumentSequence.php (93%) rename lib/Magento/{ => Framework}/Code/Validator/ConstructorIntegrity.php (87%) rename lib/Magento/{ => Framework}/Code/Validator/ContextAggregation.php (85%) rename lib/Magento/{ => Framework}/Code/Validator/TypeDuplication.php (90%) rename lib/Magento/{ => Framework}/Code/ValidatorInterface.php (92%) rename lib/Magento/{ => Framework}/Config/AbstractXml.php (85%) rename lib/Magento/{ => Framework}/Config/CacheInterface.php (89%) rename lib/Magento/{ => Framework}/Config/Converter/Dom.php (95%) rename lib/Magento/{ => Framework}/Config/Converter/Dom/Flat.php (97%) rename lib/Magento/{ => Framework}/Config/ConverterInterface.php (96%) rename lib/Magento/{ => Framework}/Config/Data.php (85%) rename lib/Magento/{ => Framework}/Config/Data/Scoped.php (84%) rename lib/Magento/{ => Framework}/Config/DataInterface.php (97%) rename lib/Magento/{ => Framework}/Config/Dom.php (96%) rename lib/Magento/{ => Framework}/Config/Dom/ArrayNodeConfig.php (98%) rename lib/Magento/{ => Framework}/Config/Dom/NodeMergingConfig.php (98%) rename lib/Magento/{ => Framework}/Config/Dom/NodePathMatcher.php (97%) rename lib/Magento/{ => Framework}/Config/Dom/ValidationException.php (96%) rename lib/Magento/{ => Framework}/Config/DomFactory.php (81%) rename lib/Magento/{ => Framework}/Config/FileIterator.php (89%) rename lib/Magento/{ => Framework}/Config/FileIteratorFactory.php (77%) rename lib/Magento/{ => Framework}/Config/FileResolverInterface.php (97%) rename lib/Magento/{ => Framework}/Config/Reader/Filesystem.php (77%) rename lib/Magento/{ => Framework}/Config/ReaderInterface.php (97%) rename lib/Magento/{ => Framework}/Config/SchemaLocatorInterface.php (97%) rename lib/Magento/{ => Framework}/Config/Scope.php (93%) rename lib/Magento/{ => Framework}/Config/ScopeInterface.php (97%) rename lib/Magento/{ => Framework}/Config/ScopeListInterface.php (96%) rename lib/Magento/{ => Framework}/Config/Theme.php (99%) rename lib/Magento/{ => Framework}/Config/ValidationStateInterface.php (96%) rename lib/Magento/{ => Framework}/Config/View.php (95%) rename lib/Magento/{ => Framework}/Config/etc/theme.xsd (100%) rename lib/Magento/{ => Framework}/Config/etc/view.xsd (100%) rename lib/Magento/{ => Framework}/Connect/Channel/Generator.php (95%) rename lib/Magento/{ => Framework}/Connect/Channel/Parser.php (100%) rename lib/Magento/{ => Framework}/Connect/Channel/VO.php (97%) rename lib/Magento/{ => Framework}/Connect/Command.php (96%) rename lib/Magento/{ => Framework}/Connect/Command/Channels.php (98%) rename lib/Magento/{ => Framework}/Connect/Command/Channels_Header.php (100%) rename lib/Magento/{ => Framework}/Connect/Command/Config.php (98%) rename lib/Magento/{ => Framework}/Connect/Command/Config_Header.php (100%) rename lib/Magento/{ => Framework}/Connect/Command/Install.php (98%) rename lib/Magento/{ => Framework}/Connect/Command/Install_Header.php (100%) rename lib/Magento/{ => Framework}/Connect/Command/Package.php (94%) rename lib/Magento/{ => Framework}/Connect/Command/Package_Header.php (100%) rename lib/Magento/{ => Framework}/Connect/Command/Registry.php (98%) rename lib/Magento/{ => Framework}/Connect/Command/Registry_Header.php (100%) rename lib/Magento/{ => Framework}/Connect/Command/Remote.php (95%) rename lib/Magento/{ => Framework}/Connect/Command/Remote_Header.php (100%) rename lib/Magento/{ => Framework}/Connect/Config.php (99%) rename lib/Magento/{ => Framework}/Connect/Converter.php (92%) rename lib/Magento/{ => Framework}/Connect/Frontend.php (98%) rename lib/Magento/{ => Framework}/Connect/Frontend/CLI.php (96%) rename lib/Magento/{ => Framework}/Connect/Ftp.php (93%) rename lib/Magento/{ => Framework}/Connect/Loader.php (84%) rename lib/Magento/{ => Framework}/Connect/Loader/Ftp.php (96%) rename lib/Magento/{ => Framework}/Connect/Package.php (96%) rename lib/Magento/{ => Framework}/Connect/Package/Hotfix.php (97%) rename lib/Magento/{ => Framework}/Connect/Package/Reader.php (88%) rename lib/Magento/{ => Framework}/Connect/Package/Target.php (98%) rename {downloader/lib/Magento => lib/Magento/Framework}/Connect/Package/VO.php (98%) rename lib/Magento/{ => Framework}/Connect/Package/Writer.php (95%) rename lib/Magento/{ => Framework}/Connect/Packager.php (95%) rename lib/Magento/{ => Framework}/Connect/Rest.php (93%) rename lib/Magento/{ => Framework}/Connect/Singleconfig.php (99%) rename lib/Magento/{ => Framework}/Connect/Structures/Graph.php (97%) rename lib/Magento/{ => Framework}/Connect/Structures/Node.php (97%) rename lib/Magento/{ => Framework}/Connect/Validator.php (99%) rename lib/Magento/{ => Framework}/Controller/Router/Route/Factory.php (84%) rename lib/Magento/{ => Framework}/Convert/ConvertArray.php (98%) rename lib/Magento/{ => Framework}/Convert/Excel.php (98%) rename lib/Magento/{ => Framework}/Convert/Object.php (94%) rename lib/Magento/{ => Framework}/Convert/Xml.php (98%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Adapter/AdapterException.php (94%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Adapter/Oyejorge.php (90%) rename lib/Magento/{ => Framework}/Css/PreProcessor/AdapterInterface.php (96%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/CacheFactory.php (78%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/CacheInterface.php (82%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/CacheManager.php (94%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/Cache.php (81%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/ImportEntity.php (93%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/ImportEntityFactory.php (69%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/ImportEntityInterface.php (95%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Import/Map/Storage.php (95%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Plugin/ImportCleaner.php (83%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Plugin/InstructionPreProcessor.php (82%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Cache/Plugin/Less.php (72%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Composite.php (81%) rename lib/Magento/{ => Framework}/Css/PreProcessor/Less.php (78%) rename lib/Magento/{ => Framework}/Css/PreProcessor/UrlResolver.php (74%) rename lib/Magento/{ => Framework}/Currency.php (88%) rename lib/Magento/{ => Framework}/CurrencyFactory.php (81%) rename lib/Magento/{ => Framework}/CurrencyInterface.php (65%) rename lib/Magento/{ => Framework}/DB/Adapter/AdapterInterface.php (92%) rename lib/Magento/{ => Framework}/DB/Adapter/Pdo/Mysql.php (98%) rename lib/Magento/{ => Framework}/DB/DBException.php (92%) rename lib/Magento/{ => Framework}/DB/Ddl/Table.php (99%) rename lib/Magento/{ => Framework}/DB/Ddl/Trigger.php (95%) rename lib/Magento/{ => Framework}/DB/Ddl/TriggerFactory.php (79%) rename lib/Magento/{ => Framework}/DB/ExpressionConverter.php (98%) rename lib/Magento/{ => Framework}/DB/Helper.php (92%) rename lib/Magento/{ => Framework}/DB/Helper/AbstractHelper.php (83%) rename lib/Magento/{ => Framework}/DB/Profiler.php (95%) rename lib/Magento/{ => Framework}/DB/Select.php (90%) rename lib/Magento/{ => Framework}/DB/Statement/Parameter.php (94%) rename lib/Magento/{ => Framework}/DB/Statement/Pdo/Mysql.php (97%) rename lib/Magento/{ => Framework}/DB/Transaction.php (96%) rename lib/Magento/{ => Framework}/DB/Tree.php (99%) rename lib/Magento/{ => Framework}/DB/Tree/Node.php (97%) rename lib/Magento/{ => Framework}/DB/Tree/Node/NodeException.php (89%) rename lib/Magento/{ => Framework}/DB/Tree/NodeSet.php (98%) rename lib/Magento/{ => Framework}/DB/Tree/NodeSet/NodeSetException.php (89%) rename lib/Magento/{ => Framework}/DB/Tree/TreeException.php (90%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/ArrayType.php (94%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/Boolean.php (91%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/Composite.php (95%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/Constant.php (92%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/NullType.php (91%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/Number.php (92%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/Object.php (88%) rename lib/Magento/{ => Framework}/Data/Argument/Interpreter/String.php (92%) rename lib/Magento/{ => Framework}/Data/Argument/InterpreterInterface.php (96%) rename lib/Magento/{ => Framework}/Data/Argument/MissingOptionalValueException.php (96%) rename lib/Magento/{ => Framework}/Data/Collection.php (93%) rename lib/Magento/{ => Framework}/Data/Collection/Db.php (97%) rename lib/Magento/{ => Framework}/Data/Collection/Db/FetchStrategy/Cache.php (80%) rename lib/Magento/{ => Framework}/Data/Collection/Db/FetchStrategy/Query.php (89%) rename lib/Magento/{ => Framework}/Data/Collection/Db/FetchStrategyInterface.php (96%) rename lib/Magento/{ => Framework}/Data/Collection/EntityFactoryInterface.php (96%) rename lib/Magento/{ => Framework}/Data/Collection/Filesystem.php (98%) rename lib/Magento/{ => Framework}/Data/DataArray.php (75%) rename lib/Magento/{ => Framework}/Data/Form.php (94%) rename lib/Magento/{ => Framework}/Data/Form/AbstractForm.php (93%) rename lib/Magento/{ => Framework}/Data/Form/Element/AbstractElement.php (97%) rename lib/Magento/{ => Framework}/Data/Form/Element/Button.php (96%) rename lib/Magento/{ => Framework}/Data/Form/Element/Checkbox.php (97%) rename lib/Magento/{ => Framework}/Data/Form/Element/Checkboxes.php (98%) rename lib/Magento/{ => Framework}/Data/Form/Element/Collection.php (97%) rename lib/Magento/{ => Framework}/Data/Form/Element/CollectionFactory.php (88%) rename lib/Magento/{ => Framework}/Data/Form/Element/Column.php (71%) rename lib/Magento/{ => Framework}/Data/Form/Element/Date.php (83%) rename lib/Magento/{ => Framework}/Data/Form/Element/Editablemultiselect.php (96%) rename lib/Magento/{ => Framework}/Data/Form/Element/Editor.php (98%) rename lib/Magento/{ => Framework}/Data/Form/Element/Factory.php (90%) rename lib/Magento/{ => Framework}/Data/Form/Element/Fieldset.php (98%) rename lib/Magento/{ => Framework}/Data/Form/Element/File.php (72%) rename lib/Magento/{ => Framework}/Data/Form/Element/Gallery.php (99%) rename lib/Magento/{ => Framework}/Data/Form/Element/Hidden.php (96%) rename lib/Magento/{ => Framework}/Data/Form/Element/Image.php (86%) rename lib/Magento/{ => Framework}/Data/Form/Element/Imagefile.php (73%) rename lib/Magento/{ => Framework}/Data/Form/Element/Label.php (76%) rename lib/Magento/{ => Framework}/Data/Form/Element/Link.php (97%) rename lib/Magento/{ => Framework}/Data/Form/Element/Multiline.php (98%) rename lib/Magento/{ => Framework}/Data/Form/Element/Multiselect.php (98%) rename lib/Magento/{ => Framework}/Data/Form/Element/Note.php (95%) rename lib/Magento/{ => Framework}/Data/Form/Element/Obscure.php (94%) rename lib/Magento/{ => Framework}/Data/Form/Element/Password.php (95%) rename lib/Magento/{ => Framework}/Data/Form/Element/Radio.php (72%) rename lib/Magento/{ => Framework}/Data/Form/Element/Radios.php (96%) rename lib/Magento/{ => Framework}/Data/Form/Element/Renderer/RendererInterface.php (84%) rename lib/Magento/{ => Framework}/Data/Form/Element/Reset.php (72%) rename lib/Magento/{ => Framework}/Data/Form/Element/Select.php (98%) rename lib/Magento/{ => Framework}/Data/Form/Element/Submit.php (95%) rename lib/Magento/{ => Framework}/Data/Form/Element/Text.php (96%) rename lib/Magento/{ => Framework}/Data/Form/Element/Textarea.php (97%) rename lib/Magento/{ => Framework}/Data/Form/Element/Time.php (98%) rename lib/Magento/{ => Framework}/Data/Form/ElementFactory.php (82%) rename lib/Magento/{ => Framework}/Data/Form/Filter/Date.php (83%) rename lib/Magento/{ => Framework}/Data/Form/Filter/Escapehtml.php (92%) rename lib/Magento/{ => Framework}/Data/Form/Filter/FilterInterface.php (96%) rename lib/Magento/{ => Framework}/Data/Form/Filter/Striptags.php (92%) rename lib/Magento/{ => Framework}/Data/Form/FormKey.php (78%) rename lib/Magento/{ => Framework}/Data/FormFactory.php (73%) rename lib/Magento/{ => Framework}/Data/Graph.php (99%) rename lib/Magento/{ => Framework}/Data/OptionSourceInterface.php (97%) rename lib/Magento/{ => Framework}/Data/Schema.php (90%) rename lib/Magento/{ => Framework}/Data/Structure.php (99%) rename lib/Magento/{ => Framework}/Data/Tree.php (96%) rename lib/Magento/{ => Framework}/Data/Tree/Db.php (96%) rename lib/Magento/{ => Framework}/Data/Tree/Dbp.php (96%) rename lib/Magento/{ => Framework}/Data/Tree/Node.php (96%) rename lib/Magento/{ => Framework}/Data/Tree/Node/Collection.php (97%) rename lib/Magento/{ => Framework}/Data/etc/argument/types.xsd (100%) rename lib/Magento/{ => Framework}/Debug.php (97%) rename lib/Magento/{ => Framework}/DomDocument/Factory.php (67%) rename lib/Magento/{ => Framework}/Encryption/Crypt.php (94%) rename lib/Magento/{ => Framework}/Encryption/CryptFactory.php (77%) rename lib/Magento/{ => Framework}/Encryption/Encryptor.php (89%) rename lib/Magento/{ => Framework}/Encryption/EncryptorInterface.php (96%) rename lib/Magento/{ => Framework}/Encryption/UrlCoder.php (87%) rename lib/Magento/{ => Framework}/Error/Handler.php (99%) rename lib/Magento/{ => Framework}/Error/HandlerInterface.php (97%) rename lib/Magento/{ => Framework}/Escaper.php (97%) rename lib/Magento/{ => Framework}/Event.php (87%) rename lib/Magento/{ => Framework}/Event/Collection.php (98%) rename lib/Magento/{ => Framework}/Event/Config.php (95%) rename lib/Magento/{ => Framework}/Event/Config/Converter.php (96%) rename lib/Magento/{ => Framework}/Event/Config/Data.php (81%) rename lib/Magento/{ => Framework}/Event/Config/Reader.php (70%) rename lib/Magento/{ => Framework}/Event/Config/SchemaLocator.php (91%) rename lib/Magento/{ => Framework}/Event/ConfigInterface.php (97%) rename lib/Magento/{ => Framework}/Event/Invoker/InvokerDefault.php (87%) rename lib/Magento/{ => Framework}/Event/InvokerInterface.php (85%) rename lib/Magento/{ => Framework}/Event/Manager.php (83%) rename lib/Magento/{ => Framework}/Event/ManagerInterface.php (97%) rename lib/Magento/{ => Framework}/Event/Observer.php (88%) rename lib/Magento/{ => Framework}/Event/Observer/Collection.php (87%) rename lib/Magento/{ => Framework}/Event/Observer/Cron.php (95%) rename lib/Magento/{ => Framework}/Event/Observer/Regex.php (86%) rename lib/Magento/{ => Framework}/Event/ObserverFactory.php (87%) rename lib/Magento/{ => Framework}/Event/WrapperFactory.php (77%) rename lib/Magento/{ => Framework}/Event/etc/events.xsd (100%) rename lib/Magento/{ => Framework}/EventFactory.php (83%) rename lib/Magento/{ => Framework}/Exception.php (73%) create mode 100644 lib/Magento/Framework/Exception/AbstractAggregateException.php rename lib/Magento/{ => Framework}/Exception/AuthenticationException.php (82%) rename lib/Magento/{ => Framework}/Exception/AuthorizationException.php (83%) create mode 100644 lib/Magento/Framework/Exception/EmailNotConfirmedException.php create mode 100644 lib/Magento/Framework/Exception/ErrorMessage.php rename lib/Magento/{ => Framework}/Exception/Exception.php (97%) create mode 100644 lib/Magento/Framework/Exception/InputException.php create mode 100644 lib/Magento/Framework/Exception/InvalidEmailOrPasswordException.php create mode 100644 lib/Magento/Framework/Exception/LocalizedException.php create mode 100644 lib/Magento/Framework/Exception/NoSuchEntityException.php create mode 100644 lib/Magento/Framework/Exception/State/ExpiredException.php create mode 100644 lib/Magento/Framework/Exception/State/InputMismatchException.php create mode 100644 lib/Magento/Framework/Exception/State/InvalidTransitionException.php rename lib/Magento/{ => Framework}/Exception/StateException.php (86%) rename lib/Magento/{ => Framework}/File/Csv.php (96%) rename lib/Magento/{ => Framework}/File/CsvMulty.php (97%) rename lib/Magento/{ => Framework}/File/Size.php (99%) rename lib/Magento/{ => Framework}/File/Transfer/Adapter/Http.php (98%) rename lib/Magento/{ => Framework}/File/Uploader.php (98%) rename lib/Magento/{ => Framework}/File/UploaderFactory.php (80%) rename lib/Magento/{ => Framework}/Filesystem.php (78%) rename lib/Magento/{ => Framework}/Filesystem/Directory/Read.php (87%) rename lib/Magento/{ => Framework}/Filesystem/Directory/ReadFactory.php (67%) rename lib/Magento/{ => Framework}/Filesystem/Directory/ReadInterface.php (93%) rename lib/Magento/{ => Framework}/Filesystem/Directory/Write.php (91%) rename lib/Magento/{ => Framework}/Filesystem/Directory/WriteFactory.php (60%) rename lib/Magento/{ => Framework}/Filesystem/Directory/WriteInterface.php (82%) rename lib/Magento/{ => Framework}/Filesystem/DirectoryList.php (95%) rename lib/Magento/{ => Framework}/Filesystem/Driver/File.php (99%) rename lib/Magento/{ => Framework}/Filesystem/Driver/Http.php (97%) rename lib/Magento/{ => Framework}/Filesystem/Driver/Https.php (91%) rename lib/Magento/{ => Framework}/Filesystem/Driver/Zlib.php (95%) rename lib/Magento/{ => Framework}/Filesystem/DriverFactory.php (77%) rename lib/Magento/{ => Framework}/Filesystem/DriverInterface.php (94%) rename lib/Magento/{ => Framework}/Filesystem/File/Read.php (94%) rename lib/Magento/{ => Framework}/Filesystem/File/ReadFactory.php (61%) rename lib/Magento/{ => Framework}/Filesystem/File/ReadInterface.php (98%) rename lib/Magento/{ => Framework}/Filesystem/File/Write.php (94%) rename lib/Magento/{ => Framework}/Filesystem/File/WriteFactory.php (62%) rename lib/Magento/{ => Framework}/Filesystem/File/WriteInterface.php (87%) rename lib/Magento/{ => Framework}/Filesystem/FilesystemException.php (96%) rename lib/Magento/{ => Framework}/Filesystem/WrapperFactory.php (92%) rename lib/Magento/{ => Framework}/Filesystem/WrapperInterface.php (98%) rename lib/Magento/{ => Framework}/Filter/AbstractFactory.php (92%) rename lib/Magento/{ => Framework}/Filter/ArrayFilter.php (98%) rename lib/Magento/{ => Framework}/Filter/Decrypt.php (83%) rename lib/Magento/{ => Framework}/Filter/Email.php (96%) rename lib/Magento/{ => Framework}/Filter/Encrypt.php (83%) rename lib/Magento/{ => Framework}/Filter/Encrypt/AdapterInterface.php (95%) rename lib/Magento/{ => Framework}/Filter/Encrypt/Basic.php (84%) create mode 100644 lib/Magento/Framework/Filter/Factory.php rename lib/Magento/{ => Framework}/Filter/FactoryInterface.php (97%) rename lib/Magento/{ => Framework}/Filter/FilterManager.php (95%) rename lib/Magento/{ => Framework}/Filter/FilterManager/Config.php (90%) rename lib/Magento/{ => Framework}/Filter/FilterManager/ConfigInterface.php (95%) rename lib/Magento/{ => Framework}/Filter/GridArray/Grid.php (92%) rename lib/Magento/{ => Framework}/Filter/Input.php (96%) rename lib/Magento/{ => Framework}/Filter/Input/MaliciousCode.php (98%) rename lib/Magento/{ => Framework}/Filter/Money.php (97%) rename lib/Magento/{ => Framework}/Filter/Object.php (82%) rename lib/Magento/{ => Framework}/Filter/Object/Grid.php (91%) rename lib/Magento/{ => Framework}/Filter/RemoveAccents.php (99%) rename lib/Magento/{ => Framework}/Filter/RemoveTags.php (97%) rename lib/Magento/{ => Framework}/Filter/SplitWords.php (98%) rename lib/Magento/{ => Framework}/Filter/Sprintf.php (98%) rename lib/Magento/{ => Framework}/Filter/StripTags.php (88%) rename lib/Magento/{ => Framework}/Filter/Template.php (93%) rename lib/Magento/{ => Framework}/Filter/Template/Simple.php (93%) rename lib/Magento/{ => Framework}/Filter/Template/Tokenizer/AbstractTokenizer.php (98%) rename lib/Magento/{ => Framework}/Filter/Template/Tokenizer/Parameter.php (94%) rename lib/Magento/{ => Framework}/Filter/Template/Tokenizer/Variable.php (97%) rename lib/Magento/{ => Framework}/Filter/Translit.php (98%) rename lib/Magento/{ => Framework}/Filter/TranslitUrl.php (97%) rename lib/Magento/{ => Framework}/Filter/Truncate.php (94%) rename lib/Magento/{ => Framework}/Filter/ZendFactory.php (99%) rename lib/Magento/{ => Framework}/Flag.php (77%) rename lib/Magento/{ => Framework}/Flag/Resource.php (91%) rename lib/Magento/{ => Framework}/FlagFactory.php (81%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/Content.php (97%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/Entry.php (90%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/Extension/Attribute.php (96%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/Extension/Control.php (97%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/Extension/Shipping.php (95%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/Extension/Tax.php (95%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/HttpException.php (99%) rename lib/Magento/{ => Framework}/Gdata/Gshopping/ItemQuery.php (98%) rename lib/Magento/{ => Framework}/HTTP/Adapter/Curl.php (98%) rename lib/Magento/{ => Framework}/HTTP/Adapter/FileTransferFactory.php (96%) rename lib/Magento/{ => Framework}/HTTP/Authentication.php (99%) rename lib/Magento/{ => Framework}/HTTP/Client.php (96%) rename lib/Magento/{ => Framework}/HTTP/Client/Curl.php (98%) rename lib/Magento/{ => Framework}/HTTP/Client/Socket.php (98%) rename lib/Magento/{ => Framework}/HTTP/Header.php (94%) rename lib/Magento/{ => Framework}/HTTP/IClient.php (99%) rename lib/Magento/{ => Framework}/HTTP/PhpEnvironment/RemoteAddress.php (98%) rename lib/Magento/{ => Framework}/HTTP/PhpEnvironment/ServerAddress.php (97%) rename lib/Magento/{ => Framework}/HTTP/ZendClient.php (91%) rename lib/Magento/{ => Framework}/Image.php (98%) rename lib/Magento/{ => Framework}/Image/Adapter/AbstractAdapter.php (97%) rename lib/Magento/{ => Framework}/Image/Adapter/AdapterInterface.php (94%) rename lib/Magento/{ => Framework}/Image/Adapter/Config.php (93%) rename lib/Magento/{ => Framework}/Image/Adapter/ConfigInterface.php (96%) rename lib/Magento/{ => Framework}/Image/Adapter/Gd2.php (99%) rename lib/Magento/{ => Framework}/Image/Adapter/ImageMagick.php (98%) rename lib/Magento/{ => Framework}/Image/AdapterFactory.php (85%) rename lib/Magento/{ => Framework}/Image/Factory.php (84%) rename lib/Magento/{ => Framework}/Interception/Chain.php (96%) rename lib/Magento/{ => Framework}/Interception/Chain/Chain.php (90%) rename lib/Magento/{ => Framework}/Interception/Code/Generator/Interceptor.php (89%) rename lib/Magento/{ => Framework}/Interception/Code/InterfaceValidator.php (96%) rename lib/Magento/{ => Framework}/Interception/Code/ValidatorException.php (95%) rename lib/Magento/{ => Framework}/Interception/Config.php (96%) rename lib/Magento/{ => Framework}/Interception/Config/Config.php (79%) rename lib/Magento/{ => Framework}/Interception/Definition.php (96%) rename lib/Magento/{ => Framework}/Interception/Definition/Compiled.php (93%) rename lib/Magento/{ => Framework}/Interception/Definition/Runtime.php (96%) rename lib/Magento/{ => Framework}/Interception/ObjectManager/Config.php (84%) rename lib/Magento/{ => Framework}/Interception/PluginList.php (97%) rename lib/Magento/{ => Framework}/Interception/PluginList/PluginList.php (94%) rename lib/Magento/{ => Framework}/Io/AbstractIo.php (94%) rename lib/Magento/{ => Framework}/Io/File.php (99%) rename lib/Magento/{ => Framework}/Io/Ftp.php (97%) rename lib/Magento/{ => Framework}/Io/IoException.php (84%) rename lib/Magento/{ => Framework}/Io/IoInterface.php (94%) rename lib/Magento/{ => Framework}/Io/Sftp.php (97%) rename lib/Magento/{ => Framework}/Json/Decoder.php (94%) rename lib/Magento/{ => Framework}/Json/DecoderInterface.php (94%) rename lib/Magento/{ => Framework}/Json/Encoder.php (84%) rename lib/Magento/{ => Framework}/Json/EncoderInterface.php (94%) rename lib/Magento/{ => Framework}/Less/File/FileList/Collator.php (84%) rename lib/Magento/{ => Framework}/Less/File/Source/Aggregated.php (86%) rename lib/Magento/{ => Framework}/Less/File/Source/Base.php (89%) rename lib/Magento/{ => Framework}/Less/File/Source/Library.php (89%) rename lib/Magento/{ => Framework}/Less/File/Source/Theme.php (88%) rename lib/Magento/{ => Framework}/Less/PreProcessor.php (99%) rename lib/Magento/{ => Framework}/Less/PreProcessor/ErrorHandler.php (86%) rename lib/Magento/{ => Framework}/Less/PreProcessor/ErrorHandlerInterface.php (96%) rename lib/Magento/{ => Framework}/Less/PreProcessor/File/FileList.php (98%) rename lib/Magento/{ => Framework}/Less/PreProcessor/File/FileListFactory.php (82%) rename lib/Magento/{ => Framework}/Less/PreProcessor/File/Less.php (92%) rename lib/Magento/{ => Framework}/Less/PreProcessor/File/LessFactory.php (80%) rename lib/Magento/{ => Framework}/Less/PreProcessor/Instruction/Import.php (93%) rename lib/Magento/{ => Framework}/Less/PreProcessor/Instruction/MagentoImport.php (90%) rename lib/Magento/{ => Framework}/Less/PreProcessor/InstructionFactory.php (74%) rename lib/Magento/{ => Framework}/Less/PreProcessorInterface.php (97%) rename lib/Magento/{ => Framework}/Locale.php (90%) rename lib/Magento/{ => Framework}/Locale/Config.php (99%) rename lib/Magento/{ => Framework}/Locale/ConfigInterface.php (97%) rename lib/Magento/{ => Framework}/Locale/Currency.php (76%) rename lib/Magento/{ => Framework}/Locale/CurrencyInterface.php (90%) rename lib/Magento/{ => Framework}/Locale/Format.php (95%) rename lib/Magento/{ => Framework}/Locale/FormatInterface.php (97%) rename lib/Magento/{ => Framework}/Locale/Hierarchy/Config.php (79%) rename lib/Magento/{ => Framework}/Locale/Hierarchy/Config/Converter.php (95%) rename lib/Magento/{ => Framework}/Locale/Hierarchy/Config/FileResolver.php (81%) rename lib/Magento/{ => Framework}/Locale/Hierarchy/Config/Reader.php (75%) rename lib/Magento/{ => Framework}/Locale/Hierarchy/Config/SchemaLocator.php (86%) rename lib/Magento/{ => Framework}/Locale/Lists.php (91%) rename lib/Magento/{ => Framework}/Locale/ListsInterface.php (98%) rename lib/Magento/{ => Framework}/Locale/Resolver.php (92%) rename lib/Magento/{ => Framework}/Locale/ResolverInterface.php (89%) rename lib/Magento/{ => Framework}/Locale/Validator.php (87%) rename lib/Magento/{ => Framework}/LocaleFactory.php (80%) rename lib/Magento/{ => Framework}/LocaleInterface.php (85%) rename lib/Magento/{ => Framework}/Logger.php (98%) rename lib/Magento/{ => Framework}/Logger/Adapter.php (94%) rename lib/Magento/{ => Framework}/Mail/Exception.php (96%) rename lib/Magento/{ => Framework}/Mail/Message.php (98%) rename lib/Magento/{ => Framework}/Mail/MessageInterface.php (98%) rename lib/Magento/{ => Framework}/Mail/Template/ConfigInterface.php (97%) rename lib/Magento/{ => Framework}/Mail/Template/Factory.php (81%) rename lib/Magento/{ => Framework}/Mail/Template/FactoryInterface.php (91%) rename lib/Magento/{ => Framework}/Mail/Template/SenderResolverInterface.php (92%) rename lib/Magento/{ => Framework}/Mail/Template/TransportBuilder.php (81%) rename lib/Magento/{ => Framework}/Mail/TemplateInterface.php (97%) rename lib/Magento/{ => Framework}/Mail/Transport.php (81%) rename lib/Magento/{ => Framework}/Mail/TransportInterface.php (92%) rename lib/Magento/{ => Framework}/Mail/TransportInterfaceFactory.php (83%) rename lib/Magento/{ => Framework}/Math/Calculator.php (98%) rename lib/Magento/{ => Framework}/Math/Division.php (97%) rename lib/Magento/{ => Framework}/Math/Random.php (98%) rename lib/Magento/{ => Framework}/Message/AbstractMessage.php (98%) rename lib/Magento/{ => Framework}/Message/Collection.php (99%) rename lib/Magento/{ => Framework}/Message/CollectionFactory.php (89%) rename lib/Magento/{ => Framework}/Message/Error.php (96%) rename lib/Magento/{ => Framework}/Message/Factory.php (91%) rename lib/Magento/{ => Framework}/Message/Manager.php (98%) rename lib/Magento/{ => Framework}/Message/ManagerInterface.php (98%) rename lib/Magento/{ => Framework}/Message/MessageInterface.php (98%) rename lib/Magento/{ => Framework}/Message/Notice.php (96%) rename lib/Magento/{ => Framework}/Message/Session.php (91%) rename lib/Magento/{ => Framework}/Message/Success.php (96%) rename lib/Magento/{ => Framework}/Message/Warning.php (96%) rename lib/Magento/{ => Framework}/Model/AbstractModel.php (88%) rename lib/Magento/{ => Framework}/Model/ActionValidator/RemoveAction.php (85%) rename lib/Magento/{ => Framework}/Model/ActionValidator/RemoveAction/Allowed.php (80%) rename lib/Magento/{ => Framework}/Model/Context.php (74%) rename lib/Magento/{ => Framework}/Model/Exception.php (90%) rename lib/Magento/{ => Framework}/Model/Resource/AbstractResource.php (86%) rename lib/Magento/{ => Framework}/Model/Resource/Db/AbstractDb.php (85%) rename lib/Magento/{ => Framework}/Model/Resource/Db/Collection/AbstractCollection.php (93%) rename lib/Magento/{ => Framework}/Model/Resource/Db/Profiler.php (90%) rename lib/Magento/{ => Framework}/Model/Resource/Entity/AbstractEntity.php (87%) rename lib/Magento/{ => Framework}/Model/Resource/Entity/Table.php (89%) rename lib/Magento/{ => Framework}/Model/Resource/Iterator.php (83%) rename lib/Magento/{ => Framework}/Model/Resource/Type/AbstractType.php (91%) rename lib/Magento/{ => Framework}/Model/Resource/Type/Db.php (82%) rename lib/Magento/{ => Framework}/Model/Resource/Type/Db/Pdo/Mysql.php (82%) rename lib/Magento/{ => Framework}/Module/Declaration/Converter/Dom.php (98%) rename lib/Magento/{ => Framework}/Module/Declaration/FileIterator.php (91%) rename lib/Magento/{ => Framework}/Module/Declaration/FileIteratorFactory.php (93%) rename lib/Magento/{ => Framework}/Module/Declaration/FileResolver.php (88%) rename lib/Magento/{ => Framework}/Module/Declaration/Reader/Filesystem.php (91%) rename lib/Magento/{ => Framework}/Module/Declaration/SchemaLocator.php (91%) rename lib/Magento/{ => Framework}/Module/DependencyManager.php (99%) rename lib/Magento/{ => Framework}/Module/DependencyManagerInterface.php (97%) rename lib/Magento/{ => Framework}/Module/Dir.php (90%) rename lib/Magento/{ => Framework}/Module/Dir/Reader.php (93%) rename lib/Magento/{ => Framework}/Module/Dir/ReverseResolver.php (93%) rename lib/Magento/{ => Framework}/Module/FrontController/Plugin/Install.php (94%) rename lib/Magento/{ => Framework}/Module/Manager.php (98%) rename lib/Magento/{ => Framework}/Module/ModuleList.php (90%) rename lib/Magento/{ => Framework}/Module/ModuleListInterface.php (97%) rename lib/Magento/{ => Framework}/Module/Output/Config.php (94%) rename lib/Magento/{ => Framework}/Module/Output/ConfigInterface.php (96%) rename lib/Magento/{ => Framework}/Module/ResourceInterface.php (97%) rename lib/Magento/{ => Framework}/Module/ResourceResolver.php (93%) rename lib/Magento/{ => Framework}/Module/ResourceResolverInterface.php (97%) rename lib/Magento/{ => Framework}/Module/Setup.php (95%) rename lib/Magento/{ => Framework}/Module/Setup/Context.php (63%) rename lib/Magento/{ => Framework}/Module/Setup/Migration.php (97%) rename lib/Magento/{ => Framework}/Module/Setup/MigrationData.php (98%) rename lib/Magento/{ => Framework}/Module/Setup/MigrationFactory.php (77%) rename lib/Magento/{ => Framework}/Module/Updater.php (92%) rename lib/Magento/{ => Framework}/Module/Updater/SetupFactory.php (87%) rename lib/Magento/{ => Framework}/Module/Updater/SetupInterface.php (92%) rename lib/Magento/{ => Framework}/Module/UpdaterInterface.php (97%) rename lib/Magento/{ => Framework}/Module/etc/module.xsd (100%) rename lib/Magento/{ => Framework}/Mview/ActionFactory.php (84%) rename lib/Magento/{ => Framework}/Mview/ActionInterface.php (96%) rename lib/Magento/{ => Framework}/Mview/Config.php (97%) rename lib/Magento/{ => Framework}/Mview/Config/Converter.php (96%) rename lib/Magento/{ => Framework}/Mview/Config/Data.php (72%) rename lib/Magento/{ => Framework}/Mview/Config/Data/Proxy.php (85%) rename lib/Magento/{ => Framework}/Mview/Config/Reader.php (74%) rename lib/Magento/{ => Framework}/Mview/Config/SchemaLocator.php (83%) rename lib/Magento/{ => Framework}/Mview/ConfigInterface.php (97%) rename lib/Magento/{ => Framework}/Mview/Processor.php (98%) rename lib/Magento/{ => Framework}/Mview/ProcessorInterface.php (97%) rename lib/Magento/{ => Framework}/Mview/View.php (93%) rename lib/Magento/{ => Framework}/Mview/View/AbstractFactory.php (86%) rename lib/Magento/{ => Framework}/Mview/View/Changelog.php (96%) rename lib/Magento/{ => Framework}/Mview/View/ChangelogInterface.php (98%) rename lib/Magento/{ => Framework}/Mview/View/Collection.php (71%) rename lib/Magento/{ => Framework}/Mview/View/CollectionFactory.php (89%) rename lib/Magento/{ => Framework}/Mview/View/CollectionInterface.php (86%) rename lib/Magento/{ => Framework}/Mview/View/State/CollectionFactory.php (82%) rename lib/Magento/{ => Framework}/Mview/View/State/CollectionInterface.php (95%) rename lib/Magento/{ => Framework}/Mview/View/StateInterface.php (84%) rename lib/Magento/{ => Framework}/Mview/View/Subscription.php (78%) rename lib/Magento/{ => Framework}/Mview/View/SubscriptionFactory.php (89%) rename lib/Magento/{ => Framework}/Mview/View/SubscriptionInterface.php (86%) rename lib/Magento/{ => Framework}/Mview/ViewInterface.php (98%) rename lib/Magento/{ => Framework}/Mview/etc/mview.xsd (100%) rename lib/Magento/{ => Framework}/Oauth/ConsumerInterface.php (96%) rename lib/Magento/{ => Framework}/Oauth/Exception.php (87%) rename lib/Magento/{ => Framework}/Oauth/Helper/Oauth.php (91%) rename lib/Magento/{ => Framework}/Oauth/Helper/Request.php (98%) rename lib/Magento/{ => Framework}/Oauth/NonceGeneratorInterface.php (92%) rename lib/Magento/{ => Framework}/Oauth/Oauth.php (97%) rename lib/Magento/{ => Framework}/Oauth/OauthInterface.php (94%) rename lib/Magento/{ => Framework}/Oauth/TokenProviderInterface.php (88%) rename lib/Magento/{ => Framework}/Object.php (98%) rename lib/Magento/{ => Framework}/Object/Cache.php (93%) rename lib/Magento/{ => Framework}/Object/Copy.php (80%) rename lib/Magento/{ => Framework}/Object/Copy/Config.php (86%) rename lib/Magento/{ => Framework}/Object/Copy/Config/Converter.php (96%) rename lib/Magento/{ => Framework}/Object/Copy/Config/Data.php (91%) rename lib/Magento/{ => Framework}/Object/Copy/Config/Reader.php (70%) rename lib/Magento/{ => Framework}/Object/Copy/Config/SchemaLocator.php (94%) rename lib/Magento/{ => Framework}/Object/Factory.php (89%) rename lib/Magento/{ => Framework}/Object/IdentityInterface.php (93%) rename lib/Magento/{ => Framework}/Object/Mapper.php (85%) rename lib/Magento/{ => Framework}/Object/etc/fieldset.xsd (100%) rename lib/Magento/{ => Framework}/Object/etc/fieldset_file.xsd (100%) rename lib/Magento/{ => Framework}/ObjectManager.php (98%) rename lib/Magento/{ => Framework}/ObjectManager/Code/Generator/Factory.php (93%) rename lib/Magento/{ => Framework}/ObjectManager/Code/Generator/Proxy.php (96%) rename lib/Magento/{ => Framework}/ObjectManager/Config.php (97%) rename lib/Magento/{ => Framework}/ObjectManager/Config/Config.php (93%) rename lib/Magento/{ => Framework}/ObjectManager/Config/Mapper/ArgumentParser.php (89%) rename lib/Magento/{ => Framework}/ObjectManager/Config/Mapper/Dom.php (96%) rename lib/Magento/{ => Framework}/ObjectManager/Config/Reader/Dom.php (74%) rename lib/Magento/{ => Framework}/ObjectManager/Config/SchemaLocator.php (91%) rename lib/Magento/{ => Framework}/ObjectManager/ConfigCache.php (96%) rename lib/Magento/{ => Framework}/ObjectManager/ContextInterface.php (95%) rename lib/Magento/{ => Framework}/ObjectManager/Definition.php (97%) rename lib/Magento/{ => Framework}/ObjectManager/Definition/Compiled.php (94%) rename lib/Magento/{ => Framework}/ObjectManager/Definition/Compiled/Binary.php (89%) rename lib/Magento/{ => Framework}/ObjectManager/Definition/Compiled/Serialized.php (89%) rename lib/Magento/{ => Framework}/ObjectManager/Definition/Runtime.php (84%) rename lib/Magento/{ => Framework}/ObjectManager/DefinitionFactory.php (72%) rename lib/Magento/{ => Framework}/ObjectManager/DynamicConfigInterface.php (96%) rename lib/Magento/{ => Framework}/ObjectManager/Factory.php (96%) rename lib/Magento/{ => Framework}/ObjectManager/Factory/Factory.php (87%) rename lib/Magento/{ => Framework}/ObjectManager/ObjectManager.php (92%) rename lib/Magento/{ => Framework}/ObjectManager/Relations.php (96%) rename lib/Magento/{ => Framework}/ObjectManager/Relations/Compiled.php (93%) rename lib/Magento/{ => Framework}/ObjectManager/Relations/Runtime.php (78%) rename lib/Magento/{ => Framework}/ObjectManager/etc/config.xsd (100%) rename lib/Magento/{ => Framework}/Option/ArrayInterface.php (89%) rename lib/Magento/{ => Framework}/Option/ArrayPool.php (77%) rename lib/Magento/{ => Framework}/OsInfo.php (94%) rename lib/Magento/{ => Framework}/Pear.php (96%) rename lib/Magento/{ => Framework}/Pear/Frontend.php (94%) rename lib/Magento/{ => Framework}/Pear/Package.php (94%) rename lib/Magento/{ => Framework}/Pear/Registry.php (92%) rename lib/Magento/{ => Framework}/Phrase.php (89%) rename lib/Magento/{ => Framework}/Phrase/Renderer/Composite.php (95%) rename lib/Magento/{ => Framework}/Phrase/Renderer/Inline.php (78%) rename lib/Magento/{ => Framework}/Phrase/Renderer/Placeholder.php (92%) rename lib/Magento/{ => Framework}/Phrase/Renderer/Translate.php (81%) rename lib/Magento/{ => Framework}/Phrase/RendererInterface.php (97%) rename lib/Magento/{ => Framework}/Pricing/Adjustment/AdjustmentInterface.php (94%) rename lib/Magento/{ => Framework}/Pricing/Adjustment/Calculator.php (91%) rename lib/Magento/{ => Framework}/Pricing/Adjustment/CalculatorInterface.php (86%) rename lib/Magento/{ => Framework}/Pricing/Adjustment/Collection.php (92%) rename lib/Magento/{ => Framework}/Pricing/Adjustment/Factory.php (79%) rename lib/Magento/{ => Framework}/Pricing/Adjustment/Pool.php (94%) rename lib/Magento/{ => Framework}/Pricing/Amount/AmountFactory.php (77%) rename lib/Magento/{ => Framework}/Pricing/Amount/AmountInterface.php (95%) rename lib/Magento/{ => Framework}/Pricing/Amount/Base.php (97%) rename lib/Magento/{ => Framework}/Pricing/Object/SaleableInterface.php (91%) rename lib/Magento/{ => Framework}/Pricing/Price/Factory.php (80%) rename lib/Magento/{ => Framework}/Pricing/Price/PriceInterface.php (92%) rename lib/Magento/{ => Framework}/Pricing/PriceComposite.php (91%) rename lib/Magento/{ => Framework}/Pricing/PriceCurrencyInterface.php (96%) rename lib/Magento/{ => Framework}/Pricing/PriceInfo/Base.php (91%) rename lib/Magento/{ => Framework}/Pricing/PriceInfo/Factory.php (77%) rename lib/Magento/{ => Framework}/Pricing/PriceInfoInterface.php (90%) rename lib/Magento/{ => Framework}/Pricing/Render.php (89%) rename lib/Magento/{ => Framework}/Pricing/Render/AbstractAdjustment.php (89%) rename lib/Magento/{ => Framework}/Pricing/Render/AdjustmentRenderInterface.php (88%) rename lib/Magento/{ => Framework}/Pricing/Render/Amount.php (93%) rename lib/Magento/{ => Framework}/Pricing/Render/AmountRenderInterface.php (88%) rename lib/Magento/{ => Framework}/Pricing/Render/Layout.php (88%) rename lib/Magento/{ => Framework}/Pricing/Render/PriceBox.php (94%) rename lib/Magento/{ => Framework}/Pricing/Render/PriceBoxRenderInterface.php (87%) rename lib/Magento/{ => Framework}/Pricing/Render/RendererPool.php (91%) rename lib/Magento/{ => Framework}/Profiler.php (98%) rename lib/Magento/{ => Framework}/Profiler/Driver/Factory.php (91%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard.php (94%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard/AbstractOutput.php (98%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard/Output/Csvfile.php (95%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard/Output/Factory.php (90%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard/Output/Firebug.php (94%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard/Output/Html.php (91%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard/OutputInterface.php (95%) rename lib/Magento/{ => Framework}/Profiler/Driver/Standard/Stat.php (98%) rename lib/Magento/{ => Framework}/Profiler/DriverInterface.php (97%) rename lib/Magento/{ => Framework}/Registry.php (98%) rename lib/Magento/{ => Framework}/Service/Data/AbstractObject.php (93%) rename lib/Magento/{ => Framework}/Service/Data/AbstractObjectBuilder.php (91%) rename lib/Magento/{Service/Data/EAV => Framework/Service/Data/Eav}/AbstractObject.php (72%) rename lib/Magento/{Service/Data/EAV => Framework/Service/Data/Eav}/AbstractObjectBuilder.php (51%) rename app/code/Magento/Customer/Service/V1/Data/Eav/Attribute.php => lib/Magento/Framework/Service/Data/Eav/AttributeValue.php (86%) rename app/code/Magento/Customer/Service/V1/Data/Eav/AttributeBuilder.php => lib/Magento/Framework/Service/Data/Eav/AttributeValueBuilder.php (80%) rename lib/Magento/{ => Framework}/Service/DataObjectConverter.php (82%) create mode 100644 lib/Magento/Framework/Service/EavDataObjectConverter.php rename lib/Magento/{ => Framework}/Service/V1/Data/Filter.php (92%) rename lib/Magento/{ => Framework}/Service/V1/Data/FilterBuilder.php (92%) rename lib/Magento/{ => Framework}/Service/V1/Data/Search/FilterGroup.php (88%) rename lib/Magento/{ => Framework}/Service/V1/Data/Search/FilterGroupBuilder.php (84%) rename lib/Magento/{ => Framework}/Service/V1/Data/SearchCriteria.php (92%) rename lib/Magento/{ => Framework}/Service/V1/Data/SearchCriteriaBuilder.php (91%) rename lib/Magento/{ => Framework}/Session/Config.php (97%) rename lib/Magento/{ => Framework}/Session/Config/ConfigInterface.php (98%) rename lib/Magento/{ => Framework}/Session/Exception.php (92%) rename lib/Magento/{ => Framework}/Session/Generic.php (89%) rename lib/Magento/{ => Framework}/Session/SaveHandler.php (97%) rename lib/Magento/{ => Framework}/Session/SaveHandler/DbTable.php (92%) rename lib/Magento/{ => Framework}/Session/SaveHandler/Native.php (95%) rename lib/Magento/{ => Framework}/Session/SaveHandlerException.php (92%) rename lib/Magento/{ => Framework}/Session/SaveHandlerFactory.php (85%) rename lib/Magento/{ => Framework}/Session/SaveHandlerInterface.php (96%) rename lib/Magento/{ => Framework}/Session/SessionManager.php (96%) rename lib/Magento/{ => Framework}/Session/SessionManagerInterface.php (98%) rename lib/Magento/{ => Framework}/Session/SidResolver.php (94%) rename lib/Magento/{ => Framework}/Session/SidResolverInterface.php (83%) rename lib/Magento/{ => Framework}/Session/Storage.php (94%) rename lib/Magento/{ => Framework}/Session/StorageInterface.php (97%) rename lib/Magento/{ => Framework}/Session/Validator.php (95%) rename lib/Magento/{ => Framework}/Session/ValidatorInterface.php (81%) rename lib/Magento/{ => Framework}/Shell.php (89%) rename lib/Magento/{ => Framework}/Shell/CommandRenderer.php (94%) rename lib/Magento/{ => Framework}/Shell/CommandRendererBackground.php (92%) rename lib/Magento/{ => Framework}/Shell/CommandRendererInterface.php (93%) rename lib/Magento/{ => Framework}/ShellInterface.php (90%) rename lib/Magento/{ => Framework}/Simplexml/Config.php (92%) rename lib/Magento/{ => Framework}/Simplexml/Config/Cache/AbstractCache.php (90%) rename lib/Magento/{ => Framework}/Simplexml/Config/Cache/File.php (90%) rename lib/Magento/{ => Framework}/Simplexml/Element.php (95%) rename lib/Magento/{ => Framework}/Stdlib/ArrayUtils.php (94%) rename lib/Magento/{ => Framework}/Stdlib/BooleanUtils.php (98%) rename lib/Magento/{ => Framework}/Stdlib/Cookie.php (98%) rename lib/Magento/{ => Framework}/Stdlib/DateTime.php (91%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/Date.php (79%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/DateFactory.php (81%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/DateInterface.php (78%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/DateTime.php (94%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/Filter/Date.php (91%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/Filter/DateTime.php (76%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/Timezone.php (89%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/Timezone/ValidationException.php (91%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/Timezone/Validator.php (89%) rename lib/Magento/{ => Framework}/Stdlib/DateTime/TimezoneInterface.php (78%) rename lib/Magento/{ => Framework}/Stdlib/String.php (98%) rename lib/Magento/{ => Framework}/System/Args.php (97%) rename lib/Magento/{ => Framework}/System/Dirs.php (97%) rename lib/Magento/{ => Framework}/System/Ftp.php (98%) rename lib/Magento/{ => Framework}/Translate.php (85%) rename lib/Magento/{ => Framework}/Translate/AbstractAdapter.php (96%) rename lib/Magento/{ => Framework}/Translate/Adapter.php (98%) rename lib/Magento/{ => Framework}/Translate/AdapterInterface.php (97%) rename lib/Magento/{ => Framework}/Translate/Inline.php (85%) rename lib/Magento/{ => Framework}/Translate/Inline/ConfigInterface.php (96%) rename lib/Magento/{ => Framework}/Translate/Inline/ParserFactory.php (77%) rename lib/Magento/{ => Framework}/Translate/Inline/ParserInterface.php (97%) rename lib/Magento/{ => Framework}/Translate/Inline/Provider.php (78%) rename lib/Magento/{ => Framework}/Translate/Inline/ProviderInterface.php (90%) rename lib/Magento/{ => Framework}/Translate/Inline/Proxy.php (88%) rename lib/Magento/{ => Framework}/Translate/Inline/State.php (98%) rename lib/Magento/{ => Framework}/Translate/Inline/StateInterface.php (97%) rename lib/Magento/{ => Framework}/Translate/InlineInterface.php (94%) rename lib/Magento/{ => Framework}/Translate/Locale/Resolver/Plugin.php (74%) rename lib/Magento/{ => Framework}/Translate/ResourceInterface.php (96%) rename lib/Magento/{ => Framework}/TranslateInterface.php (92%) rename lib/Magento/{ => Framework}/Url.php (91%) rename lib/Magento/{ => Framework}/Url/QueryParamsResolver.php (96%) rename lib/Magento/{ => Framework}/Url/QueryParamsResolverInterface.php (84%) rename lib/Magento/{ => Framework}/Url/RouteParamsResolverFactory.php (81%) rename lib/Magento/{ => Framework}/Url/RouteParamsResolverInterface.php (98%) rename lib/Magento/{ => Framework}/Url/ScopeInterface.php (97%) rename lib/Magento/{ => Framework}/Url/ScopeResolverInterface.php (89%) rename lib/Magento/{ => Framework}/Url/SecurityInfoInterface.php (97%) rename lib/Magento/{ => Framework}/Url/Validator.php (98%) rename lib/Magento/{ => Framework}/UrlFactory.php (82%) rename lib/Magento/{ => Framework}/UrlInterface.php (94%) rename lib/Magento/{ => Framework}/Util.php (97%) rename lib/Magento/{ => Framework}/Validator.php (78%) rename lib/Magento/{ => Framework}/Validator/AbstractValidator.php (78%) rename lib/Magento/{ => Framework}/Validator/Alnum.php (87%) rename lib/Magento/{ => Framework}/Validator/Builder.php (84%) rename lib/Magento/{ => Framework}/Validator/Config.php (94%) rename lib/Magento/{ => Framework}/Validator/Constraint.php (80%) rename lib/Magento/{ => Framework}/Validator/Constraint/Option.php (91%) rename lib/Magento/{ => Framework}/Validator/Constraint/Option/Callback.php (95%) rename lib/Magento/{ => Framework}/Validator/Constraint/OptionInterface.php (95%) rename lib/Magento/{ => Framework}/Validator/Constraint/Property.php (82%) rename lib/Magento/{ => Framework}/Validator/ConstraintFactory.php (79%) rename lib/Magento/{ => Framework}/Validator/EmailAddress.php (91%) rename lib/Magento/{ => Framework}/Validator/Entity/Properties.php (87%) rename lib/Magento/{ => Framework}/Validator/File/Extension.php (91%) rename lib/Magento/{ => Framework}/Validator/File/ImageSize.php (91%) rename lib/Magento/{ => Framework}/Validator/File/IsImage.php (92%) rename lib/Magento/{ => Framework}/Validator/File/Size.php (92%) rename lib/Magento/{ => Framework}/Validator/Float.php (87%) rename lib/Magento/{ => Framework}/Validator/Int.php (87%) rename lib/Magento/{ => Framework}/Validator/NotEmpty.php (92%) rename lib/Magento/{ => Framework}/Validator/Object.php (95%) rename lib/Magento/{ => Framework}/Validator/Regex.php (87%) rename lib/Magento/{ => Framework}/Validator/StringLength.php (92%) rename lib/Magento/{ => Framework}/Validator/UniversalFactory.php (79%) rename lib/Magento/{ => Framework}/Validator/ValidatorException.php (97%) rename lib/Magento/{ => Framework}/Validator/ValidatorInterface.php (84%) rename lib/Magento/{ => Framework}/Validator/etc/validation.xsd (100%) rename lib/Magento/{ => Framework}/ValidatorFactory.php (80%) rename lib/Magento/{ => Framework}/View/Asset/AssetInterface.php (96%) rename lib/Magento/{ => Framework}/View/Asset/Collection.php (98%) rename lib/Magento/{ => Framework}/View/Asset/ConfigInterface.php (97%) rename lib/Magento/{ => Framework}/View/Asset/GroupedCollection.php (97%) rename lib/Magento/{ => Framework}/View/Asset/LocalInterface.php (96%) rename lib/Magento/{ => Framework}/View/Asset/MergeService.php (84%) rename lib/Magento/{ => Framework}/View/Asset/MergeStrategy/Checksum.php (87%) rename lib/Magento/{ => Framework}/View/Asset/MergeStrategy/Direct.php (85%) rename lib/Magento/{ => Framework}/View/Asset/MergeStrategy/FileExists.php (84%) rename lib/Magento/{ => Framework}/View/Asset/MergeStrategyInterface.php (97%) rename lib/Magento/{ => Framework}/View/Asset/MergeableInterface.php (96%) rename lib/Magento/{ => Framework}/View/Asset/Merged.php (91%) rename lib/Magento/{ => Framework}/View/Asset/Minified.php (82%) rename lib/Magento/{ => Framework}/View/Asset/MinifyService.php (84%) rename lib/Magento/{ => Framework}/View/Asset/PreProcessor/Composite.php (84%) rename lib/Magento/{ => Framework}/View/Asset/PreProcessor/PreProcessorInterface.php (75%) rename lib/Magento/{ => Framework}/View/Asset/PreProcessorFactory.php (88%) rename lib/Magento/{ => Framework}/View/Asset/PropertyGroup.php (97%) rename lib/Magento/{ => Framework}/View/Asset/PropertyGroupFactory.php (80%) rename lib/Magento/{ => Framework}/View/Asset/PublicFile.php (89%) rename lib/Magento/{ => Framework}/View/Asset/Remote.php (97%) rename lib/Magento/{ => Framework}/View/Asset/ViewFile.php (90%) rename lib/Magento/{ => Framework}/View/Block/IdentityInterface.php (93%) rename lib/Magento/{ => Framework}/View/BlockPool.php (89%) rename lib/Magento/{ => Framework}/View/Config.php (76%) rename lib/Magento/{ => Framework}/View/ConfigInterface.php (93%) rename lib/Magento/{ => Framework}/View/Context.php (90%) rename lib/Magento/{ => Framework}/View/DataSourcePool.php (95%) rename lib/Magento/{ => Framework}/View/DeployedFilesManager.php (87%) rename lib/Magento/{ => Framework}/View/Design/Fallback/Factory.php (92%) rename lib/Magento/{ => Framework}/View/Design/Fallback/Rule/Composite.php (97%) rename lib/Magento/{ => Framework}/View/Design/Fallback/Rule/ModularSwitch.php (97%) rename lib/Magento/{ => Framework}/View/Design/Fallback/Rule/RuleInterface.php (95%) rename lib/Magento/{ => Framework}/View/Design/Fallback/Rule/Simple.php (97%) rename lib/Magento/{ => Framework}/View/Design/Fallback/Rule/Theme.php (95%) rename lib/Magento/{ => Framework}/View/Design/FileResolution/Strategy/Fallback.php (95%) rename lib/Magento/{ => Framework}/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php (90%) rename lib/Magento/{ => Framework}/View/Design/FileResolution/Strategy/FileInterface.php (92%) rename lib/Magento/{ => Framework}/View/Design/FileResolution/Strategy/LocaleInterface.php (92%) rename lib/Magento/{ => Framework}/View/Design/FileResolution/Strategy/View/NotifiableInterface.php (88%) rename lib/Magento/{ => Framework}/View/Design/FileResolution/Strategy/ViewInterface.php (92%) rename lib/Magento/{ => Framework}/View/Design/FileResolution/StrategyPool.php (79%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization.php (76%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/AbstractFile.php (72%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/ConfigInterface.php (95%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/File/Css.php (90%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/File/Js.php (90%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/FileAssetInterface.php (94%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/FileInterface.php (67%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/FileServiceFactory.php (79%) rename lib/Magento/{ => Framework}/View/Design/Theme/Customization/Path.php (80%) rename lib/Magento/{ => Framework}/View/Design/Theme/CustomizationInterface.php (90%) rename lib/Magento/{ => Framework}/View/Design/Theme/Domain/Factory.php (67%) rename lib/Magento/{ => Framework}/View/Design/Theme/Domain/PhysicalInterface.php (85%) rename lib/Magento/{ => Framework}/View/Design/Theme/Domain/StagingInterface.php (89%) rename lib/Magento/{ => Framework}/View/Design/Theme/Domain/VirtualInterface.php (86%) rename lib/Magento/{ => Framework}/View/Design/Theme/File/CollectionInterface.php (85%) rename lib/Magento/{ => Framework}/View/Design/Theme/FileFactory.php (76%) rename lib/Magento/{ => Framework}/View/Design/Theme/FileInterface.php (87%) rename lib/Magento/{ => Framework}/View/Design/Theme/FileProviderInterface.php (78%) rename lib/Magento/{ => Framework}/View/Design/Theme/FlyweightFactory.php (81%) rename lib/Magento/{ => Framework}/View/Design/Theme/Image.php (89%) rename lib/Magento/{ => Framework}/View/Design/Theme/Image/PathInterface.php (96%) rename lib/Magento/{ => Framework}/View/Design/Theme/Image/Uploader.php (79%) rename lib/Magento/{ => Framework}/View/Design/Theme/ImageFactory.php (82%) rename lib/Magento/{ => Framework}/View/Design/Theme/Label.php (89%) rename lib/Magento/{ => Framework}/View/Design/Theme/Label/ListInterface.php (95%) rename lib/Magento/{ => Framework}/View/Design/Theme/LabelFactory.php (80%) rename lib/Magento/{ => Framework}/View/Design/Theme/ListInterface.php (91%) rename lib/Magento/{ => Framework}/View/Design/Theme/ResolverInterface.php (91%) rename lib/Magento/{ => Framework}/View/Design/Theme/ThemeProviderInterface.php (86%) rename lib/Magento/{ => Framework}/View/Design/Theme/Validator.php (93%) rename lib/Magento/{ => Framework}/View/Design/ThemeFactory.php (91%) rename lib/Magento/{ => Framework}/View/Design/ThemeInterface.php (98%) rename {app/code/Magento/Core/Model/App/Area => lib/Magento/Framework/View}/DesignExceptions.php (71%) rename lib/Magento/{ => Framework}/View/DesignInterface.php (98%) rename lib/Magento/{ => Framework}/View/DesignLoader.php (92%) rename lib/Magento/{ => Framework}/View/Element/AbstractBlock.php (92%) rename lib/Magento/{ => Framework}/View/Element/BlockFactory.php (92%) rename lib/Magento/{ => Framework}/View/Element/BlockInterface.php (96%) rename lib/Magento/{ => Framework}/View/Element/Context.php (66%) rename lib/Magento/{ => Framework}/View/Element/FormKey.php (80%) rename lib/Magento/{ => Framework}/View/Element/Html/Calendar.php (82%) rename lib/Magento/{ => Framework}/View/Element/Html/Date.php (96%) rename lib/Magento/{ => Framework}/View/Element/Html/Link.php (96%) rename lib/Magento/{ => Framework}/View/Element/Html/Link/Current.php (91%) rename lib/Magento/{ => Framework}/View/Element/Html/Links.php (85%) rename lib/Magento/{ => Framework}/View/Element/Html/Select.php (98%) rename lib/Magento/{ => Framework}/View/Element/Js/Components.php (92%) rename lib/Magento/{ => Framework}/View/Element/Js/Cookie.php (90%) rename lib/Magento/{ => Framework}/View/Element/Messages.php (79%) rename lib/Magento/{ => Framework}/View/Element/Redirect.php (95%) rename lib/Magento/{ => Framework}/View/Element/RendererInterface.php (96%) rename lib/Magento/{ => Framework}/View/Element/RendererList.php (94%) rename lib/Magento/{ => Framework}/View/Element/Template.php (91%) rename lib/Magento/{ => Framework}/View/Element/Template/Context.php (60%) rename lib/Magento/{ => Framework}/View/Element/Text.php (94%) rename lib/Magento/{ => Framework}/View/Element/Text/ListText.php (89%) rename lib/Magento/{ => Framework}/View/Element/Text/TextList/Item.php (92%) rename lib/Magento/{ => Framework}/View/Element/Text/TextList/Link.php (93%) rename lib/Magento/{ => Framework}/View/FileSystem.php (93%) rename lib/Magento/{ => Framework}/View/Helper/Js.php (97%) rename lib/Magento/{ => Framework}/View/Layout.php (88%) rename lib/Magento/{ => Framework}/View/Layout/Argument/Interpreter/Decorator/Updater.php (88%) rename lib/Magento/{ => Framework}/View/Layout/Argument/Interpreter/HelperMethod.php (94%) rename lib/Magento/{ => Framework}/View/Layout/Argument/Interpreter/NamedParams.php (94%) rename lib/Magento/{ => Framework}/View/Layout/Argument/Interpreter/Object.php (93%) rename lib/Magento/{ => Framework}/View/Layout/Argument/Interpreter/Options.php (90%) rename lib/Magento/{ => Framework}/View/Layout/Argument/Interpreter/Url.php (92%) rename lib/Magento/{ => Framework}/View/Layout/Argument/Parser.php (90%) rename lib/Magento/{ => Framework}/View/Layout/Argument/UpdaterInterface.php (95%) rename lib/Magento/{ => Framework}/View/Layout/Element.php (98%) rename lib/Magento/{ => Framework}/View/Layout/Factory.php (80%) rename lib/Magento/{ => Framework}/View/Layout/File.php (97%) rename lib/Magento/{ => Framework}/View/Layout/File/Factory.php (87%) rename lib/Magento/{ => Framework}/View/Layout/File/FileList.php (94%) rename lib/Magento/{ => Framework}/View/Layout/File/FileList/CollateInterface.php (82%) rename lib/Magento/{ => Framework}/View/Layout/File/FileList/Collator.php (87%) rename lib/Magento/{ => Framework}/View/Layout/File/FileList/Factory.php (82%) rename lib/Magento/{ => Framework}/View/Layout/File/Source/Aggregated.php (92%) rename lib/Magento/{ => Framework}/View/Layout/File/Source/Base.php (88%) rename lib/Magento/{ => Framework}/View/Layout/File/Source/Decorator/ModuleDependency.php (92%) rename lib/Magento/{ => Framework}/View/Layout/File/Source/Decorator/ModuleOutput.php (85%) rename lib/Magento/{ => Framework}/View/Layout/File/Source/Override/Base.php (88%) rename lib/Magento/{ => Framework}/View/Layout/File/Source/Override/Theme.php (89%) rename lib/Magento/{ => Framework}/View/Layout/File/Source/Theme.php (88%) rename lib/Magento/{ => Framework}/View/Layout/File/SourceInterface.php (89%) rename lib/Magento/{ => Framework}/View/Layout/PageType/Config.php (82%) rename lib/Magento/{ => Framework}/View/Layout/PageType/Config/Converter.php (92%) rename lib/Magento/{ => Framework}/View/Layout/PageType/Config/Reader.php (90%) rename lib/Magento/{ => Framework}/View/Layout/PageType/Config/SchemaLocator.php (84%) rename lib/Magento/{ => Framework}/View/Layout/ProcessorFactory.php (85%) rename lib/Magento/{ => Framework}/View/Layout/ProcessorInterface.php (94%) rename lib/Magento/{ => Framework}/View/Layout/Proxy.php (92%) rename lib/Magento/{ => Framework}/View/Layout/ScheduledStructure.php (99%) rename lib/Magento/{ => Framework}/View/LayoutFactory.php (84%) rename lib/Magento/{ => Framework}/View/LayoutInterface.php (97%) rename lib/Magento/{ => Framework}/View/PublicFilesManagerInterface.php (97%) rename lib/Magento/{ => Framework}/View/Publisher.php (91%) rename lib/Magento/{ => Framework}/View/Publisher/CssFile.php (97%) rename lib/Magento/{ => Framework}/View/Publisher/File.php (98%) rename lib/Magento/{ => Framework}/View/Publisher/FileAbstract.php (90%) rename lib/Magento/{ => Framework}/View/Publisher/FileFactory.php (91%) rename lib/Magento/{ => Framework}/View/Publisher/FileInterface.php (97%) rename lib/Magento/{ => Framework}/View/RelatedFile.php (94%) rename lib/Magento/{ => Framework}/View/Render/RenderFactory.php (84%) rename lib/Magento/{ => Framework}/View/RenderInterface.php (97%) rename lib/Magento/{ => Framework}/View/Service.php (87%) rename lib/Magento/{ => Framework}/View/TemplateEngine/Php.php (92%) rename lib/Magento/{ => Framework}/View/TemplateEngineFactory.php (93%) rename lib/Magento/{ => Framework}/View/TemplateEngineInterface.php (83%) rename lib/Magento/{ => Framework}/View/TemplateEnginePool.php (88%) rename lib/Magento/{ => Framework}/View/Url.php (81%) rename lib/Magento/{ => Framework}/View/Url/ConfigInterface.php (96%) rename lib/Magento/{ => Framework}/View/Url/CssResolver.php (91%) rename lib/Magento/{ => Framework}/Xml/Generator.php (99%) rename lib/Magento/{ => Framework}/Xml/Parser.php (98%) create mode 100644 pub/lib/css/source/lib/ui-dialog.less create mode 100644 pub/lib/jquery/jquery-ui-timepicker-addon-1.0.1.js rename dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/_files/layout/catalogsearch_ajax_suggest.xml => pub/lib/mage/dialog.js (81%) create mode 100644 pub/lib/mage/dropdown_old.js create mode 100644 pub/lib/mage/tooltip.js diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000..900ffd8e62069 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,43 @@ +language: php +php: + - 5.4 + - 5.5 +env: + - TEST_SUITE=unit + - TEST_SUITE=integration + - TEST_SUITE=integration_integrity + - TEST_SUITE=static_phpcs + - TEST_SUITE=static_annotation +matrix: + exclude: + - php: 5.5 + env: TEST_SUITE=static_phpcs + - php: 5.5 + env: TEST_SUITE=static_annotation +before_install: + - sudo apt-get update -qq + - sudo apt-get install -y -qq postfix +before_script: + # mock mail + - sudo service postfix stop + - smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 & + - echo -e '#!/usr/bin/env bash\nexit 0' | sudo tee /usr/sbin/sendmail + - echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i | grep "PHP Version" | head -n 1 | grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini" + # Disable xDebug + - echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini + # Create DB for Integration tests + - sh -c "if [ '$TEST_SUITE' = 'integration' ] || [ '$TEST_SUITE' = 'integration_integrity' ]; then mysql -e 'create database magento_integration_tests;'; mv dev/tests/integration/etc/local-mysql.travis.xml.dist dev/tests/integration/etc/local-mysql.xml; fi" + # Install tools for static tests + - sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ] || [ '$TEST_SUITE' = 'static_annotation' ]; then pear install pear/PHP_CodeSniffer-1.4.7; fi" + - phpenv rehash; +script: + # Unit tests + - sh -c "if [ '$TEST_SUITE' = 'unit' ]; then phpunit -c dev/tests/unit/phpunit.xml.dist; fi" + # Integration tests + - sh -c "if [ '$TEST_SUITE' = 'integration' ]; then cd dev/tests/integration/; phpunit -c phpunit.xml.dist; fi" + # Integration integrity tests + - sh -c "if [ '$TEST_SUITE' = 'integration_integrity' ]; then cd dev/tests/integration/; phpunit -c phpunit.xml.dist testsuite/Magento/Test/Integrity; fi" + # Static tests [Code Style] + - sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ]; then cd dev/tests/static; phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testCodeStyle'; fi" + # Static tests [Code Style] + - sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi" diff --git a/CHANGELOG.md b/CHANGELOG.md index 43082e21c24c1..4532e6f1855f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,58 @@ +2.0.0.0-dev75 +============= +* Modularity improvements: + * Introduced a new CheckoutAgreements module. Moved all "Terms and Conditions" related logic from Magento_Checkout to Magento_CheckoutAgreements + * Moved library related logic from `Magento\Core\Model\App` +* Fixed bugs: + * Fixed an issue where Currency Options were not displayed on the Currency Setup tab + * Fixed an issue where a fatal error appeared during customer registration if mail server was off + * Fixed an issue where customer with middle name did not appear in the Customers grid in the backend + * Fixed an issue where related products were not displayed on the product page in the backend + * Fixed the broken View Files Population tool + * Fixed an issue where Magento broke down if the Main Web Site was deleted + * Fixed potential security issue with orders protect_code + * Fixed an issue where an error appeared when placing an order if cache was turned on + * Fixed an issue where a warning appeared when running system_config.php tool + * Fixed an issue with incorrect reset password link for users on custom websites + * Fixed an issue with invalid error message displayed when trying to save a customer group with existing group name + * Fixed an issue with menu layout non-responsive behavior in the Blank theme +* Framework Improvements: + * Covered Magento library components with unit tests + * `Magento\Framework\Error\*` + * `Magento\Framework\Event\Observer\*` + * `Magento\Framework\Filesystem\*` + * `Magento\Framework\Filesystem\File\*` + * Updated the obsolete_classes list with changes, introduced by Offline Payment Methods Module implementation + * Moved `lib/Magento/*` to `lib/Magento/Framework/*` + * Covered Magento application components with unit tests: + * `Store\Model\*` + * `Sales/Helper/Guest.php` + * `Sales/Helper/Admin.php` + * `Sales/Model/Observer.php` + * `Sales/Model/Payment/Method/Converter.php` + * `Sales/Model/Email/Template.php` + * `Sales/Model/Observer/Backend/CustomerQuote.php` + * `Sales/Model/Status/ListStatus.php` +* Refactored the following modules to use Customer Service: + * Magento_Persistent + * Magento_GoogleShopping + * Magento_ProductAlert + * Magento_SendFriend + * Moved customer-specific logic from the Magento_ImportExport module to the Customer module + * Refactored the rest of Customer Group usages + * Refactored customerAccountService::createAccount to not expose the hashed password input from webapi + * Implemented a delimiter usage for Cache key in Customer Registry +* Customer Service usage: + * Updated exception hierarchy with a new localized exception class + * Updated CRUD APIs to support email and base URL instead of IDs +* JavaScript improvements: + * Implemented the validation widget + * Implemented the tooltip widget + * Implemented the popup/modal window widget + * Implemented the calendar widget + * Implemented the suggest widget +* Added configuration for Travis CI + 2.0.0.0-dev74 ============= * Pricing Improvements: diff --git a/app/autoload.php b/app/autoload.php index bd6e78c28720d..50d3ccd77cdf3 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -23,5 +23,5 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -require_once __DIR__ . '/../lib/Magento/Autoload/IncludePath.php'; -spl_autoload_register('\Magento\Autoload\IncludePath::load'); +require_once __DIR__ . '/../lib/Magento/Framework/Autoload/IncludePath.php'; +spl_autoload_register('\Magento\Framework\Autoload\IncludePath::load'); diff --git a/app/bootstrap.php b/app/bootstrap.php index 28d4ed318079d..74f7d43835dfe 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -63,11 +63,11 @@ require_once BP . '/app/functions.php'; require_once __DIR__ . '/autoload.php'; -\Magento\Autoload\IncludePath::addIncludePath(array(BP . '/app/code', BP . '/lib')); +\Magento\Framework\Autoload\IncludePath::addIncludePath(array(BP . '/app/code', BP . '/lib')); $classMapPath = BP . '/var/classmap.ser'; if (file_exists($classMapPath)) { - require_once BP . '/lib/Magento/Autoload/ClassMap.php'; - $classMap = new \Magento\Autoload\ClassMap(BP); + require_once BP . '/lib/Magento/Framework/Autoload/ClassMap.php'; + $classMap = new \Magento\Framework\Autoload\ClassMap(BP); $classMap->addMap(unserialize(file_get_contents($classMapPath))); spl_autoload_register(array($classMap, 'load'), true, true); } @@ -86,7 +86,11 @@ } if (!empty($_SERVER['MAGE_PROFILER'])) { - \Magento\Profiler::applyConfig($_SERVER['MAGE_PROFILER'], dirname(__DIR__), !empty($_REQUEST['isAjax'])); + \Magento\Framework\Profiler::applyConfig( + $_SERVER['MAGE_PROFILER'], + dirname(__DIR__), + !empty($_REQUEST['isAjax']) + ); } } -date_default_timezone_set(\Magento\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); +date_default_timezone_set(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php index 89e023d2c5bf0..e13b0c75c8aae 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php @@ -49,10 +49,10 @@ public function __construct( /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $readDetailsHtml = $row->getUrl() ? '' . __( 'Read Details' diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php index fa0a8990d3364..6a02c4092d7a6 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php @@ -32,10 +32,10 @@ class Notice extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstract /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { return '' . $row->getTitle() . diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Severity.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Severity.php index 363e0ccba1573..b400e945375a7 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Severity.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Severity.php @@ -51,10 +51,10 @@ public function __construct( /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $class = ''; $value = ''; diff --git a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php index 7e0f22bfb736d..b3356854cab9e 100644 --- a/app/code/Magento/AdminNotification/Block/ToolbarEntry.php +++ b/app/code/Magento/AdminNotification/Block/ToolbarEntry.php @@ -86,10 +86,10 @@ public function formatNotificationDate($dateString) if (date('Ymd') == date('Ymd', strtotime($dateString))) { return $this->formatTime( $dateString, - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT, false ); } - return $this->formatDate($dateString, \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true); + return $this->formatDate($dateString, \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true); } } diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php index 86c78a3650a06..d3b44f44ae079 100644 --- a/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php +++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/Notification.php @@ -60,7 +60,7 @@ public function markAsReadAction() $notificationId ); $this->messageManager->addSuccess(__('The message has been marked as Read.')); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException( @@ -121,7 +121,7 @@ public function massMarkAsReadAction() $this->messageManager->addSuccess( __('A total of %1 record(s) have been marked as Read.', count($ids)) ); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException( @@ -149,7 +149,7 @@ public function removeAction() try { $model->setIsRemove(1)->save(); $this->messageManager->addSuccess(__('The message has been removed.')); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException($e, __("We couldn't remove the messages because of an error.")); @@ -178,7 +178,7 @@ public function massRemoveAction() } } $this->messageManager->addSuccess(__('Total of %1 record(s) have been removed.', count($ids))); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException($e, __("We couldn't remove the messages because of an error.")); diff --git a/app/code/Magento/AdminNotification/Model/Config/Source/Frequency.php b/app/code/Magento/AdminNotification/Model/Config/Source/Frequency.php index 3b2e36c2f4da8..08340bf404353 100644 --- a/app/code/Magento/AdminNotification/Model/Config/Source/Frequency.php +++ b/app/code/Magento/AdminNotification/Model/Config/Source/Frequency.php @@ -32,7 +32,7 @@ * @package Magento_AdminNotification * @author Magento Core Team */ -class Frequency implements \Magento\Option\ArrayInterface +class Frequency implements \Magento\Framework\Option\ArrayInterface { /** * @return array diff --git a/app/code/Magento/AdminNotification/Model/Feed.php b/app/code/Magento/AdminNotification/Model/Feed.php index 1715651a556fe..16c031fc4e772 100644 --- a/app/code/Magento/AdminNotification/Model/Feed.php +++ b/app/code/Magento/AdminNotification/Model/Feed.php @@ -32,7 +32,7 @@ * @package Magento_AdminNotification * @author Magento Core Team */ -class Feed extends \Magento\Model\AbstractModel +class Feed extends \Magento\Framework\Model\AbstractModel { const XML_USE_HTTPS_PATH = 'system/adminnotification/use_https'; @@ -60,21 +60,21 @@ class Feed extends \Magento\Model\AbstractModel protected $_inboxFactory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Backend\App\ConfigInterface $backendConfig * @param \Magento\AdminNotification\Model\InboxFactory $inboxFactory - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Backend\App\ConfigInterface $backendConfig, \Magento\AdminNotification\Model\InboxFactory $inboxFactory, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { parent::__construct($context, $registry, $resource, $resourceCollection, $data); @@ -189,7 +189,7 @@ public function setLastUpdate() */ public function getFeedData() { - $curl = new \Magento\HTTP\Adapter\Curl(); + $curl = new \Magento\Framework\HTTP\Adapter\Curl(); $curl->setConfig(array('timeout' => 2)); $curl->write(\Zend_Http_Client::GET, $this->getFeedUrl(), '1.0'); $data = $curl->read(); diff --git a/app/code/Magento/AdminNotification/Model/Inbox.php b/app/code/Magento/AdminNotification/Model/Inbox.php index cc5c4adb9e954..169da1d187466 100644 --- a/app/code/Magento/AdminNotification/Model/Inbox.php +++ b/app/code/Magento/AdminNotification/Model/Inbox.php @@ -49,7 +49,7 @@ * @package Magento_AdminNotification * @author Magento Core Team */ -class Inbox extends \Magento\Model\AbstractModel +class Inbox extends \Magento\Framework\Model\AbstractModel { const SEVERITY_CRITICAL = 1; @@ -133,13 +133,13 @@ public function parse(array $data) * @param string|string[] $description * @param string $url * @param bool $isInternal - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return $this */ public function add($severity, $title, $description, $url = '', $isInternal = true) { if (!$this->getSeverities($severity)) { - throw new \Magento\Model\Exception(__('Wrong message type')); + throw new \Magento\Framework\Model\Exception(__('Wrong message type')); } if (is_array($description)) { $description = '
  • ' . implode('
  • ', $description) . '
'; diff --git a/app/code/Magento/AdminNotification/Model/NotificationService.php b/app/code/Magento/AdminNotification/Model/NotificationService.php index 7efd5f064a218..27a7d6f984ac0 100644 --- a/app/code/Magento/AdminNotification/Model/NotificationService.php +++ b/app/code/Magento/AdminNotification/Model/NotificationService.php @@ -52,14 +52,14 @@ public function __construct(\Magento\AdminNotification\Model\InboxFactory $notif * * @param int $notificationId * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function markAsRead($notificationId) { $notification = $this->_notificationFactory->create(); $notification->load($notificationId); if (!$notification->getId()) { - throw new \Magento\Model\Exception('Wrong notification ID specified.'); + throw new \Magento\Framework\Model\Exception('Wrong notification ID specified.'); } $notification->setIsRead(1); $notification->save(); diff --git a/app/code/Magento/AdminNotification/Model/Observer.php b/app/code/Magento/AdminNotification/Model/Observer.php index d068e15a1a47a..5e22d30939526 100644 --- a/app/code/Magento/AdminNotification/Model/Observer.php +++ b/app/code/Magento/AdminNotification/Model/Observer.php @@ -59,10 +59,10 @@ public function __construct( /** * Predispath admin action controller * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function preDispatch(\Magento\Event\Observer $observer) + public function preDispatch(\Magento\Framework\Event\Observer $observer) { if ($this->_backendAuthSession->isLoggedIn()) { $feedModel = $this->_feedFactory->create(); diff --git a/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php index 98b0cb708cca4..7fe6b53fd94b5 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Grid/Collection.php @@ -38,7 +38,7 @@ class Collection extends \Magento\AdminNotification\Model\Resource\Inbox\Collect /** * Add remove filter * - * @return \Magento\AdminNotification\Model\Resource\Grid\Collection|\Magento\Model\Resource\Db\Collection\AbstractCollection + * @return \Magento\AdminNotification\Model\Resource\Grid\Collection|\Magento\Framework\Model\Resource\Db\Collection\AbstractCollection */ protected function _initSelect() { diff --git a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php index d11427c33e75e..8b620208e4dac 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Inbox.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Inbox.php @@ -32,7 +32,7 @@ * @package Magento_AdminNotification * @author Magento Core Team */ -class Inbox extends \Magento\Model\Resource\Db\AbstractDb +class Inbox extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * AdminNotification Resource initialization diff --git a/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection.php index 93d4219169044..b9f9dbbed67a2 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection.php @@ -32,7 +32,7 @@ * @package Magento_AdminNotification * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Resource collection initialization diff --git a/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection/Critical.php b/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection/Critical.php index 2599f958784d9..870c60a0c1a08 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection/Critical.php +++ b/app/code/Magento/AdminNotification/Model/Resource/Inbox/Collection/Critical.php @@ -25,7 +25,7 @@ */ namespace Magento\AdminNotification\Model\Resource\Inbox\Collection; -class Critical extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Critical extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Resource collection initialization diff --git a/app/code/Magento/AdminNotification/Model/Resource/System/Message.php b/app/code/Magento/AdminNotification/Model/Resource/System/Message.php index eb1305f857e6d..6a00b7f896ff8 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/System/Message.php +++ b/app/code/Magento/AdminNotification/Model/Resource/System/Message.php @@ -23,7 +23,7 @@ */ namespace Magento\AdminNotification\Model\Resource\System; -class Message extends \Magento\Model\Resource\Db\AbstractDb +class Message extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Flag that notifies whether Primary key of table is auto-incremeted diff --git a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php index 1bf58e16f7537..8e44afd3851e1 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php +++ b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php @@ -23,7 +23,7 @@ */ namespace Magento\AdminNotification\Model\Resource\System\Message; -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * System message list @@ -41,21 +41,21 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio /** * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\AdminNotification\Model\System\MessageList $messageList * @param mixed $connection - * @param \Magento\Model\Resource\Db\AbstractDb $resource + * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\AdminNotification\Model\System\MessageList $messageList, $connection = null, - \Magento\Model\Resource\Db\AbstractDb $resource = null + \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null ) { $this->_messageList = $messageList; parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); diff --git a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection/Synchronized.php b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection/Synchronized.php index 1e909f5099382..c848602c9de06 100644 --- a/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection/Synchronized.php +++ b/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection/Synchronized.php @@ -35,7 +35,7 @@ class Synchronized extends \Magento\AdminNotification\Model\Resource\System\Mess /** * Store new messages in database and remove outdated messages * - * @return $this|\Magento\Model\Resource\Db\AbstractDb + * @return $this|\Magento\Framework\Model\Resource\Db\AbstractDb */ public function _afterLoad() { diff --git a/app/code/Magento/AdminNotification/Model/Survey.php b/app/code/Magento/AdminNotification/Model/Survey.php index 3ea56c4a49146..c09fb41f90f7f 100644 --- a/app/code/Magento/AdminNotification/Model/Survey.php +++ b/app/code/Magento/AdminNotification/Model/Survey.php @@ -44,12 +44,12 @@ class Survey protected $_flagCode = 'admin_notification_survey'; /** - * @var \Magento\Flag + * @var \Magento\Framework\Flag */ protected $_flagModel = null; /** - * @var \Magento\FlagFactory + * @var \Magento\Framework\FlagFactory */ protected $_flagFactory; @@ -59,11 +59,13 @@ class Survey protected $_request; /** - * @param \Magento\FlagFactory $flagFactory + * @param \Magento\Framework\FlagFactory $flagFactory * @param \Magento\Framework\App\RequestInterface $request */ - public function __construct(\Magento\FlagFactory $flagFactory, \Magento\Framework\App\RequestInterface $request) - { + public function __construct( + \Magento\Framework\FlagFactory $flagFactory, + \Magento\Framework\App\RequestInterface $request + ) { $this->_request = $request; $this->_flagFactory = $flagFactory; } @@ -75,7 +77,7 @@ public function __construct(\Magento\FlagFactory $flagFactory, \Magento\Framewor */ public function isSurveyUrlValid() { - $curl = new \Magento\HTTP\Adapter\Curl(); + $curl = new \Magento\Framework\HTTP\Adapter\Curl(); $curl->setConfig(array('timeout' => 5))->write(\Zend_Http_Client::GET, $this->getSurveyUrl(), '1.0'); $response = $curl->read(); $curl->close(); @@ -100,7 +102,7 @@ public function getSurveyUrl() /** * Return core flag model * - * @return \Magento\Flag + * @return \Magento\Framework\Flag */ protected function _getFlagModel() { diff --git a/app/code/Magento/AdminNotification/Model/System/Message.php b/app/code/Magento/AdminNotification/Model/System/Message.php index d606ae60dfe20..d4588cf27e11a 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message.php +++ b/app/code/Magento/AdminNotification/Model/System/Message.php @@ -23,7 +23,7 @@ */ namespace Magento\AdminNotification\Model\System; -class Message extends \Magento\Model\AbstractModel implements \Magento\AdminNotification\Model\System\MessageInterface +class Message extends \Magento\Framework\Model\AbstractModel implements \Magento\AdminNotification\Model\System\MessageInterface { /** * @return void diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php index 91ad984970a8d..2ede00eb20d10 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php @@ -26,7 +26,7 @@ class Baseurl implements \Magento\AdminNotification\Model\System\MessageInterface { /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; @@ -48,13 +48,13 @@ class Baseurl implements \Magento\AdminNotification\Model\System\MessageInterfac /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\App\Config\ValueFactory $configValueFactory */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\Config\ValueFactory $configValueFactory ) { $this->_urlBuilder = $urlBuilder; diff --git a/app/code/Magento/AdminNotification/Model/System/Message/CacheOutdated.php b/app/code/Magento/AdminNotification/Model/System/Message/CacheOutdated.php index 1a71a7752122b..a7f57b85e2123 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/CacheOutdated.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/CacheOutdated.php @@ -26,12 +26,12 @@ class CacheOutdated implements \Magento\AdminNotification\Model\System\MessageInterface { /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_authorization; @@ -41,13 +41,13 @@ class CacheOutdated implements \Magento\AdminNotification\Model\System\MessageIn protected $_cacheTypeList; /** - * @param \Magento\AuthorizationInterface $authorization - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\AuthorizationInterface $authorization + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList */ public function __construct( - \Magento\AuthorizationInterface $authorization, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\AuthorizationInterface $authorization, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList ) { $this->_authorization = $authorization; diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Security.php b/app/code/Magento/AdminNotification/Model/System/Message/Security.php index 646c622d901dc..6a67afb6d0ff6 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Security.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Security.php @@ -59,7 +59,7 @@ class Security implements \Magento\AdminNotification\Model\System\MessageInterfa protected $_config; /** - * @var \Magento\HTTP\Adapter\CurlFactory + * @var \Magento\Framework\HTTP\Adapter\CurlFactory */ protected $_curlFactory; @@ -67,13 +67,13 @@ class Security implements \Magento\AdminNotification\Model\System\MessageInterfa * @param \Magento\Framework\App\CacheInterface $cache * @param \Magento\Backend\App\ConfigInterface $backendConfig * @param \Magento\Framework\App\Config\ScopeConfigInterface $config - * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory + * @param \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory */ public function __construct( \Magento\Framework\App\CacheInterface $cache, \Magento\Backend\App\ConfigInterface $backendConfig, \Magento\Framework\App\Config\ScopeConfigInterface $config, - \Magento\HTTP\Adapter\CurlFactory $curlFactory + \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory ) { $this->_cache = $cache; $this->_backendConfig = $backendConfig; @@ -110,7 +110,7 @@ private function _isFileAccessible() { $unsecureBaseURL = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default'); - /** @var $http \Magento\HTTP\Adapter\Curl */ + /** @var $http \Magento\Framework\HTTP\Adapter\Curl */ $http = $this->_curlFactory->create(); $http->setConfig(array('timeout' => $this->_verificationTimeOut)); $http->write(\Zend_Http_Client::POST, $unsecureBaseURL . $this->_filePath); diff --git a/app/code/Magento/AdminNotification/Model/System/Message/Survey.php b/app/code/Magento/AdminNotification/Model/System/Message/Survey.php index 37bc71eddb851..e2aad4101909c 100644 --- a/app/code/Magento/AdminNotification/Model/System/Message/Survey.php +++ b/app/code/Magento/AdminNotification/Model/System/Message/Survey.php @@ -31,12 +31,12 @@ class Survey implements \Magento\AdminNotification\Model\System\MessageInterface protected $_authSession; /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_authorization; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; @@ -47,14 +47,14 @@ class Survey implements \Magento\AdminNotification\Model\System\MessageInterface /** * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\AuthorizationInterface $authorization - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\AuthorizationInterface $authorization + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\AdminNotification\Model\Survey $survey */ public function __construct( \Magento\Backend\Model\Auth\Session $authSession, - \Magento\AuthorizationInterface $authorization, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\AuthorizationInterface $authorization, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\AdminNotification\Model\Survey $survey ) { $this->_authorization = $authorization; diff --git a/app/code/Magento/AdminNotification/Model/System/MessageList.php b/app/code/Magento/AdminNotification/Model/System/MessageList.php index 221e2180e8d30..ac86107e988ff 100644 --- a/app/code/Magento/AdminNotification/Model/System/MessageList.php +++ b/app/code/Magento/AdminNotification/Model/System/MessageList.php @@ -40,10 +40,10 @@ class MessageList protected $_messages; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param array $messages */ - public function __construct(\Magento\ObjectManager $objectManager, $messages = array()) + public function __construct(\Magento\Framework\ObjectManager $objectManager, $messages = array()) { $this->_objectManager = $objectManager; $this->_messageClasses = $messages; diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml b/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml index f3eb1c9f539ed..f5e34c5e5722f 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml index 833f39912e931..25f28e83adfda 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/di.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + @@ -36,7 +36,7 @@ - + Magento_AdminNotification diff --git a/app/code/Magento/AdminNotification/etc/adminhtml/events.xml b/app/code/Magento/AdminNotification/etc/adminhtml/events.xml index 6aafe0b7b95a9..530f11f6ec431 100644 --- a/app/code/Magento/AdminNotification/etc/adminhtml/events.xml +++ b/app/code/Magento/AdminNotification/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/AdminNotification/etc/module.xml b/app/code/Magento/AdminNotification/etc/module.xml index f70d9dab760e9..a965fe02da75e 100644 --- a/app/code/Magento/AdminNotification/etc/module.xml +++ b/app/code/Magento/AdminNotification/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php b/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php index 076d14fb56326..264ea2d65ba03 100644 --- a/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php +++ b/app/code/Magento/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php @@ -32,7 +32,7 @@ * @author Magento Core Team */ $installer = $this; -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); /** @@ -42,49 +42,49 @@ $installer->getTable('adminnotification_inbox') )->addColumn( 'notification_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Notification id' )->addColumn( 'severity', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Problem type' )->addColumn( 'date_added', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array('nullable' => false), 'Create date' )->addColumn( 'title', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => false), 'Title' )->addColumn( 'description', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Description' )->addColumn( 'url', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Url' )->addColumn( 'is_read', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Flag if notification read' )->addColumn( 'is_remove', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Flag if notification might be removed' diff --git a/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php b/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php index 08049ba1080bc..f5d9f065bd48a 100644 --- a/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php +++ b/app/code/Magento/AdminNotification/sql/adminnotification_setup/upgrade-1.6.0.0-2.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ $installer = $this; -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); /** @@ -32,19 +32,19 @@ $installer->getTable('admin_system_messages') )->addColumn( 'identity', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 100, array('nullable' => false, 'primary' => true), 'Message id' )->addColumn( 'severity', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Problem type' )->addColumn( 'created_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array('nullable' => false), 'Create date' diff --git a/app/code/Magento/Authorizenet/Block/Authorizenet/Info/Cc.php b/app/code/Magento/Authorizenet/Block/Authorizenet/Info/Cc.php index 7cf647f11fbe6..5e46a78ff893f 100644 --- a/app/code/Magento/Authorizenet/Block/Authorizenet/Info/Cc.php +++ b/app/code/Magento/Authorizenet/Block/Authorizenet/Info/Cc.php @@ -47,13 +47,13 @@ class Cc extends \Magento\Payment\Block\Info\Cc protected $_coreData; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Core\Helper\Data $coreData, array $data = array() diff --git a/app/code/Magento/Authorizenet/Block/Directpost/Form.php b/app/code/Magento/Authorizenet/Block/Directpost/Form.php index 1df7bbbbbc603..bdac0bf27eee2 100644 --- a/app/code/Magento/Authorizenet/Block/Directpost/Form.php +++ b/app/code/Magento/Authorizenet/Block/Directpost/Form.php @@ -48,14 +48,14 @@ class Form extends \Magento\Payment\Block\Form\Cc protected $_checkoutModel; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Authorizenet\Model\Directpost $model * @param \Magento\Checkout\Model\Type\Onepage $checkoutModel * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Authorizenet\Model\Directpost $model, \Magento\Checkout\Model\Type\Onepage $checkoutModel, diff --git a/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php b/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php index 001d9d8bb6a6e..4755e9a0a4a8a 100644 --- a/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php +++ b/app/code/Magento/Authorizenet/Block/Directpost/Iframe.php @@ -33,23 +33,23 @@ */ namespace Magento\Authorizenet\Block\Directpost; -class Iframe extends \Magento\View\Element\Template +class Iframe extends \Magento\Framework\View\Element\Template { /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** - * @param \Magento\View\Element\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\View\Element\Template\Context $context + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\View\Element\Template\Context $context, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; @@ -61,7 +61,7 @@ public function __construct( * * You can redefine this method in child classes for changing layout * - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php index f4488a33c6fd0..6aafb88564b82 100644 --- a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php @@ -30,19 +30,19 @@ class Payment extends \Magento\Sales\Controller\Adminhtml\Order\Create /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Catalog\Helper\Product $productHelper - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry */ public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Catalog\Helper\Product $productHelper, - \Magento\Registry $coreRegistry + \Magento\Framework\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; parent::__construct($context, $productHelper); @@ -150,7 +150,7 @@ public function placeAction() $result['success'] = 1; $isError = false; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $message = $e->getMessage(); if (!empty($message)) { $this->messageManager->addError($message); diff --git a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Payment.php b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Payment.php index a20c0951ae06a..cbba17f3a4d65 100644 --- a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Payment.php @@ -77,11 +77,11 @@ public function cancelAction() )->getPaymentMethodsHtml( $this->_view ); - } catch (\Magento\Model\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + } catch (\Magento\Framework\Model\Exception $e) { + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $result['error_message'] = $e->getMessage(); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $result['error_message'] = __('Something went wrong canceling the transactions.'); } diff --git a/app/code/Magento/Authorizenet/Controller/Authorizenet/Payment.php b/app/code/Magento/Authorizenet/Controller/Authorizenet/Payment.php index 2908cd736e3e5..1d2ee938deb77 100644 --- a/app/code/Magento/Authorizenet/Controller/Authorizenet/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Authorizenet/Payment.php @@ -67,11 +67,11 @@ public function cancelAction() )->getPaymentMethodsHtml( $this->_view ); - } catch (\Magento\Model\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + } catch (\Magento\Framework\Model\Exception $e) { + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $result['error_message'] = $e->getMessage(); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $result['error_message'] = __( 'There was an error canceling transactions. Please contact us or try again later.' ); diff --git a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php index cd5def51762e2..5f57d7ce23185 100644 --- a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php +++ b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php @@ -35,15 +35,15 @@ class Payment extends \Magento\Framework\App\Action\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry */ - public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Registry $coreRegistry) + public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry) { $this->_coreRegistry = $coreRegistry; parent::__construct($context); @@ -114,12 +114,12 @@ protected function _responseAction(\Magento\Authorizenet\Helper\HelperInterface } $paymentMethod->process($data); $result['success'] = 1; - } catch (\Magento\Model\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + } catch (\Magento\Framework\Model\Exception $e) { + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $result['success'] = 0; $result['error_msg'] = $e->getMessage(); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $result['success'] = 0; $result['error_msg'] = __('We couldn\'t process your order right now. Please try again later.'); } diff --git a/app/code/Magento/Authorizenet/Helper/Backend.php b/app/code/Magento/Authorizenet/Helper/Backend.php index c1f0be73c5961..55949a0fa6044 100644 --- a/app/code/Magento/Authorizenet/Helper/Backend.php +++ b/app/code/Magento/Authorizenet/Helper/Backend.php @@ -103,7 +103,7 @@ public function getRedirectIframeUrl($params) public function getRelyUrl($storeId = null) { return $this->_storeManager->getDefaultStoreView()->getBaseUrl( - \Magento\UrlInterface::URL_TYPE_LINK + \Magento\Framework\UrlInterface::URL_TYPE_LINK ) . 'authorizenet/directpost_payment/backendResponse'; } } diff --git a/app/code/Magento/Authorizenet/Helper/Data.php b/app/code/Magento/Authorizenet/Helper/Data.php index 3e355a4108297..3dbad268adf04 100644 --- a/app/code/Magento/Authorizenet/Helper/Data.php +++ b/app/code/Magento/Authorizenet/Helper/Data.php @@ -64,7 +64,7 @@ public function __construct( */ protected function _getUrl($route, $params = array()) { - $params['_type'] = \Magento\UrlInterface::URL_TYPE_LINK; + $params['_type'] = \Magento\Framework\UrlInterface::URL_TYPE_LINK; if (isset($params['is_secure'])) { $params['_secure'] = (bool)$params['is_secure']; } elseif ($this->_storeManager->getStore()->isCurrentlySecure()) { @@ -196,7 +196,7 @@ public function convertMessagesToMessage($messages) * @param \Magento\Payment\Model\Info $payment * @param string $requestType * @param string $lastTransactionId - * @param \Magento\Object $card + * @param \Magento\Framework\Object $card * @param bool|float $amount * @param bool|string $exception * @return bool|string @@ -225,7 +225,7 @@ public function getTransactionMessage( * @param \Magento\Payment\Model\Info $payment * @param string $requestType * @param string $lastTransactionId - * @param \Magento\Object $card + * @param \Magento\Framework\Object $card * @param bool|float $amount * @param bool|string $exception * @param bool|string $additionalMessage @@ -339,7 +339,7 @@ public function getRelyUrl($storeId = null) return $this->_storeManager->getStore( $storeId )->getBaseUrl( - \Magento\UrlInterface::URL_TYPE_LINK + \Magento\Framework\UrlInterface::URL_TYPE_LINK ) . 'authorizenet/directpost_payment/response'; } } diff --git a/app/code/Magento/Authorizenet/Model/Authorizenet.php b/app/code/Magento/Authorizenet/Model/Authorizenet.php index 0385f47a5e5cd..cf5b2a3bf553d 100644 --- a/app/code/Magento/Authorizenet/Model/Authorizenet.php +++ b/app/code/Magento/Authorizenet/Model/Authorizenet.php @@ -279,7 +279,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc /** * Session * - * @var \Magento\Session\SessionManagerInterface + * @var \Magento\Framework\Session\SessionManagerInterface */ protected $_session; @@ -312,38 +312,38 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc protected $_cardsFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Logger $logger - * @param \Magento\Module\ModuleListInterface $moduleList - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService * @param \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory * @param \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory * @param \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory - * @param \Magento\Session\SessionManagerInterface $session + * @param \Magento\Framework\Session\SessionManagerInterface $session * @param \Magento\Authorizenet\Helper\Data $authorizenetData * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Logger $logger, - \Magento\Module\ModuleListInterface $moduleList, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Module\ModuleListInterface $moduleList, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory, \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory, \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory, \Magento\Sales\Model\OrderFactory $orderFactory, - \Magento\Session\SessionManagerInterface $session, + \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Authorizenet\Helper\Data $authorizenetData, array $data = array() ) { @@ -447,10 +447,10 @@ public function canRefund() /** * Check void availability * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return bool */ - public function canVoid(\Magento\Object $payment) + public function canVoid(\Magento\Framework\Object $payment) { if ($this->_isGatewayActionsLocked($this->getInfoInstance())) { return false; @@ -497,12 +497,12 @@ public function unsetPartialAuthorizationLastActionState() * @param \Magento\Payment\Model\Info $payment * @param float $amount * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function authorize(\Magento\Object $payment, $amount) + public function authorize(\Magento\Framework\Object $payment, $amount) { if ($amount <= 0) { - throw new \Magento\Model\Exception(__('This is an invalid amount for authorization.')); + throw new \Magento\Framework\Model\Exception(__('This is an invalid amount for authorization.')); } $this->_initCardsStorage($payment); @@ -524,12 +524,12 @@ public function authorize(\Magento\Object $payment, $amount) * @param \Magento\Payment\Model\Info $payment * @param float $amount * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { if ($amount <= 0) { - throw new \Magento\Model\Exception(__('This is an invalid amount for capture.')); + throw new \Magento\Framework\Model\Exception(__('This is an invalid amount for capture.')); } $this->_initCardsStorage($payment); if ($this->_isPreauthorizeCapture($payment)) { @@ -549,7 +549,7 @@ public function capture(\Magento\Object $payment, $amount) * @param \Magento\Payment\Model\Info $payment * @return $this */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { $cardsStorage = $this->getCardsStorage($payment); @@ -583,7 +583,7 @@ public function void(\Magento\Object $payment) * @param \Magento\Payment\Model\Info $payment * @return $this */ - public function cancel(\Magento\Object $payment) + public function cancel(\Magento\Framework\Object $payment) { return $this->void($payment); } @@ -594,9 +594,9 @@ public function cancel(\Magento\Object $payment) * @param \Magento\Payment\Model\Info $payment * @param float $requestedAmount * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function refund(\Magento\Object $payment, $requestedAmount) + public function refund(\Magento\Framework\Object $payment, $requestedAmount) { $cardsStorage = $this->getCardsStorage($payment); @@ -604,7 +604,7 @@ public function refund(\Magento\Object $payment, $requestedAmount) $cardsStorage->getCapturedAmount() - $cardsStorage->getRefundedAmount() ) < $requestedAmount ) { - throw new \Magento\Model\Exception(__('This is an invalid amount for refund.')); + throw new \Magento\Framework\Model\Exception(__('This is an invalid amount for refund.')); } $messages = array(); @@ -650,12 +650,12 @@ public function refund(\Magento\Object $payment, $requestedAmount) * * @param \Magento\Payment\Model\Info $payment * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function cancelPartialAuthorization(\Magento\Payment\Model\Info $payment) { if (!$payment->getAdditionalInformation($this->_splitTenderIdKey)) { - throw new \Magento\Model\Exception(__('This is an invalid split tenderId ID.')); + throw new \Magento\Framework\Model\Exception(__('This is an invalid split tenderId ID.')); } $request = $this->_getRequest(); @@ -672,7 +672,7 @@ public function cancelPartialAuthorization(\Magento\Payment\Model\Info $payment) $this->setPartialAuthorizationLastActionState(self::PARTIAL_AUTH_ALL_CANCELED); return; default: - throw new \Magento\Model\Exception(__('Something went wrong while canceling the payment.')); + throw new \Magento\Framework\Model\Exception(__('Something went wrong while canceling the payment.')); } } @@ -683,7 +683,7 @@ public function cancelPartialAuthorization(\Magento\Payment\Model\Info $payment) * @param float $amount * @param string $requestType * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _place($payment, $amount, $requestType) { @@ -762,12 +762,12 @@ protected function _place($payment, $amount, $requestType) return $this; } } - throw new \Magento\Model\Exception($defaultExceptionMessage); + throw new \Magento\Framework\Model\Exception($defaultExceptionMessage); case self::RESPONSE_CODE_DECLINED: case self::RESPONSE_CODE_ERROR: - throw new \Magento\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); default: - throw new \Magento\Model\Exception($defaultExceptionMessage); + throw new \Magento\Framework\Model\Exception($defaultExceptionMessage); } return $this; } @@ -780,7 +780,7 @@ protected function _place($payment, $amount, $requestType) * @param string $requestType * @return $this * @throws \Magento\Payment\Model\Info\Exception - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _partialAuthorization($payment, $amount, $requestType) { @@ -811,7 +811,7 @@ protected function _partialAuthorization($payment, $amount, $requestType) $amount = $amount - $this->getCardsStorage()->getProcessedAmount(); if ($amount <= 0) { - throw new \Magento\Model\Exception(__('This is an invalid amount for partial authorization.')); + throw new \Magento\Framework\Model\Exception(__('This is an invalid amount for partial authorization.')); } $payment->setAmount($amount); $request = $this->_buildRequest($payment); @@ -879,7 +879,7 @@ protected function _isPreauthorizeCapture($payment) * @param \Magento\Payment\Model\Info $payment * @param float $requestedAmount * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _preauthorizeCapture($payment, $requestedAmount) { @@ -889,7 +889,7 @@ protected function _preauthorizeCapture($payment, $requestedAmount) $cardsStorage->getProcessedAmount() - $cardsStorage->getCapturedAmount() ) < $requestedAmount ) { - throw new \Magento\Model\Exception(__('This is an invalid amount for capture.')); + throw new \Magento\Framework\Model\Exception(__('This is an invalid amount for capture.')); } $messages = array(); @@ -931,9 +931,9 @@ protected function _preauthorizeCapture($payment, $requestedAmount) * * @param \Magento\Payment\Model\Info $payment * @param float $amount - * @param \Magento\Object $card + * @param \Magento\Framework\Object $card * @return \Magento\Sales\Model\Order\Payment\Transaction - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _preauthorizeCaptureCardTransaction($payment, $amount, $card) { @@ -988,16 +988,16 @@ protected function _preauthorizeCaptureCardTransaction($payment, $amount, $card) $amount, $exceptionMessage ); - throw new \Magento\Model\Exception($exceptionMessage); + throw new \Magento\Framework\Model\Exception($exceptionMessage); } /** * Void the card transaction through gateway * * @param \Magento\Payment\Model\Info $payment - * @param \Magento\Object $card + * @param \Magento\Framework\Object $card * @return \Magento\Sales\Model\Order\Payment\Transaction - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _voidCardTransaction($payment, $card) { @@ -1080,7 +1080,7 @@ protected function _voidCardTransaction($payment, $card) false, $exceptionMessage ); - throw new \Magento\Model\Exception($exceptionMessage); + throw new \Magento\Framework\Model\Exception($exceptionMessage); } /** @@ -1100,9 +1100,9 @@ protected function _isTransactionExpired($realAuthTransactionId) * * @param \Magento\Payment\Model\Info $payment * @param float $amount - * @param \Magento\Object $card + * @param \Magento\Framework\Object $card * @return \Magento\Sales\Model\Order\Payment\Transaction - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _refundCardTransaction($payment, $amount, $card) { @@ -1173,7 +1173,7 @@ protected function _refundCardTransaction($payment, $amount, $card) $amount, $exceptionMessage ); - throw new \Magento\Model\Exception($exceptionMessage); + throw new \Magento\Framework\Model\Exception($exceptionMessage); } /** @@ -1280,7 +1280,7 @@ public function fetchTransactionInfo(\Magento\Payment\Model\Info $payment, $tran /** * Set split_tender_id to quote payment if needed * - * @param \Magento\Object $response + * @param \Magento\Framework\Object $response * @param float $orderPayment * @throws \Magento\Payment\Model\Info\Exception * @return bool @@ -1371,11 +1371,11 @@ protected function _getRequest() /** * Prepare request to gateway * - * @param \Magento\Object|\Magento\Payment\Model\Info $payment + * @param \Magento\Framework\Object|\Magento\Payment\Model\Info $payment * @return \Magento\Authorizenet\Model\Authorizenet\Request * @link http://www.authorize.net/support/AIM_guide.pdf */ - protected function _buildRequest(\Magento\Object $payment) + protected function _buildRequest(\Magento\Framework\Object $payment) { $order = $payment->getOrder(); @@ -1426,7 +1426,7 @@ protected function _buildRequest(\Magento\Object $payment) if ($this->getIsCentinelValidationEnabled()) { $params = $this->getCentinelValidator()->exportCmpiData(array()); - $request = \Magento\Object\Mapper::accumulateByMap($params, $request, $this->_centinelFieldMap); + $request = \Magento\Framework\Object\Mapper::accumulateByMap($params, $request, $this->_centinelFieldMap); } if (!empty($order)) { @@ -1515,15 +1515,15 @@ protected function _buildRequest(\Magento\Object $payment) * * @param \Magento\Authorizenet\Model\Authorizenet\Request $request * @return \Magento\Authorizenet\Model\Authorizenet\Result - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - protected function _postRequest(\Magento\Object $request) + protected function _postRequest(\Magento\Framework\Object $request) { $debugData = array('request' => $request->getData()); $result = $this->_resultFactory->create(); - $client = new \Magento\HTTP\ZendClient(); + $client = new \Magento\Framework\HTTP\ZendClient(); $uri = $this->getConfigData('cgi_url'); $client->setUri($uri ? $uri : self::CGI_URL); @@ -1549,7 +1549,7 @@ protected function _postRequest(\Magento\Object $request) $debugData['result'] = $result->getData(); $this->_debug($debugData); - throw new \Magento\Model\Exception($this->_wrapGatewayError($e->getMessage())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($e->getMessage())); } $responseBody = $response->getBody(); @@ -1601,7 +1601,7 @@ protected function _postRequest(\Magento\Object $request) $r[54] ); } else { - throw new \Magento\Model\Exception(__('Something went wrong in the payment gateway.')); + throw new \Magento\Framework\Model\Exception(__('Something went wrong in the payment gateway.')); } $debugData['result'] = $result->getData(); @@ -1624,11 +1624,11 @@ protected function _wrapGatewayError($text) /** * It sets card`s data into additional information of payment model * - * @param \Magento\Object $response + * @param \Magento\Framework\Object $response * @param \Magento\Sales\Model\Order\Payment $payment * @return string */ - protected function _registerCard(\Magento\Object $response, \Magento\Sales\Model\Order\Payment $payment) + protected function _registerCard(\Magento\Framework\Object $response, \Magento\Sales\Model\Order\Payment $payment) { $cardsStorage = $this->getCardsStorage($payment); $card = $cardsStorage->registerCard(); @@ -1768,7 +1768,7 @@ protected function _isGatewayActionsLocked($payment) * @param string $messages * @param bool $isSuccessfulTransactions * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _processFailureMultitransactionAction($payment, $messages, $isSuccessfulTransactions) { @@ -1792,17 +1792,17 @@ protected function _processFailureMultitransactionAction($payment, $messages, $i } $copyOrder->save(); } - throw new \Magento\Model\Exception($this->_authorizenetData->convertMessagesToMessage($messages)); + throw new \Magento\Framework\Model\Exception($this->_authorizenetData->convertMessagesToMessage($messages)); } /** * Generate checksum for object * - * @param \Magento\Object $object + * @param \Magento\Framework\Object $object * @param array $checkSumDataKeys * @return string */ - protected function _generateChecksum(\Magento\Object $object, $checkSumDataKeys = array()) + protected function _generateChecksum(\Magento\Framework\Object $object, $checkSumDataKeys = array()) { $data = array(); foreach ($checkSumDataKeys as $dataKey) { @@ -1816,8 +1816,8 @@ protected function _generateChecksum(\Magento\Object $object, $checkSumDataKeys * This function returns full transaction details for a specified transaction ID. * * @param string $transactionId - * @return \Magento\Object - * @throws \Magento\Model\Exception + * @return \Magento\Framework\Object + * @throws \Magento\Framework\Model\Exception * @link http://www.authorize.net/support/ReportingGuide_XML.pdf * @link http://developer.authorize.net/api/transaction_details/ */ @@ -1834,7 +1834,7 @@ protected function _getTransactionDetails($transactionId) $transactionId ); - $client = new \Magento\HTTP\ZendClient(); + $client = new \Magento\Framework\HTTP\ZendClient(); $uri = $this->getConfigData('cgi_url_td'); $client->setUri($uri ? $uri : self::CGI_URL_TD); $client->setConfig(array('timeout' => 45)); @@ -1849,13 +1849,13 @@ protected function _getTransactionDetails($transactionId) $debugData['result'] = $responseBody; $this->_debug($debugData); libxml_use_internal_errors(true); - $responseXmlDocument = new \Magento\Simplexml\Element($responseBody); + $responseXmlDocument = new \Magento\Framework\Simplexml\Element($responseBody); libxml_use_internal_errors(false); } catch (\Exception $e) { - throw new \Magento\Model\Exception(__('Payment updating error.')); + throw new \Magento\Framework\Model\Exception(__('Payment updating error.')); } - $response = new \Magento\Object(); + $response = new \Magento\Framework\Object(); $response->setResponseCode( (string)$responseXmlDocument->transaction->responseCode )->setResponseReasonCode( diff --git a/app/code/Magento/Authorizenet/Model/Authorizenet/Cards.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Cards.php index 5360492c3405d..e2d906ec8effc 100644 --- a/app/code/Magento/Authorizenet/Model/Authorizenet/Cards.php +++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Cards.php @@ -103,7 +103,7 @@ public function registerCard($cardInfo = array()) /** * Save data from card object in cards storage * - * @param \Magento\Object $card + * @param \Magento\Framework\Object $card * @return $this */ public function updateCard($card) @@ -120,12 +120,12 @@ public function updateCard($card) * Retrieve card by ID * * @param string $cardId - * @return \Magento\Object|false + * @return \Magento\Framework\Object|false */ public function getCard($cardId) { if (isset($this->_cards[$cardId])) { - $card = new \Magento\Object($this->_cards[$cardId]); + $card = new \Magento\Framework\Object($this->_cards[$cardId]); return $card; } return false; diff --git a/app/code/Magento/Authorizenet/Model/Authorizenet/Debug.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Debug.php index 965176635c043..a4d167309db92 100644 --- a/app/code/Magento/Authorizenet/Model/Authorizenet/Debug.php +++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Debug.php @@ -43,7 +43,7 @@ * * @author Magento Core Team */ -class Debug extends \Magento\Model\AbstractModel +class Debug extends \Magento\Framework\Model\AbstractModel { /** * @return void diff --git a/app/code/Magento/Authorizenet/Model/Authorizenet/Request.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Request.php index 0347d6b927e26..e4143da62f2b8 100644 --- a/app/code/Magento/Authorizenet/Model/Authorizenet/Request.php +++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Request.php @@ -25,6 +25,6 @@ */ namespace Magento\Authorizenet\Model\Authorizenet; -class Request extends \Magento\Object +class Request extends \Magento\Framework\Object { } diff --git a/app/code/Magento/Authorizenet/Model/Authorizenet/Result.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Result.php index 650b1f31e9b37..c0c7815c5e6ff 100644 --- a/app/code/Magento/Authorizenet/Model/Authorizenet/Result.php +++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Result.php @@ -25,6 +25,6 @@ */ namespace Magento\Authorizenet\Model\Authorizenet; -class Result extends \Magento\Object +class Result extends \Magento\Framework\Object { } diff --git a/app/code/Magento/Authorizenet/Model/Authorizenet/Source/PaymentAction.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Source/PaymentAction.php index 4be1b29f1d639..592302a312505 100644 --- a/app/code/Magento/Authorizenet/Model/Authorizenet/Source/PaymentAction.php +++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Source/PaymentAction.php @@ -31,7 +31,7 @@ * * @author Magento Core Team */ -class PaymentAction implements \Magento\Option\ArrayInterface +class PaymentAction implements \Magento\Framework\Option\ArrayInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php index b2a35abe9ec9a..ef24c34cdb2df 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost.php +++ b/app/code/Magento/Authorizenet/Model/Directpost.php @@ -91,19 +91,19 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet protected $_helper; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Logger $logger - * @param \Magento\Module\ModuleListInterface $moduleList - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService * @param \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory * @param \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory * @param \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory - * @param \Magento\Session\SessionManagerInterface $session + * @param \Magento\Framework\Session\SessionManagerInterface $session * @param \Magento\Authorizenet\Helper\Data $authorizenetData * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\QuoteFactory $quoteFactory @@ -115,19 +115,19 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Logger $logger, - \Magento\Module\ModuleListInterface $moduleList, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Module\ModuleListInterface $moduleList, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory, \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory, \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory, \Magento\Sales\Model\OrderFactory $orderFactory, - \Magento\Session\SessionManagerInterface $session, + \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Authorizenet\Helper\Data $authorizenetData, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\QuoteFactory $quoteFactory, @@ -173,11 +173,11 @@ public function validate() /** * Send authorize request to gateway * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return void */ - public function authorize(\Magento\Object $payment, $amount) + public function authorize(\Magento\Framework\Object $payment, $amount) { $payment->setAdditionalInformation('payment_type', $this->getConfigData('payment_action')); } @@ -185,15 +185,15 @@ public function authorize(\Magento\Object $payment, $amount) /** * Send capture request to gateway * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { if ($amount <= 0) { - throw new \Magento\Model\Exception(__('Invalid amount for capture.')); + throw new \Magento\Framework\Model\Exception(__('Invalid amount for capture.')); } $payment->setAmount($amount); @@ -224,12 +224,12 @@ public function capture(\Magento\Object $payment, $amount) ); return $this; } - throw new \Magento\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); case self::RESPONSE_CODE_DECLINED: case self::RESPONSE_CODE_ERROR: - throw new \Magento\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); default: - throw new \Magento\Model\Exception(__('Payment capturing error.')); + throw new \Magento\Framework\Model\Exception(__('Payment capturing error.')); } } @@ -246,10 +246,10 @@ public function canRefund() /** * Check void availability * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return bool */ - public function canVoid(\Magento\Object $payment) + public function canVoid(\Magento\Framework\Object $payment) { return $this->_canVoid; } @@ -257,14 +257,14 @@ public function canVoid(\Magento\Object $payment) /** * Void the payment through gateway * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { if (!$payment->getParentTransactionId()) { - throw new \Magento\Model\Exception(__('Invalid transaction ID.')); + throw new \Magento\Framework\Model\Exception(__('Invalid transaction ID.')); } $payment->setAnetTransType(self::REQUEST_TYPE_VOID); @@ -289,12 +289,12 @@ public function void(\Magento\Object $payment) ); return $this; } - throw new \Magento\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); case self::RESPONSE_CODE_DECLINED: case self::RESPONSE_CODE_ERROR: - throw new \Magento\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); default: - throw new \Magento\Model\Exception(__('Payment voiding error.')); + throw new \Magento\Framework\Model\Exception(__('Payment voiding error.')); } } @@ -324,12 +324,12 @@ public function processCreditmemo($creditmemo, $payment) * Refund the amount * Need to decode last 4 digits for request. * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return $this * @throws \Exception */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { $last4 = $payment->getCcLast4(); $payment->setCcLast4($payment->decrypt($last4)); @@ -346,19 +346,19 @@ public function refund(\Magento\Object $payment, $amount) /** * Refund the amount with transaction id * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - protected function _refund(\Magento\Object $payment, $amount) + protected function _refund(\Magento\Framework\Object $payment, $amount) { if ($amount <= 0) { - throw new \Magento\Model\Exception(__('Invalid amount for refund.')); + throw new \Magento\Framework\Model\Exception(__('Invalid amount for refund.')); } if (!$payment->getParentTransactionId()) { - throw new \Magento\Model\Exception(__('Invalid transaction ID.')); + throw new \Magento\Framework\Model\Exception(__('Invalid transaction ID.')); } $payment->setAnetTransType(self::REQUEST_TYPE_CREDIT); @@ -385,12 +385,12 @@ protected function _refund(\Magento\Object $payment, $amount) ); return $this; } - throw new \Magento\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); case self::RESPONSE_CODE_DECLINED: case self::RESPONSE_CODE_ERROR: - throw new \Magento\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); + throw new \Magento\Framework\Model\Exception($this->_wrapGatewayError($result->getResponseReasonText())); default: - throw new \Magento\Model\Exception(__('Payment refunding error.')); + throw new \Magento\Framework\Model\Exception(__('Payment refunding error.')); } } @@ -433,7 +433,7 @@ public function getResponse() * Instantiate state and set it to state object * * @param string $paymentAction - * @param \Magento\Object $stateObject + * @param \Magento\Framework\Object $stateObject * @return void */ public function initialize($paymentAction, $stateObject) @@ -495,7 +495,7 @@ public function setResponseData(array $postData) * Validate response data. Needed in controllers. * * @return bool true in case of validation success. - * @throws \Magento\Model\Exception In case of validation error + * @throws \Magento\Framework\Model\Exception In case of validation error */ public function validateResponse() { @@ -510,7 +510,7 @@ public function validateResponse() $this->getConfigData('login') ) ) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('The transaction was declined because the response hash validation failed.') ); } @@ -522,7 +522,7 @@ public function validateResponse() * * @param array $responseData data from Authorize.net from $_POST * @return void - * @throws \Magento\Model\Exception In case of validation error or order creation error + * @throws \Magento\Framework\Model\Exception In case of validation error or order creation error */ public function process(array $responseData) { @@ -546,7 +546,7 @@ public function process(array $responseData) //check payment method $payment = $order->getPayment(); if (!$payment || $payment->getMethod() != $this->getCode()) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('This payment didn\'t work out because we can\'t find this order.') ); } @@ -561,7 +561,7 @@ public function process(array $responseData) } if ($isError) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( $responseText && !$response->isApproved() ? $responseText : __( 'This payment didn\'t work out because we can\'t find this order.' ) @@ -572,10 +572,10 @@ public function process(array $responseData) /** * Fill payment with credit card data from response from Authorize.net. * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return void */ - protected function _fillPaymentByResponse(\Magento\Object $payment) + protected function _fillPaymentByResponse(\Magento\Framework\Object $payment) { $response = $this->getResponse(); $payment->setTransactionId( @@ -602,7 +602,7 @@ protected function _fillPaymentByResponse(\Magento\Object $payment) * Check response code came from Authorize.net. * * @return true in case of Approved response - * @throws \Magento\Model\Exception In case of Declined or Error response from Authorize.net + * @throws \Magento\Framework\Model\Exception In case of Declined or Error response from Authorize.net */ public function checkResponseCode() { @@ -611,11 +611,11 @@ public function checkResponseCode() return true; case self::RESPONSE_CODE_DECLINED: case self::RESPONSE_CODE_ERROR: - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( $this->_wrapGatewayError($this->getResponse()->getXResponseReasonText()) ); default: - throw new \Magento\Model\Exception(__('There was a payment authorization error.')); + throw new \Magento\Framework\Model\Exception(__('There was a payment authorization error.')); } } @@ -623,12 +623,12 @@ public function checkResponseCode() * Check transaction id came from Authorize.net * * @return true in case of right transaction id - * @throws \Magento\Model\Exception In case of bad transaction id. + * @throws \Magento\Framework\Model\Exception In case of bad transaction id. */ public function checkTransId() { if (!$this->getResponse()->getXTransId()) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('This payment was not authorized because the transaction ID field is empty.') ); } @@ -652,7 +652,7 @@ protected function _matchAmount($amount) * * @param \Magento\Sales\Model\Order $order * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @throws \Exception */ protected function _authOrder(\Magento\Sales\Model\Order $order) @@ -697,7 +697,7 @@ protected function _authOrder(\Magento\Sales\Model\Order $order) 'Something went wrong: the paid amount doesn\'t match the order amount. Please correct this and try again.' ); $this->_declineOrder($order, $message, true); - throw new \Magento\Model\Exception($message); + throw new \Magento\Framework\Model\Exception($message); } //capture order using AIM if needed diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php index 286c3c29981a4..88f9f912c655d 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php @@ -35,7 +35,7 @@ class Observer /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -71,7 +71,7 @@ class Observer /** * @param \Magento\Authorizenet\Helper\Data $authorizenetData * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Authorizenet\Model\Directpost $payment * @param \Magento\Authorizenet\Model\Directpost\Session $session * @param \Magento\Store\Model\StoreManagerInterface $storeManager @@ -79,7 +79,7 @@ class Observer public function __construct( \Magento\Authorizenet\Helper\Data $authorizenetData, \Magento\Core\Helper\Data $coreData, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Authorizenet\Model\Directpost $payment, \Magento\Authorizenet\Model\Directpost\Session $session, \Magento\Store\Model\StoreManagerInterface $storeManager @@ -95,10 +95,10 @@ public function __construct( /** * Save order into registry to use it in the overloaded controller. * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function saveOrderAfterSubmit(\Magento\Event\Observer $observer) + public function saveOrderAfterSubmit(\Magento\Framework\Event\Observer $observer) { /* @var $order \Magento\Sales\Model\Order */ $order = $observer->getEvent()->getData('order'); @@ -110,10 +110,10 @@ public function saveOrderAfterSubmit(\Magento\Event\Observer $observer) /** * Set data for response of frontend saveOrder action * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function addAdditionalFieldsToResponseFrontend(\Magento\Event\Observer $observer) + public function addAdditionalFieldsToResponseFrontend(\Magento\Framework\Event\Observer $observer) { /* @var $order \Magento\Sales\Model\Order */ $order = $this->_coreRegistry->registry('directpost_order'); @@ -151,10 +151,10 @@ public function addAdditionalFieldsToResponseFrontend(\Magento\Event\Observer $o * Update all edit increments for all orders if module is enabled. * Needed for correct work of edit orders in Admin area. * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function updateAllEditIncrements(\Magento\Event\Observer $observer) + public function updateAllEditIncrements(\Magento\Framework\Event\Observer $observer) { /* @var $order \Magento\Sales\Model\Order */ $order = $observer->getEvent()->getData('order'); diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Request.php b/app/code/Magento/Authorizenet/Model/Directpost/Request.php index 7acea50c73e52..de2e9c36a5e97 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Request.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Request.php @@ -30,7 +30,7 @@ * * @author Magento Core Team */ -class Request extends \Magento\Object +class Request extends \Magento\Framework\Object { /** * @var string diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Response.php b/app/code/Magento/Authorizenet/Model/Directpost/Response.php index 19ee7b58cd940..950344d492c8d 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Response.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Response.php @@ -33,7 +33,7 @@ */ namespace Magento\Authorizenet\Model\Directpost; -class Response extends \Magento\Object +class Response extends \Magento\Framework\Object { /** * Generates an Md5 hash to compare against AuthNet's. diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Session.php b/app/code/Magento/Authorizenet/Model/Directpost/Session.php index 6eed4fc8d5947..ce3f865e637de 100644 --- a/app/code/Magento/Authorizenet/Model/Directpost/Session.php +++ b/app/code/Magento/Authorizenet/Model/Directpost/Session.php @@ -28,25 +28,25 @@ /** * Authorize.net DirectPost session model */ -class Session extends \Magento\Session\SessionManager +class Session extends \Magento\Framework\Session\SessionManager { /** * @param \Magento\Framework\App\Request\Http $request - * @param \Magento\Session\SidResolverInterface $sidResolver - * @param \Magento\Session\Config\ConfigInterface $sessionConfig - * @param \Magento\Session\SaveHandlerInterface $saveHandler - * @param \Magento\Session\ValidatorInterface $validator - * @param \Magento\Session\StorageInterface $storage + * @param \Magento\Framework\Session\SidResolverInterface $sidResolver + * @param \Magento\Framework\Session\Config\ConfigInterface $sessionConfig + * @param \Magento\Framework\Session\SaveHandlerInterface $saveHandler + * @param \Magento\Framework\Session\ValidatorInterface $validator + * @param \Magento\Framework\Session\StorageInterface $storage * @param string|null $sessionName * @internal param array $data */ public function __construct( \Magento\Framework\App\Request\Http $request, - \Magento\Session\SidResolverInterface $sidResolver, - \Magento\Session\Config\ConfigInterface $sessionConfig, - \Magento\Session\SaveHandlerInterface $saveHandler, - \Magento\Session\ValidatorInterface $validator, - \Magento\Session\StorageInterface $storage, + \Magento\Framework\Session\SidResolverInterface $sidResolver, + \Magento\Framework\Session\Config\ConfigInterface $sessionConfig, + \Magento\Framework\Session\SaveHandlerInterface $saveHandler, + \Magento\Framework\Session\ValidatorInterface $validator, + \Magento\Framework\Session\StorageInterface $storage, $sessionName = null ) { parent::__construct($request, $sidResolver, $sessionConfig, $saveHandler, $validator, $storage); diff --git a/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug.php b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug.php index 7dffdead4a0ae..266e6f87cdae6 100644 --- a/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug.php +++ b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug.php @@ -30,7 +30,7 @@ * * @author Magento Core Team */ -class Debug extends \Magento\Model\Resource\Db\AbstractDb +class Debug extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Resource initialization diff --git a/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug/Collection.php b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug/Collection.php index 4949b62de7251..ba7c71346a7ac 100644 --- a/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug/Collection.php +++ b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug/Collection.php @@ -30,7 +30,7 @@ * * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Resource initialization diff --git a/app/code/Magento/Authorizenet/etc/adminhtml/di.xml b/app/code/Magento/Authorizenet/etc/adminhtml/di.xml index e7fc537d0cdad..b8a76b965dc16 100644 --- a/app/code/Magento/Authorizenet/etc/adminhtml/di.xml +++ b/app/code/Magento/Authorizenet/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Authorizenet/etc/adminhtml/events.xml b/app/code/Magento/Authorizenet/etc/adminhtml/events.xml index d1c987e499c49..17f1a032802eb 100644 --- a/app/code/Magento/Authorizenet/etc/adminhtml/events.xml +++ b/app/code/Magento/Authorizenet/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Authorizenet/etc/di.xml b/app/code/Magento/Authorizenet/etc/di.xml index d0d85823945b5..fd9750860b71e 100644 --- a/app/code/Magento/Authorizenet/etc/di.xml +++ b/app/code/Magento/Authorizenet/etc/di.xml @@ -23,14 +23,14 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Magento\Authorizenet\Helper\Data\Proxy Magento\Core\Helper\Data\Proxy - + authorizenet_directpost diff --git a/app/code/Magento/Authorizenet/etc/frontend/di.xml b/app/code/Magento/Authorizenet/etc/frontend/di.xml index f8325394ecb8a..3ce29e15f3525 100644 --- a/app/code/Magento/Authorizenet/etc/frontend/di.xml +++ b/app/code/Magento/Authorizenet/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Authorizenet/etc/frontend/events.xml b/app/code/Magento/Authorizenet/etc/frontend/events.xml index 82c159abae327..2067922851c3b 100644 --- a/app/code/Magento/Authorizenet/etc/frontend/events.xml +++ b/app/code/Magento/Authorizenet/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Authorizenet/etc/module.xml b/app/code/Magento/Authorizenet/etc/module.xml index 2a1baabe9f32e..8a84f38001e92 100644 --- a/app/code/Magento/Authorizenet/etc/module.xml +++ b/app/code/Magento/Authorizenet/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Authz/Model/UserIdentifier/Factory.php b/app/code/Magento/Authz/Model/UserIdentifier/Factory.php index 378fe3df48e7f..906a7d5417991 100644 --- a/app/code/Magento/Authz/Model/UserIdentifier/Factory.php +++ b/app/code/Magento/Authz/Model/UserIdentifier/Factory.php @@ -23,7 +23,7 @@ */ namespace Magento\Authz\Model\UserIdentifier; -use Magento\ObjectManager; +use Magento\Framework\ObjectManager; use Magento\Authz\Model\UserIdentifier; /** @@ -32,7 +32,7 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; diff --git a/app/code/Magento/Authz/Service/AuthorizationV1.php b/app/code/Magento/Authz/Service/AuthorizationV1.php index a2c4a65b594f0..54e3214e36049 100644 --- a/app/code/Magento/Authz/Service/AuthorizationV1.php +++ b/app/code/Magento/Authz/Service/AuthorizationV1.php @@ -23,10 +23,10 @@ */ namespace Magento\Authz\Service; -use Magento\Acl\Builder as AclBuilder; -use Magento\Acl; +use Magento\Framework\Acl\Builder as AclBuilder; +use Magento\Framework\Acl; use Magento\Authz\Model\UserIdentifier; -use Magento\Logger; +use Magento\Framework\Logger; use Magento\Webapi\ServiceException as ServiceException; use Magento\Webapi\ServiceResourceNotFoundException; use Magento\User\Model\Resource\Role\CollectionFactory as RoleCollectionFactory; @@ -34,7 +34,7 @@ use Magento\User\Model\Role; use Magento\User\Model\RoleFactory; use Magento\User\Model\RulesFactory; -use Magento\Acl\RootResource as RootAclResource; +use Magento\Framework\Acl\RootResource as RootAclResource; /** * Authorization service. diff --git a/app/code/Magento/Authz/etc/adminhtml/di.xml b/app/code/Magento/Authz/etc/adminhtml/di.xml index 5c35b47b08a09..d9d626001b2fd 100644 --- a/app/code/Magento/Authz/etc/adminhtml/di.xml +++ b/app/code/Magento/Authz/etc/adminhtml/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Authz/etc/di.xml b/app/code/Magento/Authz/etc/di.xml index 8964164788d7e..0f91223ef3f88 100644 --- a/app/code/Magento/Authz/etc/di.xml +++ b/app/code/Magento/Authz/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Authz/etc/module.xml b/app/code/Magento/Authz/etc/module.xml index 9c997c43014d5..c3096891612a9 100644 --- a/app/code/Magento/Authz/etc/module.xml +++ b/app/code/Magento/Authz/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php index c68f927bc4b6c..9d0e54c66748b 100644 --- a/app/code/Magento/Backend/App/AbstractAction.php +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -67,7 +67,7 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action protected $_session; /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_authorization; @@ -82,7 +82,7 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action protected $_backendUrl; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -137,7 +137,7 @@ protected function _getSession() } /** - * @return \Magento\Message\ManagerInterface + * @return \Magento\Framework\Message\ManagerInterface */ protected function getMessageManager() { @@ -177,28 +177,28 @@ protected function _addBreadcrumb($label, $title, $link = null) } /** - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block * @return $this */ - protected function _addContent(\Magento\View\Element\AbstractBlock $block) + protected function _addContent(\Magento\Framework\View\Element\AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'content'); } /** - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block * @return $this */ - protected function _addLeft(\Magento\View\Element\AbstractBlock $block) + protected function _addLeft(\Magento\Framework\View\Element\AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'left'); } /** - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block * @return $this */ - protected function _addJs(\Magento\View\Element\AbstractBlock $block) + protected function _addJs(\Magento\Framework\View\Element\AbstractBlock $block) { return $this->_moveBlockToContainer($block, 'js'); } @@ -208,11 +208,11 @@ protected function _addJs(\Magento\View\Element\AbstractBlock $block) * * The block will be moved to the container from previous parent after all other elements * - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block * @param string $containerName * @return $this */ - private function _moveBlockToContainer(\Magento\View\Element\AbstractBlock $block, $containerName) + private function _moveBlockToContainer(\Magento\Framework\View\Element\AbstractBlock $block, $containerName) { $this->_view->getLayout()->setChild($containerName, $block->getNameInLayout(), ''); return $this; @@ -306,7 +306,7 @@ public function _processUrlKeys() protected function _processLocaleSettings() { $forceLocale = $this->getRequest()->getParam('locale', null); - if ($this->_objectManager->get('Magento\Locale\Validator')->isValid($forceLocale)) { + if ($this->_objectManager->get('Magento\Framework\Locale\Validator')->isValid($forceLocale)) { $this->_getSession()->setSessionLocale($forceLocale); } diff --git a/app/code/Magento/Backend/App/Action/Context.php b/app/code/Magento/Backend/App/Action/Context.php index fad7d173587e1..60fbb63d81704 100644 --- a/app/code/Magento/Backend/App/Action/Context.php +++ b/app/code/Magento/Backend/App/Action/Context.php @@ -31,7 +31,7 @@ class Context extends \Magento\Framework\App\Action\Context { /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_authorization; @@ -71,48 +71,48 @@ class Context extends \Magento\Framework\App\Action\Context protected $_session; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; /** * @param \Magento\Framework\App\RequestInterface $request * @param \Magento\Framework\App\ResponseInterface $response - * @param \Magento\ObjectManager $objectManager - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\UrlInterface $url + * @param \Magento\Framework\ObjectManager $objectManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Framework\UrlInterface $url * @param \Magento\Framework\App\Response\RedirectInterface $redirect * @param \Magento\Framework\App\ActionFlag $actionFlag * @param \Magento\Framework\App\ViewInterface $view - * @param \Magento\Message\ManagerInterface $messageManager + * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Backend\Model\Session $session - * @param \Magento\AuthorizationInterface $authorization + * @param \Magento\Framework\AuthorizationInterface $authorization * @param \Magento\Backend\Model\Auth $auth * @param \Magento\Backend\Helper\Data $helper * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator * @param \Magento\Framework\App\Action\Title $title - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param bool $canUseBaseUrl */ public function __construct( \Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\ResponseInterface $response, - \Magento\ObjectManager $objectManager, - \Magento\Event\ManagerInterface $eventManager, - \Magento\UrlInterface $url, + \Magento\Framework\ObjectManager $objectManager, + \Magento\Framework\Event\ManagerInterface $eventManager, + \Magento\Framework\UrlInterface $url, \Magento\Framework\App\Response\RedirectInterface $redirect, \Magento\Framework\App\ActionFlag $actionFlag, \Magento\Framework\App\ViewInterface $view, - \Magento\Message\ManagerInterface $messageManager, + \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Backend\Model\Session $session, - \Magento\AuthorizationInterface $authorization, + \Magento\Framework\AuthorizationInterface $authorization, \Magento\Backend\Model\Auth $auth, \Magento\Backend\Helper\Data $helper, \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, \Magento\Framework\App\Action\Title $title, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, $canUseBaseUrl = false ) { parent::__construct( @@ -147,7 +147,7 @@ public function getAuth() } /** - * @return \Magento\AuthorizationInterface + * @return \Magento\Framework\AuthorizationInterface */ public function getAuthorization() { @@ -187,7 +187,7 @@ public function getHelper() } /** - * @return \Magento\Locale\ResolverInterface + * @return \Magento\Framework\Locale\ResolverInterface */ public function getLocaleResolver() { diff --git a/app/code/Magento/Backend/App/Action/Plugin/Authentication.php b/app/code/Magento/Backend/App/Action/Plugin/Authentication.php index ad396056c6d5d..d08ba1e44a339 100644 --- a/app/code/Magento/Backend/App/Action/Plugin/Authentication.php +++ b/app/code/Magento/Backend/App/Action/Plugin/Authentication.php @@ -58,7 +58,7 @@ class Authentication protected $_actionFlag; /** - * @var \Magento\Message\ManagerInterface + * @var \Magento\Framework\Message\ManagerInterface */ protected $messageManager; @@ -67,14 +67,14 @@ class Authentication * @param \Magento\Backend\Model\UrlInterface $url * @param \Magento\Framework\App\ResponseInterface $response * @param \Magento\Framework\App\ActionFlag $actionFlag - * @param \Magento\Message\ManagerInterface $messageManager + * @param \Magento\Framework\Message\ManagerInterface $messageManager */ public function __construct( \Magento\Backend\Model\Auth $auth, \Magento\Backend\Model\UrlInterface $url, \Magento\Framework\App\ResponseInterface $response, \Magento\Framework\App\ActionFlag $actionFlag, - \Magento\Message\ManagerInterface $messageManager + \Magento\Framework\Message\ManagerInterface $messageManager ) { $this->_auth = $auth; $this->_url = $url; diff --git a/app/code/Magento/Backend/App/Router/DefaultRouter.php b/app/code/Magento/Backend/App/Router/DefaultRouter.php index fa9a5be75d5d0..c4be5bccb3bc0 100644 --- a/app/code/Magento/Backend/App/Router/DefaultRouter.php +++ b/app/code/Magento/Backend/App/Router/DefaultRouter.php @@ -34,7 +34,7 @@ class DefaultRouter extends \Magento\Core\App\Router\Base protected $_backendConfig; /** - * @var \Magento\Core\Model\Url|\Magento\UrlInterface $url + * @var \Magento\Core\Model\Url|\Magento\Framework\UrlInterface $url */ protected $_url; @@ -57,14 +57,14 @@ class DefaultRouter extends \Magento\Core\App\Router\Base * @param \Magento\Framework\App\ResponseFactory $responseFactory * @param \Magento\Framework\App\Route\ConfigInterface $routeConfig * @param \Magento\Framework\App\State $appState - * @param \Magento\UrlInterface $url + * @param \Magento\Framework\UrlInterface $url * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Url\SecurityInfoInterface $urlSecurityInfo + * @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo * @param string $routerId * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Backend\App\ConfigInterface $backendConfig - * @param \Magento\Code\NameBuilder $nameBuilder + * @param \Magento\Framework\Code\NameBuilder $nameBuilder * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ @@ -74,12 +74,12 @@ public function __construct( \Magento\Framework\App\ResponseFactory $responseFactory, \Magento\Framework\App\Route\ConfigInterface $routeConfig, \Magento\Framework\App\State $appState, - \Magento\UrlInterface $url, + \Magento\Framework\UrlInterface $url, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Url\SecurityInfoInterface $urlSecurityInfo, + \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo, $routerId, - \Magento\Code\NameBuilder $nameBuilder, + \Magento\Framework\Code\NameBuilder $nameBuilder, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Backend\App\ConfigInterface $backendConfig ) { diff --git a/app/code/Magento/Backend/Block/AbstractBlock.php b/app/code/Magento/Backend/Block/AbstractBlock.php index dfefb766206d9..9726882f990b0 100644 --- a/app/code/Magento/Backend/Block/AbstractBlock.php +++ b/app/code/Magento/Backend/Block/AbstractBlock.php @@ -30,10 +30,10 @@ * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class AbstractBlock extends \Magento\View\Element\AbstractBlock +class AbstractBlock extends \Magento\Framework\View\Element\AbstractBlock { /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_authorization; diff --git a/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php b/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php index 0f289733752d6..1cd75ea507f40 100644 --- a/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php +++ b/app/code/Magento/Backend/Block/Cache/Grid/Column/Statuses.php @@ -60,7 +60,7 @@ public function getFrameCallback() * Decorate status column values * * @param string $value - * @param \Magento\Model\AbstractModel $row + * @param \Magento\Framework\Model\AbstractModel $row * @param \Magento\Backend\Block\Widget\Grid\Column $column * @param bool $isExport * @return string diff --git a/app/code/Magento/Backend/Block/Context.php b/app/code/Magento/Backend/Block/Context.php index ccf5ec6db0857..7caecb18d424d 100644 --- a/app/code/Magento/Backend/Block/Context.php +++ b/app/code/Magento/Backend/Block/Context.php @@ -30,56 +30,56 @@ * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Context extends \Magento\View\Element\Context +class Context extends \Magento\Framework\View\Element\Context { /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_authorization; /** * @param \Magento\Framework\App\RequestInterface $request - * @param \Magento\View\LayoutInterface $layout - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\UrlInterface $urlBuilder - * @param \Magento\TranslateInterface $translator + * @param \Magento\Framework\View\LayoutInterface $layout + * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Framework\UrlInterface $urlBuilder + * @param \Magento\Framework\TranslateInterface $translator * @param \Magento\Framework\App\CacheInterface $cache - * @param \Magento\View\DesignInterface $design - * @param \Magento\Session\SessionManagerInterface $session - * @param \Magento\Session\SidResolverInterface $sidResolver + * @param \Magento\Framework\View\DesignInterface $design + * @param \Magento\Framework\Session\SessionManagerInterface $session + * @param \Magento\Framework\Session\SidResolverInterface $sidResolver * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\View\Url $viewUrl - * @param \Magento\View\ConfigInterface $viewConfig + * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\ConfigInterface $viewConfig * @param \Magento\Framework\App\Cache\StateInterface $cacheState - * @param \Magento\Logger $logger - * @param \Magento\Escaper $escaper - * @param \Magento\Filter\FilterManager $filterManager - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate - * @param \Magento\AuthorizationInterface $authorization - * @param \Magento\Translate\Inline\StateInterface $inlineTranslation + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Escaper $escaper + * @param \Magento\Framework\Filter\FilterManager $filterManager + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\AuthorizationInterface $authorization + * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\App\RequestInterface $request, - \Magento\View\LayoutInterface $layout, - \Magento\Event\ManagerInterface $eventManager, - \Magento\UrlInterface $urlBuilder, - \Magento\TranslateInterface $translator, + \Magento\Framework\View\LayoutInterface $layout, + \Magento\Framework\Event\ManagerInterface $eventManager, + \Magento\Framework\UrlInterface $urlBuilder, + \Magento\Framework\TranslateInterface $translator, \Magento\Framework\App\CacheInterface $cache, - \Magento\View\DesignInterface $design, - \Magento\Session\SessionManagerInterface $session, - \Magento\Session\SidResolverInterface $sidResolver, + \Magento\Framework\View\DesignInterface $design, + \Magento\Framework\Session\SessionManagerInterface $session, + \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\View\Url $viewUrl, - \Magento\View\ConfigInterface $viewConfig, + \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, - \Magento\Logger $logger, - \Magento\Escaper $escaper, - \Magento\Filter\FilterManager $filterManager, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, - \Magento\Translate\Inline\StateInterface $inlineTranslation, - \Magento\AuthorizationInterface $authorization + \Magento\Framework\Logger $logger, + \Magento\Framework\Escaper $escaper, + \Magento\Framework\Filter\FilterManager $filterManager, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, + \Magento\Framework\AuthorizationInterface $authorization ) { $this->_authorization = $authorization; parent::__construct( @@ -107,7 +107,7 @@ public function __construct( /** * Retrieve Authorization * - * @return \Magento\AuthorizationInterface + * @return \Magento\Framework\AuthorizationInterface */ public function getAuthorization() { diff --git a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php index 6acb8b651f49e..9adf8d89fdb82 100644 --- a/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard/AbstractDashboard.php @@ -25,8 +25,6 @@ */ namespace Magento\Backend\Block\Dashboard; -use Magento\Model\Resource\Db\Collection\AbstractCollection; - /** * Adminhtml dashboard tab abstract * @@ -61,7 +59,7 @@ public function __construct( } /** - * @return array|AbstractCollection|\Magento\Eav\Model\Entity\Collection\Abstract + * @return array|\Magento\Framework\Model\Resource\Db\Collection\AbstractCollection|\Magento\Eav\Model\Entity\Collection\Abstract */ public function getCollection() { diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 3f79191b59bd9..b2a3574717344 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -122,7 +122,7 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard protected $_dashboardData = null; /** - * @var \Magento\Locale\ListsInterface + * @var \Magento\Framework\Locale\ListsInterface */ protected $_localeLists = null; @@ -130,14 +130,14 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory * @param \Magento\Backend\Helper\Dashboard\Data $dashboardData - * @param \Magento\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Locale\ListsInterface $localeLists * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, \Magento\Backend\Helper\Dashboard\Data $dashboardData, - \Magento\Locale\ListsInterface $localeLists, + \Magento\Framework\Locale\ListsInterface $localeLists, array $data = array() ) { $this->_dashboardData = $dashboardData; @@ -414,7 +414,7 @@ public function getChartUrl($directUrl = true) switch ($this->getDataHelper()->getParam('period')) { case '24h': $this->_axisLabels[$idx][$_index] = $this->formatTime( - new \Magento\Stdlib\DateTime\Date($_label, 'yyyy-MM-dd HH:00'), + new \Magento\Framework\Stdlib\DateTime\Date($_label, 'yyyy-MM-dd HH:00'), 'short', false ); @@ -422,7 +422,7 @@ public function getChartUrl($directUrl = true) case '7d': case '1m': $this->_axisLabels[$idx][$_index] = $this->formatDate( - new \Magento\Stdlib\DateTime\Date($_label, 'yyyy-MM-dd') + new \Magento\Framework\Stdlib\DateTime\Date($_label, 'yyyy-MM-dd') ); break; case '1y': diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php index d4f42e9ddefea..7e3ccb6d35e18 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -40,21 +40,21 @@ class Grid extends \Magento\Backend\Block\Dashboard\Grid protected $_collectionFactory; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ protected $_moduleManager; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Framework\Module\Manager $moduleManager * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, - \Magento\Module\Manager $moduleManager, + \Magento\Framework\Module\Manager $moduleManager, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Sales.php b/app/code/Magento/Backend/Block/Dashboard/Sales.php index 035d5d081de09..4871b352e948d 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Sales.php +++ b/app/code/Magento/Backend/Block/Dashboard/Sales.php @@ -42,20 +42,20 @@ class Sales extends \Magento\Backend\Block\Dashboard\Bar protected $_template = 'dashboard/salebar.phtml'; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ protected $_moduleManager; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Framework\Module\Manager $moduleManager * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - \Magento\Module\Manager $moduleManager, + \Magento\Framework\Module\Manager $moduleManager, array $data = array() ) { $this->_moduleManager = $moduleManager; diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php index 6aa6f2eb79210..00abc742b8996 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Last.php @@ -45,21 +45,21 @@ class Last extends \Magento\Backend\Block\Dashboard\Grid protected $_queriesFactory; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ protected $_moduleManager; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Framework\Module\Manager $moduleManager * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, - \Magento\Module\Manager $moduleManager, + \Magento\Framework\Module\Manager $moduleManager, \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php index 9a2a3bdb3a6a1..78096582e81cd 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Renderer/Searchquery.php @@ -33,18 +33,18 @@ class Searchquery extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abs /** * String helper * - * @var \Magento\Stdlib\String + * @var \Magento\Framework\Stdlib\String */ protected $stringHelper; /** * @param \Magento\Backend\Block\Context $context - * @param \Magento\Stdlib\String $stringHelper + * @param \Magento\Framework\Stdlib\String $stringHelper * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, - \Magento\Stdlib\String $stringHelper, + \Magento\Framework\Stdlib\String $stringHelper, array $data = array() ) { $this->stringHelper = $stringHelper; @@ -54,10 +54,10 @@ public function __construct( /** * Renders a column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $value = $row->getData($this->getColumn()->getIndex()); if ($this->stringHelper->strlen($value) > 30) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php index e6449b7e2f253..e17c0a972eda1 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php +++ b/app/code/Magento/Backend/Block/Dashboard/Searches/Top.php @@ -45,21 +45,21 @@ class Top extends \Magento\Backend\Block\Dashboard\Grid protected $_queriesFactory; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ protected $_moduleManager; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Framework\Module\Manager $moduleManager * @param \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, - \Magento\Module\Manager $moduleManager, + \Magento\Framework\Module\Manager $moduleManager, \Magento\CatalogSearch\Model\Resource\Query\CollectionFactory $queriesFactory, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php index 34574b1f81b2e..3ad8abab4c4f6 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Amounts.php @@ -39,7 +39,7 @@ class Amounts extends \Magento\Backend\Block\Dashboard\Graph * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory * @param \Magento\Backend\Helper\Dashboard\Data $dashboardData - * @param \Magento\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Locale\ListsInterface $localeLists * @param \Magento\Backend\Helper\Dashboard\Order $dataHelper * @param array $data */ @@ -47,7 +47,7 @@ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, \Magento\Backend\Helper\Dashboard\Data $dashboardData, - \Magento\Locale\ListsInterface $localeLists, + \Magento\Framework\Locale\ListsInterface $localeLists, \Magento\Backend\Helper\Dashboard\Order $dataHelper, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php index a7a2162ad3c30..d970fac7317dc 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Orders.php @@ -39,7 +39,7 @@ class Orders extends \Magento\Backend\Block\Dashboard\Graph * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory * @param \Magento\Backend\Helper\Dashboard\Data $dashboardData - * @param \Magento\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Locale\ListsInterface $localeLists * @param \Magento\Backend\Helper\Dashboard\Order $dataHelper * @param array $data */ @@ -47,7 +47,7 @@ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, \Magento\Backend\Helper\Dashboard\Data $dashboardData, - \Magento\Locale\ListsInterface $localeLists, + \Magento\Framework\Locale\ListsInterface $localeLists, \Magento\Backend\Helper\Dashboard\Order $dataHelper, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php index 9b75779234972..fedaf6083e7cd 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/Magento/Backend/Block/Dashboard/Tab/Products/Ordered.php @@ -40,21 +40,21 @@ class Ordered extends \Magento\Backend\Block\Dashboard\Grid protected $_collectionFactory; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ protected $_moduleManager; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Framework\Module\Manager $moduleManager * @param \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, - \Magento\Module\Manager $moduleManager, + \Magento\Framework\Module\Manager $moduleManager, \Magento\Sales\Model\Resource\Report\Bestsellers\CollectionFactory $collectionFactory, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php index ade17ef66738d..00c4d2155a4e3 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Totals.php +++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php @@ -44,20 +44,20 @@ class Totals extends \Magento\Backend\Block\Dashboard\Bar protected $_template = 'dashboard/totalbar.phtml'; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ protected $_moduleManager; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory - * @param \Magento\Module\Manager $moduleManager + * @param \Magento\Framework\Module\Manager $moduleManager * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\Resource\Order\CollectionFactory $collectionFactory, - \Magento\Module\Manager $moduleManager, + \Magento\Framework\Module\Manager $moduleManager, array $data = array() ) { $this->_moduleManager = $moduleManager; diff --git a/app/code/Magento/Backend/Block/Media/Uploader.php b/app/code/Magento/Backend/Block/Media/Uploader.php index 1603f997c1c0b..553cc908f077b 100644 --- a/app/code/Magento/Backend/Block/Media/Uploader.php +++ b/app/code/Magento/Backend/Block/Media/Uploader.php @@ -31,7 +31,7 @@ class Uploader extends \Magento\Backend\Block\Widget { /** - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_config; @@ -41,18 +41,18 @@ class Uploader extends \Magento\Backend\Block\Widget protected $_template = 'Magento_Backend::media/uploader.phtml'; /** - * @var \Magento\File\Size + * @var \Magento\Framework\File\Size */ protected $_fileSizeService; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\File\Size $fileSize + * @param \Magento\Framework\File\Size $fileSize * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\File\Size $fileSize, + \Magento\Framework\File\Size $fileSize, array $data = array() ) { $this->_fileSizeService = $fileSize; @@ -90,7 +90,7 @@ protected function _construct() /** * Get file size * - * @return \Magento\File\Size + * @return \Magento\Framework\File\Size */ public function getFileSizeService() { @@ -138,12 +138,12 @@ public function getConfigJson() /** * Retrieve config object * - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function getConfig() { if (null === $this->_config) { - $this->_config = new \Magento\Object(); + $this->_config = new \Magento\Framework\Object(); } return $this->_config; diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index 891bd0b81e6ad..967a48895f235 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -75,7 +75,7 @@ class Menu extends \Magento\Backend\Block\Template protected $_menuConfig; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -85,7 +85,7 @@ class Menu extends \Magento\Backend\Block\Template * @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory * @param \Magento\Backend\Model\Auth\Session $authSession * @param \Magento\Backend\Model\Menu\Config $menuConfig - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param array $data */ public function __construct( @@ -94,7 +94,7 @@ public function __construct( \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory, \Magento\Backend\Model\Auth\Session $authSession, \Magento\Backend\Model\Menu\Config $menuConfig, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, array $data = array() ) { $this->_url = $url; diff --git a/app/code/Magento/Backend/Block/Page.php b/app/code/Magento/Backend/Block/Page.php index 04a6bf6099d2e..88ca50771190c 100644 --- a/app/code/Magento/Backend/Block/Page.php +++ b/app/code/Magento/Backend/Block/Page.php @@ -41,18 +41,18 @@ class Page extends \Magento\Backend\Block\Template protected $_template = 'admin/page.phtml'; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; /** * @param Template\Context $context - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, array $data = array() ) { parent::__construct($context, $data); diff --git a/app/code/Magento/Backend/Block/Page/Head.php b/app/code/Magento/Backend/Block/Page/Head.php index 5771f46803ae7..c2c5443345b00 100644 --- a/app/code/Magento/Backend/Block/Page/Head.php +++ b/app/code/Magento/Backend/Block/Page/Head.php @@ -41,34 +41,34 @@ class Head extends \Magento\Theme\Block\Html\Head protected $_template = 'page/head.phtml'; /** - * @var \Magento\Data\Form\FormKey + * @var \Magento\Framework\Data\Form\FormKey */ protected $formKey; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase - * @param \Magento\ObjectManager $objectManager - * @param \Magento\View\Asset\GroupedCollection $assets - * @param \Magento\View\Asset\MergeService $assetMergeService - * @param \Magento\View\Asset\MinifyService $assetMinifyService - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\ObjectManager $objectManager + * @param \Magento\Framework\View\Asset\GroupedCollection $assets + * @param \Magento\Framework\View\Asset\MergeService $assetMergeService + * @param \Magento\Framework\View\Asset\MinifyService $assetMinifyService + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Translation\Block\Js $jsTranslation * @param \Magento\Framework\App\Action\Title $titles - * @param \Magento\Data\Form\FormKey $formKey + * @param \Magento\Framework\Data\Form\FormKey $formKey * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase, - \Magento\ObjectManager $objectManager, - \Magento\View\Asset\GroupedCollection $assets, - \Magento\View\Asset\MergeService $assetMergeService, - \Magento\View\Asset\MinifyService $assetMinifyService, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\ObjectManager $objectManager, + \Magento\Framework\View\Asset\GroupedCollection $assets, + \Magento\Framework\View\Asset\MergeService $assetMergeService, + \Magento\Framework\View\Asset\MinifyService $assetMinifyService, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Translation\Block\Js $jsTranslation, \Magento\Framework\App\Action\Title $titles, - \Magento\Data\Form\FormKey $formKey, + \Magento\Framework\Data\Form\FormKey $formKey, array $data = array() ) { $this->_titles = $titles; diff --git a/app/code/Magento/Backend/Block/Page/Locale.php b/app/code/Magento/Backend/Block/Page/Locale.php index e26e20c51eda6..501cbec4178f2 100644 --- a/app/code/Magento/Backend/Block/Page/Locale.php +++ b/app/code/Magento/Backend/Block/Page/Locale.php @@ -35,12 +35,12 @@ class Locale extends \Magento\Backend\Block\Template protected $_template = 'page/locale.phtml'; /** - * @var \Magento\Locale\ListsInterface + * @var \Magento\Framework\Locale\ListsInterface */ protected $_localeLists; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -51,15 +51,15 @@ class Locale extends \Magento\Backend\Block\Template /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Locale\ListsInterface $localeLists - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Core\Helper\Url $urlHelper * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Locale\ListsInterface $localeLists, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ListsInterface $localeLists, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Core\Helper\Url $urlHelper, array $data = array() ) { @@ -96,7 +96,7 @@ public function getUrlForReferer() */ public function getLocaleSelect() { - $html = $this->getLayout()->createBlock('Magento\View\Element\Html\Select') + $html = $this->getLayout()->createBlock('Magento\Framework\View\Element\Html\Select') ->setName('locale') ->setId('interface_locale') ->setTitle(__('Interface Language')) diff --git a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php index 1b42a94a9a6d2..2a43991e64b84 100644 --- a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php @@ -96,10 +96,10 @@ public function getButtonHtml() /** * Render button * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { // Remove scope label $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); @@ -109,11 +109,11 @@ public function render(\Magento\Data\Form\Element\AbstractElement $element) /** * Return element html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) { return $this->_toHtml(); } diff --git a/app/code/Magento/Backend/Block/Store/Switcher.php b/app/code/Magento/Backend/Block/Store/Switcher.php index a79710eeaaccf..633336f3d61a9 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher.php +++ b/app/code/Magento/Backend/Block/Store/Switcher.php @@ -91,14 +91,14 @@ class Switcher extends \Magento\Backend\Block\Template /** * Website factory * - * @var \Magento\Store\Model\Website\Factory + * @var \Magento\Store\Model\WebsiteFactory */ protected $_websiteFactory; /** * Store Group Factory * - * @var \Magento\Store\Model\Group\Factory + * @var \Magento\Store\Model\GroupFactory */ protected $_storeGroupFactory; @@ -111,15 +111,15 @@ class Switcher extends \Magento\Backend\Block\Template /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Store\Model\Website\Factory $websiteFactory - * @param \Magento\Store\Model\Group\Factory $storeGroupFactory + * @param \Magento\Store\Model\WebsiteFactory $websiteFactory + * @param \Magento\Store\Model\GroupFactory $storeGroupFactory * @param \Magento\Store\Model\StoreFactory $storeFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Store\Model\Website\Factory $websiteFactory, - \Magento\Store\Model\Group\Factory $storeGroupFactory, + \Magento\Store\Model\WebsiteFactory $websiteFactory, + \Magento\Store\Model\GroupFactory $storeGroupFactory, \Magento\Store\Model\StoreFactory $storeFactory, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php index 270865e2b8a34..539b6af6e4050 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php @@ -28,12 +28,12 @@ /** * Form fieldset renderer */ -class Fieldset extends \Magento\Backend\Block\Template implements \Magento\Data\Form\Element\Renderer\RendererInterface +class Fieldset extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * Form element which re-rendering * - * @var \Magento\Data\Form\Element\Fieldset + * @var \Magento\Framework\Data\Form\Element\Fieldset */ protected $_element; @@ -45,7 +45,7 @@ class Fieldset extends \Magento\Backend\Block\Template implements \Magento\Data\ /** * Retrieve an element * - * @return \Magento\Data\Form\Element\Fieldset + * @return \Magento\Framework\Data\Form\Element\Fieldset */ public function getElement() { @@ -55,10 +55,10 @@ public function getElement() /** * Render element * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $this->_element = $element; return $this->toHtml(); diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php index 37ac253725877..8ccfc49235050 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php +++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php @@ -29,12 +29,12 @@ * Form fieldset renderer */ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element implements - \Magento\Data\Form\Element\Renderer\RendererInterface + \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * Form element which re-rendering * - * @var \Magento\Data\Form\Element\Fieldset + * @var \Magento\Framework\Data\Form\Element\Fieldset */ protected $_element; @@ -46,7 +46,7 @@ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Eleme /** * Retrieve an element * - * @return \Magento\Data\Form\Element\Fieldset + * @return \Magento\Framework\Data\Form\Element\Fieldset */ public function getElement() { @@ -56,10 +56,10 @@ public function getElement() /** * Render element * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $this->_element = $element; return $this->toHtml(); diff --git a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php index c93fffa7e2f06..e072c062ae535 100644 --- a/app/code/Magento/Backend/Block/System/Account/Edit/Form.php +++ b/app/code/Magento/Backend/Block/System/Account/Edit/Form.php @@ -45,26 +45,26 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_userFactory; /** - * @var \Magento\Locale\ListsInterface + * @var \Magento\Framework\Locale\ListsInterface */ protected $_localeLists; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\User\Model\UserFactory $userFactory * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Locale\ListsInterface $localeLists * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\User\Model\UserFactory $userFactory, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Locale\ListsInterface $localeLists, + \Magento\Framework\Locale\ListsInterface $localeLists, array $data = array() ) { $this->_userFactory = $userFactory; @@ -82,7 +82,7 @@ protected function _prepareForm() $user = $this->_userFactory->create()->load($userId); $user->unsetData('password'); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('Account Information'))); diff --git a/app/code/Magento/Backend/Block/System/Cache/Form.php b/app/code/Magento/Backend/Block/System/Cache/Form.php index 6947d80e2fa5b..91193525b37e6 100644 --- a/app/code/Magento/Backend/Block/System/Cache/Form.php +++ b/app/code/Magento/Backend/Block/System/Cache/Form.php @@ -41,15 +41,15 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Core\Helper\Data $coreData * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Core\Helper\Data $coreData, array $data = array() ) { @@ -64,7 +64,7 @@ public function __construct( */ public function initForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $fieldset = $form->addFieldset('cache_enable', array('legend' => __('Cache Control'))); diff --git a/app/code/Magento/Backend/Block/System/Config/Edit.php b/app/code/Magento/Backend/Block/System/Config/Edit.php index 27023a62af53b..7435e2ffb3c22 100644 --- a/app/code/Magento/Backend/Block/System/Config/Edit.php +++ b/app/code/Magento/Backend/Block/System/Config/Edit.php @@ -78,7 +78,7 @@ public function __construct( /** * Prepare layout object * - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/System/Config/Form.php b/app/code/Magento/Backend/Block/System/Config/Form.php index 4635bc1f0e97b..934e8f6551001 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form.php +++ b/app/code/Magento/Backend/Block/System/Config/Form.php @@ -89,9 +89,9 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_configFactory; /** - * Magento\Data\FormFactory + * Magento\Framework\Data\FormFactory * - * @var \Magento\Data\FormFactory + * @var \Magento\Framework\Data\FormFactory */ protected $_formFactory; @@ -118,8 +118,8 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Backend\Model\Config\Factory $configFactory * @param \Magento\Backend\Model\Config\Structure $configStructure * @param \Magento\Backend\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory @@ -128,8 +128,8 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Backend\Model\Config\Factory $configFactory, \Magento\Backend\Model\Config\Structure $configStructure, \Magento\Backend\Block\System\Config\Form\Fieldset\Factory $fieldsetFactory, @@ -181,7 +181,7 @@ public function initForm() { $this->_initObjects(); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); /** @var $section \Magento\Backend\Model\Config\Structure\Element\Section */ $section = $this->_configStructure->getElement($this->getSectionCode()); @@ -200,13 +200,13 @@ public function initForm() * * @param \Magento\Backend\Model\Config\Structure\Element\Group $group * @param \Magento\Backend\Model\Config\Structure\Element\Section $section - * @param \Magento\Data\Form\AbstractForm $form + * @param \Magento\Framework\Data\Form\AbstractForm $form * @return void */ protected function _initGroup( \Magento\Backend\Model\Config\Structure\Element\Group $group, \Magento\Backend\Model\Config\Structure\Element\Section $section, - \Magento\Data\Form\AbstractForm $form + \Magento\Framework\Data\Form\AbstractForm $form ) { $frontendModelClass = $group->getFrontendModel(); $fieldsetRenderer = $frontendModelClass ? $this->_layout->getBlockSingleton( @@ -263,7 +263,7 @@ protected function _getDependence() /** * Initialize config group fields * - * @param \Magento\Data\Form\Element\Fieldset $fieldset + * @param \Magento\Framework\Data\Form\Element\Fieldset $fieldset * @param \Magento\Backend\Model\Config\Structure\Element\Group $group * @param \Magento\Backend\Model\Config\Structure\Element\Section $section * @param string $fieldPrefix @@ -271,7 +271,7 @@ protected function _getDependence() * @return $this */ public function initFields( - \Magento\Data\Form\Element\Fieldset $fieldset, + \Magento\Framework\Data\Form\Element\Fieldset $fieldset, \Magento\Backend\Model\Config\Structure\Element\Group $group, \Magento\Backend\Model\Config\Structure\Element\Section $section, $fieldPrefix = '', @@ -311,7 +311,7 @@ public function initFields( * Initialize form element * * @param \Magento\Backend\Model\Config\Structure\Element\Field $field - * @param \Magento\Data\Form\Element\Fieldset $fieldset + * @param \Magento\Framework\Data\Form\Element\Fieldset $fieldset * @param string $path * @param string $fieldPrefix * @param string $labelPrefix @@ -319,7 +319,7 @@ public function initFields( */ protected function _initElement( \Magento\Backend\Model\Config\Structure\Element\Field $field, - \Magento\Data\Form\Element\Fieldset $fieldset, + \Magento\Framework\Data\Form\Element\Fieldset $fieldset, $path, $fieldPrefix = '', $labelPrefix = '' @@ -471,7 +471,7 @@ public function getConfigValue($path) } /** - * @return \Magento\Backend\Block\Widget\Form|\Magento\View\Element\AbstractBlock + * @return \Magento\Backend\Block\Widget\Form|\Magento\Framework\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field.php b/app/code/Magento/Backend/Block/System/Config/Form/Field.php index 8724b61a0556e..396d132286aab 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field.php @@ -37,15 +37,15 @@ /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Field extends \Magento\Backend\Block\Template implements \Magento\Data\Form\Element\Renderer\RendererInterface +class Field extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * Retrieve element HTML markup * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) { return $element->getElementHtml(); } @@ -53,10 +53,10 @@ protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $e /** * Retrieve HTML markup for given form element * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $isCheckboxRequired = $this->_isInheritCheckboxRequired($element); @@ -85,10 +85,10 @@ public function render(\Magento\Data\Form\Element\AbstractElement $element) /** * Render element value * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _renderValue(\Magento\Data\Form\Element\AbstractElement $element) + protected function _renderValue(\Magento\Framework\Data\Form\Element\AbstractElement $element) { if ($element->getTooltip()) { $html = ''; @@ -109,10 +109,10 @@ protected function _renderValue(\Magento\Data\Form\Element\AbstractElement $elem /** * Render inheritance checkbox (Use Default or Use Website) * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _renderInheritCheckbox(\Magento\Data\Form\Element\AbstractElement $element) + protected function _renderInheritCheckbox(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $htmlId = $element->getHtmlId(); $namePrefix = preg_replace('#\[value\](\[\])?$#', '', $element->getName()); @@ -138,10 +138,10 @@ protected function _renderInheritCheckbox(\Magento\Data\Form\Element\AbstractEle /** * Check if inheritance checkbox has to be rendered * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return bool */ - protected function _isInheritCheckboxRequired(\Magento\Data\Form\Element\AbstractElement $element) + protected function _isInheritCheckboxRequired(\Magento\Framework\Data\Form\Element\AbstractElement $element) { return $element->getCanUseWebsiteValue() || $element->getCanUseDefaultValue(); } @@ -149,10 +149,10 @@ protected function _isInheritCheckboxRequired(\Magento\Data\Form\Element\Abstrac /** * Retrieve label for the inheritance checkbox * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _getInheritCheckboxLabel(\Magento\Data\Form\Element\AbstractElement $element) + protected function _getInheritCheckboxLabel(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $checkboxLabel = __('Use Default'); if ($element->getCanUseWebsiteValue()) { @@ -164,10 +164,10 @@ protected function _getInheritCheckboxLabel(\Magento\Data\Form\Element\AbstractE /** * Render scope label * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _renderScopeLabel(\Magento\Data\Form\Element\AbstractElement $element) + protected function _renderScopeLabel(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $html = ''; if ($element->getScope() && false == $this->_storeManager->isSingleStoreMode()) { @@ -180,10 +180,10 @@ protected function _renderScopeLabel(\Magento\Data\Form\Element\AbstractElement /** * Render field hint * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _renderHint(\Magento\Data\Form\Element\AbstractElement $element) + protected function _renderHint(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $html = ''; if ($element->getHint()) { @@ -196,7 +196,7 @@ protected function _renderHint(\Magento\Data\Form\Element\AbstractElement $eleme /** * Decorate field row html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @param string $html * @return string */ diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php index 6c7749aaee76d..ad436df676bd2 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Datetime.php @@ -25,8 +25,8 @@ */ namespace Magento\Backend\Block\System\Config\Form\Field; -use Magento\Data\Form\Element\AbstractElement; -use Magento\View\Element\Template; +use Magento\Framework\Data\Form\Element\AbstractElement; +use Magento\Framework\View\Element\Template; /** * Backend system config datetime field renderer @@ -40,7 +40,7 @@ class Datetime extends \Magento\Backend\Block\System\Config\Form\Field protected function _getElementHtml(AbstractElement $element) { $format = $this->_localeDate->getDateTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM ); return $this->_localeDate->date(intval($element->getValue()))->toString($format); } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Factory.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Factory.php index 5dba3cd676d12..92867db4243a1 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Factory.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Factory.php @@ -32,14 +32,14 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php index 9fce4a0748c0e..5e9ca111c1ab0 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php @@ -103,7 +103,7 @@ public function addColumn($name, $params) 'class' => $this->_getParam($params, 'class'), 'renderer' => false ); - if (!empty($params['renderer']) && $params['renderer'] instanceof \Magento\View\Element\AbstractBlock) { + if (!empty($params['renderer']) && $params['renderer'] instanceof \Magento\Framework\View\Element\AbstractBlock) { $this->_columns[$name]['renderer'] = $params['renderer']; } } @@ -124,10 +124,10 @@ protected function _getParam($params, $paramName, $defaultValue = null) /** * Get the grid and scripts contents * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $this->setElement($element); $html = $this->_toHtml(); @@ -139,11 +139,11 @@ protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $e /** * Prepare existing row data object * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function _prepareArrayRow(\Magento\Object $row) + protected function _prepareArrayRow(\Magento\Framework\Object $row) { // override in descendants } @@ -151,7 +151,7 @@ protected function _prepareArrayRow(\Magento\Object $row) /** * Obtain existing data from form element * - * Each row will be instance of \Magento\Object + * Each row will be instance of \Magento\Framework\Object * * @return array */ @@ -161,7 +161,7 @@ public function getArrayRows() return $this->_arrayRowsCache; } $result = array(); - /** @var \Magento\Data\Form\Element\AbstractElement */ + /** @var \Magento\Framework\Data\Form\Element\AbstractElement */ $element = $this->getElement(); if ($element->getValue() && is_array($element->getValue())) { foreach ($element->getValue() as $rowId => $row) { @@ -172,7 +172,7 @@ public function getArrayRows() } $row['_id'] = $rowId; $row['column_values'] = $rowColumnValues; - $result[$rowId] = new \Magento\Object($row); + $result[$rowId] = new \Magento\Framework\Object($row); $this->_prepareArrayRow($result[$rowId]); } } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/File.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/File.php index 4fc569045141b..1332474ff49c5 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/File.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/File.php @@ -34,7 +34,7 @@ */ namespace Magento\Backend\Block\System\Config\Form\Field; -class File extends \Magento\Data\Form\Element\File +class File extends \Magento\Framework\Data\Form\Element\File { /** * Get element html diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Heading.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Heading.php index e9e40d031339a..9cf3134f65a87 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Heading.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Heading.php @@ -33,15 +33,15 @@ namespace Magento\Backend\Block\System\Config\Form\Field; class Heading extends \Magento\Backend\Block\AbstractBlock implements - \Magento\Data\Form\Element\Renderer\RendererInterface + \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * Render element html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { return sprintf( '

%s

', diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Image.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Image.php index 3560a2c38f448..e092e555865ae 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Image.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Image.php @@ -29,7 +29,7 @@ */ namespace Magento\Backend\Block\System\Config\Form\Field; -class Image extends \Magento\Data\Form\Element\Image +class Image extends \Magento\Framework\Data\Form\Element\Image { /** * Get image preview url diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php index 037271ec89a1c..f1234866aec24 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Notification.php @@ -25,7 +25,7 @@ */ namespace Magento\Backend\Block\System\Config\Form\Field; -use Magento\Data\Form\Element\AbstractElement; +use Magento\Framework\Data\Form\Element\AbstractElement; /** * Backend system config datetime field renderer @@ -40,7 +40,7 @@ protected function _getElementHtml(AbstractElement $element) { $element->setValue($this->_cache->load('admin_notifications_lastcheck')); $format = $this->_localeDate->getDateTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM ); return $this->_localeDate->date(intval($element->getValue()))->toString($format); } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php index f00e5368bef42..f1bf1b602332a 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Regexceptions.php @@ -31,25 +31,25 @@ class Regexceptions extends \Magento\Backend\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray { /** - * @var \Magento\Data\Form\Element\Factory + * @var \Magento\Framework\Data\Form\Element\Factory */ protected $_elementFactory; /** - * @var \Magento\View\Design\Theme\LabelFactory + * @var \Magento\Framework\View\Design\Theme\LabelFactory */ protected $_labelFactory; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Data\Form\Element\Factory $elementFactory - * @param \Magento\View\Design\Theme\LabelFactory $labelFactory + * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory + * @param \Magento\Framework\View\Design\Theme\LabelFactory $labelFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Data\Form\Element\Factory $elementFactory, - \Magento\View\Design\Theme\LabelFactory $labelFactory, + \Magento\Framework\Data\Form\Element\Factory $elementFactory, + \Magento\Framework\View\Design\Theme\LabelFactory $labelFactory, array $data = array() ) { $this->_elementFactory = $elementFactory; @@ -80,7 +80,7 @@ protected function _construct() public function renderCellTemplate($columnName) { if ($columnName == 'value' && isset($this->_columns[$columnName])) { - /** @var $label \Magento\View\Design\Theme\Label */ + /** @var $label \Magento\Framework\View\Design\Theme\Label */ $label = $this->_labelFactory->create(); $options = $label->getLabelsCollection(__('-- No Theme --')); $element = $this->_elementFactory->create('select'); diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php b/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php index dd6ca08bdeea0..75c9b3b88d3b5 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php @@ -34,7 +34,7 @@ */ namespace Magento\Backend\Block\System\Config\Form\Field\Select; -class Allowspecific extends \Magento\Data\Form\Element\Select +class Allowspecific extends \Magento\Framework\Data\Form\Element\Select { /** * Add additional Javascript code diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php index a17a612e886c7..7a73c52c80619 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset.php @@ -30,7 +30,7 @@ namespace Magento\Backend\Block\System\Config\Form; class Fieldset extends \Magento\Backend\Block\AbstractBlock implements - \Magento\Data\Form\Element\Renderer\RendererInterface + \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * @var \Magento\Backend\Model\Auth\Session @@ -38,20 +38,20 @@ class Fieldset extends \Magento\Backend\Block\AbstractBlock implements protected $_authSession; /** - * @var \Magento\View\Helper\Js + * @var \Magento\Framework\View\Helper\Js */ protected $_jsHelper; /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\View\Helper\Js $jsHelper + * @param \Magento\Framework\View\Helper\Js $jsHelper * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\View\Helper\Js $jsHelper, + \Magento\Framework\View\Helper\Js $jsHelper, array $data = array() ) { $this->_jsHelper = $jsHelper; @@ -62,16 +62,16 @@ public function __construct( /** * Render fieldset html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $this->setElement($element); $html = $this->_getHeaderHtml($element); foreach ($element->getElements() as $field) { - if ($field instanceof \Magento\Data\Form\Element\Fieldset) { + if ($field instanceof \Magento\Framework\Data\Form\Element\Fieldset) { $html .= '' . $field->toHtml() . ''; } else { $html .= $field->toHtml(); @@ -86,7 +86,7 @@ public function render(\Magento\Data\Form\Element\AbstractElement $element) /** * Return header html for fieldset * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getHeaderHtml($element) @@ -131,7 +131,7 @@ protected function _getHeaderHtml($element) /** * Get frontend class * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ @@ -145,7 +145,7 @@ protected function _getFrontendClass($element) /** * Return header title part of html for fieldset * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getHeaderTitleHtml($element) @@ -165,7 +165,7 @@ protected function _getHeaderTitleHtml($element) /** * Return header comment part of html for fieldset * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getHeaderCommentHtml($element) @@ -190,7 +190,7 @@ protected function _getFieldsetCss() * Return footer html for fieldset * Add extra tooltip comments to elements * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getFooterHtml($element) @@ -220,7 +220,7 @@ protected function _getFooterHtml($element) * - observe fieldset rows; * - apply collapse; * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getExtraJs($element) @@ -233,7 +233,7 @@ protected function _getExtraJs($element) /** * Collapsed or expanded fieldset when page loaded? * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return bool */ protected function _isCollapseState($element) diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Factory.php b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Factory.php index 5f7cbf459aa2e..1e0d7b2f40310 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Factory.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Factory.php @@ -32,14 +32,14 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php index 77ddff349216c..6fb45eefca884 100644 --- a/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php +++ b/app/code/Magento/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php @@ -32,7 +32,7 @@ class DisableOutput extends \Magento\Backend\Block\System\Config\Form\Fieldset { /** - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_dummyElement; @@ -47,22 +47,22 @@ class DisableOutput extends \Magento\Backend\Block\System\Config\Form\Fieldset protected $_values; /** - * @var \Magento\Module\ModuleListInterface + * @var \Magento\Framework\Module\ModuleListInterface */ protected $_moduleList; /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\View\Helper\Js $jsHelper - * @param \Magento\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\View\Helper\Js $jsHelper + * @param \Magento\Framework\Module\ModuleListInterface $moduleList * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\View\Helper\Js $jsHelper, - \Magento\Module\ModuleListInterface $moduleList, + \Magento\Framework\View\Helper\Js $jsHelper, + \Magento\Framework\Module\ModuleListInterface $moduleList, array $data = array() ) { parent::__construct($context, $authSession, $jsHelper, $data); @@ -70,16 +70,16 @@ public function __construct( } /** - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $html = $this->_getHeaderHtml($element); $modules = array_keys($this->_moduleList->getModules()); - $dispatchResult = new \Magento\Object($modules); + $dispatchResult = new \Magento\Framework\Object($modules); $this->_eventManager->dispatch( 'adminhtml_system_config_advanced_disableoutput_render_before', array('modules' => $dispatchResult) @@ -100,12 +100,12 @@ public function render(\Magento\Data\Form\Element\AbstractElement $element) } /** - * @return \Magento\Object + * @return \Magento\Framework\Object */ protected function _getDummyElement() { if (empty($this->_dummyElement)) { - $this->_dummyElement = new \Magento\Object(array('showInDefault' => 1, 'showInWebsite' => 1)); + $this->_dummyElement = new \Magento\Framework\Object(array('showInDefault' => 1, 'showInWebsite' => 1)); } return $this->_dummyElement; } @@ -138,7 +138,7 @@ protected function _getValues() } /** - * @param \Magento\Data\Form\Element\Fieldset $fieldset + * @param \Magento\Framework\Data\Form\Element\Fieldset $fieldset * @param string $moduleName * @return mixed */ diff --git a/app/code/Magento/Backend/Block/System/Config/Switcher.php b/app/code/Magento/Backend/Block/System/Config/Switcher.php index 274d0e885ab58..115201d9d885d 100644 --- a/app/code/Magento/Backend/Block/System/Config/Switcher.php +++ b/app/code/Magento/Backend/Block/System/Config/Switcher.php @@ -52,7 +52,7 @@ public function __construct( } /** - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _prepareLayout() { diff --git a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php index 81a2d7c88798b..4c54b94f59567 100644 --- a/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php +++ b/app/code/Magento/Backend/Block/System/Config/System/Storage/Media/Synchronize.php @@ -57,10 +57,10 @@ public function __construct( /** * Remove scope label * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); return parent::render($element); @@ -69,10 +69,10 @@ public function render(\Magento\Data\Form\Element\AbstractElement $element) /** * Return element html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) { return $this->_toHtml(); } diff --git a/app/code/Magento/Backend/Block/System/Design/Edit.php b/app/code/Magento/Backend/Block/System/Design/Edit.php index c5a476d5f3ccf..1b175d590932d 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit.php @@ -35,18 +35,18 @@ class Edit extends \Magento\Backend\Block\Widget /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php index 2582798da8f09..86735306037d7 100644 --- a/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php +++ b/app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php @@ -28,7 +28,7 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic { /** - * @var \Magento\View\Design\Theme\LabelFactory + * @var \Magento\Framework\View\Design\Theme\LabelFactory */ protected $_labelFactory; @@ -39,17 +39,17 @@ class General extends \Magento\Backend\Block\Widget\Form\Generic /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\View\Design\Theme\LabelFactory $labelFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory + * @param \Magento\Framework\View\Design\Theme\LabelFactory $labelFactory * @param \Magento\Store\Model\System\Store $systemStore * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\View\Design\Theme\LabelFactory $labelFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, + \Magento\Framework\View\Design\Theme\LabelFactory $labelFactory, \Magento\Store\Model\System\Store $systemStore, array $data = array() ) { @@ -65,7 +65,7 @@ public function __construct( */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $fieldset = $form->addFieldset('general', array('legend' => __('General Settings'))); @@ -94,7 +94,7 @@ protected function _prepareForm() ); } - /** @var $label \Magento\View\Design\Theme\Label */ + /** @var $label \Magento\Framework\View\Design\Theme\Label */ $label = $this->_labelFactory->create(); $options = $label->getLabelsCollection(__('-- Please Select --')); $fieldset->addField( @@ -109,7 +109,7 @@ protected function _prepareForm() ) ); - $dateFormat = $this->_localeDate->getDateFormat(\Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT); + $dateFormat = $this->_localeDate->getDateFormat(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT); $fieldset->addField( 'date_from', 'date', diff --git a/app/code/Magento/Backend/Block/System/Store/Delete/Form.php b/app/code/Magento/Backend/Block/System/Store/Delete/Form.php index 3c8976f272b8e..16289b6a1e468 100644 --- a/app/code/Magento/Backend/Block/System/Store/Delete/Form.php +++ b/app/code/Magento/Backend/Block/System/Store/Delete/Form.php @@ -53,7 +53,7 @@ protected function _prepareForm() { $dataObject = $this->getDataObject(); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array('data' => array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')) ); diff --git a/app/code/Magento/Backend/Block/System/Store/Edit.php b/app/code/Magento/Backend/Block/System/Store/Edit.php index 5071e3bd3ac05..d0f33360e07a1 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit.php @@ -33,18 +33,18 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php index 6e32e14edfc5e..3e99a89f64fc0 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php @@ -54,7 +54,7 @@ protected function _construct() */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array('data' => array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')) ); @@ -89,9 +89,9 @@ protected function _prepareForm() /** * Build store type specific fieldset * - * @param \Magento\Data\Form $form + * @param \Magento\Framework\Data\Form $form * @return void * @abstract */ - abstract protected function _prepareStoreFieldset(\Magento\Data\Form $form); + abstract protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form); } diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php index 2573b7ee6c273..10915cdb980ec 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Group.php @@ -47,26 +47,26 @@ class Group extends \Magento\Backend\Block\System\Store\Edit\AbstractForm protected $_storeFactory; /** - * @var \Magento\Store\Model\Website\Factory + * @var \Magento\Store\Model\WebsiteFactory */ protected $_websiteFactory; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Catalog\Model\Config\Source\Category $category * @param \Magento\Store\Model\StoreFactory $storeFactory - * @param \Magento\Store\Model\Website\Factory $websiteFactory + * @param \Magento\Store\Model\WebsiteFactory $websiteFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Catalog\Model\Config\Source\Category $category, \Magento\Store\Model\StoreFactory $storeFactory, - \Magento\Store\Model\Website\Factory $websiteFactory, + \Magento\Store\Model\WebsiteFactory $websiteFactory, array $data = array() ) { $this->_category = $category; @@ -78,11 +78,11 @@ public function __construct( /** * Prepare group specific fieldset * - * @param \Magento\Data\Form $form + * @param \Magento\Framework\Data\Form $form * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - protected function _prepareStoreFieldset(\Magento\Data\Form $form) + protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form) { $groupModel = $this->_coreRegistry->registry('store_data'); $postData = $this->_coreRegistry->registry('store_post_data'); diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php index cadd37eee18db..cdb14a94fd866 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php @@ -37,29 +37,29 @@ class Store extends \Magento\Backend\Block\System\Store\Edit\AbstractForm { /** - * @var \Magento\Store\Model\Website\Factory + * @var \Magento\Store\Model\WebsiteFactory */ protected $_websiteFactory; /** - * @var \Magento\Store\Model\Group\Factory + * @var \Magento\Store\Model\GroupFactory */ protected $_groupFactory; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Store\Model\Group\Factory $groupFactory - * @param \Magento\Store\Model\Website\Factory $websiteFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory + * @param \Magento\Store\Model\GroupFactory $groupFactory + * @param \Magento\Store\Model\WebsiteFactory $websiteFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Store\Model\Group\Factory $groupFactory, - \Magento\Store\Model\Website\Factory $websiteFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, + \Magento\Store\Model\GroupFactory $groupFactory, + \Magento\Store\Model\WebsiteFactory $websiteFactory, array $data = array() ) { $this->_groupFactory = $groupFactory; @@ -70,11 +70,11 @@ public function __construct( /** * Prepare store specific fieldset * - * @param \Magento\Data\Form $form + * @param \Magento\Framework\Data\Form $form * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - protected function _prepareStoreFieldset(\Magento\Data\Form $form) + protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form) { $storeModel = $this->_coreRegistry->registry('store_data'); $postData = $this->_coreRegistry->registry('store_post_data'); diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php index dfe0e4f01d73c..8955a2bc069ba 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php @@ -43,15 +43,15 @@ class Website extends \Magento\Backend\Block\System\Store\Edit\AbstractForm /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Store\Model\GroupFactory $groupFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Store\Model\GroupFactory $groupFactory, array $data = array() ) { @@ -62,10 +62,10 @@ public function __construct( /** * Prepare website specific fieldset * - * @param \Magento\Data\Form $form + * @param \Magento\Framework\Data\Form $form * @return void */ - protected function _prepareStoreFieldset(\Magento\Data\Form $form) + protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form) { $websiteModel = $this->_coreRegistry->registry('store_data'); $postData = $this->_coreRegistry->registry('store_post_data'); @@ -73,7 +73,7 @@ protected function _prepareStoreFieldset(\Magento\Data\Form $form) $websiteModel->setData($postData['website']); } $fieldset = $form->addFieldset('website_fieldset', array('legend' => __('Web Site Information'))); - /* @var $fieldset \Magento\Data\Form */ + /* @var $fieldset \Magento\Framework\Data\Form */ $fieldset->addField( 'website_name', diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php index d55d07753fb84..c48286acf04a9 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php @@ -37,7 +37,7 @@ class Group extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR /** * {@inheritdoc} */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { if (!$row->getData($this->getColumn()->getIndex())) { return null; diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php index ed16a9269c251..3ba2a9a24cfb5 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php @@ -37,7 +37,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR /** * {@inheritdoc} */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { if (!$row->getData($this->getColumn()->getIndex())) { return null; diff --git a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php index 2cd251f8617d2..6102fcb805f72 100644 --- a/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php @@ -37,7 +37,7 @@ class Website extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstrac /** * {@inheritdoc} */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { return '
' . @@ -156,7 +156,7 @@ public function getEscapedValue($index = null) $value = $this->getValue($index); if ($value instanceof \Zend_Date) { return $value->toString( - $this->_localeDate->getDateFormat(\Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT) + $this->_localeDate->getDateFormat(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT) ); } return $value; @@ -220,7 +220,7 @@ public function setValue($value) * * @param string $date * @param string $locale - * @return \Magento\Stdlib\DateTime\Date|null + * @return \Magento\Framework\Stdlib\DateTime\Date|null */ protected function _convertDate($date, $locale) { @@ -244,7 +244,7 @@ protected function _convertDate($date, $locale) $dateObj->set($date, \Zend_Date::DATE_SHORT, $locale); //convert store date to default date in UTC timezone without DST - $dateObj->setTimezone(\Magento\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); + $dateObj->setTimezone(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); return $dateObj; } catch (\Exception $e) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php index 1b90823bab02a..a5e956d90a91c 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php @@ -67,7 +67,7 @@ public function getValue($index = null) ) ); $datetimeTo->addDay(1)->subSecond(1); - $datetimeTo->setTimezone(\Magento\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); + $datetimeTo->setTimezone(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); } return $value; } @@ -77,7 +77,7 @@ public function getValue($index = null) * * @param string $date * @param string $locale - * @return \Magento\Stdlib\DateTime\Date|null + * @return \Magento\Framework\Stdlib\DateTime\Date|null */ protected function _convertDate($date, $locale) { @@ -97,13 +97,13 @@ protected function _convertDate($date, $locale) $dateObj->set( $date, $this->getLocaleDate()->getDateTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT ), $locale ); //convert store date to default date in UTC timezone without DST - $dateObj->setTimezone(\Magento\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); + $dateObj->setTimezone(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE); return $dateObj; } catch (\Exception $e) { @@ -121,12 +121,12 @@ protected function _convertDate($date, $locale) public function getHtml() { $htmlId = $this->mathRandom->getUniqueHash($this->_getHtmlId()); - $format = $this->_localeDate->getDateFormat(\Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT); + $format = $this->_localeDate->getDateFormat(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT); $timeFormat = ''; if ($this->getColumn()->getFilterTime()) { $timeFormat = $this->_localeDate->getTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT ); } @@ -185,7 +185,7 @@ public function getEscapedValue($index = null) if ($value instanceof \Zend_Date) { return $value->toString( $this->_localeDate->getDateTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT ) ); } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php index 0c7f01f53400c..fda39736d287d 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Price.php @@ -53,14 +53,14 @@ class Price extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFil /** * @param \Magento\Backend\Block\Context $context - * @param \Magento\DB\Helper $resourceHelper + * @param \Magento\Framework\DB\Helper $resourceHelper * @param \Magento\Directory\Model\Currency $currencyModel * @param \Magento\Directory\Model\Currency\DefaultLocator $currencyLocator * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, - \Magento\DB\Helper $resourceHelper, + \Magento\Framework\DB\Helper $resourceHelper, \Magento\Directory\Model\Currency $currencyModel, \Magento\Directory\Model\Currency\DefaultLocator $currencyLocator, array $data = array() diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php index ad7ef82f61ec2..6a223f4a664ab 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Store.php @@ -38,13 +38,13 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFil /** * @param \Magento\Backend\Block\Context $context - * @param \Magento\DB\Helper $resourceHelper + * @param \Magento\Framework\DB\Helper $resourceHelper * @param \Magento\Store\Model\System\Store $systemStore * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, - \Magento\DB\Helper $resourceHelper, + \Magento\Framework\DB\Helper $resourceHelper, \Magento\Store\Model\System\Store $systemStore, array $data = array() ) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Theme.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Theme.php index 63c14b3c39199..501a2c82c318b 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Theme.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Theme.php @@ -32,20 +32,20 @@ class Theme extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter { /** - * @var \Magento\View\Design\Theme\LabelFactory + * @var \Magento\Framework\View\Design\Theme\LabelFactory */ protected $_labelFactory; /** * @param \Magento\Backend\Block\Context $context - * @param \Magento\DB\Helper $resourceHelper - * @param \Magento\View\Design\Theme\LabelFactory $labelFactory + * @param \Magento\Framework\DB\Helper $resourceHelper + * @param \Magento\Framework\View\Design\Theme\LabelFactory $labelFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, - \Magento\DB\Helper $resourceHelper, - \Magento\View\Design\Theme\LabelFactory $labelFactory, + \Magento\Framework\DB\Helper $resourceHelper, + \Magento\Framework\View\Design\Theme\LabelFactory $labelFactory, array $data = array() ) { $this->_labelFactory = $labelFactory; @@ -83,7 +83,7 @@ public function getOptions() { $options = $this->getColumn()->getOptions(); if (empty($options) || !is_array($options)) { - /** @var $label \Magento\View\Design\Theme\Label */ + /** @var $label \Magento\Framework\View\Design\Theme\Label */ $label = $this->_labelFactory->create(); $options = $label->getLabelsCollection(); } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php index 30cbd0ece2b85..7b2c35ae21806 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php @@ -68,10 +68,10 @@ public function getColumn() /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { if ($this->getColumn()->getEditable()) { $value = $this->_getValue($row); @@ -86,19 +86,19 @@ public function render(\Magento\Object $row) /** * Render column for export * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function renderExport(\Magento\Object $row) + public function renderExport(\Magento\Framework\Object $row) { return $this->render($row); } /** - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return mixed */ - protected function _getValue(\Magento\Object $row) + protected function _getValue(\Magento\Framework\Object $row) { if ($getter = $this->getColumn()->getGetter()) { if (is_string($getter)) { @@ -112,10 +112,10 @@ protected function _getValue(\Magento\Object $row) } /** - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function _getInputValueElement(\Magento\Object $row) + public function _getInputValueElement(\Magento\Framework\Object $row) { return 'getColumn()->getInlineCss() . diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Input.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Input.php index 3e0fb4145a870..8f132cd7fe4d7 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Input.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Input.php @@ -43,10 +43,10 @@ class Input extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $html = 'getColumn()->getId() . '" '; diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Ip.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Ip.php index 0684c809d03e3..4df8aaf3dbfb0 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Ip.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Ip.php @@ -38,10 +38,10 @@ class Ip extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRend /** * Render the grid cell value * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { return long2ip($row->getData($this->getColumn()->getIndex())); } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php index dd4eac1b61575..94bbe8024e4e9 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Longtext.php @@ -36,10 +36,10 @@ class Longtext extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra * Text will be truncated as specified in string_limit, truncate or 250 by default * Also it can be html-escaped and nl2br() * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $truncateLength = 250; // stringLength() is for legacy purposes diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Massaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Massaction.php index 2fd799389ce68..4b79abd5a632c 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Massaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Massaction.php @@ -65,10 +65,10 @@ public function renderProperty() /** * Returns HTML of the object * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { if ($this->getColumn()->getGrid()->getMassactionIdFieldOnlyIndexValue()) { $this->setNoObjectId(true); diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Number.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Number.php index bb140f1696797..52a520f94df5f 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Number.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Number.php @@ -42,10 +42,10 @@ class Number extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstract /** * Returns value of the row * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return mixed|string */ - protected function _getValue(\Magento\Object $row) + protected function _getValue(\Magento\Framework\Object $row) { $data = parent::_getValue($row); if (!is_null($data)) { diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php index a1160ea302fe8..fbe66d1a0e99e 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Options.php @@ -47,10 +47,10 @@ protected function _getOptions() /** * Render a grid cell as options * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string|void */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $options = $this->_getOptions(); diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php index 99ae3536f5ba3..a3abfee993457 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Price.php @@ -38,23 +38,23 @@ class Price extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractR /** * Currency objects cache * - * @var \Magento\Object[] + * @var \Magento\Framework\Object[] */ protected static $_currencies = array(); /** - * @var \Magento\Locale\CurrencyInterface + * @var \Magento\Framework\Locale\CurrencyInterface */ protected $_localeCurrency; /** * @param \Magento\Backend\Block\Context $context - * @param \Magento\Locale\CurrencyInterface $localeCurrency + * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, - \Magento\Locale\CurrencyInterface $localeCurrency, + \Magento\Framework\Locale\CurrencyInterface $localeCurrency, array $data = array() ) { parent::__construct($context, $data); @@ -64,10 +64,10 @@ public function __construct( /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { if ($data = $row->getData($this->getColumn()->getIndex())) { $currencyCode = $this->_getCurrencyCode($row); @@ -87,7 +87,7 @@ public function render(\Magento\Object $row) /** * Returns currency code for the row, false on error * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string|false */ protected function _getCurrencyCode($row) @@ -104,7 +104,7 @@ protected function _getCurrencyCode($row) /** * Returns rate for the row, 1 by default * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return float|int */ protected function _getRate($row) diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php index 58f970e376de7..a07ae189fec67 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio.php @@ -90,10 +90,10 @@ public function getValues() /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $values = $this->_getValues(); $value = $row->getData($this->getColumn()->getIndex()); diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/RendererInterface.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/RendererInterface.php index 66b647a13a6f7..42285b6627eba 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/RendererInterface.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/RendererInterface.php @@ -56,8 +56,8 @@ public function getColumn(); /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row); + public function render(\Magento\Framework\Object $row); } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Select.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Select.php index ae89b3cf71725..b51f7626daa88 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Select.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Select.php @@ -67,10 +67,10 @@ protected function _getOptions() /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $name = $this->getColumn()->getName() ? $this->getColumn()->getName() : $this->getColumn()->getId(); $html = ''; } diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php index d5c66d3b144a4..1b36516eaab69 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -25,7 +25,7 @@ */ namespace Magento\Newsletter\Block\Adminhtml\Queue; -use Magento\View\Element\AbstractBlock; +use Magento\Framework\View\Element\AbstractBlock; use Magento\Newsletter\Model\Queue as ModelQueue; /** @@ -41,7 +41,7 @@ class Edit extends \Magento\Backend\Block\Template /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -53,13 +53,13 @@ class Edit extends \Magento\Backend\Block\Template /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php index d30ac8fd4dc36..a4b4319fc8f87 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit/Form.php @@ -51,8 +51,8 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Newsletter\Model\QueueFactory $queueFactory * @param \Magento\Store\Model\System\Store $systemStore * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig @@ -60,8 +60,8 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Newsletter\Model\QueueFactory $queueFactory, \Magento\Store\Model\System\Store $systemStore, \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, @@ -85,7 +85,7 @@ protected function _prepareForm() /* @var $queue \Magento\Newsletter\Model\Queue */ $queue = $this->getQueue(); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $fieldset = $form->addFieldset( @@ -94,10 +94,10 @@ protected function _prepareForm() ); $dateFormat = $this->_localeDate->getDateFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM ); $timeFormat = $this->_localeDate->getTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM ); if ($queue->getQueueStatus() == \Magento\Newsletter\Model\Queue::STATUS_NEVER) { @@ -173,7 +173,7 @@ protected function _prepareForm() $form->getElement( 'date' )->setValue( - $this->_localeDate->date($queue->getQueueStartAt(), \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT) + $this->_localeDate->date($queue->getQueueStartAt(), \Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT) ); } diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Grid/Renderer/Action.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Grid/Renderer/Action.php index 37599307f2f0a..c31089f8c721d 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Grid/Renderer/Action.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Grid/Renderer/Action.php @@ -38,10 +38,10 @@ class Action extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Action /** * Renders column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $actions = array(); diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php index 3b953e5f61c34..ba25a08899c30 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php @@ -96,7 +96,7 @@ protected function _toHtml() $storeId = $this->_storeManager->getDefaultStoreView()->getId(); } - \Magento\Profiler::start("newsletter_queue_proccessing"); + \Magento\Framework\Profiler::start("newsletter_queue_proccessing"); $vars = array(); $vars['subscriber'] = $this->_subscriberFactory->create(); @@ -113,7 +113,7 @@ protected function _toHtml() $templateProcessed = "
" . htmlspecialchars($templateProcessed) . "
"; } - \Magento\Profiler::stop("newsletter_queue_proccessing"); + \Magento\Framework\Profiler::stop("newsletter_queue_proccessing"); return $templateProcessed; } diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php index 3b93b5c3fdf37..eb8bdfa8b0961 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview/Form.php @@ -42,7 +42,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array( 'data' => array( diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php index 38bd0c88a154f..f21e0bf45731d 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Filter/Website.php @@ -43,7 +43,7 @@ class Website extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -59,18 +59,18 @@ class Website extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Select /** * @param \Magento\Backend\Block\Context $context - * @param \Magento\DB\Helper $resourceHelper + * @param \Magento\Framework\DB\Helper $resourceHelper * @param \Magento\Store\Model\Resource\Website\CollectionFactory $websitesFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, - \Magento\DB\Helper $resourceHelper, + \Magento\Framework\DB\Helper $resourceHelper, \Magento\Store\Model\Resource\Website\CollectionFactory $websitesFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Renderer/Checkbox.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Renderer/Checkbox.php index e43453851b0d7..2609c25ae4cb9 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Renderer/Checkbox.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber/Grid/Renderer/Checkbox.php @@ -38,10 +38,10 @@ class Checkbox extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra /** * Renders grid column * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { if ($row->getSubscriberStatus() == \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED) { return 'isValidForSend()) { $actions[] = array( diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid/Renderer/Sender.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid/Renderer/Sender.php index 6ab1a25e82c3a..87e9474e73b2a 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid/Renderer/Sender.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Grid/Renderer/Sender.php @@ -38,10 +38,10 @@ class Sender extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstract /** * Renderer for "Action" column in Newsletter templates grid * - * @param \Magento\Object $row + * @param \Magento\Framework\Object $row * @return string */ - public function render(\Magento\Object $row) + public function render(\Magento\Framework\Object $row) { $str = ''; if ($row->getTemplateSenderName()) { diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php index a16b17680a8a5..b7bb27e9ca992 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview.php @@ -85,7 +85,7 @@ protected function _toHtml() $storeId = $this->_storeManager->getDefaultStoreView()->getId(); } - \Magento\Profiler::start("newsletter_template_proccessing"); + \Magento\Framework\Profiler::start("newsletter_template_proccessing"); $vars = array(); $vars['subscriber'] = $this->_subscriberFactory->create(); @@ -105,7 +105,7 @@ protected function _toHtml() $templateProcessed = "
" . htmlspecialchars($templateProcessed) . "
"; } - \Magento\Profiler::stop("newsletter_template_proccessing"); + \Magento\Framework\Profiler::stop("newsletter_template_proccessing"); return $templateProcessed; } diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php index 89970e9566cf5..5178b0316055c 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template/Preview/Form.php @@ -42,7 +42,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array( 'data' => array( diff --git a/app/code/Magento/Newsletter/Block/Subscribe.php b/app/code/Magento/Newsletter/Block/Subscribe.php index 13ba0f2317ef2..024401c437b4e 100644 --- a/app/code/Magento/Newsletter/Block/Subscribe.php +++ b/app/code/Magento/Newsletter/Block/Subscribe.php @@ -33,7 +33,7 @@ */ namespace Magento\Newsletter\Block; -class Subscribe extends \Magento\View\Element\Template +class Subscribe extends \Magento\Framework\View\Element\Template { /** * Newsletter session @@ -43,12 +43,12 @@ class Subscribe extends \Magento\View\Element\Template protected $_newsletterSession; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Newsletter\Model\Session $newsletterSession * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Newsletter\Model\Session $newsletterSession, array $data = array() ) { diff --git a/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/GroupOptionHash.php b/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/GroupOptionHash.php index 33821f9fdf5fa..2aa82c75342a3 100644 --- a/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/GroupOptionHash.php +++ b/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/GroupOptionHash.php @@ -25,7 +25,7 @@ */ namespace Magento\Newsletter\Block\Subscribe\Grid\Options; -class GroupOptionHash implements \Magento\Option\ArrayInterface +class GroupOptionHash implements \Magento\Framework\Option\ArrayInterface { /** * System Store Model diff --git a/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/StoreOptionHash.php b/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/StoreOptionHash.php index 680936786f0d8..0b3b7ed5025df 100644 --- a/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/StoreOptionHash.php +++ b/app/code/Magento/Newsletter/Block/Subscribe/Grid/Options/StoreOptionHash.php @@ -25,7 +25,7 @@ */ namespace Magento\Newsletter\Block\Subscribe\Grid\Options; -class StoreOptionHash implements \Magento\Option\ArrayInterface +class StoreOptionHash implements \Magento\Framework\Option\ArrayInterface { /** * System Store Model diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue.php index 6904c916a4067..ffc5a705c3c8d 100644 --- a/app/code/Magento/Newsletter/Controller/Adminhtml/Queue.php +++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Queue.php @@ -38,15 +38,15 @@ class Queue extends \Magento\Backend\App\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry */ - public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Registry $coreRegistry) + public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry) { $this->_coreRegistry = $coreRegistry; parent::__construct($context); @@ -143,7 +143,7 @@ public function startAction() } $queue->setQueueStartAt( - $this->_objectManager->get('Magento\Stdlib\DateTime\DateTime')->gmtDate() + $this->_objectManager->get('Magento\Framework\Stdlib\DateTime\DateTime')->gmtDate() )->setQueueStatus( \Magento\Newsletter\Model\Queue::STATUS_SENDING )->save(); @@ -282,7 +282,7 @@ public function editAction() /** * Save Newsletter queue * - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return void */ public function saveAction() @@ -297,7 +297,7 @@ public function saveAction() $template = $this->_objectManager->create('Magento\Newsletter\Model\Template')->load($templateId); if (!$template->getId() || $template->getIsSystem()) { - throw new \Magento\Model\Exception(__('Please correct the newsletter template and try again.')); + throw new \Magento\Framework\Model\Exception(__('Please correct the newsletter template and try again.')); } $queue->setTemplateId( @@ -351,7 +351,7 @@ public function saveAction() $this->_getSession()->setFormData(false); $this->_redirect('*/*'); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); $id = $this->getRequest()->getParam('id'); if ($id) { diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Template.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Template.php index 7a9850279c0e5..d5bc4ff0696e5 100644 --- a/app/code/Magento/Newsletter/Controller/Adminhtml/Template.php +++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Template.php @@ -37,15 +37,15 @@ class Template extends \Magento\Backend\App\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry */ - public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Registry $coreRegistry) + public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry) { $this->_coreRegistry = $coreRegistry; parent::__construct($context); @@ -201,7 +201,7 @@ public function saveAction() )->setTemplateStyles( $request->getParam('styles') )->setModifiedAt( - $this->_objectManager->get('Magento\Stdlib\DateTime\DateTime')->gmtDate() + $this->_objectManager->get('Magento\Framework\Stdlib\DateTime\DateTime')->gmtDate() ); if (!$template->getId()) { @@ -222,7 +222,7 @@ public function saveAction() $this->_redirect('*/template'); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError(nl2br($e->getMessage())); $this->_getSession()->setData('newsletter_template_form_data', $this->getRequest()->getParams()); } catch (\Exception $e) { @@ -250,7 +250,7 @@ public function deleteAction() $template->delete(); $this->messageManager->addSuccess(__('The newsletter template has been deleted.')); $this->_getSession()->setFormData(false); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException($e, __('An error occurred while deleting this template.')); diff --git a/app/code/Magento/Newsletter/Controller/Subscriber.php b/app/code/Magento/Newsletter/Controller/Subscriber.php index fdaa21391938c..98f20ee1585db 100644 --- a/app/code/Magento/Newsletter/Controller/Subscriber.php +++ b/app/code/Magento/Newsletter/Controller/Subscriber.php @@ -96,7 +96,7 @@ public function __construct( /** * New subscription action * - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return void */ public function newAction() @@ -115,7 +115,7 @@ public function newAction() } else { $this->messageManager->addSuccess(__('Thank you for your subscription.')); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addException( $e, __('There was a problem with the subscription: %1', $e->getMessage()) @@ -167,7 +167,7 @@ public function unsubscribeAction() try { $this->_subscriberFactory->create()->load($id)->setCheckCode($code)->unsubscribe(); $this->messageManager->addSuccess(__('You have been unsubscribed.')); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addException($e, $e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException($e, __('Something went wrong with the un-subscription.')); @@ -180,7 +180,7 @@ public function unsubscribeAction() * Validates that the email address isn't being used by a different account. * * @param string $email - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return void */ protected function validateEmailAvailable($email) @@ -189,14 +189,14 @@ protected function validateEmailAvailable($email) if ($this->_customerSession->getCustomerDataObject()->getEmail() !== $email && !$this->_customerService->isEmailAvailable($email, $websiteId) ) { - throw new \Magento\Model\Exception(__('This email address is already assigned to another user.')); + throw new \Magento\Framework\Model\Exception(__('This email address is already assigned to another user.')); } } /** * Validates that if the current user is a guest, that they can subscribe to a newsletter. * - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return void */ protected function validateGuestSubscription() @@ -208,7 +208,7 @@ protected function validateGuestSubscription() ) != 1 && !$this->_customerSession->isLoggedIn() ) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __( 'Sorry, but the administrator denied subscription for guests. ' . 'Please
register.', @@ -222,13 +222,13 @@ protected function validateGuestSubscription() * Validates the format of the email address * * @param string $email - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return void */ protected function validateEmailFormat($email) { if (!\Zend_Validate::is($email, 'EmailAddress')) { - throw new \Magento\Model\Exception(__('Please enter a valid email address.')); + throw new \Magento\Framework\Model\Exception(__('Please enter a valid email address.')); } } } diff --git a/app/code/Magento/Newsletter/Model/Problem.php b/app/code/Magento/Newsletter/Model/Problem.php index afe21d0abf453..0436a2ffedac5 100644 --- a/app/code/Magento/Newsletter/Model/Problem.php +++ b/app/code/Magento/Newsletter/Model/Problem.php @@ -43,7 +43,7 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Problem extends \Magento\Model\AbstractModel +class Problem extends \Magento\Framework\Model\AbstractModel { /** * Current Subscriber @@ -62,19 +62,19 @@ class Problem extends \Magento\Model\AbstractModel /** * Construct * - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { parent::__construct($context, $registry, $resource, $resourceCollection, $data); diff --git a/app/code/Magento/Newsletter/Model/Queue.php b/app/code/Magento/Newsletter/Model/Queue.php index 8b9c74c49c6e5..9d55a35423b0b 100644 --- a/app/code/Magento/Newsletter/Model/Queue.php +++ b/app/code/Magento/Newsletter/Model/Queue.php @@ -102,12 +102,12 @@ class Queue extends \Magento\Email\Model\AbstractTemplate /** * Date * - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; /** - * @var \Magento\Stdlib\DateTime\TimezoneInterface + * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface */ protected $_localeDate; @@ -131,14 +131,14 @@ class Queue extends \Magento\Email\Model\AbstractTemplate protected $_transportBuilder; /** - * @param \Magento\Model\Context $context - * @param \Magento\View\DesignInterface $design - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\View\DesignInterface $design + * @param \Magento\Framework\Registry $registry * @param \Magento\Core\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Newsletter\Model\Template\Filter $templateFilter - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate - * @param \Magento\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory * @param \Magento\Newsletter\Model\ProblemFactory $problemFactory * @param \Magento\Newsletter\Model\Resource\Subscriber\CollectionFactory $subscriberCollectionFactory @@ -146,14 +146,14 @@ class Queue extends \Magento\Email\Model\AbstractTemplate * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\View\DesignInterface $design, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\View\DesignInterface $design, + \Magento\Framework\Registry $registry, \Magento\Core\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Newsletter\Model\Template\Filter $templateFilter, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, - \Magento\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Newsletter\Model\TemplateFactory $templateFactory, \Magento\Newsletter\Model\ProblemFactory $problemFactory, \Magento\Newsletter\Model\Resource\Subscriber\CollectionFactory $subscriberCollectionFactory, @@ -203,7 +203,7 @@ public function setQueueStartAtByString($startAt) $this->setQueueStartAt(null); } else { $format = $this->_localeDate->getDateTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM ); $time = $this->_localeDate->date($startAt, $format)->getTimestamp(); $this->setQueueStartAt($this->_date->gmtDate(null, $time)); @@ -254,7 +254,7 @@ public function sendPerSubscriber($count = 20) /** @var \Magento\Newsletter\Model\Subscriber $item */ foreach ($collection->getItems() as $item) { $transport = $this->_transportBuilder->setTemplateOptions( - array('area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => $item->getStoreId()) + array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $item->getStoreId()) )->setTemplateVars( array('subscriber' => $item) )->setFrom( @@ -266,7 +266,7 @@ public function sendPerSubscriber($count = 20) try { $transport->sendMessage(); - } catch (\Magento\Mail\Exception $e) { + } catch (\Magento\Framework\Mail\Exception $e) { /** @var \Magento\Newsletter\Model\Problem $problem */ $problem = $this->_problemFactory->create(); $problem->addSubscriberData($item); diff --git a/app/code/Magento/Newsletter/Model/Queue/Options/Status.php b/app/code/Magento/Newsletter/Model/Queue/Options/Status.php index 2308035299fc1..95b8b39ae0e81 100644 --- a/app/code/Magento/Newsletter/Model/Queue/Options/Status.php +++ b/app/code/Magento/Newsletter/Model/Queue/Options/Status.php @@ -33,7 +33,7 @@ */ namespace Magento\Newsletter\Model\Queue\Options; -class Status implements \Magento\Option\ArrayInterface +class Status implements \Magento\Framework\Option\ArrayInterface { /** * Return statuses option array diff --git a/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php b/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php index bb2e0c3bd0a47..d353cb51f361a 100644 --- a/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php +++ b/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php @@ -23,7 +23,7 @@ */ namespace Magento\Newsletter\Model\Queue; -class TransportBuilder extends \Magento\Mail\Template\TransportBuilder +class TransportBuilder extends \Magento\Framework\Mail\Template\TransportBuilder { /** * Template data @@ -52,7 +52,7 @@ protected function prepareMessage() $template = $this->getTemplate()->setData($this->templateData); $this->message->setMessageType( - \Magento\Mail\MessageInterface::TYPE_HTML + \Magento\Framework\Mail\MessageInterface::TYPE_HTML )->setBody( $template->getProcessedTemplate() )->setSubject( diff --git a/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php index 8fd107795ebf2..3190dc7ba8dee 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Grid/Collection.php @@ -39,7 +39,7 @@ class Collection extends \Magento\Newsletter\Model\Resource\Problem\Collection /** * Adds queue info to grid * - * @return \Magento\Model\Resource\Db\Collection\AbstractCollection|\Magento\Newsletter\Model\Resource\Grid\Collection + * @return \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection|\Magento\Newsletter\Model\Resource\Grid\Collection */ protected function _initSelect() { diff --git a/app/code/Magento/Newsletter/Model/Resource/Problem.php b/app/code/Magento/Newsletter/Model/Resource/Problem.php index 4372fe715b93e..bbc20840c4a26 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Problem.php +++ b/app/code/Magento/Newsletter/Model/Resource/Problem.php @@ -32,7 +32,7 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Problem extends \Magento\Model\Resource\Db\AbstractDb +class Problem extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Define main table diff --git a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php index ccb3321ad2eab..1bbc14d9969d8 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Problem/Collection.php @@ -26,14 +26,14 @@ namespace Magento\Newsletter\Model\Resource\Problem; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; /** * Newsletter problems collection * * @SuppressWarnings(PHPMD.LongVariable) */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * True when subscribers info joined @@ -80,23 +80,23 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio /** * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param CustomerAccountServiceInterface $customerAccountService, * @param \Magento\Customer\Helper\View $customerView * @param null|\Zend_Db_Adapter_Abstract $connection - * @param \Magento\Model\Resource\Db\AbstractDb $resource + * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, CustomerAccountServiceInterface $customerAccountService, \Magento\Customer\Helper\View $customerView, $connection = null, - \Magento\Model\Resource\Db\AbstractDb $resource = null + \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null ) { parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_customerAccountService = $customerAccountService; diff --git a/app/code/Magento/Newsletter/Model/Resource/Queue.php b/app/code/Magento/Newsletter/Model/Resource/Queue.php index f2ff3ee484fcd..0f141870577bf 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Queue.php +++ b/app/code/Magento/Newsletter/Model/Resource/Queue.php @@ -26,7 +26,7 @@ namespace Magento\Newsletter\Model\Resource; use Magento\Newsletter\Model\Queue as ModelQueue; -use Magento\Model\AbstractModel; +use Magento\Framework\Model\AbstractModel; /** * Newsletter queue resource model @@ -35,7 +35,7 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Queue extends \Magento\Model\Resource\Db\AbstractDb +class Queue extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Subscriber collection @@ -74,16 +74,16 @@ protected function _construct() * @param ModelQueue $queue * @param array $subscriberIds * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function addSubscribersToQueue(ModelQueue $queue, array $subscriberIds) { if (count($subscriberIds) == 0) { - throw new \Magento\Model\Exception(__('There are no subscribers selected.')); + throw new \Magento\Framework\Model\Exception(__('There are no subscribers selected.')); } if (!$queue->getId() && $queue->getQueueStatus() != Magento_Newsletter_Model_Queue::STATUS_NEVER) { - throw new \Magento\Model\Exception(__('You selected an invalid queue.')); + throw new \Magento\Framework\Model\Exception(__('You selected an invalid queue.')); } $adapter = $this->_getWriteAdapter(); @@ -214,7 +214,7 @@ public function getStores(ModelQueue $queue) /** * Saving template after saving queue action * - * @param AbstractModel $queue + * @param \Magento\Framework\Model\AbstractModel $queue * @return $this */ protected function _afterSave(AbstractModel $queue) diff --git a/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php index 879ff3bca7f36..5d3e993e69da8 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Queue/Collection.php @@ -32,7 +32,7 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * True when subscribers info joined @@ -51,27 +51,27 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio /** * Date * - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; /** * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param null|\Zend_Db_Adapter_Abstract $connection - * @param \Magento\Model\Resource\Db\AbstractDb $resource + * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, - \Magento\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, + \Magento\Framework\Stdlib\DateTime\DateTime $date, $connection = null, - \Magento\Model\Resource\Db\AbstractDb $resource = null + \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null ) { parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_date = $date; @@ -111,7 +111,7 @@ public function addTemplateInfo() */ protected function _addSubscriberInfoToSelect() { - /** @var $select \Magento\DB\Select */ + /** @var $select \Magento\Framework\DB\Select */ $select = $this->getConnection()->select()->from( array('qlt' => $this->getTable('newsletter_queue_link')), 'COUNT(qlt.queue_link_id)' diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber.php index 188954b02f8d8..27f39229bf91b 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber.php @@ -32,7 +32,7 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Subscriber extends \Magento\Model\Resource\Db\AbstractDb +class Subscriber extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * DB read connection @@ -65,12 +65,12 @@ class Subscriber extends \Magento\Model\Resource\Db\AbstractDb /** * Date * - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; @@ -78,13 +78,13 @@ class Subscriber extends \Magento\Model\Resource\Db\AbstractDb * Construct * * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Stdlib\DateTime\DateTime $date - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Math\Random $mathRandom */ public function __construct( \Magento\Framework\App\Resource $resource, - \Magento\Stdlib\DateTime\DateTime $date, - \Magento\Math\Random $mathRandom + \Magento\Framework\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Math\Random $mathRandom ) { $this->_date = $date; $this->mathRandom = $mathRandom; @@ -178,7 +178,7 @@ protected function _generateRandomCode() * @param \Magento\Newsletter\Model\Subscriber $subscriber * @param \Magento\Newsletter\Model\Queue $queue * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function received(\Magento\Newsletter\Model\Subscriber $subscriber, \Magento\Newsletter\Model\Queue $queue) { @@ -193,7 +193,7 @@ public function received(\Magento\Newsletter\Model\Subscriber $subscriber, \Mage $this->_write->commit(); } catch (\Exception $e) { $this->_write->rollBack(); - throw new \Magento\Model\Exception(__('We cannot mark as received subscriber.')); + throw new \Magento\Framework\Model\Exception(__('We cannot mark as received subscriber.')); } return $this; } diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php index 948039c9266e5..d1883727e31a2 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php @@ -35,7 +35,7 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Queue link table name @@ -81,21 +81,21 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio /** * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Eav\Helper\Data $customerHelperData * @param null|\Zend_Db_Adapter_Abstract $connection - * @param \Magento\Model\Resource\Db\AbstractDb $resource + * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Eav\Helper\Data $customerHelperData, $connection = null, - \Magento\Model\Resource\Db\AbstractDb $resource = null + \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null ) { $this->_customerHelperData = $customerHelperData; parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); diff --git a/app/code/Magento/Newsletter/Model/Resource/Template.php b/app/code/Magento/Newsletter/Model/Resource/Template.php index ba8aeb3b118a0..0d450c242ee5d 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Template.php +++ b/app/code/Magento/Newsletter/Model/Resource/Template.php @@ -32,20 +32,20 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Template extends \Magento\Model\Resource\Db\AbstractDb +class Template extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Date * - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; /** * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date */ - public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Stdlib\DateTime\DateTime $date) + public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Stdlib\DateTime\DateTime $date) { parent::__construct($resource); $this->_date = $date; @@ -153,14 +153,14 @@ public function checkCodeUsage(\Magento\Newsletter\Model\Template $template) /** * Perform actions before object save * - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - protected function _beforeSave(\Magento\Model\AbstractModel $object) + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) { if ($this->checkCodeUsage($object)) { - throw new \Magento\Model\Exception(__('Duplicate template code')); + throw new \Magento\Framework\Model\Exception(__('Duplicate template code')); } if (!$object->hasTemplateActual()) { diff --git a/app/code/Magento/Newsletter/Model/Resource/Template/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Template/Collection.php index f6a6ed7723eb0..901d34c70e6d1 100644 --- a/app/code/Magento/Newsletter/Model/Resource/Template/Collection.php +++ b/app/code/Magento/Newsletter/Model/Resource/Template/Collection.php @@ -32,7 +32,7 @@ * @package Magento_Newsletter * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Define resource model and model diff --git a/app/code/Magento/Newsletter/Model/Session.php b/app/code/Magento/Newsletter/Model/Session.php index 5959e4122f64a..437bdca8f84ac 100644 --- a/app/code/Magento/Newsletter/Model/Session.php +++ b/app/code/Magento/Newsletter/Model/Session.php @@ -28,7 +28,7 @@ /** * Newsletter session model */ -class Session extends \Magento\Session\Generic +class Session extends \Magento\Framework\Session\Generic { /** * Set error message diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php index d1d60ed372d62..7959382d1e816 100644 --- a/app/code/Magento/Newsletter/Model/Subscriber.php +++ b/app/code/Magento/Newsletter/Model/Subscriber.php @@ -24,7 +24,8 @@ namespace Magento\Newsletter\Model; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; +use Magento\Framework\Mail\Exception as MailException; /** * Subscriber model @@ -49,7 +50,7 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ -class Subscriber extends \Magento\Model\AbstractModel +class Subscriber extends \Magento\Framework\Model\AbstractModel { const STATUS_SUBSCRIBED = 1; const STATUS_NOT_ACTIVE = 2; @@ -124,41 +125,41 @@ class Subscriber extends \Magento\Model\AbstractModel protected $_customerAccountService; /** - * @var \Magento\Mail\Template\TransportBuilder + * @var \Magento\Framework\Mail\Template\TransportBuilder */ protected $_transportBuilder; /** - * @var \Magento\Translate\Inline\StateInterface + * @var \Magento\Framework\Translate\Inline\StateInterface */ protected $inlineTranslation; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Newsletter\Helper\Data $newsletterData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Mail\Template\TransportBuilder $transportBuilder + * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService - * @param \Magento\Translate\Inline\StateInterface $inlineTranslation - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Newsletter\Helper\Data $newsletterData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Mail\Template\TransportBuilder $transportBuilder, + \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Customer\Model\Session $customerSession, CustomerAccountServiceInterface $customerAccountService, - \Magento\Translate\Inline\StateInterface $inlineTranslation, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = [] ) { $this->_newsletterData = $newsletterData; @@ -364,7 +365,7 @@ public function loadByCustomerId($customerId) $this->setSubscriberConfirmCode($this->randomSequence()); $this->save(); } - } catch (\Magento\Exception\NoSuchEntityException $e) { + } catch (NoSuchEntityException $e) { } return $this; } @@ -467,13 +468,13 @@ public function subscribe($email) /** * Unsubscribes loaded subscription * - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return $this */ public function unsubscribe() { if ($this->hasCheckCode() && $this->getCode() != $this->getCheckCode()) { - throw new \Magento\Model\Exception(__('This is an invalid subscription confirmation code.')); + throw new \Magento\Framework\Model\Exception(__('This is an invalid subscription confirmation code.')); } if ($this->getSubscriberStatus() != self::STATUS_UNSUBSCRIBED) { @@ -585,10 +586,15 @@ protected function _updateCustomerSubscription($customerId, $subscribe) $this->save(); $sendSubscription = $sendInformationEmail; if (is_null($sendSubscription) xor $sendSubscription) { - if ($this->isStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) { - $this->sendUnsubscriptionEmail(); - } elseif ($this->isStatusChanged() && $status == self::STATUS_SUBSCRIBED) { - $this->sendConfirmationSuccessEmail(); + try { + if ($this->isStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) { + $this->sendUnsubscriptionEmail(); + } elseif ($this->isStatusChanged() && $status == self::STATUS_SUBSCRIBED) { + $this->sendConfirmationSuccessEmail(); + } + } catch (MailException $e) { + // If we are not able to send a new account email, this should be ignored + $this->_logger->logException($e); } } return $this; @@ -655,7 +661,7 @@ public function sendConfirmationRequestEmail() ) )->setTemplateOptions( array( - 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $this->_storeManager->getStore()->getId() ) )->setTemplateVars( @@ -708,7 +714,7 @@ public function sendConfirmationSuccessEmail() ) )->setTemplateOptions( array( - 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $this->_storeManager->getStore()->getId() ) )->setTemplateVars( @@ -760,7 +766,7 @@ public function sendUnsubscriptionEmail() ) )->setTemplateOptions( array( - 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $this->_storeManager->getStore()->getId() ) )->setTemplateVars( diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php index ace206a7d5f46..c963d5d8fb834 100644 --- a/app/code/Magento/Newsletter/Model/Template.php +++ b/app/code/Magento/Newsletter/Model/Template.php @@ -107,34 +107,34 @@ class Template extends \Magento\Email\Model\AbstractTemplate protected $_templateFactory; /** - * @var \Magento\Filter\FilterManager + * @var \Magento\Framework\Filter\FilterManager */ protected $_filterManager; /** - * @param \Magento\Model\Context $context - * @param \Magento\View\DesignInterface $design - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\View\DesignInterface $design + * @param \Magento\Framework\Registry $registry * @param \Magento\Core\Model\App\Emulation $appEmulation * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\RequestInterface $request * @param \Magento\Newsletter\Model\Template\Filter $filter * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory - * @param \Magento\Filter\FilterManager $filterManager + * @param \Magento\Framework\Filter\FilterManager $filterManager * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\View\DesignInterface $design, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\View\DesignInterface $design, + \Magento\Framework\Registry $registry, \Magento\Core\Model\App\Emulation $appEmulation, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\RequestInterface $request, \Magento\Newsletter\Model\Template\Filter $filter, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Newsletter\Model\TemplateFactory $templateFactory, - \Magento\Filter\FilterManager $filterManager, + \Magento\Framework\Filter\FilterManager $filterManager, array $data = array() ) { parent::__construct($context, $design, $registry, $appEmulation, $storeManager, $data); @@ -160,7 +160,7 @@ protected function _construct() * Validate Newsletter template * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function validate() { @@ -188,7 +188,7 @@ public function validate() } } - throw new \Magento\Model\Exception(join("\n", $errorMessages)); + throw new \Magento\Framework\Model\Exception(join("\n", $errorMessages)); } } diff --git a/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.0-1.6.0.1.php index 623183595a9b3..8e8c3c2cab062 100644 --- a/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $subscriberTable = $installer->getTable('newsletter_subscriber'); diff --git a/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php index ba52b3a29d18d..a78fd43a3dd74 100644 --- a/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Newsletter/data/newsletter_setup/data-upgrade-1.6.0.1-1.6.0.2.php @@ -24,29 +24,29 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup\Migration */ +/** @var $installer \Magento\Framework\Module\Setup\Migration */ $installer = $this->createMigrationSetup(); $installer->startSetup(); $installer->appendClassAliasReplace( 'newsletter_template', 'template_text', - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI, + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI, array('template_id') ); $installer->appendClassAliasReplace( 'newsletter_template', 'template_text_preprocessed', - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI, + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI, array('template_id') ); $installer->appendClassAliasReplace( 'newsletter_queue', 'newsletter_text', - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI, + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI, array('queue_id') ); diff --git a/app/code/Magento/Newsletter/etc/adminhtml/acl.xml b/app/code/Magento/Newsletter/etc/adminhtml/acl.xml index 815f335203a6a..4a1f863645796 100644 --- a/app/code/Magento/Newsletter/etc/adminhtml/acl.xml +++ b/app/code/Magento/Newsletter/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Newsletter/etc/adminhtml/di.xml b/app/code/Magento/Newsletter/etc/adminhtml/di.xml index eec191dd7495e..a3f2721c6a3c2 100644 --- a/app/code/Magento/Newsletter/etc/adminhtml/di.xml +++ b/app/code/Magento/Newsletter/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + adminhtml diff --git a/app/code/Magento/Newsletter/etc/di.xml b/app/code/Magento/Newsletter/etc/di.xml index 13addd3297378..d048bfbd9a5c8 100644 --- a/app/code/Magento/Newsletter/etc/di.xml +++ b/app/code/Magento/Newsletter/etc/di.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + newsletter diff --git a/app/code/Magento/Newsletter/etc/frontend/di.xml b/app/code/Magento/Newsletter/etc/frontend/di.xml index 1df18a6261904..939a3b9eb607f 100644 --- a/app/code/Magento/Newsletter/etc/frontend/di.xml +++ b/app/code/Magento/Newsletter/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + frontend diff --git a/app/code/Magento/Newsletter/etc/module.xml b/app/code/Magento/Newsletter/etc/module.xml index 006dd78f50af6..f1063ed2e6bec 100644 --- a/app/code/Magento/Newsletter/etc/module.xml +++ b/app/code/Magento/Newsletter/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php b/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php index b71aebd6cd42c..040cb38e5da7a 100644 --- a/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php +++ b/app/code/Magento/Newsletter/sql/newsletter_setup/install-1.6.0.0.php @@ -33,7 +33,7 @@ * @author Magento Core Team */ $installer = $this; -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); @@ -44,43 +44,43 @@ $installer->getTable('newsletter_subscriber') )->addColumn( 'subscriber_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Subscriber Id' )->addColumn( 'store_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'default' => '0'), 'Store Id' )->addColumn( 'change_status_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Change Status At' )->addColumn( 'customer_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Customer Id' )->addColumn( 'subscriber_email', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 150, array('nullable' => true, 'default' => null), 'Subscriber Email' )->addColumn( 'subscriber_status', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('nullable' => false, 'default' => '0'), 'Subscriber Status' )->addColumn( 'subscriber_confirm_code', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 32, array('default' => 'NULL'), 'Subscriber Confirm Code' @@ -95,8 +95,8 @@ 'store_id', $installer->getTable('store'), 'store_id', - \Magento\DB\Ddl\Table::ACTION_SET_NULL, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_SET_NULL, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Newsletter Subscriber' ); @@ -109,73 +109,73 @@ $installer->getTable('newsletter_template') )->addColumn( 'template_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Template Id' )->addColumn( 'template_code', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 150, array(), 'Template Code' )->addColumn( 'template_text', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Template Text' )->addColumn( 'template_text_preprocessed', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Template Text Preprocessed' )->addColumn( 'template_styles', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Template Styles' )->addColumn( 'template_type', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true), 'Template Type' )->addColumn( 'template_subject', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 200, array(), 'Template Subject' )->addColumn( 'template_sender_name', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 200, array(), 'Template Sender Name' )->addColumn( 'template_sender_email', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 200, array(), 'Template Sender Email' )->addColumn( 'template_actual', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'default' => '1'), 'Template Actual' )->addColumn( 'added_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Added At' )->addColumn( 'modified_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Modified At' @@ -200,67 +200,67 @@ $installer->getTable('newsletter_queue') )->addColumn( 'queue_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Queue Id' )->addColumn( 'template_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Template Id' )->addColumn( 'newsletter_type', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array(), 'Newsletter Type' )->addColumn( 'newsletter_text', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Newsletter Text' )->addColumn( 'newsletter_styles', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Newsletter Styles' )->addColumn( 'newsletter_subject', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 200, array(), 'Newsletter Subject' )->addColumn( 'newsletter_sender_name', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 200, array(), 'Newsletter Sender Name' )->addColumn( 'newsletter_sender_email', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 200, array(), 'Newsletter Sender Email' )->addColumn( 'queue_status', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Queue Status' )->addColumn( 'queue_start_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Queue Start At' )->addColumn( 'queue_finish_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Queue Finish At' @@ -272,8 +272,8 @@ 'template_id', $installer->getTable('newsletter_template'), 'template_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Newsletter Queue' ); @@ -286,25 +286,25 @@ $installer->getTable('newsletter_queue_link') )->addColumn( 'queue_link_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Queue Link Id' )->addColumn( 'queue_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Queue Id' )->addColumn( 'subscriber_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Subscriber Id' )->addColumn( 'letter_sent_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Letter Sent At' @@ -322,15 +322,15 @@ 'queue_id', $installer->getTable('newsletter_queue'), 'queue_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('newsletter_queue_link', 'subscriber_id', 'newsletter_subscriber', 'subscriber_id'), 'subscriber_id', $installer->getTable('newsletter_subscriber'), 'subscriber_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Newsletter Queue Link' ); @@ -343,13 +343,13 @@ $installer->getTable('newsletter_queue_store_link') )->addColumn( 'queue_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'primary' => true, 'default' => '0'), 'Queue Id' )->addColumn( 'store_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'primary' => true, 'default' => '0'), 'Store Id' @@ -361,15 +361,15 @@ 'queue_id', $installer->getTable('newsletter_queue'), 'queue_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('newsletter_queue_store_link', 'store_id', 'store', 'store_id'), 'store_id', $installer->getTable('store'), 'store_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Newsletter Queue Store Link' ); @@ -382,31 +382,31 @@ $installer->getTable('newsletter_problem') )->addColumn( 'problem_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Problem Id' )->addColumn( 'subscriber_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true), 'Subscriber Id' )->addColumn( 'queue_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Queue Id' )->addColumn( 'problem_error_code', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'default' => '0'), 'Problem Error Code' )->addColumn( 'problem_error_text', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 200, array(), 'Problem Error Text' @@ -421,15 +421,15 @@ 'queue_id', $installer->getTable('newsletter_queue'), 'queue_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('newsletter_problem', 'subscriber_id', 'newsletter_subscriber', 'subscriber_id'), 'subscriber_id', $installer->getTable('newsletter_subscriber'), 'subscriber_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Newsletter Problems' ); diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml index 5f94b1fe292ba..26910f766883e 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_queue_preview_popup.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml index 02bee1dc3d819..3ca47ef559b53 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/newsletter_template_preview_popup.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml b/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml index dfcbb72979a73..de7ff8d6d5bbf 100644 --- a/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml +++ b/app/code/Magento/Newsletter/view/adminhtml/layout/preview.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml b/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml index df2fecb111f2d..0f5d66cff2494 100644 --- a/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml @@ -25,7 +25,7 @@ --> - + newsletter/manage Newsletter Subscriptions diff --git a/app/code/Magento/OfflinePayments/Block/Info/Ccsave.php b/app/code/Magento/OfflinePayments/Block/Info/Ccsave.php index a22d44d4df056..2247bddf5301b 100644 --- a/app/code/Magento/OfflinePayments/Block/Info/Ccsave.php +++ b/app/code/Magento/OfflinePayments/Block/Info/Ccsave.php @@ -30,8 +30,8 @@ class Ccsave extends \Magento\Payment\Block\Info\Cc * * Expiration date and full number will show up only in secure mode (only for admin, not in emails or pdfs) * - * @param \Magento\Object|array $transport - * @return \Magento\Object + * @param \Magento\Framework\Object|array $transport + * @return \Magento\Framework\Object */ protected function _prepareSpecificInformation($transport = null) { @@ -39,7 +39,7 @@ protected function _prepareSpecificInformation($transport = null) return $this->_paymentSpecificInformation; } $info = $this->getInfo(); - $transport = new \Magento\Object(array((string)__('Name on the Card') => $info->getCcOwner())); + $transport = new \Magento\Framework\Object(array((string)__('Name on the Card') => $info->getCcOwner())); $transport = parent::_prepareSpecificInformation($transport); if (!$this->getIsSecureMode()) { $transport->addData( diff --git a/app/code/Magento/OfflinePayments/Model/Observer.php b/app/code/Magento/OfflinePayments/Model/Observer.php index 9f14bbdec4d2b..662b7ad074072 100644 --- a/app/code/Magento/OfflinePayments/Model/Observer.php +++ b/app/code/Magento/OfflinePayments/Model/Observer.php @@ -32,10 +32,10 @@ class Observer /** * Sets current instructions for bank transfer account * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function beforeOrderPaymentSave(\Magento\Event\Observer $observer) + public function beforeOrderPaymentSave(\Magento\Framework\Event\Observer $observer) { /** @var \Magento\Sales\Model\Order\Payment $payment */ $payment = $observer->getEvent()->getPayment(); diff --git a/app/code/Magento/OfflinePayments/Model/Purchaseorder.php b/app/code/Magento/OfflinePayments/Model/Purchaseorder.php index f6553bcb90fc9..f7bedc9d08817 100644 --- a/app/code/Magento/OfflinePayments/Model/Purchaseorder.php +++ b/app/code/Magento/OfflinePayments/Model/Purchaseorder.php @@ -43,13 +43,13 @@ class Purchaseorder extends \Magento\Payment\Model\Method\AbstractMethod /** * Assign data to info model instance * - * @param \Magento\Object|mixed $data + * @param \Magento\Framework\Object|mixed $data * @return $this */ public function assignData($data) { - if (!$data instanceof \Magento\Object) { - $data = new \Magento\Object($data); + if (!$data instanceof \Magento\Framework\Object) { + $data = new \Magento\Framework\Object($data); } $this->getInfoInstance()->setPoNumber($data->getPoNumber()); diff --git a/app/code/Magento/OfflinePayments/etc/events.xml b/app/code/Magento/OfflinePayments/etc/events.xml index 47ccab9c91314..8e06e159a9546 100644 --- a/app/code/Magento/OfflinePayments/etc/events.xml +++ b/app/code/Magento/OfflinePayments/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/OfflinePayments/etc/module.xml b/app/code/Magento/OfflinePayments/etc/module.xml index c40a3a6e90fc3..ffd43c8ad3313 100644 --- a/app/code/Magento/OfflinePayments/etc/module.xml +++ b/app/code/Magento/OfflinePayments/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/form/cashondelivery.phtml index 6844f939e8a6e..71f1bc8a2472f 100644 --- a/app/code/Magento/OfflinePayments/view/adminhtml/form/cashondelivery.phtml +++ b/app/code/Magento/OfflinePayments/view/adminhtml/form/cashondelivery.phtml @@ -25,7 +25,7 @@ */ /** - * @see \Magento\Payment\Block\Form\Cashondelivery + * @var $this \Magento\OfflinePayments\Block\Form\Cashondelivery */ ?> getInstructions()): ?> diff --git a/app/code/Magento/OfflinePayments/view/frontend/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/frontend/form/cashondelivery.phtml index 9af9e0201801e..1b9adee76f5fd 100644 --- a/app/code/Magento/OfflinePayments/view/frontend/form/cashondelivery.phtml +++ b/app/code/Magento/OfflinePayments/view/frontend/form/cashondelivery.phtml @@ -24,7 +24,7 @@ */ /** - * @see \Magento\Payment\Block\Form\Cashondelivery + * @see \Magento\OfflinePayments\Block\Form\Cashondelivery */ ?> getInstructions()): ?> diff --git a/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Export.php b/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Export.php index f548711e4113c..2934c20fabb5f 100644 --- a/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Export.php +++ b/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Export.php @@ -30,7 +30,7 @@ * @package Magento_OfflineShipping * @author Magento Core Team */ -class Export extends \Magento\Data\Form\Element\AbstractElement +class Export extends \Magento\Framework\Data\Form\Element\AbstractElement { /** * @var \Magento\Backend\Model\UrlInterface @@ -38,16 +38,16 @@ class Export extends \Magento\Data\Form\Element\AbstractElement protected $_backendUrl; /** - * @param \Magento\Data\Form\Element\Factory $factoryElement - * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection - * @param \Magento\Escaper $escaper + * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement + * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection + * @param \Magento\Framework\Escaper $escaper * @param \Magento\Backend\Helper\Data $helper * @param array $data */ public function __construct( - \Magento\Data\Form\Element\Factory $factoryElement, - \Magento\Data\Form\Element\CollectionFactory $factoryCollection, - \Magento\Escaper $escaper, + \Magento\Framework\Data\Form\Element\Factory $factoryElement, + \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, + \Magento\Framework\Escaper $escaper, \Magento\Backend\Model\UrlInterface $backendUrl, array $data = array() ) { diff --git a/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Import.php b/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Import.php index fd195728e8ee3..a4e4a5c996830 100644 --- a/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Import.php +++ b/app/code/Magento/OfflineShipping/Block/Adminhtml/Form/Field/Import.php @@ -30,7 +30,7 @@ * @package Magento_OfflineShipping * @author Magento Core Team */ -class Import extends \Magento\Data\Form\Element\AbstractElement +class Import extends \Magento\Framework\Data\Form\Element\AbstractElement { /** * @return void diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php index d9b81bf6be662..6dd0b300bcb6c 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Flatrate.php @@ -54,7 +54,7 @@ class Flatrate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implement /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory * @param array $data @@ -62,7 +62,7 @@ class Flatrate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implement public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory, \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, array $data = array() diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Freeshipping.php b/app/code/Magento/OfflineShipping/Model/Carrier/Freeshipping.php index d8a081ed68995..065d40b0ad51d 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Freeshipping.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Freeshipping.php @@ -58,7 +58,7 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory * @param array $data @@ -66,7 +66,7 @@ class Freeshipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier imple public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory, \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, array $data = array() diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php b/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php index 029ad7400f232..611eea399de59 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Pickup.php @@ -49,7 +49,7 @@ class Pickup extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory * @param array $data @@ -57,7 +57,7 @@ class Pickup extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory, \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, array $data = array() diff --git a/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php index b466f5c6dcae0..9dd229d9c5f27 100644 --- a/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Carrier/Tablerate.php @@ -64,7 +64,7 @@ class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implemen /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $resultMethodFactory * @param \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory @@ -73,7 +73,7 @@ class Tablerate extends \Magento\Shipping\Model\Carrier\AbstractCarrier implemen public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory, \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $resultMethodFactory, \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory, diff --git a/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php index fc6416ce0f8f7..e0ae53d84b286 100644 --- a/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Config/Backend/Tablerate.php @@ -23,7 +23,7 @@ */ namespace Magento\OfflineShipping\Model\Config\Backend; -use Magento\Model\AbstractModel; +use Magento\Framework\Model\AbstractModel; /** * Backend model for shipping table rates CSV importing @@ -38,21 +38,21 @@ class Tablerate extends \Magento\Framework\App\Config\Value protected $_tablerateFactory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\OfflineShipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_tablerateFactory = $tablerateFactory; @@ -60,7 +60,7 @@ public function __construct( } /** - * @return AbstractModel|void + * @return \Magento\Framework\Model\AbstractModel|void */ public function _afterSave() { diff --git a/app/code/Magento/OfflineShipping/Model/Config/Source/Flatrate.php b/app/code/Magento/OfflineShipping/Model/Config/Source/Flatrate.php index 731aca4f66233..95be41347f963 100644 --- a/app/code/Magento/OfflineShipping/Model/Config/Source/Flatrate.php +++ b/app/code/Magento/OfflineShipping/Model/Config/Source/Flatrate.php @@ -23,7 +23,7 @@ */ namespace Magento\OfflineShipping\Model\Config\Source; -class Flatrate implements \Magento\Option\ArrayInterface +class Flatrate implements \Magento\Framework\Option\ArrayInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/OfflineShipping/Model/Config/Source/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Config/Source/Tablerate.php index e6ef34da4aa8e..9057fcf586164 100644 --- a/app/code/Magento/OfflineShipping/Model/Config/Source/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Config/Source/Tablerate.php @@ -23,7 +23,7 @@ */ namespace Magento\OfflineShipping\Model\Config\Source; -class Tablerate implements \Magento\Option\ArrayInterface +class Tablerate implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\OfflineShipping\Model\Carrier\Tablerate diff --git a/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php b/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php index 55bd6bd4c9076..37135422be769 100644 --- a/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php +++ b/app/code/Magento/OfflineShipping/Model/Observer/SalesRule/ActionsTab.php @@ -35,15 +35,15 @@ class ActionsTab { /** - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function prepareForm($observer) { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $observer->getForm(); foreach ($form->getElements() as $element) { - /** @var \Magento\Data\Form\Element\AbstractElement $element */ + /** @var \Magento\Framework\Data\Form\Element\AbstractElement $element */ if ($element->getId() == 'action_fieldset') { $element->addField( 'simple_free_shipping', diff --git a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php index b49b164acce36..d2889621a2468 100644 --- a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php +++ b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php @@ -31,7 +31,7 @@ */ namespace Magento\OfflineShipping\Model\Resource\Carrier; -class Tablerate extends \Magento\Model\Resource\Db\AbstractDb +class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Import table rates website ID @@ -103,7 +103,7 @@ class Tablerate extends \Magento\Model\Resource\Db\AbstractDb protected $_coreConfig; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; @@ -136,7 +136,7 @@ class Tablerate extends \Magento\Model\Resource\Db\AbstractDb /** * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Logger $logger + * @param \Magento\Framework\Logger $logger * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\OfflineShipping\Model\Carrier\Tablerate $carrierTablerate @@ -146,7 +146,7 @@ class Tablerate extends \Magento\Model\Resource\Db\AbstractDb */ public function __construct( \Magento\Framework\App\Resource $resource, - \Magento\Logger $logger, + \Magento\Framework\Logger $logger, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\OfflineShipping\Model\Carrier\Tablerate $carrierTablerate, @@ -253,13 +253,13 @@ public function getRate(\Magento\Sales\Model\Quote\Address\RateRequest $request) /** * Upload table rate file and import data from it * - * @param \Magento\Object $object - * @throws \Magento\Model\Exception + * @param \Magento\Framework\Object $object + * @throws \Magento\Framework\Model\Exception * @return \Magento\OfflineShipping\Model\Resource\Carrier\Tablerate * @todo: this method should be refactored as soon as updated design will be provided * @see https://wiki.corp.x.com/display/MCOMS/Magento+Filesystem+Decisions */ - public function uploadAndImport(\Magento\Object $object) + public function uploadAndImport(\Magento\Framework\Object $object) { if (empty($_FILES['groups']['tmp_name']['tablerate']['fields']['import']['value'])) { return $this; @@ -281,7 +281,7 @@ public function uploadAndImport(\Magento\Object $object) $headers = $stream->readCsv(); if ($headers === false || count($headers) < 5) { $stream->close(); - throw new \Magento\Model\Exception(__('Please correct Table Rates File Format.')); + throw new \Magento\Framework\Model\Exception(__('Please correct Table Rates File Format.')); } if ($object->getData('groups/tablerate/fields/condition_name/inherit') == '1') { @@ -327,15 +327,15 @@ public function uploadAndImport(\Magento\Object $object) } $this->_saveImportData($importData); $stream->close(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $adapter->rollback(); $stream->close(); - throw new \Magento\Model\Exception($e->getMessage()); + throw new \Magento\Framework\Model\Exception($e->getMessage()); } catch (\Exception $e) { $adapter->rollback(); $stream->close(); $this->_logger->logException($e); - throw new \Magento\Model\Exception(__('Something went wrong while importing table rates.')); + throw new \Magento\Framework\Model\Exception(__('Something went wrong while importing table rates.')); } $adapter->commit(); @@ -345,7 +345,7 @@ public function uploadAndImport(\Magento\Object $object) 'We couldn\'t import this file because of these errors: %1', implode(" \n", $this->_importErrors) ); - throw new \Magento\Model\Exception($error); + throw new \Magento\Framework\Model\Exception($error); } return $this; diff --git a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate/Collection.php b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate/Collection.php index a854a890e3e72..8e15ebbce8033 100644 --- a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate/Collection.php +++ b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate/Collection.php @@ -28,7 +28,7 @@ * * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Directory/country table name diff --git a/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml b/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml index 98164fa9a2840..2b5a01e3cfeb8 100644 --- a/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml +++ b/app/code/Magento/OfflineShipping/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/OfflineShipping/etc/di.xml b/app/code/Magento/OfflineShipping/etc/di.xml index 0baccfccd7f1c..868a6329f9b21 100644 --- a/app/code/Magento/OfflineShipping/etc/di.xml +++ b/app/code/Magento/OfflineShipping/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/OfflineShipping/etc/fieldset.xml b/app/code/Magento/OfflineShipping/etc/fieldset.xml index fa316095f3f9c..58b3a02f07d9c 100644 --- a/app/code/Magento/OfflineShipping/etc/fieldset.xml +++ b/app/code/Magento/OfflineShipping/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd">
diff --git a/app/code/Magento/OfflineShipping/etc/module.xml b/app/code/Magento/OfflineShipping/etc/module.xml index 43c9bb6eb2713..e0061292dd59f 100644 --- a/app/code/Magento/OfflineShipping/etc/module.xml +++ b/app/code/Magento/OfflineShipping/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php b/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php index fdbedc5899273..9196d04196fbf 100644 --- a/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php +++ b/app/code/Magento/OfflineShipping/sql/offlineshipping_setup/install-2.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -34,55 +34,55 @@ $installer->getTable('shipping_tablerate') )->addColumn( 'pk', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Primary key' )->addColumn( 'website_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('nullable' => false, 'default' => '0'), 'Website Id' )->addColumn( 'dest_country_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 4, array('nullable' => false, 'default' => '0'), 'Destination coutry ISO/2 or ISO/3 code' )->addColumn( 'dest_region_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('nullable' => false, 'default' => '0'), 'Destination Region Id' )->addColumn( 'dest_zip', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 10, array('nullable' => false, 'default' => '*'), 'Destination Post Code (Zip)' )->addColumn( 'condition_name', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 20, array('nullable' => false), 'Rate Condition name' )->addColumn( 'condition_value', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '12,4', array('nullable' => false, 'default' => '0.0000'), 'Rate condition value' )->addColumn( 'price', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '12,4', array('nullable' => false, 'default' => '0.0000'), 'Price' )->addColumn( 'cost', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '12,4', array('nullable' => false, 'default' => '0.0000'), 'Cost' @@ -90,10 +90,10 @@ $installer->getIdxName( 'shipping_tablerate', array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'condition_name', 'condition_value'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'condition_name', 'condition_value'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->setComment( 'Shipping Tablerate' ); @@ -102,7 +102,7 @@ $installer->getConnection()->addColumn( $installer->getTable('salesrule'), 'simple_free_shipping', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Simple Free Shipping' @@ -110,7 +110,7 @@ $installer->getConnection()->addColumn( $installer->getTable('sales_flat_order_item'), 'free_shipping', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Free Shipping' @@ -118,7 +118,7 @@ $installer->getConnection()->addColumn( $installer->getTable('sales_flat_quote_address'), 'free_shipping', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Free Shipping' @@ -126,7 +126,7 @@ $installer->getConnection()->addColumn( $installer->getTable('sales_flat_quote_item'), 'free_shipping', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Free Shipping' @@ -134,7 +134,7 @@ $installer->getConnection()->addColumn( $installer->getTable('sales_flat_quote_address_item'), 'free_shipping', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true), 'Free Shipping' diff --git a/app/code/Magento/Ogone/Block/Paypage.php b/app/code/Magento/Ogone/Block/Paypage.php index 5cd2dcd6b4022..48e8fafff8fd1 100644 --- a/app/code/Magento/Ogone/Block/Paypage.php +++ b/app/code/Magento/Ogone/Block/Paypage.php @@ -25,7 +25,7 @@ */ namespace Magento\Ogone\Block; -class Paypage extends \Magento\View\Element\Template +class Paypage extends \Magento\Framework\View\Element\Template { /** * @var string diff --git a/app/code/Magento/Ogone/Block/Placeform.php b/app/code/Magento/Ogone/Block/Placeform.php index 5815f35a786ad..34318816792aa 100644 --- a/app/code/Magento/Ogone/Block/Placeform.php +++ b/app/code/Magento/Ogone/Block/Placeform.php @@ -25,7 +25,7 @@ */ namespace Magento\Ogone\Block; -class Placeform extends \Magento\View\Element\Template +class Placeform extends \Magento\Framework\View\Element\Template { /** * @var \Magento\Sales\Model\OrderFactory @@ -43,14 +43,14 @@ class Placeform extends \Magento\View\Element\Template protected $_ogoneApi; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Ogone\Model\Api $ogoneApi * @param \Magento\Sales\Model\OrderFactory $salesOrderFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Ogone\Model\Api $ogoneApi, \Magento\Sales\Model\OrderFactory $salesOrderFactory, diff --git a/app/code/Magento/Ogone/Controller/Api.php b/app/code/Magento/Ogone/Controller/Api.php index 0bd3e30deb8ed..435bdf8bd4894 100644 --- a/app/code/Magento/Ogone/Controller/Api.php +++ b/app/code/Magento/Ogone/Controller/Api.php @@ -45,18 +45,18 @@ class Api extends \Magento\Framework\App\Action\Action protected $_salesOrderFactory; /** - * @var \Magento\DB\TransactionFactory + * @var \Magento\Framework\DB\TransactionFactory */ protected $_transactionFactory; /** * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\DB\TransactionFactory $transactionFactory + * @param \Magento\Framework\DB\TransactionFactory $transactionFactory * @param \Magento\Sales\Model\OrderFactory $salesOrderFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, - \Magento\DB\TransactionFactory $transactionFactory, + \Magento\Framework\DB\TransactionFactory $transactionFactory, \Magento\Sales\Model\OrderFactory $salesOrderFactory ) { parent::__construct($context); diff --git a/app/code/Magento/Ogone/Model/Api.php b/app/code/Magento/Ogone/Model/Api.php index 08b8b27812aa9..1de91171d03a9 100644 --- a/app/code/Magento/Ogone/Model/Api.php +++ b/app/code/Magento/Ogone/Model/Api.php @@ -454,12 +454,12 @@ class Api extends \Magento\Payment\Model\Method\AbstractMethod /** * Magento string lib * - * @var \Magento\Stdlib\String + * @var \Magento\Framework\Stdlib\String */ protected $string; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; @@ -469,31 +469,31 @@ class Api extends \Magento\Payment\Model\Method\AbstractMethod protected $_storeManager; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Locale\ResolverInterface $localeResolver - * @param \Magento\UrlInterface $urlBuilder - * @param \Magento\Stdlib\String $string + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\UrlInterface $urlBuilder + * @param \Magento\Framework\Stdlib\String $string * @param \Magento\Ogone\Model\Config $config * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Locale\ResolverInterface $localeResolver, - \Magento\UrlInterface $urlBuilder, - \Magento\Stdlib\String $string, + \Magento\Framework\Locale\ResolverInterface $localeResolver, + \Magento\Framework\UrlInterface $urlBuilder, + \Magento\Framework\Stdlib\String $string, \Magento\Ogone\Model\Config $config, array $data = array() ) { diff --git a/app/code/Magento/Ogone/Model/Config.php b/app/code/Magento/Ogone/Model/Config.php index 986927794a584..ecb7353f8b9ae 100644 --- a/app/code/Magento/Ogone/Model/Config.php +++ b/app/code/Magento/Ogone/Model/Config.php @@ -33,12 +33,12 @@ class Config extends \Magento\Payment\Model\Config const OGONE_PAYMENT_PATH = 'payment/ogone/'; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; /** - * @var \Magento\Encryption\EncryptorInterface + * @var \Magento\Framework\Encryption\EncryptorInterface */ protected $_encryptor; @@ -46,19 +46,19 @@ class Config extends \Magento\Payment\Model\Config * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Payment\Model\Method\Factory $paymentMethodFactory - * @param \Magento\Locale\ListsInterface $localeLists - * @param \Magento\Config\DataInterface $dataStorage - * @param \Magento\UrlInterface $urlBuilder - * @param \Magento\Encryption\EncryptorInterface $encryptor + * @param \Magento\Framework\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Config\DataInterface $dataStorage + * @param \Magento\Framework\UrlInterface $urlBuilder + * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Payment\Model\Method\Factory $paymentMethodFactory, - \Magento\Locale\ListsInterface $localeLists, - \Magento\Config\DataInterface $dataStorage, - \Magento\UrlInterface $urlBuilder, - \Magento\Encryption\EncryptorInterface $encryptor + \Magento\Framework\Locale\ListsInterface $localeLists, + \Magento\Framework\Config\DataInterface $dataStorage, + \Magento\Framework\UrlInterface $urlBuilder, + \Magento\Framework\Encryption\EncryptorInterface $encryptor ) { parent::__construct($scopeConfig, $coreConfig, $paymentMethodFactory, $localeLists, $dataStorage); $this->_urlBuilder = $urlBuilder; diff --git a/app/code/Magento/Ogone/Model/Source/PaymentAction.php b/app/code/Magento/Ogone/Model/Source/PaymentAction.php index 252b45b2c27c6..62b5beaa79c83 100644 --- a/app/code/Magento/Ogone/Model/Source/PaymentAction.php +++ b/app/code/Magento/Ogone/Model/Source/PaymentAction.php @@ -29,7 +29,7 @@ */ namespace Magento\Ogone\Model\Source; -class PaymentAction implements \Magento\Option\ArrayInterface +class PaymentAction implements \Magento\Framework\Option\ArrayInterface { /** * Prepare payment action list as optional array diff --git a/app/code/Magento/Ogone/Model/Source/Pmlist.php b/app/code/Magento/Ogone/Model/Source/Pmlist.php index 4d4c8a920b691..0f6688572842f 100644 --- a/app/code/Magento/Ogone/Model/Source/Pmlist.php +++ b/app/code/Magento/Ogone/Model/Source/Pmlist.php @@ -29,7 +29,7 @@ */ namespace Magento\Ogone\Model\Source; -class Pmlist implements \Magento\Option\ArrayInterface +class Pmlist implements \Magento\Framework\Option\ArrayInterface { /** * Prepare ogone payment block layout as option array diff --git a/app/code/Magento/Ogone/Model/Source/Template.php b/app/code/Magento/Ogone/Model/Source/Template.php index 78373503b9555..a9eee14ae9bd0 100644 --- a/app/code/Magento/Ogone/Model/Source/Template.php +++ b/app/code/Magento/Ogone/Model/Source/Template.php @@ -29,7 +29,7 @@ */ namespace Magento\Ogone\Model\Source; -class Template implements \Magento\Option\ArrayInterface +class Template implements \Magento\Framework\Option\ArrayInterface { /** * Prepare ogone template mode list as option array diff --git a/app/code/Magento/Ogone/etc/frontend/di.xml b/app/code/Magento/Ogone/etc/frontend/di.xml index b41b1ba7b8b26..d9db9df666436 100644 --- a/app/code/Magento/Ogone/etc/frontend/di.xml +++ b/app/code/Magento/Ogone/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Ogone/etc/module.xml b/app/code/Magento/Ogone/etc/module.xml index dadb0b28b1c88..9dcc42717d200 100644 --- a/app/code/Magento/Ogone/etc/module.xml +++ b/app/code/Magento/Ogone/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Ogone/sql/ogone_setup/install-1.6.0.0.php b/app/code/Magento/Ogone/sql/ogone_setup/install-1.6.0.0.php index fa7ebaa205d03..6936bbe7dd4c9 100644 --- a/app/code/Magento/Ogone/sql/ogone_setup/install-1.6.0.0.php +++ b/app/code/Magento/Ogone/sql/ogone_setup/install-1.6.0.0.php @@ -25,7 +25,7 @@ */ $installer = $this; -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $data = array(); $statuses = array( diff --git a/app/code/Magento/PageCache/Block/Javascript.php b/app/code/Magento/PageCache/Block/Javascript.php index d67b9cf3e8db9..19ee70bef64a8 100644 --- a/app/code/Magento/PageCache/Block/Javascript.php +++ b/app/code/Magento/PageCache/Block/Javascript.php @@ -29,7 +29,7 @@ * Class Form * @package Magento\PageCache\Block */ -class Javascript extends \Magento\View\Element\Template +class Javascript extends \Magento\Framework\View\Element\Template { /** * @var \Magento\PageCache\Helper\Data @@ -39,12 +39,12 @@ class Javascript extends \Magento\View\Element\Template /** * Constructor * - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\PageCache\Helper\Data $helper * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\PageCache\Helper\Data $helper, array $data = array() ) { diff --git a/app/code/Magento/PageCache/Block/System/Config/Form/Field/Export.php b/app/code/Magento/PageCache/Block/System/Config/Form/Field/Export.php index d9ec51b8f151b..3b0ff2d54a134 100644 --- a/app/code/Magento/PageCache/Block/System/Config/Form/Field/Export.php +++ b/app/code/Magento/PageCache/Block/System/Config/Form/Field/Export.php @@ -33,10 +33,10 @@ class Export extends \Magento\Backend\Block\System\Config\Form\Field /** * Retrieve element HTML markup * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) { /** @var \Magento\Backend\Block\Widget\Button $buttonBlock */ $buttonBlock = $this->getForm()->getLayout()->createBlock('Magento\Backend\Block\Widget\Button'); diff --git a/app/code/Magento/PageCache/Controller/Block.php b/app/code/Magento/PageCache/Controller/Block.php index bcc10a6d9217d..f4e3cc9a1a652 100644 --- a/app/code/Magento/PageCache/Controller/Block.php +++ b/app/code/Magento/PageCache/Controller/Block.php @@ -65,7 +65,7 @@ public function esiAction() $blockInstance = array_shift($blocks); $html = $blockInstance->toHtml(); $ttl = $blockInstance->getTtl(); - if ($blockInstance instanceof \Magento\View\Block\IdentityInterface) { + if ($blockInstance instanceof \Magento\Framework\View\Block\IdentityInterface) { $response->setHeader('X-Magento-Tags', implode(',', $blockInstance->getIdentities())); } } diff --git a/app/code/Magento/Core/Model/App/Area/CacheIdentifierPlugin.php b/app/code/Magento/PageCache/Model/App/CacheIdentifierPlugin.php similarity index 86% rename from app/code/Magento/Core/Model/App/Area/CacheIdentifierPlugin.php rename to app/code/Magento/PageCache/Model/App/CacheIdentifierPlugin.php index 8ba3b7a402ac4..ea4093dd7cd92 100644 --- a/app/code/Magento/Core/Model/App/Area/CacheIdentifierPlugin.php +++ b/app/code/Magento/PageCache/Model/App/CacheIdentifierPlugin.php @@ -22,25 +22,23 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\App\Area; +namespace Magento\PageCache\Model\App; /** * Class CachePlugin * Should add design exceptions o identifier for built-in cache - * - * @package Magento\Core\Model\App\Area */ class CacheIdentifierPlugin { /** * Constructor * - * @param DesignExceptions $designExceptions - * @param \Magento\Framework\App\RequestInterface $request + * @param \Magento\Framework\View\DesignExceptions $designExceptions + * @param \Magento\Framework\App\RequestInterface $request * @param \Magento\PageCache\Model\Config $config */ public function __construct( - \Magento\Core\Model\App\Area\DesignExceptions $designExceptions, + \Magento\Framework\View\DesignExceptions $designExceptions, \Magento\Framework\App\RequestInterface $request, \Magento\PageCache\Model\Config $config ) { @@ -55,11 +53,12 @@ public function __construct( * @param \Magento\Framework\App\PageCache\Identifier $identifier * @param string $result * @return string + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetValue(\Magento\Framework\App\PageCache\Identifier $identifier, $result) { if ($this->config->getType() == \Magento\PageCache\Model\Config::BUILT_IN && $this->config->isEnabled()) { - $ruleDesignException = $this->designExceptions->getThemeForUserAgent($this->request); + $ruleDesignException = $this->designExceptions->getThemeByRequest($this->request); if ($ruleDesignException !== false) { return $ruleDesignException . $result; } diff --git a/app/code/Magento/PageCache/Model/App/FrontController/MessageBox.php b/app/code/Magento/PageCache/Model/App/FrontController/MessageBox.php index d8ee0625f08d3..a78b9fe1d0125 100644 --- a/app/code/Magento/PageCache/Model/App/FrontController/MessageBox.php +++ b/app/code/Magento/PageCache/Model/App/FrontController/MessageBox.php @@ -40,7 +40,7 @@ class MessageBox /** * Cookie * - * @var \Magento\Stdlib\Cookie + * @var \Magento\Framework\Stdlib\Cookie */ protected $cookie; @@ -57,21 +57,21 @@ class MessageBox protected $config; /** - * @var \Magento\Message\Manager + * @var \Magento\Framework\Message\Manager */ protected $messageManager; /** - * @param \Magento\Stdlib\Cookie $cookie + * @param \Magento\Framework\Stdlib\Cookie $cookie * @param \Magento\Framework\App\Request\Http $request * @param \Magento\PageCache\Model\Config $config - * @param \Magento\Message\ManagerInterface $messageManager + * @param \Magento\Framework\Message\ManagerInterface $messageManager */ public function __construct( - \Magento\Stdlib\Cookie $cookie, + \Magento\Framework\Stdlib\Cookie $cookie, \Magento\Framework\App\Request\Http $request, \Magento\PageCache\Model\Config $config, - \Magento\Message\ManagerInterface $messageManager + \Magento\Framework\Message\ManagerInterface $messageManager ) { $this->cookie = $cookie; $this->request = $request; diff --git a/app/code/Magento/PageCache/Model/Cache/Type.php b/app/code/Magento/PageCache/Model/Cache/Type.php index c8ac99146e687..5f686c079db70 100644 --- a/app/code/Magento/PageCache/Model/Cache/Type.php +++ b/app/code/Magento/PageCache/Model/Cache/Type.php @@ -27,7 +27,7 @@ namespace Magento\PageCache\Model\Cache; /** System / Cache Management / Cache type "Full Page Cache" */ -class Type extends \Magento\Cache\Frontend\Decorator\TagScope +class Type extends \Magento\Framework\Cache\Frontend\Decorator\TagScope { /** * Cache type code unique among all cache types diff --git a/app/code/Magento/PageCache/Model/Config.php b/app/code/Magento/PageCache/Model/Config.php index 1753fa81dfe04..4a659590432e4 100644 --- a/app/code/Magento/PageCache/Model/Config.php +++ b/app/code/Magento/PageCache/Model/Config.php @@ -81,7 +81,7 @@ class Config protected $_cacheState; /** - * @var \Magento\Filesystem\Directory\WriteInterface + * @var \Magento\Framework\Filesystem\Directory\WriteInterface */ protected $_modulesDirectory; diff --git a/app/code/Magento/PageCache/Model/Layout/LayoutPlugin.php b/app/code/Magento/PageCache/Model/Layout/LayoutPlugin.php index d008b0470ddae..60c99cbd5972d 100644 --- a/app/code/Magento/PageCache/Model/Layout/LayoutPlugin.php +++ b/app/code/Magento/PageCache/Model/Layout/LayoutPlugin.php @@ -29,7 +29,7 @@ class LayoutPlugin { /** - * @var \Magento\View\Layout + * @var \Magento\Framework\View\Layout */ protected $layout; @@ -46,12 +46,12 @@ class LayoutPlugin /** * Constructor * - * @param \Magento\View\Layout $layout + * @param \Magento\Framework\View\Layout $layout * @param \Magento\Framework\App\ResponseInterface $response * @param \Magento\PageCache\Model\Config $config */ public function __construct( - \Magento\View\Layout $layout, + \Magento\Framework\View\Layout $layout, \Magento\Framework\App\ResponseInterface $response, \Magento\PageCache\Model\Config $config ) { @@ -64,11 +64,11 @@ public function __construct( * Set appropriate Cache-Control headers * We have to set public headers in order to tell Varnish and Builtin app that page should be cached * - * @param \Magento\View\Layout $subject + * @param \Magento\Framework\View\Layout $subject * @param mixed $result * @return mixed */ - public function afterGenerateXml(\Magento\View\Layout $subject, $result) + public function afterGenerateXml(\Magento\Framework\View\Layout $subject, $result) { if ($this->layout->isCacheable() && $this->config->isEnabled()) { $this->response->setPublicHeaders($this->config->getTtl()); @@ -79,16 +79,16 @@ public function afterGenerateXml(\Magento\View\Layout $subject, $result) /** * Retrieve all identities from blocks for further cache invalidation * - * @param \Magento\View\Layout $subject + * @param \Magento\Framework\View\Layout $subject * @param mixed $result * @return mixed */ - public function afterGetOutput(\Magento\View\Layout $subject, $result) + public function afterGetOutput(\Magento\Framework\View\Layout $subject, $result) { if ($this->layout->isCacheable() && $this->config->isEnabled()) { $tags = array(); foreach ($this->layout->getAllBlocks() as $block) { - if ($block instanceof \Magento\View\Block\IdentityInterface) { + if ($block instanceof \Magento\Framework\View\Block\IdentityInterface) { $isEsiBlock = $block->getTtl() > 0; $isVarnish = $this->config->getType() == \Magento\PageCache\Model\Config::VARNISH; if ($isVarnish && $isEsiBlock) { diff --git a/app/code/Magento/PageCache/Model/Observer.php b/app/code/Magento/PageCache/Model/Observer.php index 9e2af4e5814c0..b65d1c5c99a66 100644 --- a/app/code/Magento/PageCache/Model/Observer.php +++ b/app/code/Magento/PageCache/Model/Observer.php @@ -53,7 +53,7 @@ class Observer protected $_typeList; /** - * @var \Magento\Session\Generic + * @var \Magento\Framework\Session\Generic */ protected $_session; @@ -69,7 +69,7 @@ class Observer * @param \Magento\Framework\App\PageCache\Cache $cache * @param \Magento\PageCache\Helper\Data $helper * @param \Magento\Framework\App\Cache\TypeListInterface $typeList - * @param \Magento\Session\Generic $session + * @param \Magento\Framework\Session\Generic $session * @param \Magento\Framework\App\PageCache\FormKey $formKey */ public function __construct( @@ -78,7 +78,7 @@ public function __construct( \Magento\PageCache\Helper\Data $helper, \Magento\Framework\App\Cache\TypeListInterface $typeList, \Magento\Framework\App\PageCache\FormKey $formKey, - \Magento\Session\Generic $session + \Magento\Framework\Session\Generic $session ) { $this->_config = $config; $this->_cache = $cache; @@ -92,19 +92,19 @@ public function __construct( * Add comment cache containers to private blocks * Blocks are wrapped only if page is cacheable * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function processLayoutRenderElement(\Magento\Event\Observer $observer) + public function processLayoutRenderElement(\Magento\Framework\Event\Observer $observer) { $event = $observer->getEvent(); - /** @var \Magento\View\Layout $layout */ + /** @var \Magento\Framework\View\Layout $layout */ $layout = $event->getLayout(); if ($layout->isCacheable() && $this->_config->isEnabled()) { $name = $event->getElementName(); $block = $layout->getBlock($name); $transport = $event->getTransport(); - if ($block instanceof \Magento\View\Element\AbstractBlock) { + if ($block instanceof \Magento\Framework\View\Element\AbstractBlock) { $blockTtl = $block->getTtl(); $varnishIsEnabledFlag = ($this->_config->getType() == \Magento\PageCache\Model\Config::VARNISH); $output = $transport->getData('output'); @@ -125,10 +125,10 @@ public function processLayoutRenderElement(\Magento\Event\Observer $observer) /** * Replace the output of the block, containing ttl attribute, with ESI tag * - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block * @return string */ - protected function _wrapEsi(\Magento\View\Element\AbstractBlock $block) + protected function _wrapEsi(\Magento\Framework\View\Element\AbstractBlock $block) { $url = $block->getUrl( 'page_cache/block/esi', @@ -144,14 +144,14 @@ protected function _wrapEsi(\Magento\View\Element\AbstractBlock $block) * If Built-In caching is enabled it collects array of tags * of incoming object and asks to clean cache. * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function flushCacheByTags(\Magento\Event\Observer $observer) + public function flushCacheByTags(\Magento\Framework\Event\Observer $observer) { if ($this->_config->getType() == \Magento\PageCache\Model\Config::BUILT_IN && $this->_config->isEnabled()) { $object = $observer->getEvent()->getObject(); - if ($object instanceof \Magento\Object\IdentityInterface) { + if ($object instanceof \Magento\Framework\Object\IdentityInterface) { $tags = $object->getIdentities(); foreach ($tags as $tag) { $tags[] = preg_replace("~_\\d+$~", '', $tag); @@ -164,10 +164,10 @@ public function flushCacheByTags(\Magento\Event\Observer $observer) /** * Flash Built-In cache * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function flushAllCache(\Magento\Event\Observer $observer) + public function flushAllCache(\Magento\Framework\Event\Observer $observer) { if ($this->_config->getType() == \Magento\PageCache\Model\Config::BUILT_IN) { $this->_cache->clean(); @@ -190,14 +190,14 @@ public function invalidateCache() /** * Register form key in session from cookie value * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function registerFormKeyFromCookie(\Magento\Event\Observer $observer) + public function registerFormKeyFromCookie(\Magento\Framework\Event\Observer $observer) { $formKeyFromCookie = $this->_formKey->get(); if ($formKeyFromCookie) { - $this->_session->setData(\Magento\Data\Form\FormKey::FORM_KEY, $formKeyFromCookie); + $this->_session->setData(\Magento\Framework\Data\Form\FormKey::FORM_KEY, $formKeyFromCookie); } } } diff --git a/app/code/Magento/PageCache/Model/System/Config/Backend/Ttl.php b/app/code/Magento/PageCache/Model/System/Config/Backend/Ttl.php index 8ffa19a5be2a7..ced41b6e40a2a 100644 --- a/app/code/Magento/PageCache/Model/System/Config/Backend/Ttl.php +++ b/app/code/Magento/PageCache/Model/System/Config/Backend/Ttl.php @@ -36,13 +36,13 @@ class Ttl extends \Magento\Framework\App\Config\Value * Throw exception if Ttl data is invalid or empty * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _beforeSave() { $value = $this->getValue(); if ($value < 0 || !preg_match('/^[0-9]+$/', $value)) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('Ttl value "%1" is not valid. Please use only numbers equal or greater than zero.', $value) ); } diff --git a/app/code/Magento/PageCache/Model/System/Config/Backend/Varnish.php b/app/code/Magento/PageCache/Model/System/Config/Backend/Varnish.php index 8ed70da7835a7..b1035dffe3f40 100644 --- a/app/code/Magento/PageCache/Model/System/Config/Backend/Varnish.php +++ b/app/code/Magento/PageCache/Model/System/Config/Backend/Varnish.php @@ -39,8 +39,8 @@ class Varnish extends \Magento\Framework\App\Config\Value /** * Set default data if empty fields have been left * - * @return $this|\Magento\Model\AbstractModel - * @throws \Magento\Model\Exception + * @return $this|\Magento\Framework\Model\AbstractModel + * @throws \Magento\Framework\Model\Exception */ protected function _beforeSave() { @@ -69,7 +69,7 @@ protected function _getDefaultValues() /** * If fields are empty fill them with default data * - * @return $this|\Magento\Model\AbstractModel + * @return $this|\Magento\Framework\Model\AbstractModel */ protected function _afterLoad() { diff --git a/app/code/Magento/PageCache/Model/System/Config/Source/Application.php b/app/code/Magento/PageCache/Model/System/Config/Source/Application.php index 737c2cf5edcd3..68327becb395c 100644 --- a/app/code/Magento/PageCache/Model/System/Config/Source/Application.php +++ b/app/code/Magento/PageCache/Model/System/Config/Source/Application.php @@ -34,7 +34,7 @@ * * @package Magento\PageCache\Model\System\Config\Source */ -class Application implements \Magento\Option\ArrayInterface +class Application implements \Magento\Framework\Option\ArrayInterface { /** * Options getter diff --git a/app/code/Magento/PageCache/etc/adminhtml/di.xml b/app/code/Magento/PageCache/etc/adminhtml/di.xml index d167e57d8215a..12977b3e46e0c 100644 --- a/app/code/Magento/PageCache/etc/adminhtml/di.xml +++ b/app/code/Magento/PageCache/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/PageCache/etc/cache.xml b/app/code/Magento/PageCache/etc/cache.xml index 4b6cd3c78937f..eae3ee0cbb011 100644 --- a/app/code/Magento/PageCache/etc/cache.xml +++ b/app/code/Magento/PageCache/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Full page caching. diff --git a/app/code/Magento/PageCache/etc/events.xml b/app/code/Magento/PageCache/etc/events.xml index f7304b6899352..0de00234d62af 100644 --- a/app/code/Magento/PageCache/etc/events.xml +++ b/app/code/Magento/PageCache/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/PageCache/etc/frontend/di.xml b/app/code/Magento/PageCache/etc/frontend/di.xml index 00269b8b6307d..6986beb072166 100644 --- a/app/code/Magento/PageCache/etc/frontend/di.xml +++ b/app/code/Magento/PageCache/etc/frontend/di.xml @@ -23,13 +23,13 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + diff --git a/app/code/Magento/PageCache/etc/module.xml b/app/code/Magento/PageCache/etc/module.xml index 1e9a1bdd4faa7..ec5119d028f83 100644 --- a/app/code/Magento/PageCache/etc/module.xml +++ b/app/code/Magento/PageCache/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/PayPalRecurringPayment/Model/Api/Nvp.php b/app/code/Magento/PayPalRecurringPayment/Model/Api/Nvp.php index 89eb59b78e93d..585ae7c71a2b3 100644 --- a/app/code/Magento/PayPalRecurringPayment/Model/Api/Nvp.php +++ b/app/code/Magento/PayPalRecurringPayment/Model/Api/Nvp.php @@ -91,20 +91,20 @@ class Nvp extends \Magento\Paypal\Model\Api\Nvp /** * @param \Magento\Customer\Helper\Address $customerAddress - * @param \Magento\Logger $logger - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Directory\Model\RegionFactory $regionFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Directory\Model\CountryFactory $countryFactory * @param \Magento\RecurringPayment\Model\QuoteImporter $quoteImporter * @param array $data */ public function __construct( \Magento\Customer\Helper\Address $customerAddress, - \Magento\Logger $logger, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Logger $logger, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Directory\Model\RegionFactory $regionFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Directory\Model\CountryFactory $countryFactory, \Magento\RecurringPayment\Model\QuoteImporter $quoteImporter, array $data = array() @@ -125,7 +125,7 @@ public function __construct( * SetExpressCheckout call * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @link https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetExpressCheckout * TODO: put together style and giropay settings */ @@ -156,7 +156,7 @@ public function callSetExpressCheckout() foreach ($payments as $payment) { $payment->setMethodCode(\Magento\Paypal\Model\Config::METHOD_WPP_EXPRESS); if (!$payment->isValid()) { - throw new \Magento\Model\Exception($payment->getValidationErrors()); + throw new \Magento\Framework\Model\Exception($payment->getValidationErrors()); } $request["L_BILLINGTYPE{$i}"] = 'RecurringPayments'; $request["L_BILLINGAGREEMENTDESCRIPTION{$i}"] = $payment->getScheduleDescription(); @@ -223,7 +223,7 @@ public function callCreateRecurringPayment() * ManageRecurringPaymentStatus call * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function callManageRecurringPaymentStatus() { @@ -233,7 +233,7 @@ public function callManageRecurringPaymentStatus() } try { $this->call('ManageRecurringPaymentsProfileStatus', $request); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { if (in_array( 11556, $this->_callErrors @@ -245,7 +245,7 @@ public function callManageRecurringPaymentStatus() $this->_callErrors ) && 'Reactivate' === $request['ACTION'] ) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('We can\'t change the status because the current status doesn\'t match the real status.') ); } @@ -256,10 +256,10 @@ public function callManageRecurringPaymentStatus() /** * GetRecurringPaymentDetails call * - * @param \Magento\Object $result + * @param \Magento\Framework\Object $result * @return void */ - public function callGetRecurringPaymentDetails(\Magento\Object $result) + public function callGetRecurringPaymentDetails(\Magento\Framework\Object $result) { $request = $this->_exportToRequest($this->_getRecurringPaymentDetailsRequest); $response = $this->call('GetRecurringPaymentsProfileDetails', $request); @@ -291,10 +291,10 @@ protected function _filterRecurringPaymentActionToNvp($value) * Check the obtained RP status in NVP format and specify the payment state * * @param string $value - * @param \Magento\Object $result + * @param \Magento\Framework\Object $result * @return void */ - protected function _analyzeRecurringPaymentStatus($value, \Magento\Object $result) + protected function _analyzeRecurringPaymentStatus($value, \Magento\Framework\Object $result) { switch ($value) { case 'ActiveProfile': diff --git a/app/code/Magento/PayPalRecurringPayment/Model/Express.php b/app/code/Magento/PayPalRecurringPayment/Model/Express.php index 319f97d30791f..22b0201ef71a2 100644 --- a/app/code/Magento/PayPalRecurringPayment/Model/Express.php +++ b/app/code/Magento/PayPalRecurringPayment/Model/Express.php @@ -59,7 +59,7 @@ public function getPaymentMethodCode() * * @param RecurringPayment $payment * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function validate(RecurringPayment $payment) { @@ -81,7 +81,7 @@ public function validate(RecurringPayment $payment) $errors[] = __('The schedule description is too long.'); } if ($errors) { - throw new \Magento\Model\Exception(implode(' ', $errors)); + throw new \Magento\Framework\Model\Exception(implode(' ', $errors)); } } @@ -97,7 +97,7 @@ public function submit(RecurringPayment $payment, PaymentInfo $paymentInfo) $token = $paymentInfo->getAdditionalInformation(PayPalExpress\Checkout::PAYMENT_INFO_TRANSPORT_TOKEN); $payment->setToken($token); $api = $this->_paymentMethod->getApi(); - \Magento\Object\Mapper::accumulateByMap( + \Magento\Framework\Object\Mapper::accumulateByMap( $payment, $api, array( @@ -138,10 +138,10 @@ public function submit(RecurringPayment $payment, PaymentInfo $paymentInfo) * Fetch RP details * * @param string $referenceId - * @param \Magento\Object $result + * @param \Magento\Framework\Object $result * @return void */ - public function getDetails($referenceId, \Magento\Object $result) + public function getDetails($referenceId, \Magento\Framework\Object $result) { $this->_paymentMethod->getApi()->setRecurringPaymentId($referenceId)->callGetRecurringPaymentDetails($result); } diff --git a/app/code/Magento/PayPalRecurringPayment/Model/Ipn.php b/app/code/Magento/PayPalRecurringPayment/Model/Ipn.php index b032a058c3ab3..d04c57253fb70 100644 --- a/app/code/Magento/PayPalRecurringPayment/Model/Ipn.php +++ b/app/code/Magento/PayPalRecurringPayment/Model/Ipn.php @@ -44,15 +44,15 @@ class Ipn extends \Magento\Paypal\Model\AbstractIpn implements \Magento\Paypal\M /** * @param \Magento\Paypal\Model\ConfigFactory $configFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory * @param \Magento\RecurringPayment\Model\PaymentFactory $recurringPaymentFactory * @param array $data */ public function __construct( \Magento\Paypal\Model\ConfigFactory $configFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\HTTP\Adapter\CurlFactory $curlFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory, \Magento\RecurringPayment\Model\PaymentFactory $recurringPaymentFactory, array $data = array() ) { @@ -120,7 +120,7 @@ protected function _getRecurringPayment() * Process notification from recurring payments * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @throws Exception */ protected function _processRecurringPayment() @@ -140,7 +140,7 @@ protected function _processRecurringPayment() ) - $this->getRequestData( 'shipping' ); - $productItemInfo = new \Magento\Object(); + $productItemInfo = new \Magento\Framework\Object(); $type = trim($this->getRequestData('period_type')); if ($type == 'Trial') { $productItemInfo->setPaymentType(\Magento\RecurringPayment\Model\PaymentTypeInterface::TRIAL); @@ -173,7 +173,7 @@ protected function _processRecurringPayment() $message = __('You notified customer about invoice #%1.', $invoice->getIncrementId()); $order->sendNewOrderEmail()->addStatusHistoryComment($message)->setIsCustomerNotified(true)->save(); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $comment = $this->_createIpnComment(__('Note: %1', $e->getMessage()), true); //TODO: add to payment comments //$comment->save(); diff --git a/app/code/Magento/PayPalRecurringPayment/etc/di.xml b/app/code/Magento/PayPalRecurringPayment/etc/di.xml index f4cecfa9787a6..3294296de3927 100644 --- a/app/code/Magento/PayPalRecurringPayment/etc/di.xml +++ b/app/code/Magento/PayPalRecurringPayment/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/PayPalRecurringPayment/etc/module.xml b/app/code/Magento/PayPalRecurringPayment/etc/module.xml index 9a6e6aad1451b..9ae9462a4a278 100644 --- a/app/code/Magento/PayPalRecurringPayment/etc/module.xml +++ b/app/code/Magento/PayPalRecurringPayment/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Payment/Block/Form.php b/app/code/Magento/Payment/Block/Form.php index 5e5ec4f5145f5..bef7dadf7eee0 100644 --- a/app/code/Magento/Payment/Block/Form.php +++ b/app/code/Magento/Payment/Block/Form.php @@ -28,20 +28,20 @@ /** * Payment method form base block */ -class Form extends \Magento\View\Element\Template +class Form extends \Magento\Framework\View\Element\Template { /** * Retrieve payment method model * * @return \Magento\Payment\Model\MethodInterface - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function getMethod() { $method = $this->getData('method'); if (!$method instanceof \Magento\Payment\Model\MethodInterface) { - throw new \Magento\Model\Exception(__('We cannot retrieve the payment method model object.')); + throw new \Magento\Framework\Model\Exception(__('We cannot retrieve the payment method model object.')); } return $method; } diff --git a/app/code/Magento/Payment/Block/Form/Cc.php b/app/code/Magento/Payment/Block/Form/Cc.php index fa7d42bd304a4..0e4d38312eda1 100644 --- a/app/code/Magento/Payment/Block/Form/Cc.php +++ b/app/code/Magento/Payment/Block/Form/Cc.php @@ -38,12 +38,12 @@ class Cc extends \Magento\Payment\Block\Form protected $_paymentConfig; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, array $data = array() ) { diff --git a/app/code/Magento/Payment/Block/Form/Container.php b/app/code/Magento/Payment/Block/Form/Container.php index 89e65e9e124ae..a722db5262184 100644 --- a/app/code/Magento/Payment/Block/Form/Container.php +++ b/app/code/Magento/Payment/Block/Form/Container.php @@ -36,7 +36,7 @@ * @package Magento_Payment * @author Magento Core Team */ -class Container extends \Magento\View\Element\Template +class Container extends \Magento\Framework\View\Element\Template { /** * @var \Magento\Payment\Helper\Data @@ -47,13 +47,13 @@ class Container extends \Magento\View\Element\Template protected $methodSpecificationFactory; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Helper\Data $paymentHelper, \Magento\Payment\Model\Checks\SpecificationFactory $methodSpecificationFactory, array $data = array() diff --git a/app/code/Magento/Payment/Block/Info.php b/app/code/Magento/Payment/Block/Info.php index b7b43ac4239d2..52cfa00683de1 100644 --- a/app/code/Magento/Payment/Block/Info.php +++ b/app/code/Magento/Payment/Block/Info.php @@ -28,12 +28,12 @@ /** * Base payment iformation block */ -class Info extends \Magento\View\Element\Template +class Info extends \Magento\Framework\View\Element\Template { /** * Payment rendered specific information * - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_paymentSpecificInformation = null; @@ -46,13 +46,13 @@ class Info extends \Magento\View\Element\Template * Retrieve info model * * @return \Magento\Payment\Model\Info - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function getInfo() { $info = $this->getData('info'); if (!$info instanceof \Magento\Payment\Model\Info) { - throw new \Magento\Model\Exception(__('We cannot retrieve the payment info model object.')); + throw new \Magento\Framework\Model\Exception(__('We cannot retrieve the payment info model object.')); } return $info; } @@ -158,16 +158,16 @@ public function getIsSecureMode() /** * Prepare information specific to current payment method * - * @param null|\Magento\Object|array $transport - * @return \Magento\Object + * @param null|\Magento\Framework\Object|array $transport + * @return \Magento\Framework\Object */ protected function _prepareSpecificInformation($transport = null) { if (null === $this->_paymentSpecificInformation) { if (null === $transport) { - $transport = new \Magento\Object(); + $transport = new \Magento\Framework\Object(); } elseif (is_array($transport)) { - $transport = new \Magento\Object($transport); + $transport = new \Magento\Framework\Object($transport); } $this->_eventManager->dispatch( 'payment_info_block_prepare_specific_information', diff --git a/app/code/Magento/Payment/Block/Info/AbstractContainer.php b/app/code/Magento/Payment/Block/Info/AbstractContainer.php index 647e05154ae36..8e873fa6c824d 100644 --- a/app/code/Magento/Payment/Block/Info/AbstractContainer.php +++ b/app/code/Magento/Payment/Block/Info/AbstractContainer.php @@ -32,7 +32,7 @@ * @package Magento_Payment * @author Magento Core Team */ -abstract class AbstractContainer extends \Magento\View\Element\Template +abstract class AbstractContainer extends \Magento\Framework\View\Element\Template { /** * Payment data @@ -42,12 +42,12 @@ abstract class AbstractContainer extends \Magento\View\Element\Template protected $_paymentData = null; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Helper\Data $paymentData * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Helper\Data $paymentData, array $data = array() ) { diff --git a/app/code/Magento/Payment/Block/Info/Cc.php b/app/code/Magento/Payment/Block/Info/Cc.php index 29f80d545986a..40c601efbf453 100644 --- a/app/code/Magento/Payment/Block/Info/Cc.php +++ b/app/code/Magento/Payment/Block/Info/Cc.php @@ -38,12 +38,12 @@ class Cc extends \Magento\Payment\Block\Info protected $_paymentConfig; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, array $data = array() ) { @@ -93,7 +93,7 @@ public function getCcExpMonth() /** * Retrieve CC expiration date * - * @return \Magento\Stdlib\DateTime\Date + * @return \Magento\Framework\Stdlib\DateTime\Date */ public function getCcExpDate() { @@ -106,8 +106,8 @@ public function getCcExpDate() /** * Prepare credit card related payment info * - * @param \Magento\Object|array $transport - * @return \Magento\Object + * @param \Magento\Framework\Object|array $transport + * @return \Magento\Framework\Object */ protected function _prepareSpecificInformation($transport = null) { diff --git a/app/code/Magento/Payment/Block/Info/Substitution.php b/app/code/Magento/Payment/Block/Info/Substitution.php index 9a17ad83f24db..67f95f0f908ab 100644 --- a/app/code/Magento/Payment/Block/Info/Substitution.php +++ b/app/code/Magento/Payment/Block/Info/Substitution.php @@ -43,7 +43,7 @@ protected function _beforeToHtml() $container = $parentBlock->getParentBlock(); if ($container) { $block = $this->_layout->createBlock( - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', '', ['data' => ['method' => $this->getMethod(), 'template' => 'Magento_Payment::info/substitution.phtml']] ); diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php index 006a85a7ea787..31922a11e37ca 100644 --- a/app/code/Magento/Payment/Helper/Data.php +++ b/app/code/Magento/Payment/Helper/Data.php @@ -27,7 +27,7 @@ use Magento\Store\Model\Store; use Magento\Payment\Block\Form; use Magento\Payment\Model\Info; -use Magento\View\Element\Template; +use Magento\Framework\View\Element\Template; /** * Payment module base helper @@ -51,7 +51,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper /** * Layout * - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -79,7 +79,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\View\LayoutInterface $layout + * @param \Magento\Framework\View\LayoutInterface $layout * @param \Magento\Payment\Model\Method\Factory $paymentMethodFactory * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param \Magento\Core\Model\App\Emulation $appEmulation @@ -89,7 +89,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\View\LayoutInterface $layout, + \Magento\Framework\View\LayoutInterface $layout, \Magento\Payment\Model\Method\Factory $paymentMethodFactory, \Magento\Core\Model\App\Emulation $appEmulation, \Magento\Payment\Model\Config $paymentConfig, @@ -121,7 +121,7 @@ public function getMethodInstance($code) * Get and sort available payment methods for specified or current store * * Array structure: - * $index => \Magento\Simplexml\Element + * $index => \Magento\Framework\Simplexml\Element * * @param null|string|bool|int|Store $store * @param Quote|null $quote @@ -220,7 +220,7 @@ public function getInfoBlockHtml(Info $info, $storeId) try { // Retrieve specified view block from appropriate design package (depends on emulated store) $paymentBlock = $info->getBlockMock() ?: $this->getInfoBlock($info); - $paymentBlock->setArea(\Magento\Core\Model\App\Area::AREA_FRONTEND)->setIsSecureMode(true); + $paymentBlock->setArea(\Magento\Framework\App\Area::AREA_FRONTEND)->setIsSecureMode(true); $paymentBlock->getMethod()->setStore($storeId); $paymentBlockHtml = $paymentBlock->toHtml(); } catch (\Exception $exception) { diff --git a/app/code/Magento/Payment/Model/Cart.php b/app/code/Magento/Payment/Model/Cart.php index 953fe42de31c4..ef76137967c28 100644 --- a/app/code/Magento/Payment/Model/Cart.php +++ b/app/code/Magento/Payment/Model/Cart.php @@ -51,7 +51,7 @@ class Cart /** * Core event manager proxy * - * @var \Magento\Event\ManagerInterface + * @var \Magento\Framework\Event\ManagerInterface */ protected $_eventManager; @@ -92,12 +92,12 @@ class Cart /** * @param \Magento\Payment\Model\Cart\SalesModel\Factory $salesModelFactory - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Sales\Model\Order|\Magento\Sales\Model\Quote $salesModel */ public function __construct( \Magento\Payment\Model\Cart\SalesModel\Factory $salesModelFactory, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, $salesModel ) { $this->_eventManager = $eventManager; @@ -411,11 +411,11 @@ protected function _getAmount($amountType) * @param int $qty * @param float $amount * @param null|string $identifier - * @return \Magento\Object + * @return \Magento\Framework\Object */ protected function _createItemFromData($name, $qty, $amount, $identifier = null) { - $item = new \Magento\Object(array('name' => $name, 'qty' => $qty, 'amount' => (double)$amount)); + $item = new \Magento\Framework\Object(array('name' => $name, 'qty' => $qty, 'amount' => (double)$amount)); if ($identifier) { $item->setData('id', $identifier); diff --git a/app/code/Magento/Payment/Model/Cart/SalesModel/Factory.php b/app/code/Magento/Payment/Model/Cart/SalesModel/Factory.php index ed272b5683a76..efdb098eb3a6a 100644 --- a/app/code/Magento/Payment/Model/Cart/SalesModel/Factory.php +++ b/app/code/Magento/Payment/Model/Cart/SalesModel/Factory.php @@ -29,14 +29,14 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Payment/Model/Cart/SalesModel/Order.php b/app/code/Magento/Payment/Model/Cart/SalesModel/Order.php index 4f02533685434..53bd8136e0e31 100644 --- a/app/code/Magento/Payment/Model/Cart/SalesModel/Order.php +++ b/app/code/Magento/Payment/Model/Cart/SalesModel/Order.php @@ -51,7 +51,7 @@ public function getAllItems() $resultItems = array(); foreach ($this->_salesModel->getAllItems() as $item) { - $resultItems[] = new \Magento\Object( + $resultItems[] = new \Magento\Framework\Object( array( 'parent_item' => $item->getParentItem(), 'name' => $item->getName(), diff --git a/app/code/Magento/Payment/Model/Cart/SalesModel/Quote.php b/app/code/Magento/Payment/Model/Cart/SalesModel/Quote.php index da2fc0b1264cc..5d6d7571011d6 100644 --- a/app/code/Magento/Payment/Model/Cart/SalesModel/Quote.php +++ b/app/code/Magento/Payment/Model/Cart/SalesModel/Quote.php @@ -63,7 +63,7 @@ public function getAllItems() $resultItems = array(); foreach ($this->_salesModel->getAllItems() as $item) { - $resultItems[] = new \Magento\Object( + $resultItems[] = new \Magento\Framework\Object( array( 'parent_item' => $item->getParentItem(), 'name' => $item->getName(), diff --git a/app/code/Magento/Payment/Model/Cart/SalesModel/SalesModelInterface.php b/app/code/Magento/Payment/Model/Cart/SalesModel/SalesModelInterface.php index b26c1cab13fea..47dff4643dfac 100644 --- a/app/code/Magento/Payment/Model/Cart/SalesModel/SalesModelInterface.php +++ b/app/code/Magento/Payment/Model/Cart/SalesModel/SalesModelInterface.php @@ -56,7 +56,7 @@ public function getBaseShippingAmount(); public function getBaseDiscountAmount(); /** - * Wrapper for \Magento\Object getDataUsingMethod method + * Wrapper for \Magento\Framework\Object getDataUsingMethod method * * @param string $key * @param mixed $args diff --git a/app/code/Magento/Payment/Model/Checks/SpecificationFactory.php b/app/code/Magento/Payment/Model/Checks/SpecificationFactory.php index 58511c276b43a..26295db8efe85 100644 --- a/app/code/Magento/Payment/Model/Checks/SpecificationFactory.php +++ b/app/code/Magento/Payment/Model/Checks/SpecificationFactory.php @@ -31,7 +31,7 @@ class SpecificationFactory /** * Object manager * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; @@ -41,10 +41,10 @@ class SpecificationFactory /** * Construct * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param array $mapping */ - public function __construct(\Magento\ObjectManager $objectManager, array $mapping) + public function __construct(\Magento\Framework\ObjectManager $objectManager, array $mapping) { $this->objectManager = $objectManager; $this->mapping = $mapping; @@ -55,7 +55,7 @@ public function __construct(\Magento\ObjectManager $objectManager, array $mappin * * @param array $data * @return SpecificationInterface - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function create($data) { diff --git a/app/code/Magento/Payment/Model/Config.php b/app/code/Magento/Payment/Model/Config.php index fca4e243e9f0a..8483ff7c53709 100644 --- a/app/code/Magento/Payment/Model/Config.php +++ b/app/code/Magento/Payment/Model/Config.php @@ -48,14 +48,14 @@ class Config protected $_scopeConfig; /** - * @var \Magento\Config\DataInterface + * @var \Magento\Framework\Config\DataInterface */ protected $_dataStorage; /** * Locale model * - * @var \Magento\Locale\ListsInterface + * @var \Magento\Framework\Locale\ListsInterface */ protected $_localeLists; @@ -72,15 +72,15 @@ class Config * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Payment\Model\Method\Factory $paymentMethodFactory - * @param \Magento\Locale\ListsInterface $localeLists - * @param \Magento\Config\DataInterface $dataStorage + * @param \Magento\Framework\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Config\DataInterface $dataStorage */ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Payment\Model\Method\Factory $paymentMethodFactory, - \Magento\Locale\ListsInterface $localeLists, - \Magento\Config\DataInterface $dataStorage + \Magento\Framework\Locale\ListsInterface $localeLists, + \Magento\Framework\Config\DataInterface $dataStorage ) { $this->_scopeConfig = $scopeConfig; $this->_dataStorage = $dataStorage; diff --git a/app/code/Magento/Payment/Model/Config/Converter.php b/app/code/Magento/Payment/Model/Config/Converter.php index 6bd385691a906..d2ad3b0d4f76d 100644 --- a/app/code/Magento/Payment/Model/Config/Converter.php +++ b/app/code/Magento/Payment/Model/Config/Converter.php @@ -25,7 +25,7 @@ */ namespace Magento\Payment\Model\Config; -class Converter implements \Magento\Config\ConverterInterface +class Converter implements \Magento\Framework\Config\ConverterInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Payment/Model/Config/Reader.php b/app/code/Magento/Payment/Model/Config/Reader.php index 7a3f5170e56f4..019861db643cd 100644 --- a/app/code/Magento/Payment/Model/Config/Reader.php +++ b/app/code/Magento/Payment/Model/Config/Reader.php @@ -25,7 +25,7 @@ */ namespace Magento\Payment\Model\Config; -class Reader extends \Magento\Config\Reader\Filesystem +class Reader extends \Magento\Framework\Config\Reader\Filesystem { /** * List of identifier attributes for merging diff --git a/app/code/Magento/Payment/Model/Config/SchemaLocator.php b/app/code/Magento/Payment/Model/Config/SchemaLocator.php index 2d995d6e7f99c..a86cffd42e00e 100644 --- a/app/code/Magento/Payment/Model/Config/SchemaLocator.php +++ b/app/code/Magento/Payment/Model/Config/SchemaLocator.php @@ -25,7 +25,7 @@ */ namespace Magento\Payment\Model\Config; -class SchemaLocator implements \Magento\Config\SchemaLocatorInterface +class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface { /** * Path to corresponding XSD file with validation rules for merged config @@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface protected $_perFileSchema = null; /** - * @param \Magento\Module\Dir\Reader $moduleReader + * @param \Magento\Framework\Module\Dir\Reader $moduleReader */ - public function __construct(\Magento\Module\Dir\Reader $moduleReader) + public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) { $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Payment') . '/payment.xsd'; $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Payment') . '/payment_file.xsd'; diff --git a/app/code/Magento/Payment/Model/Config/Source/Allmethods.php b/app/code/Magento/Payment/Model/Config/Source/Allmethods.php index 376d060edd549..449c15a7022c4 100644 --- a/app/code/Magento/Payment/Model/Config/Source/Allmethods.php +++ b/app/code/Magento/Payment/Model/Config/Source/Allmethods.php @@ -25,7 +25,7 @@ */ namespace Magento\Payment\Model\Config\Source; -class Allmethods implements \Magento\Option\ArrayInterface +class Allmethods implements \Magento\Framework\Option\ArrayInterface { /** * Payment data diff --git a/app/code/Magento/Payment/Model/Config/Source/Allspecificcountries.php b/app/code/Magento/Payment/Model/Config/Source/Allspecificcountries.php index 93ada0711f72f..1e866bed5c51c 100644 --- a/app/code/Magento/Payment/Model/Config/Source/Allspecificcountries.php +++ b/app/code/Magento/Payment/Model/Config/Source/Allspecificcountries.php @@ -25,7 +25,7 @@ */ namespace Magento\Payment\Model\Config\Source; -class Allspecificcountries implements \Magento\Option\ArrayInterface +class Allspecificcountries implements \Magento\Framework\Option\ArrayInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Payment/Model/Config/Source/Cctype.php b/app/code/Magento/Payment/Model/Config/Source/Cctype.php index 8e56a89e1628e..912fd9b52e787 100644 --- a/app/code/Magento/Payment/Model/Config/Source/Cctype.php +++ b/app/code/Magento/Payment/Model/Config/Source/Cctype.php @@ -23,7 +23,7 @@ */ namespace Magento\Payment\Model\Config\Source; -class Cctype implements \Magento\Option\ArrayInterface +class Cctype implements \Magento\Framework\Option\ArrayInterface { /** * Payment config model diff --git a/app/code/Magento/Payment/Model/Info.php b/app/code/Magento/Payment/Model/Info.php index b9d574568173f..d122893f65bcc 100644 --- a/app/code/Magento/Payment/Model/Info.php +++ b/app/code/Magento/Payment/Model/Info.php @@ -28,7 +28,7 @@ /** * Payment information model */ -class Info extends \Magento\Model\AbstractModel +class Info extends \Magento\Framework\Model\AbstractModel { /** * Additional information container @@ -45,26 +45,26 @@ class Info extends \Magento\Model\AbstractModel protected $_paymentData = null; /** - * @var \Magento\Encryption\EncryptorInterface + * @var \Magento\Framework\Encryption\EncryptorInterface */ protected $_encryptor; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Encryption\EncryptorInterface $encryptor - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Payment\Helper\Data $paymentData, - \Magento\Encryption\EncryptorInterface $encryptor, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Encryption\EncryptorInterface $encryptor, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_paymentData = $paymentData; @@ -98,7 +98,7 @@ public function getData($key = '', $index = null) * Retrieve payment method model object * * @return \Magento\Payment\Model\MethodInterface - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function getMethodInstance() { @@ -114,7 +114,7 @@ public function getMethodInstance() $this->setMethodInstance($instance); return $instance; } - throw new \Magento\Model\Exception(__('The payment method you requested is not available.')); + throw new \Magento\Framework\Model\Exception(__('The payment method you requested is not available.')); } return $this->_getData('method_instance'); @@ -156,12 +156,12 @@ public function decrypt($data) * @param string|array $key * @param mixed $value * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function setAdditionalInformation($key, $value = null) { if (is_object($value)) { - throw new \Magento\Model\Exception(__('The payment disallows storing objects.')); + throw new \Magento\Framework\Model\Exception(__('The payment disallows storing objects.')); } $this->_initAdditionalInformation(); if (is_array($key) && is_null($value)) { diff --git a/app/code/Magento/Payment/Model/Info/Exception.php b/app/code/Magento/Payment/Model/Info/Exception.php index b127a3ca54cd8..45953b8ed42d5 100644 --- a/app/code/Magento/Payment/Model/Info/Exception.php +++ b/app/code/Magento/Payment/Model/Info/Exception.php @@ -34,6 +34,6 @@ * @package Magento_Payment * @author Magento Core Team */ -class Exception extends \Magento\Model\Exception +class Exception extends \Magento\Framework\Model\Exception { } diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 75c5576521c2f..3faf6d595b280 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -29,7 +29,7 @@ /** * Payment method abstract model */ -abstract class AbstractMethod extends \Magento\Object implements \Magento\Payment\Model\MethodInterface +abstract class AbstractMethod extends \Magento\Framework\Object implements \Magento\Payment\Model\MethodInterface { const ACTION_ORDER = 'order'; @@ -201,31 +201,31 @@ abstract class AbstractMethod extends \Magento\Object implements \Magento\Paymen /** * Core event manager proxy * - * @var \Magento\Event\ManagerInterface + * @var \Magento\Framework\Event\ManagerInterface */ protected $_eventManager; /** * Log adapter factory * - * @var \Magento\Logger\AdapterFactory + * @var \Magento\Framework\Logger\AdapterFactory */ protected $_logAdapterFactory; /** * Construct * - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, array $data = array() ) { parent::__construct($data); @@ -298,10 +298,10 @@ public function canRefundPartialPerInvoice() /** * Check void availability * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return bool */ - public function canVoid(\Magento\Object $payment) + public function canVoid(\Magento\Framework\Object $payment) { return $this->_canVoid; } @@ -414,12 +414,12 @@ public function canUseForCurrency($currencyCode) * Retrieve payment method code * * @return string - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function getCode() { if (empty($this->_code)) { - throw new \Magento\Model\Exception(__('We cannot retrieve the payment method code.')); + throw new \Magento\Framework\Model\Exception(__('We cannot retrieve the payment method code.')); } return $this->_code; } @@ -448,13 +448,13 @@ public function getInfoBlockType() * Retrieve payment information model object * * @return \Magento\Payment\Model\Info - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function getInfoInstance() { $instance = $this->getData('info_instance'); if (!$instance instanceof \Magento\Payment\Model\Info) { - throw new \Magento\Model\Exception(__('We cannot retrieve the payment information object instance.')); + throw new \Magento\Framework\Model\Exception(__('We cannot retrieve the payment information object instance.')); } return $instance; } @@ -463,7 +463,7 @@ public function getInfoInstance() * Validate payment method information object * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function validate() { @@ -477,7 +477,7 @@ public function validate() $billingCountry = $paymentInfo->getQuote()->getBillingAddress()->getCountryId(); } if (!$this->canUseForCountry($billingCountry)) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('You can\'t use the payment type you selected to make payments to the billing country.') ); } @@ -487,16 +487,16 @@ public function validate() /** * Order payment abstract method * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function order(\Magento\Object $payment, $amount) + public function order(\Magento\Framework\Object $payment, $amount) { if (!$this->canOrder()) { - throw new \Magento\Model\Exception(__('The order action is not available.')); + throw new \Magento\Framework\Model\Exception(__('The order action is not available.')); } return $this; } @@ -504,16 +504,16 @@ public function order(\Magento\Object $payment, $amount) /** * Authorize payment abstract method * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function authorize(\Magento\Object $payment, $amount) + public function authorize(\Magento\Framework\Object $payment, $amount) { if (!$this->canAuthorize()) { - throw new \Magento\Model\Exception(__('The authorize action is not available.')); + throw new \Magento\Framework\Model\Exception(__('The authorize action is not available.')); } return $this; } @@ -521,16 +521,16 @@ public function authorize(\Magento\Object $payment, $amount) /** * Capture payment abstract method * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { if (!$this->canCapture()) { - throw new \Magento\Model\Exception(__('The capture action is not available.')); + throw new \Magento\Framework\Model\Exception(__('The capture action is not available.')); } return $this; @@ -569,15 +569,15 @@ public function processBeforeRefund($invoice, $payment) /** * Refund specified amount for payment * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { if (!$this->canRefund()) { - throw new \Magento\Model\Exception(__('The refund action is not available.')); + throw new \Magento\Framework\Model\Exception(__('The refund action is not available.')); } return $this; } @@ -597,11 +597,11 @@ public function processCreditmemo($creditmemo, $payment) /** * Cancel payment abstract method * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * * @return $this */ - public function cancel(\Magento\Object $payment) + public function cancel(\Magento\Framework\Object $payment) { return $this; } @@ -609,14 +609,14 @@ public function cancel(\Magento\Object $payment) /** * Void payment abstract method * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { if (!$this->canVoid($payment)) { - throw new \Magento\Model\Exception(__('Void action is not available.')); + throw new \Magento\Framework\Model\Exception(__('Void action is not available.')); } return $this; } @@ -637,12 +637,12 @@ public function canReviewPayment(\Magento\Payment\Model\Info $payment) * * @param \Magento\Payment\Model\Info $payment * @return false - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function acceptPayment(\Magento\Payment\Model\Info $payment) { if (!$this->canReviewPayment($payment)) { - throw new \Magento\Model\Exception(__('The payment review action is unavailable.')); + throw new \Magento\Framework\Model\Exception(__('The payment review action is unavailable.')); } return false; } @@ -652,12 +652,12 @@ public function acceptPayment(\Magento\Payment\Model\Info $payment) * * @param \Magento\Payment\Model\Info $payment * @return false - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function denyPayment(\Magento\Payment\Model\Info $payment) { if (!$this->canReviewPayment($payment)) { - throw new \Magento\Model\Exception(__('The payment review action is unavailable.')); + throw new \Magento\Framework\Model\Exception(__('The payment review action is unavailable.')); } return false; } @@ -692,14 +692,14 @@ public function getConfigData($field, $storeId = null) /** * Assign data to info model instance * - * @param array|\Magento\Object $data + * @param array|\Magento\Framework\Object $data * @return $this */ public function assignData($data) { if (is_array($data)) { $this->getInfoInstance()->addData($data); - } elseif ($data instanceof \Magento\Object) { + } elseif ($data instanceof \Magento\Framework\Object) { $this->getInfoInstance()->addData($data->getData()); } return $this; diff --git a/app/code/Magento/Payment/Model/Method/Cc.php b/app/code/Magento/Payment/Model/Method/Cc.php index 1672e1203024e..5b9b39a3c693f 100644 --- a/app/code/Magento/Payment/Model/Method/Cc.php +++ b/app/code/Magento/Payment/Model/Method/Cc.php @@ -43,12 +43,12 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod protected $_canSaveCc = false; /** - * @var \Magento\Module\ModuleListInterface + * @var \Magento\Framework\Module\ModuleListInterface */ protected $_moduleList; /** - * @var \Magento\Stdlib\DateTime\TimezoneInterface + * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface */ protected $_localeDate; @@ -62,29 +62,29 @@ class Cc extends \Magento\Payment\Model\Method\AbstractMethod /** * Construct * - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Logger $logger - * @param \Magento\Module\ModuleListInterface $moduleList - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Logger $logger, - \Magento\Module\ModuleListInterface $moduleList, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Module\ModuleListInterface $moduleList, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, array $data = array() ) { @@ -98,13 +98,13 @@ public function __construct( /** * Assign data to info model instance * - * @param \Magento\Object|mixed $data + * @param \Magento\Framework\Object|mixed $data * @return $this */ public function assignData($data) { - if (!$data instanceof \Magento\Object) { - $data = new \Magento\Object($data); + if (!$data instanceof \Magento\Framework\Object) { + $data = new \Magento\Framework\Object($data); } $info = $this->getInfoInstance(); $info->setCcType( @@ -151,7 +151,7 @@ public function prepareSave() * Validate payment method information object * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) */ @@ -245,7 +245,7 @@ public function validate() } if ($errorMsg) { - throw new \Magento\Model\Exception($errorMsg); + throw new \Magento\Framework\Model\Exception($errorMsg); } //This must be after all validation conditions @@ -411,12 +411,12 @@ public function getCentinelValidator() /** * Return data for Centinel validation * - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function getCentinelValidationData() { $info = $this->getInfoInstance(); - $params = new \Magento\Object(); + $params = new \Magento\Framework\Object(); $params->setPaymentMethodCode( $this->getCode() )->setCardType( diff --git a/app/code/Magento/Payment/Model/Method/Factory.php b/app/code/Magento/Payment/Model/Method/Factory.php index a8c90fa1012a5..0a0f5f98b3f81 100644 --- a/app/code/Magento/Payment/Model/Method/Factory.php +++ b/app/code/Magento/Payment/Model/Method/Factory.php @@ -31,16 +31,16 @@ class Factory /** * Object manager * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** * Construct * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } @@ -51,13 +51,13 @@ public function __construct(\Magento\ObjectManager $objectManager) * @param string $className * @param array $data * @return \Magento\Payment\Model\MethodInterface - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function create($className, $data = array()) { $method = $this->_objectManager->create($className, $data); if (!$method instanceof \Magento\Payment\Model\MethodInterface) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( sprintf("%s class doesn't implement \Magento\Payment\Model\MethodInterface", $className) ); } diff --git a/app/code/Magento/Payment/Model/Method/Free.php b/app/code/Magento/Payment/Model/Method/Free.php index 0bfd8f569be44..05cadf99b8061 100644 --- a/app/code/Magento/Payment/Model/Method/Free.php +++ b/app/code/Magento/Payment/Model/Method/Free.php @@ -63,18 +63,18 @@ class Free extends \Magento\Payment\Model\Method\AbstractMethod /** * Construct * - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, array $data = array() ) { diff --git a/app/code/Magento/Payment/Model/Method/Specification/Factory.php b/app/code/Magento/Payment/Model/Method/Specification/Factory.php index 7337000c5cfe3..69dd79aa0a985 100644 --- a/app/code/Magento/Payment/Model/Method/Specification/Factory.php +++ b/app/code/Magento/Payment/Model/Method/Specification/Factory.php @@ -23,7 +23,7 @@ */ namespace Magento\Payment\Model\Method\Specification; -use Magento\ObjectManager; +use Magento\Framework\ObjectManager; use Magento\Payment\Model\Method\SpecificationInterface; /** diff --git a/app/code/Magento/Payment/Model/Observer.php b/app/code/Magento/Payment/Model/Observer.php index 5a095ef8ba545..1bc135340e164 100644 --- a/app/code/Magento/Payment/Model/Observer.php +++ b/app/code/Magento/Payment/Model/Observer.php @@ -65,7 +65,7 @@ public function __construct( /** * Set forced canCreditmemo flag * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ public function salesOrderBeforeSave($observer) @@ -93,10 +93,10 @@ public function salesOrderBeforeSave($observer) } /** - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function updateOrderStatusForPaymentMethods(\Magento\Event\Observer $observer) + public function updateOrderStatusForPaymentMethods(\Magento\Framework\Event\Observer $observer) { if ($observer->getEvent()->getState() !== \Magento\Sales\Model\Order::STATE_NEW) { return; diff --git a/app/code/Magento/Payment/Model/Paygate/Result.php b/app/code/Magento/Payment/Model/Paygate/Result.php index 023e9c0153f85..731c9abcef2fe 100644 --- a/app/code/Magento/Payment/Model/Paygate/Result.php +++ b/app/code/Magento/Payment/Model/Paygate/Result.php @@ -25,6 +25,6 @@ */ namespace Magento\Payment\Model\Paygate; -class Result extends \Magento\Object +class Result extends \Magento\Framework\Object { } diff --git a/app/code/Magento/Payment/Model/Resource/Grid/GroupList.php b/app/code/Magento/Payment/Model/Resource/Grid/GroupList.php index 89b2778adc37a..963edb13c0518 100644 --- a/app/code/Magento/Payment/Model/Resource/Grid/GroupList.php +++ b/app/code/Magento/Payment/Model/Resource/Grid/GroupList.php @@ -26,7 +26,7 @@ /** * Sales transaction types option array */ -class GroupList implements \Magento\Option\ArrayInterface +class GroupList implements \Magento\Framework\Option\ArrayInterface { /** * Payment data diff --git a/app/code/Magento/Payment/Model/Resource/Grid/TypeList.php b/app/code/Magento/Payment/Model/Resource/Grid/TypeList.php index 01711c9091728..2f32ae65165bc 100644 --- a/app/code/Magento/Payment/Model/Resource/Grid/TypeList.php +++ b/app/code/Magento/Payment/Model/Resource/Grid/TypeList.php @@ -26,7 +26,7 @@ /** * Sales transaction payment method types option array */ -class TypeList implements \Magento\Option\ArrayInterface +class TypeList implements \Magento\Framework\Option\ArrayInterface { /** * Payment data diff --git a/app/code/Magento/Payment/Model/Source/Cctype.php b/app/code/Magento/Payment/Model/Source/Cctype.php index bca8cec92995b..95b8f8ef1e44a 100644 --- a/app/code/Magento/Payment/Model/Source/Cctype.php +++ b/app/code/Magento/Payment/Model/Source/Cctype.php @@ -26,7 +26,7 @@ /** * Payment CC Types Source Model */ -class Cctype implements \Magento\Option\ArrayInterface +class Cctype implements \Magento\Framework\Option\ArrayInterface { /** * Allowed CC types diff --git a/app/code/Magento/Payment/Model/Source/Invoice.php b/app/code/Magento/Payment/Model/Source/Invoice.php index 711fd414f6ecc..3331f42c4236f 100644 --- a/app/code/Magento/Payment/Model/Source/Invoice.php +++ b/app/code/Magento/Payment/Model/Source/Invoice.php @@ -30,7 +30,7 @@ * * @author Magento Core Team */ -class Invoice implements \Magento\Option\ArrayInterface +class Invoice implements \Magento\Framework\Option\ArrayInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Payment/etc/adminhtml/acl.xml b/app/code/Magento/Payment/etc/adminhtml/acl.xml index edc36ce822eca..f9189fdf4d2c2 100644 --- a/app/code/Magento/Payment/etc/adminhtml/acl.xml +++ b/app/code/Magento/Payment/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Payment/etc/di.xml b/app/code/Magento/Payment/etc/di.xml index 8964934737fef..3cb005465f076 100644 --- a/app/code/Magento/Payment/etc/di.xml +++ b/app/code/Magento/Payment/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + payment.xml @@ -31,7 +31,7 @@ Magento\Payment\Model\Config\SchemaLocator - + Magento\Payment\Model\Config\Reader payment_config diff --git a/app/code/Magento/Payment/etc/events.xml b/app/code/Magento/Payment/etc/events.xml index a7c0a45cf9ed8..a140b5ff0a5eb 100644 --- a/app/code/Magento/Payment/etc/events.xml +++ b/app/code/Magento/Payment/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Payment/etc/module.xml b/app/code/Magento/Payment/etc/module.xml index 9e39e89985f29..32fa4dd8ddaf1 100644 --- a/app/code/Magento/Payment/etc/module.xml +++ b/app/code/Magento/Payment/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View.php index b10f428748d78..dfd2eb705ec01 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View.php @@ -31,18 +31,18 @@ class View extends \Magento\Backend\Block\Widget\Form\Container /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php index 2900d8ae5ba58..eef4f91559eee 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php @@ -38,7 +38,7 @@ class Info extends \Magento\Backend\Block\Template implements \Magento\Backend\B /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -51,13 +51,13 @@ class Info extends \Magento\Backend\Block\Template implements \Magento\Backend\B /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param CustomerAccountServiceInterface $customerAccountService * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, CustomerAccountServiceInterface $customerAccountService, array $data = array() ) { diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php index 414c730426dea..fbd64bab38f38 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php @@ -26,7 +26,7 @@ /** * Adminhtml billing agreement related orders tab */ -class Orders extends \Magento\View\Element\Text\ListText implements \Magento\Backend\Block\Widget\Tab\TabInterface +class Orders extends \Magento\Framework\View\Element\Text\ListText implements \Magento\Backend\Block\Widget\Tab\TabInterface { /** * Initialize grid params diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Customer/Edit/Tab/Agreement.php b/app/code/Magento/Paypal/Block/Adminhtml/Customer/Edit/Tab/Agreement.php index 48288ba060b30..290f245582de7 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Customer/Edit/Tab/Agreement.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Customer/Edit/Tab/Agreement.php @@ -39,7 +39,7 @@ class Agreement extends \Magento\Paypal\Block\Adminhtml\Billing\Agreement\Grid i /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -49,7 +49,7 @@ class Agreement extends \Magento\Paypal\Block\Adminhtml\Billing\Agreement\Grid i * @param \Magento\Paypal\Helper\Data $helper * @param \Magento\Paypal\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory * @param \Magento\Paypal\Model\Billing\Agreement $agreementModel - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param array $data */ public function __construct( @@ -58,7 +58,7 @@ public function __construct( \Magento\Paypal\Helper\Data $helper, \Magento\Paypal\Model\Resource\Billing\Agreement\CollectionFactory $agreementFactory, \Magento\Paypal\Model\Billing\Agreement $agreementModel, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, array $data = array() ) { $this->_coreRegistry = $coreRegistry; diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php index fbbc4702ce84e..b26727b634350 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php @@ -36,24 +36,24 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic protected $_settlement; /** - * @var \Magento\Locale\CurrencyInterface + * @var \Magento\Framework\Locale\CurrencyInterface */ protected $_localeCurrency; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Paypal\Model\Report\Settlement $settlement - * @param \Magento\Locale\CurrencyInterface $localeCurrency + * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Paypal\Model\Report\Settlement $settlement, - \Magento\Locale\CurrencyInterface $localeCurrency, + \Magento\Framework\Locale\CurrencyInterface $localeCurrency, array $data = array() ) { $this->_settlement = $settlement; @@ -100,7 +100,7 @@ protected function _prepareForm() 'label' => $this->_settlement->getFieldLabel('transaction_initiation_date'), 'value' => $this->formatDate( $model->getData('transaction_initiation_date'), - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true ) ), @@ -108,7 +108,7 @@ protected function _prepareForm() 'label' => $this->_settlement->getFieldLabel('transaction_completion_date'), 'value' => $this->formatDate( $model->getData('transaction_completion_date'), - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true ) ), @@ -146,7 +146,7 @@ protected function _prepareForm() ) ); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); foreach ($fieldsets as $key => $data) { $fieldset = $form->addFieldset($key, array('legend' => $data['legend'])); diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/ApiWizard.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/ApiWizard.php index 0b24b03772ed4..a2808f521d46f 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/ApiWizard.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/ApiWizard.php @@ -47,10 +47,10 @@ protected function _prepareLayout() /** * Unset some non-related element parameters * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); return parent::render($element); @@ -59,10 +59,10 @@ public function render(\Magento\Data\Form\Element\AbstractElement $element) /** * Get the button and scripts contents * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - protected function _getElementHtml(\Magento\Data\Form\Element\AbstractElement $element) + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $originalData = $element->getOriginalData(); $this->addData( diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php index 9671d3b3365b3..c241680e342a8 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php @@ -34,7 +34,7 @@ class Hidden extends \Magento\Backend\Block\System\Config\Form\Field /** * Decorate field row html to be invisible * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @param string $html * @return string */ diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php index d099623ee74ff..6a72524399913 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Expanded.php @@ -25,7 +25,7 @@ */ namespace Magento\Paypal\Block\Adminhtml\System\Config\Fieldset; -use Magento\Data\Form\Element\AbstractElement; +use Magento\Framework\Data\Form\Element\AbstractElement; /** * Fieldset renderer which expanded by default @@ -35,13 +35,13 @@ class Expanded extends \Magento\Backend\Block\System\Config\Form\Fieldset /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\View\Helper\Js $jsHelper + * @param \Magento\Framework\View\Helper\Js $jsHelper * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\View\Helper\Js $jsHelper, + \Magento\Framework\View\Helper\Js $jsHelper, array $data = array() ) { parent::__construct($context, $authSession, $jsHelper, $data); diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php index f7da301d31e5f..e7f1dac6918f8 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php @@ -34,13 +34,13 @@ class Group extends \Magento\Backend\Block\System\Config\Form\Fieldset /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\View\Helper\Js $jsHelper + * @param \Magento\Framework\View\Helper\Js $jsHelper * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\View\Helper\Js $jsHelper, + \Magento\Framework\View\Helper\Js $jsHelper, array $data = array() ) { parent::__construct($context, $authSession, $jsHelper, $data); @@ -49,7 +49,7 @@ public function __construct( /** * Return header comment part of html for fieldset * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getHeaderCommentHtml($element) @@ -75,7 +75,7 @@ protected function _getHeaderCommentHtml($element) /** * Return collapse state * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return bool */ protected function _isCollapseState($element) diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php index ac67605590289..f839ca6f99115 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php @@ -29,7 +29,7 @@ * Renderer for PayPal banner in System Configuration * @author Magento Core Team */ -class Hint extends \Magento\Backend\Block\Template implements \Magento\Data\Form\Element\Renderer\RendererInterface +class Hint extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * @var string @@ -37,18 +37,18 @@ class Hint extends \Magento\Backend\Block\Template implements \Magento\Data\Form protected $_template = 'Magento_Paypal::system/config/fieldset/hint.phtml'; /** - * @var \Magento\View\Helper\Js + * @var \Magento\Framework\View\Helper\Js */ protected $_jsHelper; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\View\Helper\Js $jsHelper + * @param \Magento\Framework\View\Helper\Js $jsHelper * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\View\Helper\Js $jsHelper, + \Magento\Framework\View\Helper\Js $jsHelper, array $data = array() ) { $this->_jsHelper = $jsHelper; @@ -58,10 +58,10 @@ public function __construct( /** * Render fieldset html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $elementOriginalData = $element->getOriginalData(); if (isset($elementOriginalData['help_link'])) { diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php index 65798242824ae..2ec1197436871 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Location.php @@ -36,10 +36,10 @@ class Location extends \Magento\Backend\Block\System\Config\Form\Fieldset /** * Render fieldset html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $this->setElement($element); $js = ' diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php index 15b5e20a3c1fd..d0e14d5265cf1 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php @@ -38,14 +38,14 @@ class Payment extends \Magento\Backend\Block\System\Config\Form\Fieldset /** * @param \Magento\Backend\Block\Context $context * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\View\Helper\Js $jsHelper + * @param \Magento\Framework\View\Helper\Js $jsHelper * @param \Magento\Backend\Model\Config $backendConfig * @param array $data */ public function __construct( \Magento\Backend\Block\Context $context, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\View\Helper\Js $jsHelper, + \Magento\Framework\View\Helper\Js $jsHelper, \Magento\Backend\Model\Config $backendConfig, array $data = array() ) { @@ -56,7 +56,7 @@ public function __construct( /** * Add custom css class * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getFrontendClass($element) @@ -68,7 +68,7 @@ protected function _getFrontendClass($element) /** * Check whether current payment method is enabled * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return bool */ protected function _isPaymentEnabled($element) @@ -88,7 +88,7 @@ protected function _isPaymentEnabled($element) /** * Return header title part of html for payment solution * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getHeaderTitleHtml($element) @@ -144,7 +144,7 @@ protected function _getHeaderTitleHtml($element) /** * Return header comment part of html for payment solution * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ protected function _getHeaderCommentHtml($element) @@ -155,7 +155,7 @@ protected function _getHeaderCommentHtml($element) /** * Get collapsed state on-load * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return false */ protected function _isCollapseState($element) diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php index f11728a37bad4..902ced408d130 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Store.php @@ -29,7 +29,7 @@ * Renderer for service JavaScript code that disables corresponding paypal methods on page load * @author Magento Core Team */ -class Store extends \Magento\Backend\Block\Template implements \Magento\Data\Form\Element\Renderer\RendererInterface +class Store extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * Path to template file @@ -52,10 +52,10 @@ public function __construct( /** * Render service JavaScript code * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $html = $this->_storeManager->isSingleStoreMode() ? '' : $this->toHtml(); return $html; diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php index a78c0a23e9908..68bd7df69a1a3 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php @@ -41,10 +41,10 @@ class Info extends \Magento\Backend\Block\System\Config\Form\Field /** * Render fieldset html * - * @param \Magento\Data\Form\Element\AbstractElement $element + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ - public function render(\Magento\Data\Form\Element\AbstractElement $element) + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $columns = $this->getRequest()->getParam('website') || $this->getRequest()->getParam('store') ? 5 : 4; return $this->_decorateRowHtml($element, "" . $this->toHtml() . ''); diff --git a/app/code/Magento/Paypal/Block/Billing/Agreement/View.php b/app/code/Magento/Paypal/Block/Billing/Agreement/View.php index d70a9756d8753..99db5bce42100 100644 --- a/app/code/Magento/Paypal/Block/Billing/Agreement/View.php +++ b/app/code/Magento/Paypal/Block/Billing/Agreement/View.php @@ -26,7 +26,7 @@ /** * Customer account billing agreement view block */ -class View extends \Magento\View\Element\Template +class View extends \Magento\Framework\View\Element\Template { /** * Payment methods array @@ -52,7 +52,7 @@ class View extends \Magento\View\Element\Template /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -82,8 +82,8 @@ class View extends \Magento\View\Element\Template protected $_agreementResource; /** - * @param \Magento\View\Element\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\View\Element\Template\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Sales\Model\Order\Config $orderConfig @@ -92,8 +92,8 @@ class View extends \Magento\View\Element\Template * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\View\Element\Template\Context $context, + \Magento\Framework\Registry $registry, \Magento\Sales\Model\Resource\Order\CollectionFactory $orderCollectionFactory, \Magento\Customer\Model\Session $customerSession, \Magento\Sales\Model\Order\Config $orderConfig, diff --git a/app/code/Magento/Paypal/Block/Billing/Agreements.php b/app/code/Magento/Paypal/Block/Billing/Agreements.php index c0ef10dc9ee01..a2ba1798ed107 100644 --- a/app/code/Magento/Paypal/Block/Billing/Agreements.php +++ b/app/code/Magento/Paypal/Block/Billing/Agreements.php @@ -26,7 +26,7 @@ /** * Customer account billing agreements block */ -class Agreements extends \Magento\View\Element\Template +class Agreements extends \Magento\Framework\View\Element\Template { /** * Payment methods array @@ -58,14 +58,14 @@ class Agreements extends \Magento\View\Element\Template protected $_helper; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Paypal\Model\Resource\Billing\Agreement\CollectionFactory $agreementCollection * @param \Magento\Paypal\Helper\Data $helper * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Paypal\Model\Resource\Billing\Agreement\CollectionFactory $agreementCollection, \Magento\Paypal\Helper\Data $helper, @@ -120,7 +120,7 @@ public function getBillingAgreements() /** * Retrieve item value by key * - * @param \Magento\Object|\Magento\Paypal\Model\Billing\Agreement $item + * @param \Magento\Framework\Object|\Magento\Paypal\Model\Billing\Agreement $item * @param string $key * @return string */ diff --git a/app/code/Magento/Paypal/Block/Checkout/Onepage/Success/BillingAgreement.php b/app/code/Magento/Paypal/Block/Checkout/Onepage/Success/BillingAgreement.php index 5a4d07fba6581..4570859ab6a53 100644 --- a/app/code/Magento/Paypal/Block/Checkout/Onepage/Success/BillingAgreement.php +++ b/app/code/Magento/Paypal/Block/Checkout/Onepage/Success/BillingAgreement.php @@ -26,7 +26,7 @@ /** * Billing agreement information on Order success page */ -class BillingAgreement extends \Magento\View\Element\Template +class BillingAgreement extends \Magento\Framework\View\Element\Template { /** * @var \Magento\Checkout\Model\Session @@ -44,14 +44,14 @@ class BillingAgreement extends \Magento\View\Element\Template protected $_agreementFactory; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory, diff --git a/app/code/Magento/Paypal/Block/Express/Form.php b/app/code/Magento/Paypal/Block/Express/Form.php index f52e2a6f23051..7abffb31dfae2 100644 --- a/app/code/Magento/Paypal/Block/Express/Form.php +++ b/app/code/Magento/Paypal/Block/Express/Form.php @@ -50,17 +50,17 @@ class Form extends \Magento\Paypal\Block\Standard\Form protected $currentCustomer; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Paypal\Helper\Data $paypalData * @param \Magento\Customer\Service\V1\CustomerCurrentService $currentCustomer * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Paypal\Helper\Data $paypalData, \Magento\Customer\Service\V1\CustomerCurrentService $currentCustomer, array $data = array() diff --git a/app/code/Magento/Paypal/Block/Express/Review.php b/app/code/Magento/Paypal/Block/Express/Review.php index 35e0972a5f04e..49bf0d506d9e9 100644 --- a/app/code/Magento/Paypal/Block/Express/Review.php +++ b/app/code/Magento/Paypal/Block/Express/Review.php @@ -32,7 +32,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class Review extends \Magento\View\Element\Template +class Review extends \Magento\Framework\View\Element\Template { /** * @var \Magento\Sales\Model\Quote @@ -71,13 +71,13 @@ class Review extends \Magento\View\Element\Template /** * Initialize dependencies. * - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Tax\Helper\Data $taxHelper * @param \Magento\Customer\Model\Address\Config $addressConfig * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Tax\Helper\Data $taxHelper, \Magento\Customer\Model\Address\Config $addressConfig, array $data = array() @@ -132,7 +132,7 @@ public function renderAddress($address) { /** @var \Magento\Customer\Block\Address\Renderer\RendererInterface $renderer */ $renderer = $this->_addressConfig->getFormatByCode('html')->getRenderer(); - $addressData = \Magento\Convert\ConvertArray::toFlatArray($address->getData()); + $addressData = \Magento\Framework\Convert\ConvertArray::toFlatArray($address->getData()); return $renderer->renderArray($addressData); } @@ -153,10 +153,10 @@ public function getCarrierName($carrierCode) /** * Get either shipping rate code or empty value on error * - * @param \Magento\Object $rate + * @param \Magento\Framework\Object $rate * @return string */ - public function renderShippingRateValue(\Magento\Object $rate) + public function renderShippingRateValue(\Magento\Framework\Object $rate) { if ($rate->getErrorMessage()) { return ''; @@ -167,7 +167,7 @@ public function renderShippingRateValue(\Magento\Object $rate) /** * Get shipping rate code title and its price or error message * - * @param \Magento\Object $rate + * @param \Magento\Framework\Object $rate * @param string $format * @param string $inclTaxFormat * @return string diff --git a/app/code/Magento/Paypal/Block/Express/Shortcut.php b/app/code/Magento/Paypal/Block/Express/Shortcut.php index 16da4eefcfeaf..f8de794bd5c09 100644 --- a/app/code/Magento/Paypal/Block/Express/Shortcut.php +++ b/app/code/Magento/Paypal/Block/Express/Shortcut.php @@ -30,7 +30,7 @@ /** * Paypal express checkout shortcut link */ -class Shortcut extends \Magento\View\Element\Template implements CatalogBlock\ShortcutInterface +class Shortcut extends \Magento\Framework\View\Element\Template implements CatalogBlock\ShortcutInterface { /** * Whether the block should be eventually rendered @@ -63,7 +63,7 @@ class Shortcut extends \Magento\View\Element\Template implements CatalogBlock\Sh /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_registry; @@ -102,7 +102,7 @@ class Shortcut extends \Magento\View\Element\Template implements CatalogBlock\Sh protected $_checkoutFactory; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; @@ -117,37 +117,37 @@ class Shortcut extends \Magento\View\Element\Template implements CatalogBlock\Sh protected $currentCustomer; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Paypal\Helper\Data $paypalData * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory * @param \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig * @param \Magento\Customer\Service\V1\CustomerCurrentService $currentCustomer - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Checkout\Model\Session $checkoutSession * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Paypal\Helper\Data $paypalData, \Magento\Payment\Helper\Data $paymentData, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, \Magento\Customer\Model\Session $customerSession, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory, - \Magento\Math\Random $mathRandom, + \Magento\Framework\Math\Random $mathRandom, \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig, \Magento\Customer\Service\V1\CustomerCurrentService $currentCustomer, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Checkout\Model\Session $checkoutSession = null, array $data = array() ) { @@ -167,7 +167,7 @@ public function __construct( } /** - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index 2464ad5ae38a7..f99ca37e70fb8 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -79,14 +79,14 @@ class Iframe extends \Magento\Payment\Block\Form protected $_hssHelper; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Paypal\Helper\Hss $hssHelper * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Paypal\Helper\Hss $hssHelper, @@ -127,7 +127,7 @@ protected function _construct() * Get current block instance * * @return \Magento\Payment\Block\Form - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _getBlock() { @@ -135,12 +135,12 @@ protected function _getBlock() $this->_block = $this->getLayout()->createBlock( 'Magento\\Paypal\\Block\\' . str_replace( ' ', - \Magento\Autoload\IncludePath::NS_SEPARATOR, + \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR, ucwords(str_replace('_', ' ', $this->_paymentMethodCode)) ) . '\\Iframe' ); if (!$this->_block instanceof \Magento\Paypal\Block\Iframe) { - throw new \Magento\Model\Exception('Invalid block type'); + throw new \Magento\Framework\Model\Exception('Invalid block type'); } } @@ -174,7 +174,7 @@ protected function _getCheckout() /** * Before rendering html, check if is block rendering needed * - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Paypal/Block/Logo.php b/app/code/Magento/Paypal/Block/Logo.php index 59162476f5d95..9f3051a616648 100644 --- a/app/code/Magento/Paypal/Block/Logo.php +++ b/app/code/Magento/Paypal/Block/Logo.php @@ -29,7 +29,7 @@ */ namespace Magento\Paypal\Block; -class Logo extends \Magento\View\Element\Template +class Logo extends \Magento\Framework\View\Element\Template { /** * @var \Magento\Paypal\Model\Config @@ -37,20 +37,20 @@ class Logo extends \Magento\View\Element\Template protected $_paypalConfig; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Paypal\Model\Config $paypalConfig - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Paypal\Model\Config $paypalConfig, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, array $data = array() ) { $this->_paypalConfig = $paypalConfig; diff --git a/app/code/Magento/Paypal/Block/Payflow/Advanced/Iframe.php b/app/code/Magento/Paypal/Block/Payflow/Advanced/Iframe.php index 0a26728043432..3b591087c696c 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Advanced/Iframe.php +++ b/app/code/Magento/Paypal/Block/Payflow/Advanced/Iframe.php @@ -35,7 +35,7 @@ class Iframe extends \Magento\Paypal\Block\Payflow\Link\Iframe { /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Paypal\Helper\Hss $hssHelper @@ -43,7 +43,7 @@ class Iframe extends \Magento\Paypal\Block\Payflow\Link\Iframe * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Paypal\Helper\Hss $hssHelper, diff --git a/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php b/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php index 37262cd8aa74e..dee2d6f5e13db 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php +++ b/app/code/Magento/Paypal/Block/Payflow/Link/Iframe.php @@ -38,7 +38,7 @@ class Iframe extends \Magento\Paypal\Block\Iframe protected $_paymentData = null; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Paypal\Helper\Hss $hssHelper @@ -46,7 +46,7 @@ class Iframe extends \Magento\Paypal\Block\Iframe * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Paypal\Helper\Hss $hssHelper, diff --git a/app/code/Magento/Paypal/Block/Payment/Form/Billing/Agreement.php b/app/code/Magento/Paypal/Block/Payment/Form/Billing/Agreement.php index 2e76715872319..cab7ad339a4d2 100644 --- a/app/code/Magento/Paypal/Block/Payment/Form/Billing/Agreement.php +++ b/app/code/Magento/Paypal/Block/Payment/Form/Billing/Agreement.php @@ -39,12 +39,12 @@ class Agreement extends \Magento\Payment\Block\Form protected $_agreementFactory; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory, array $data = array() ) { diff --git a/app/code/Magento/Paypal/Block/Payment/Info.php b/app/code/Magento/Paypal/Block/Payment/Info.php index c1eaf7aa42355..df4d16afcd874 100644 --- a/app/code/Magento/Paypal/Block/Payment/Info.php +++ b/app/code/Magento/Paypal/Block/Payment/Info.php @@ -37,13 +37,13 @@ class Info extends \Magento\Payment\Block\Info\Cc protected $_paypalInfoFactory; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Paypal\Model\InfoFactory $paypalInfoFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Paypal\Model\InfoFactory $paypalInfoFactory, array $data = array() @@ -67,8 +67,8 @@ public function getCcTypeName() /** * Prepare PayPal-specific payment information * - * @param \Magento\Object|array|null $transport - * @return \Magento\Object + * @param \Magento\Framework\Object|array|null $transport + * @return \Magento\Framework\Object */ protected function _prepareSpecificInformation($transport = null) { diff --git a/app/code/Magento/Paypal/Block/Payment/Info/Billing/Agreement.php b/app/code/Magento/Paypal/Block/Payment/Info/Billing/Agreement.php index 1e7831893f234..7ba1907c3f823 100644 --- a/app/code/Magento/Paypal/Block/Payment/Info/Billing/Agreement.php +++ b/app/code/Magento/Paypal/Block/Payment/Info/Billing/Agreement.php @@ -31,8 +31,8 @@ class Agreement extends \Magento\Payment\Block\Info /** * Add reference id to payment method information * - * @param \Magento\Object|array|null $transport - * @return \Magento\Object + * @param \Magento\Framework\Object|array|null $transport + * @return \Magento\Framework\Object */ protected function _prepareSpecificInformation($transport = null) { @@ -43,7 +43,7 @@ protected function _prepareSpecificInformation($transport = null) $referenceID = $info->getAdditionalInformation( \Magento\Paypal\Model\Payment\Method\Billing\AbstractAgreement::PAYMENT_INFO_REFERENCE_ID ); - $transport = new \Magento\Object(array((string)__('Reference ID') => $referenceID)); + $transport = new \Magento\Framework\Object(array((string)__('Reference ID') => $referenceID)); $transport = parent::_prepareSpecificInformation($transport); return $transport; diff --git a/app/code/Magento/Paypal/Block/Standard/Form.php b/app/code/Magento/Paypal/Block/Standard/Form.php index 5ab8020e075d6..00281bf1e059c 100644 --- a/app/code/Magento/Paypal/Block/Standard/Form.php +++ b/app/code/Magento/Paypal/Block/Standard/Form.php @@ -49,20 +49,20 @@ class Form extends \Magento\Payment\Block\Form protected $_paypalConfigFactory; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Paypal\Model\ConfigFactory $paypalConfigFactory, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, array $data = array() ) { $this->_paypalConfigFactory = $paypalConfigFactory; @@ -78,8 +78,8 @@ public function __construct( protected function _construct() { $this->_config = $this->_paypalConfigFactory->create()->setMethod($this->getMethodCode()); - /** @var $mark \Magento\View\Element\Template */ - $mark = $this->_layout->createBlock('Magento\View\Element\Template'); + /** @var $mark \Magento\Framework\View\Element\Template */ + $mark = $this->_layout->createBlock('Magento\Framework\View\Element\Template'); $mark->setTemplate( 'Magento_Paypal::payment/mark.phtml' )->setPaymentAcceptanceMarkHref( diff --git a/app/code/Magento/Paypal/Block/Standard/Redirect.php b/app/code/Magento/Paypal/Block/Standard/Redirect.php index c1b2596af2c5f..5dc67fa76aef9 100644 --- a/app/code/Magento/Paypal/Block/Standard/Redirect.php +++ b/app/code/Magento/Paypal/Block/Standard/Redirect.php @@ -25,15 +25,15 @@ */ namespace Magento\Paypal\Block\Standard; -class Redirect extends \Magento\View\Element\AbstractBlock +class Redirect extends \Magento\Framework\View\Element\AbstractBlock { /** - * @var \Magento\Data\FormFactory + * @var \Magento\Framework\Data\FormFactory */ protected $_formFactory; /** - * @var \Magento\Data\Form\Element\Factory + * @var \Magento\Framework\Data\Form\Element\Factory */ protected $_elementFactory; @@ -43,24 +43,24 @@ class Redirect extends \Magento\View\Element\AbstractBlock protected $_paypalStandardFactory; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** - * @param \Magento\View\Element\Context $context - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param \Magento\Framework\View\Element\Context $context + * @param \Magento\Framework\Data\FormFactory $formFactory + * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory * @param \Magento\Paypal\Model\StandardFactory $paypalStandardFactory - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom * @param array $data */ public function __construct( - \Magento\View\Element\Context $context, - \Magento\Data\FormFactory $formFactory, - \Magento\Data\Form\Element\Factory $elementFactory, + \Magento\Framework\View\Element\Context $context, + \Magento\Framework\Data\FormFactory $formFactory, + \Magento\Framework\Data\Form\Element\Factory $elementFactory, \Magento\Paypal\Model\StandardFactory $paypalStandardFactory, - \Magento\Math\Random $mathRandom, + \Magento\Framework\Math\Random $mathRandom, array $data = array() ) { $this->_formFactory = $formFactory; diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Billing/Agreement.php b/app/code/Magento/Paypal/Controller/Adminhtml/Billing/Agreement.php index 28cc38ec82723..b79b75cbc8c7c 100644 --- a/app/code/Magento/Paypal/Controller/Adminhtml/Billing/Agreement.php +++ b/app/code/Magento/Paypal/Controller/Adminhtml/Billing/Agreement.php @@ -31,15 +31,15 @@ class Agreement extends \Magento\Backend\App\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry */ - public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Registry $coreRegistry) + public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry) { $this->_coreRegistry = $coreRegistry; parent::__construct($context); @@ -132,11 +132,11 @@ public function cancelAction() $this->messageManager->addSuccess(__('You canceled the billing agreement.')); $this->_redirect('paypal/*/view', array('_current' => true)); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We could not cancel the billing agreement.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('paypal/*/view', array('_current' => true)); } @@ -158,11 +158,11 @@ public function deleteAction() $this->messageManager->addSuccess(__('You deleted the billing agreement.')); $this->_redirect('paypal/*/'); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We could not delete the billing agreement.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('paypal/*/view', array('_current' => true)); } diff --git a/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php b/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php index d4a1a96f74251..ba7d47f7021e2 100644 --- a/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php +++ b/app/code/Magento/Paypal/Controller/Adminhtml/Paypal/Reports.php @@ -33,7 +33,7 @@ class Reports extends \Magento\Backend\App\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -48,23 +48,23 @@ class Reports extends \Magento\Backend\App\Action protected $_settlementFactory; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Paypal\Model\Report\Settlement\RowFactory $rowFactory * @param \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory - * @param \Magento\Logger $logger + * @param \Magento\Framework\Logger $logger */ public function __construct( \Magento\Backend\App\Action\Context $context, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Paypal\Model\Report\Settlement\RowFactory $rowFactory, \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory, - \Magento\Logger $logger + \Magento\Framework\Logger $logger ) { $this->_coreRegistry = $coreRegistry; $this->_rowFactory = $rowFactory; @@ -124,7 +124,7 @@ public function detailsAction() * Forced fetch reports action * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function fetchAction() { @@ -133,7 +133,7 @@ public function fetchAction() /* @var $reports \Magento\Paypal\Model\Report\Settlement */ $credentials = $reports->getSftpCredentials(); if (empty($credentials)) { - throw new \Magento\Model\Exception(__('We found nothing to fetch because of an empty configuration.')); + throw new \Magento\Framework\Model\Exception(__('We found nothing to fetch because of an empty configuration.')); } foreach ($credentials as $config) { try { @@ -155,7 +155,7 @@ public function fetchAction() $this->_logger->logException($e); } } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->_logger->logException($e); diff --git a/app/code/Magento/Paypal/Controller/Billing/Agreement.php b/app/code/Magento/Paypal/Controller/Billing/Agreement.php index 9456f3ef6d06b..bb01eb0341073 100644 --- a/app/code/Magento/Paypal/Controller/Billing/Agreement.php +++ b/app/code/Magento/Paypal/Controller/Billing/Agreement.php @@ -33,7 +33,7 @@ class Agreement extends \Magento\Framework\App\Action\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -44,12 +44,12 @@ class Agreement extends \Magento\Framework\App\Action\Action /** * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Framework\App\Action\Title $title */ public function __construct( \Magento\Framework\App\Action\Context $context, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Framework\App\Action\Title $title ) { $this->_coreRegistry = $coreRegistry; @@ -125,18 +125,18 @@ public function startWizardAction() $paymentCode )->setReturnUrl( $this->_objectManager->create( - 'Magento\UrlInterface' + 'Magento\Framework\UrlInterface' )->getUrl('*/*/returnWizard', array('payment_method' => $paymentCode)) )->setCancelUrl( - $this->_objectManager->create('Magento\UrlInterface') + $this->_objectManager->create('Magento\Framework\UrlInterface') ->getUrl('*/*/cancelWizard', array('payment_method' => $paymentCode)) ); return $this->getResponse()->setRedirect($agreement->initToken()); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->messageManager->addError(__('We couldn\'t start the billing agreement wizard.')); } } @@ -171,10 +171,10 @@ public function returnWizardAction() ); $this->_redirect('*/*/view', array('agreement' => $agreement->getId())); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->messageManager->addError(__('We couldn\'t finish the billing agreement wizard.')); } $this->_redirect('*/*/index'); @@ -209,10 +209,10 @@ public function cancelAction() $this->messageManager->addNotice( __('The billing agreement "%1" has been canceled.', $agreement->getReferenceId()) ); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->messageManager->addError(__('We couldn\'t cancel the billing agreement.')); } } diff --git a/app/code/Magento/Paypal/Controller/Express.php b/app/code/Magento/Paypal/Controller/Express.php index 1ca2c204c3952..bb7b24d90505e 100644 --- a/app/code/Magento/Paypal/Controller/Express.php +++ b/app/code/Magento/Paypal/Controller/Express.php @@ -66,7 +66,7 @@ class Express extends \Magento\Paypal\Controller\Express\AbstractExpress * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory - * @param \Magento\Session\Generic $paypalSession + * @param \Magento\Framework\Session\Generic $paypalSession * @param \Magento\Core\Helper\Url $urlHelper * @param \Magento\Customer\Helper\Data $customerHelper * @@ -79,7 +79,7 @@ public function __construct( \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory, - \Magento\Session\Generic $paypalSession, + \Magento\Framework\Session\Generic $paypalSession, \Magento\Core\Helper\Url $urlHelper, \Magento\Customer\Helper\Data $customerHelper ) { diff --git a/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php b/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php index d70090ddb2354..4f58a27151157 100644 --- a/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php +++ b/app/code/Magento/Paypal/Controller/Express/AbstractExpress.php @@ -101,7 +101,7 @@ abstract class AbstractExpress extends AppAction implements RedirectLoginInterfa protected $_checkoutFactory; /** - * @var \Magento\Session\Generic + * @var \Magento\Framework\Session\Generic */ protected $_paypalSession; @@ -112,7 +112,7 @@ abstract class AbstractExpress extends AppAction implements RedirectLoginInterfa * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory - * @param \Magento\Session\Generic $paypalSession + * @param \Magento\Framework\Session\Generic $paypalSession */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -121,7 +121,7 @@ public function __construct( \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory, - \Magento\Session\Generic $paypalSession + \Magento\Framework\Session\Generic $paypalSession ) { $this->_customerSession = $customerSession; $this->_quoteFactory = $quoteFactory; @@ -198,11 +198,11 @@ public function startAction() $this->getResponse()->setRedirect($url); return; } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t start Express Checkout.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('checkout/cart'); @@ -222,7 +222,7 @@ public function shippingOptionsCallbackAction() $response = $this->_checkout->getShippingOptionsCallbackResponse($this->getRequest()->getParams()); $this->getResponse()->setBody($response); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } } @@ -250,11 +250,11 @@ public function cancelAction() } else { $this->messageManager->addSuccess(__('Express Checkout has been canceled.')); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('Unable to cancel Express Checkout')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('checkout/cart'); @@ -272,11 +272,11 @@ public function returnAction() $this->_checkout->returnFromPaypal($this->_initToken()); $this->_redirect('*/*/review'); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t process Express Checkout approval.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('checkout/cart'); } @@ -301,13 +301,13 @@ public function reviewAction() } $this->_view->renderLayout(); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError( __('We can\'t initialize Express Checkout review.') ); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('checkout/cart'); } @@ -321,7 +321,7 @@ public function editAction() { try { $this->getResponse()->setRedirect($this->_config->getExpressCheckoutEditUrl($this->_initToken())); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); $this->_redirect('*/*/review'); } @@ -345,11 +345,11 @@ public function saveShippingMethodAction() ); return; } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t update shipping method.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } if ($isAjax) { $this->getResponse()->setBody( @@ -382,11 +382,11 @@ public function updateShippingMethodsAction() ->toHtml() ); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t update Order data.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->getResponse()->setBody( '' @@ -411,11 +411,11 @@ public function updateOrderAction() ); return; } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t update Order data.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } if ($isAjax) { $this->getResponse()->setBody( @@ -432,19 +432,16 @@ public function updateOrderAction() * Submit the order * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function placeOrderAction() { try { - $requiredAgreements = $this->_objectManager->get('Magento\Checkout\Helper\Data')->getRequiredAgreementIds(); - if ($requiredAgreements) { - $postedAgreements = array_keys($this->getRequest()->getPost('agreement', array())); - if (array_diff($requiredAgreements, $postedAgreements)) { - throw new \Magento\Model\Exception( - __('Please agree to all the terms and conditions before placing the order.') - ); - } + $agreementsValidator = $this->_objectManager->get('Magento\Checkout\Model\Agreements\AgreementsValidator'); + if (!$agreementsValidator->isValid(array_keys($this->getRequest()->getPost('agreement', [])))) { + throw new \Magento\Framework\Model\Exception( + __('Please agree to all the terms and conditions before placing the order.') + ); } $this->_initCheckout(); @@ -481,11 +478,11 @@ public function placeOrderAction() $this->_initToken(false); // no need in token anymore $this->_redirect('checkout/onepage/success'); return; - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t place the order.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('*/*/review'); } @@ -494,14 +491,14 @@ public function placeOrderAction() * Instantiate quote and checkout * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ private function _initCheckout() { $quote = $this->_getQuote(); if (!$quote->hasItems() || $quote->getHasError()) { $this->getResponse()->setHeader('HTTP/1.1', '403 Forbidden'); - throw new \Magento\Model\Exception(__('We can\'t initialize Express Checkout.')); + throw new \Magento\Framework\Model\Exception(__('We can\'t initialize Express Checkout.')); } if (!isset($this->_checkoutTypes[$this->_checkoutType])) { $parameters = array( @@ -522,7 +519,7 @@ private function _initCheckout() * * @param string|null $setToken * @return \Magento\Paypal\Controller\Express|string - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _initToken($setToken = null) { @@ -530,7 +527,7 @@ protected function _initToken($setToken = null) if (false === $setToken) { // security measure for avoid unsetting token twice if (!$this->_getSession()->getExpressCheckoutToken()) { - throw new \Magento\Model\Exception(__('PayPal Express Checkout Token does not exist.')); + throw new \Magento\Framework\Model\Exception(__('PayPal Express Checkout Token does not exist.')); } $this->_getSession()->unsExpressCheckoutToken(); } else { @@ -541,7 +538,7 @@ protected function _initToken($setToken = null) $setToken = $this->getRequest()->getParam('token'); if ($setToken) { if ($setToken !== $this->_getSession()->getExpressCheckoutToken()) { - throw new \Magento\Model\Exception(__('A wrong PayPal Express Checkout Token is specified.')); + throw new \Magento\Framework\Model\Exception(__('A wrong PayPal Express Checkout Token is specified.')); } } else { $setToken = $this->_getSession()->getExpressCheckoutToken(); @@ -552,7 +549,7 @@ protected function _initToken($setToken = null) /** * PayPal session instance getter * - * @return \Magento\Session\Generic + * @return \Magento\Framework\Session\Generic */ private function _getSession() { diff --git a/app/code/Magento/Paypal/Controller/Ipn.php b/app/code/Magento/Paypal/Controller/Ipn.php index b619d7af8ae5a..a2e5eed1eba25 100644 --- a/app/code/Magento/Paypal/Controller/Ipn.php +++ b/app/code/Magento/Paypal/Controller/Ipn.php @@ -29,7 +29,7 @@ class Ipn extends \Magento\Framework\App\Action\Action { /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; @@ -41,12 +41,12 @@ class Ipn extends \Magento\Framework\App\Action\Action /** * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Paypal\Model\IpnFactory $ipnFactory - * @param \Magento\Logger $logger + * @param \Magento\Framework\Logger $logger */ public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Paypal\Model\IpnFactory $ipnFactory, - \Magento\Logger $logger + \Magento\Framework\Logger $logger ) { $this->_logger = $logger; $this->_ipnFactory = $ipnFactory; diff --git a/app/code/Magento/Paypal/Controller/Payflow.php b/app/code/Magento/Paypal/Controller/Payflow.php index 3346475953223..bf9e42bde5a63 100644 --- a/app/code/Magento/Paypal/Controller/Payflow.php +++ b/app/code/Magento/Paypal/Controller/Payflow.php @@ -39,7 +39,7 @@ class Payflow extends \Magento\Framework\App\Action\Action protected $_orderFactory; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; @@ -65,7 +65,7 @@ class Payflow extends \Magento\Framework\App\Action\Action * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Paypal\Model\PayflowlinkFactory $payflowModelFactory * @param \Magento\Paypal\Helper\Checkout $checkoutHelper - * @param \Magento\Logger $logger + * @param \Magento\Framework\Logger $logger */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -73,7 +73,7 @@ public function __construct( \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Paypal\Model\PayflowlinkFactory $payflowModelFactory, \Magento\Paypal\Helper\Checkout $checkoutHelper, - \Magento\Logger $logger + \Magento\Framework\Logger $logger ) { $this->_checkoutSession = $checkoutSession; $this->_orderFactory = $orderFactory; diff --git a/app/code/Magento/Paypal/Exception.php b/app/code/Magento/Paypal/Exception.php index 026ecf539ba5d..a9802dcf64bf4 100644 --- a/app/code/Magento/Paypal/Exception.php +++ b/app/code/Magento/Paypal/Exception.php @@ -25,6 +25,6 @@ */ namespace Magento\Paypal; -class Exception extends \Magento\Model\Exception +class Exception extends \Magento\Framework\Model\Exception { } diff --git a/app/code/Magento/Paypal/Helper/Hss.php b/app/code/Magento/Paypal/Helper/Hss.php index 6652b8d7d348a..775996947e29c 100644 --- a/app/code/Magento/Paypal/Helper/Hss.php +++ b/app/code/Magento/Paypal/Helper/Hss.php @@ -45,19 +45,19 @@ class Hss extends \Magento\Framework\App\Helper\AbstractHelper protected $_checkoutSession; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\View\LayoutInterface $layout + * @param \Magento\Framework\View\LayoutInterface $layout */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\View\LayoutInterface $layout + \Magento\Framework\View\LayoutInterface $layout ) { $this->_checkoutSession = $checkoutSession; $this->_layout = $layout; diff --git a/app/code/Magento/Paypal/Model/AbstractIpn.php b/app/code/Magento/Paypal/Model/AbstractIpn.php index 54f7be8b6a9f5..891581276d25e 100644 --- a/app/code/Magento/Paypal/Model/AbstractIpn.php +++ b/app/code/Magento/Paypal/Model/AbstractIpn.php @@ -55,20 +55,20 @@ class AbstractIpn protected $_configFactory; /** - * @var \Magento\HTTP\Adapter\CurlFactory + * @var \Magento\Framework\HTTP\Adapter\CurlFactory */ protected $_curlFactory; /** * @param \Magento\Paypal\Model\ConfigFactory $configFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory * @param array $data */ public function __construct( \Magento\Paypal\Model\ConfigFactory $configFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\HTTP\Adapter\CurlFactory $curlFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory, array $data = array() ) { $this->_configFactory = $configFactory; diff --git a/app/code/Magento/Paypal/Model/Api/AbstractApi.php b/app/code/Magento/Paypal/Model/Api/AbstractApi.php index 1a881d7242086..107ba1346be54 100644 --- a/app/code/Magento/Paypal/Model/Api/AbstractApi.php +++ b/app/code/Magento/Paypal/Model/Api/AbstractApi.php @@ -28,7 +28,7 @@ /** * Abstract class for Paypal API wrappers */ -abstract class AbstractApi extends \Magento\Object +abstract class AbstractApi extends \Magento\Framework\Object { /** * Config instance @@ -103,12 +103,12 @@ abstract class AbstractApi extends \Magento\Object protected $_customerAddress; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -118,7 +118,7 @@ abstract class AbstractApi extends \Magento\Object protected $_regionFactory; /** - * @var \Magento\Logger\AdapterFactory + * @var \Magento\Framework\Logger\AdapterFactory */ protected $_logAdapterFactory; @@ -129,18 +129,18 @@ abstract class AbstractApi extends \Magento\Object * attributes This behavior may change in child classes * * @param \Magento\Customer\Helper\Address $customerAddress - * @param \Magento\Logger $logger - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Directory\Model\RegionFactory $regionFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param array $data */ public function __construct( \Magento\Customer\Helper\Address $customerAddress, - \Magento\Logger $logger, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Logger $logger, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Directory\Model\RegionFactory $regionFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, array $data = array() ) { $this->_customerAddress = $customerAddress; @@ -304,25 +304,25 @@ public function getBusinessAccount() /** * Import $this public data to specified object or array * - * @param array|\Magento\Object $to + * @param array|\Magento\Framework\Object $to * @param array $publicMap - * @return array|\Magento\Object + * @return array|\Magento\Framework\Object */ public function &import($to, array $publicMap = array()) { - return \Magento\Object\Mapper::accumulateByMap(array($this, 'getDataUsingMethod'), $to, $publicMap); + return \Magento\Framework\Object\Mapper::accumulateByMap(array($this, 'getDataUsingMethod'), $to, $publicMap); } /** * Export $this public data from specified object or array * - * @param array|\Magento\Object $from + * @param array|\Magento\Framework\Object $from * @param array $publicMap * @return $this */ public function export($from, array $publicMap = array()) { - \Magento\Object\Mapper::accumulateByMap($from, array($this, 'setDataUsingMethod'), $publicMap); + \Magento\Framework\Object\Mapper::accumulateByMap($from, array($this, 'setDataUsingMethod'), $publicMap); return $this; } @@ -385,7 +385,7 @@ protected function &_exportToRequest(array $privateRequestMap, array $request = $map[$this->_globalMap[$key]] = $key; } } - $result = \Magento\Object\Mapper::accumulateByMap(array($this, 'getDataUsingMethod'), $request, $map); + $result = \Magento\Framework\Object\Mapper::accumulateByMap(array($this, 'getDataUsingMethod'), $request, $map); foreach ($privateRequestMap as $key) { if (isset($this->_exportToRequestFilters[$key]) && isset($result[$key])) { $callback = $this->_exportToRequestFilters[$key]; @@ -416,7 +416,7 @@ protected function _importFromResponse(array $privateResponseMap, array $respons $response[$key] = call_user_func(array($this, $callback), $response[$key], $key, $map[$key]); } } - \Magento\Object\Mapper::accumulateByMap($response, array($this, 'setDataUsingMethod'), $map); + \Magento\Framework\Object\Mapper::accumulateByMap($response, array($this, 'setDataUsingMethod'), $map); } /** @@ -550,10 +550,10 @@ protected function _getDataOrConfig($key, $default = null) /** * region_id workaround: PayPal requires state code, try to find one in the address * - * @param \Magento\Object $address + * @param \Magento\Framework\Object $address * @return string */ - protected function _lookupRegionCodeFromAddress(\Magento\Object $address) + protected function _lookupRegionCodeFromAddress(\Magento\Framework\Object $address) { $regionId = $address->getData('region_id'); if ($regionId) { @@ -569,11 +569,11 @@ protected function _lookupRegionCodeFromAddress(\Magento\Object $address) * Street address workaround: divides address lines into parts by specified keys * (keys should go as 3rd, 4th[...] parameters) * - * @param \Magento\Object $address + * @param \Magento\Framework\Object $address * @param array $to * @return void */ - protected function _importStreetFromAddress(\Magento\Object $address, array &$to) + protected function _importStreetFromAddress(\Magento\Framework\Object $address, array &$to) { $keys = func_get_args(); array_shift($keys); diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php index 80287448be65f..b4ede1c57ff30 100644 --- a/app/code/Magento/Paypal/Model/Api/Nvp.php +++ b/app/code/Magento/Paypal/Model/Api/Nvp.php @@ -757,19 +757,19 @@ class Nvp extends \Magento\Paypal\Model\Api\AbstractApi /** * @param \Magento\Customer\Helper\Address $customerAddress - * @param \Magento\Logger $logger - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Directory\Model\RegionFactory $regionFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Directory\Model\CountryFactory $countryFactory * @param array $data */ public function __construct( \Magento\Customer\Helper\Address $customerAddress, - \Magento\Logger $logger, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Logger $logger, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Directory\Model\RegionFactory $regionFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Directory\Model\CountryFactory $countryFactory, array $data = array() ) { @@ -1080,7 +1080,7 @@ public function callUpdateBillingAgreement() $request = $this->_exportToRequest($this->_updateBillingAgreementRequest); try { $response = $this->call('BillAgreementUpdate', $request); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { if (in_array(10201, $this->_callErrors)) { $this->setIsBillingAgreementAlreadyCancelled(true); } @@ -1093,12 +1093,12 @@ public function callUpdateBillingAgreement() * Import callback request array into $this public data * * @param array $request - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function prepareShippingOptionsCallbackAddress(array $request) { - $address = new \Magento\Object(); - \Magento\Object\Mapper::accumulateByMap($request, $address, $this->_callbackRequestMap); + $address = new \Magento\Framework\Object(); + \Magento\Framework\Object\Mapper::accumulateByMap($request, $address, $this->_callbackRequestMap); $address->setExportedKeys(array_values($this->_callbackRequestMap)); $this->_applyStreetAndRegionWorkarounds($address); return $address; @@ -1159,7 +1159,7 @@ protected function _postProcessResponse($response) * @param string $methodName * @param array $request * @return array - * @throws \Magento\Model\Exception|\Exception + * @throws \Magento\Framework\Model\Exception|\Exception */ public function call($methodName, array $request) { @@ -1175,7 +1175,7 @@ public function call($methodName, array $request) $debugData = array('url' => $this->getApiEndpoint(), $methodName => $request); try { - $http = new \Magento\HTTP\Adapter\Curl(); + $http = new \Magento\Framework\HTTP\Adapter\Curl(); $config = array('timeout' => 60, 'verifypeer' => $this->_config->verifyPeer); if ($this->getUseProxy()) { $config['proxy'] = $this->getProxyHost() . ':' . $this->getProxyPort(); @@ -1216,7 +1216,7 @@ public function call($methodName, array $request) ); $http->close(); - throw new \Magento\Model\Exception(__('We can\'t contact the PayPal gateway.')); + throw new \Magento\Framework\Model\Exception(__('We can\'t contact the PayPal gateway.')); } // cUrl resource must be closed after checking it for errors @@ -1224,7 +1224,7 @@ public function call($methodName, array $request) if (!$this->_validateResponse($methodName, $response)) { $this->_logger->logException(new \Exception(__("PayPal response hasn't required fields."))); - throw new \Magento\Model\Exception(__('Something went wrong while processing your order.')); + throw new \Magento\Framework\Model\Exception(__('Something went wrong while processing your order.')); } $this->_callErrors = array(); @@ -1255,7 +1255,7 @@ public function setRawResponseNeeded($flag) * * @param array $response * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _handleCallErrors($response) { @@ -1283,7 +1283,7 @@ protected function _handleCallErrors($response) } if ($errors) { $errors = implode(' ', $errors); - $e = new \Magento\Model\Exception( + $e = new \Magento\Framework\Model\Exception( sprintf( 'PayPal NVP gateway errors: %s Correlation ID: %s. Version: %s.', $errors, @@ -1394,15 +1394,15 @@ protected function _exportLineItems(array &$request, $i = 0) */ protected function _exportAddressses($data) { - $address = new \Magento\Object(); - \Magento\Object\Mapper::accumulateByMap($data, $address, $this->_billingAddressMap); + $address = new \Magento\Framework\Object(); + \Magento\Framework\Object\Mapper::accumulateByMap($data, $address, $this->_billingAddressMap); $address->setExportedKeys(array_values($this->_billingAddressMap)); $this->_applyStreetAndRegionWorkarounds($address); $this->setExportedBillingAddress($address); // assume there is shipping address if there is at least one field specific to shipping if (isset($data['SHIPTONAME'])) { $shippingAddress = clone $address; - \Magento\Object\Mapper::accumulateByMap($data, $shippingAddress, $this->_shippingAddressMap); + \Magento\Framework\Object\Mapper::accumulateByMap($data, $shippingAddress, $this->_shippingAddressMap); $this->_applyStreetAndRegionWorkarounds($shippingAddress); // PayPal doesn't provide detailed shipping name fields, so the name will be overwritten $firstName = $data['SHIPTONAME']; @@ -1427,10 +1427,10 @@ protected function _exportAddressses($data) /** * Adopt specified address object to be compatible with Magento * - * @param \Magento\Object $address + * @param \Magento\Framework\Object $address * @return void */ - protected function _applyStreetAndRegionWorkarounds(\Magento\Object $address) + protected function _applyStreetAndRegionWorkarounds(\Magento\Framework\Object $address) { // merge street addresses into 1 if ($address->hasStreet2()) { @@ -1480,7 +1480,7 @@ protected function _importAddresses(array $to) $billingAddress = $this->getBillingAddress() ? $this->getBillingAddress() : $this->getAddress(); $shippingAddress = $this->getAddress(); - $to = \Magento\Object\Mapper::accumulateByMap( + $to = \Magento\Framework\Object\Mapper::accumulateByMap( $billingAddress, $to, array_merge(array_flip($this->_billingAddressMap), $this->_billingAddressMapRequest) @@ -1490,7 +1490,7 @@ protected function _importAddresses(array $to) $to['STATE'] = $regionCode; } if (!$this->getSuppressShipping()) { - $to = \Magento\Object\Mapper::accumulateByMap( + $to = \Magento\Framework\Object\Mapper::accumulateByMap( $shippingAddress, $to, array_flip($this->_shippingAddressMap) diff --git a/app/code/Magento/Paypal/Model/Api/PayflowNvp.php b/app/code/Magento/Paypal/Model/Api/PayflowNvp.php index 7114a088aba1b..2e3f7c4fb9d1d 100644 --- a/app/code/Magento/Paypal/Model/Api/PayflowNvp.php +++ b/app/code/Magento/Paypal/Model/Api/PayflowNvp.php @@ -437,28 +437,28 @@ class PayflowNvp extends \Magento\Paypal\Model\Api\Nvp ); /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** * @param \Magento\Customer\Helper\Address $customerAddress - * @param \Magento\Logger $logger - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Directory\Model\RegionFactory $regionFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Directory\Model\CountryFactory $countryFactory - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom * @param array $data */ public function __construct( \Magento\Customer\Helper\Address $customerAddress, - \Magento\Logger $logger, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Logger $logger, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Directory\Model\RegionFactory $regionFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Directory\Model\CountryFactory $countryFactory, - \Magento\Math\Random $mathRandom, + \Magento\Framework\Math\Random $mathRandom, array $data = array() ) { $this->mathRandom = $mathRandom; @@ -632,7 +632,7 @@ protected function _isCallSuccessful($response) * * @param array $response * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _handleCallErrors($response) { @@ -640,7 +640,7 @@ protected function _handleCallErrors($response) $message = $response['RESPMSG']; $e = new \Exception(sprintf('PayPal gateway errors: %s.', $message)); $this->_logger->logException($e); - throw new \Magento\Model\Exception(__('PayPal gateway rejected the request. %1', $message)); + throw new \Magento\Framework\Model\Exception(__('PayPal gateway rejected the request. %1', $message)); } } diff --git a/app/code/Magento/Paypal/Model/Api/Standard.php b/app/code/Magento/Paypal/Model/Api/Standard.php index 2acabef3cdc3e..818c92bd86614 100644 --- a/app/code/Magento/Paypal/Model/Api/Standard.php +++ b/app/code/Magento/Paypal/Model/Api/Standard.php @@ -242,7 +242,7 @@ protected function _importAddress(&$request) return; } - $request = \Magento\Object\Mapper::accumulateByMap($address, $request, array_flip($this->_addressMap)); + $request = \Magento\Framework\Object\Mapper::accumulateByMap($address, $request, array_flip($this->_addressMap)); // Address may come without email info (user is not always required to enter it), so add email from order if (!$request['email']) { diff --git a/app/code/Magento/Paypal/Model/Api/Type/Factory.php b/app/code/Magento/Paypal/Model/Api/Type/Factory.php index 4211f8f90d399..616dc423b71cb 100644 --- a/app/code/Magento/Paypal/Model/Api/Type/Factory.php +++ b/app/code/Magento/Paypal/Model/Api/Type/Factory.php @@ -34,16 +34,16 @@ class Factory /** * Object Manager instance * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; /** * Factory constructor * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Paypal/Model/Billing/AbstractAgreement.php b/app/code/Magento/Paypal/Model/Billing/AbstractAgreement.php index 02c42adf3cdb8..21ebff36586fe 100644 --- a/app/code/Magento/Paypal/Model/Billing/AbstractAgreement.php +++ b/app/code/Magento/Paypal/Model/Billing/AbstractAgreement.php @@ -26,7 +26,7 @@ /** * Billing Agreement abstaract class */ -abstract class AbstractAgreement extends \Magento\Model\AbstractModel +abstract class AbstractAgreement extends \Magento\Framework\Model\AbstractModel { /** * Payment method instance @@ -78,19 +78,19 @@ abstract public function cancel(); protected $_paymentData = null; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Payment\Helper\Data $paymentData - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Payment\Helper\Data $paymentData, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_paymentData = $paymentData; @@ -133,8 +133,8 @@ public function isValid() /** * Before save, it's overridden just to make data validation on before save event * - * @throws \Magento\Model\Exception - * @return \Magento\Model\AbstractModel + * @throws \Magento\Framework\Model\Exception + * @return \Magento\Framework\Model\AbstractModel */ protected function _beforeSave() { @@ -142,6 +142,6 @@ protected function _beforeSave() return parent::_beforeSave(); } array_unshift($this->_errors, __('Unable to save Billing Agreement:')); - throw new \Magento\Model\Exception(implode(' ', $this->_errors)); + throw new \Magento\Framework\Model\Exception(implode(' ', $this->_errors)); } } diff --git a/app/code/Magento/Paypal/Model/Billing/Agreement.php b/app/code/Magento/Paypal/Model/Billing/Agreement.php index d753701caaf1d..0bfd8510b667b 100644 --- a/app/code/Magento/Paypal/Model/Billing/Agreement.php +++ b/app/code/Magento/Paypal/Model/Billing/Agreement.php @@ -66,28 +66,28 @@ class Agreement extends \Magento\Paypal\Model\Billing\AbstractAgreement protected $_billingAgreementFactory; /** - * @var \Magento\Stdlib\DateTime\DateTimeFactory + * @var \Magento\Framework\Stdlib\DateTime\DateTimeFactory */ protected $_dateFactory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Paypal\Model\Resource\Billing\Agreement\CollectionFactory $billingAgreementFactory - * @param \Magento\Stdlib\DateTime\DateTimeFactory $dateFactory - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Payment\Helper\Data $paymentData, \Magento\Paypal\Model\Resource\Billing\Agreement\CollectionFactory $billingAgreementFactory, - \Magento\Stdlib\DateTime\DateTimeFactory $dateFactory, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { parent::__construct($context, $registry, $paymentData, $resource, $resourceCollection, $data); @@ -108,7 +108,7 @@ protected function _construct() /** * Set created_at parameter * - * @return \Magento\Model\AbstractModel + * @return \Magento\Framework\Model\AbstractModel */ protected function _beforeSave() { @@ -124,7 +124,7 @@ protected function _beforeSave() /** * Save agreement order relations * - * @return \Magento\Model\AbstractModel + * @return \Magento\Framework\Model\AbstractModel */ protected function _afterSave() { diff --git a/app/code/Magento/Paypal/Model/Billing/Agreement/OrdersUpdater.php b/app/code/Magento/Paypal/Model/Billing/Agreement/OrdersUpdater.php index 7fa05642e5f03..eb5ffb9ab6f10 100644 --- a/app/code/Magento/Paypal/Model/Billing/Agreement/OrdersUpdater.php +++ b/app/code/Magento/Paypal/Model/Billing/Agreement/OrdersUpdater.php @@ -26,10 +26,10 @@ /** * Orders grid massaction items updater */ -class OrdersUpdater implements \Magento\View\Layout\Argument\UpdaterInterface +class OrdersUpdater implements \Magento\Framework\View\Layout\Argument\UpdaterInterface { /** - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_registryManager; @@ -39,21 +39,21 @@ class OrdersUpdater implements \Magento\View\Layout\Argument\UpdaterInterface protected $_agreementResource; /** - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Paypal\Model\Resource\Billing\Agreement $agreementResource * @param array $data * @throws \InvalidArgumentException */ public function __construct( - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Paypal\Model\Resource\Billing\Agreement $agreementResource, array $data = array() ) { $this->_registryManager = isset($data['registry']) ? $data['registry'] : $coreRegistry; $this->_agreementResource = $agreementResource; - if (false === $this->_registryManager instanceof \Magento\Registry) { - throw new \InvalidArgumentException('registry object has to be an instance of \Magento\Registry'); + if (false === $this->_registryManager instanceof \Magento\Framework\Registry) { + throw new \InvalidArgumentException('registry object has to be an instance of \Magento\Framework\Registry'); } } diff --git a/app/code/Magento/Paypal/Model/Cert.php b/app/code/Magento/Paypal/Model/Cert.php index f7e990998b5b8..1f923c2720107 100644 --- a/app/code/Magento/Paypal/Model/Cert.php +++ b/app/code/Magento/Paypal/Model/Cert.php @@ -25,12 +25,12 @@ */ namespace Magento\Paypal\Model; -use Magento\Filesystem\Directory\WriteInterface; +use Magento\Framework\Filesystem\Directory\WriteInterface; /** * PayPal specific model for certificate based authentication */ -class Cert extends \Magento\Model\AbstractModel +class Cert extends \Magento\Framework\Model\AbstractModel { /** * Certificate base path @@ -43,26 +43,26 @@ class Cert extends \Magento\Model\AbstractModel protected $varDirectory; /** - * @var \Magento\Encryption\EncryptorInterface + * @var \Magento\Framework\Encryption\EncryptorInterface */ protected $encryptor; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Encryption\EncryptorInterface $encryptor - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Filesystem $filesystem, - \Magento\Encryption\EncryptorInterface $encryptor, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Encryption\EncryptorInterface $encryptor, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->varDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); @@ -98,12 +98,12 @@ public function loadByWebsite($websiteId, $strictLoad = true) * Get path to PayPal certificate file, if file does not exist try to create it * * @return string - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function getCertPath() { if (!$this->getContent()) { - throw new \Magento\Model\Exception(__('The PayPal certificate does not exist.')); + throw new \Magento\Framework\Model\Exception(__('The PayPal certificate does not exist.')); } $certFileName = sprintf('cert_%s_%s.pem', $this->getWebsiteId(), strtotime($this->getUpdatedAt())); diff --git a/app/code/Magento/Paypal/Model/Config.php b/app/code/Magento/Paypal/Model/Config.php index e44a49deee21d..544c60498b6f4 100644 --- a/app/code/Magento/Paypal/Model/Config.php +++ b/app/code/Magento/Paypal/Model/Config.php @@ -1109,10 +1109,10 @@ public function getPaymentMarkImageUrl($localeCode, $orderTotal = null, $pal = n * Get "What Is PayPal" localized URL * Supposed to be used with "mark" as popup window * - * @param \Magento\Locale\ResolverInterface $locale + * @param \Magento\Framework\Locale\ResolverInterface $locale * @return string */ - public function getPaymentMarkWhatIsPaypalUrl(\Magento\Locale\ResolverInterface $locale = null) + public function getPaymentMarkWhatIsPaypalUrl(\Magento\Framework\Locale\ResolverInterface $locale = null) { $countryCode = 'US'; if (null !== $locale) { @@ -1487,10 +1487,10 @@ public function isCurrencyCodeSupported($code) /** * Export page style current settings to specified object * - * @param \Magento\Object $to + * @param \Magento\Framework\Object $to * @return void */ - public function exportExpressCheckoutStyleSettings(\Magento\Object $to) + public function exportExpressCheckoutStyleSettings(\Magento\Framework\Object $to) { foreach ($this->_ecStyleConfigMap as $key => $exportKey) { if ($this->{$key}) { diff --git a/app/code/Magento/Paypal/Model/Config/Factory.php b/app/code/Magento/Paypal/Model/Config/Factory.php index 77968a84d280f..74c5fdfb2ba7a 100644 --- a/app/code/Magento/Paypal/Model/Config/Factory.php +++ b/app/code/Magento/Paypal/Model/Config/Factory.php @@ -33,16 +33,16 @@ class Factory /** * Object Manager instance * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; /** * Factory constructor * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Paypal/Model/Direct.php b/app/code/Magento/Paypal/Model/Direct.php index 8861e79ac6a64..c52d565b813db 100644 --- a/app/code/Magento/Paypal/Model/Direct.php +++ b/app/code/Magento/Paypal/Model/Direct.php @@ -149,7 +149,7 @@ class Direct extends \Magento\Payment\Model\Method\Cc protected $_storeManager; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; @@ -164,17 +164,17 @@ class Direct extends \Magento\Payment\Model\Method\Cc protected $_cartFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Logger $logger - * @param \Magento\Module\ModuleListInterface $moduleList - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService * @param \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\App\RequestInterface $requestHttp * @param \Magento\Paypal\Model\CartFactory $cartFactory * @param array $data @@ -182,17 +182,17 @@ class Direct extends \Magento\Payment\Model\Method\Cc * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Logger $logger, - \Magento\Module\ModuleListInterface $moduleList, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Module\ModuleListInterface $moduleList, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\RequestInterface $requestHttp, \Magento\Paypal\Model\CartFactory $cartFactory, array $data = array() @@ -317,11 +317,11 @@ public function getConfigData($field, $storeId = null) /** * Authorize payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function authorize(\Magento\Object $payment, $amount) + public function authorize(\Magento\Framework\Object $payment, $amount) { return $this->_placeOrder($payment, $amount); } @@ -329,10 +329,10 @@ public function authorize(\Magento\Object $payment, $amount) /** * Void payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @return $this */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { $this->_pro->void($payment); return $this; @@ -341,11 +341,11 @@ public function void(\Magento\Object $payment) /** * Capture payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { if (false === $this->_pro->capture($payment, $amount)) { $this->_placeOrder($payment, $amount); @@ -356,11 +356,11 @@ public function capture(\Magento\Object $payment, $amount) /** * Refund capture * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { $this->_pro->refund($payment, $amount); return $this; @@ -369,10 +369,10 @@ public function refund(\Magento\Object $payment, $amount) /** * Cancel payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @return $this */ - public function cancel(\Magento\Object $payment) + public function cancel(\Magento\Framework\Object $payment) { $this->void($payment); @@ -503,7 +503,7 @@ protected function _placeOrder(Payment $payment, $amount) try { $api->callGetTransactionDetails(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { // if we receive errors, but DoDirectPayment response is Success, then set Pending status for transaction $payment->setIsTransactionPending(true); } @@ -540,10 +540,10 @@ protected function _importResultToPayment($api, $payment) /** * Check void availability * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return bool */ - public function canVoid(\Magento\Object $payment) + public function canVoid(\Magento\Framework\Object $payment) { if ($payment instanceof \Magento\Sales\Model\Order\Invoice || $payment instanceof \Magento\Sales\Model\Order\Creditmemo diff --git a/app/code/Magento/Paypal/Model/Express.php b/app/code/Magento/Paypal/Model/Express.php index a8c4ad15bc07f..c954207a604c2 100644 --- a/app/code/Magento/Paypal/Model/Express.php +++ b/app/code/Magento/Paypal/Model/Express.php @@ -172,7 +172,7 @@ class Express extends \Magento\Payment\Model\Method\AbstractMethod protected $_storeManager; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; @@ -182,24 +182,24 @@ class Express extends \Magento\Payment\Model\Method\AbstractMethod protected $_cartFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Paypal\Model\CartFactory $cartFactory * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Paypal\Model\CartFactory $cartFactory, array $data = array() ) { @@ -305,11 +305,11 @@ public function getConfigData($field, $storeId = null) /** * Order payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function order(\Magento\Object $payment, $amount) + public function order(\Magento\Framework\Object $payment, $amount) { $this->_placeOrder($payment, $amount); @@ -368,11 +368,11 @@ public function order(\Magento\Object $payment, $amount) /** * Authorize payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function authorize(\Magento\Object $payment, $amount) + public function authorize(\Magento\Framework\Object $payment, $amount) { return $this->_placeOrder($payment, $amount); } @@ -380,10 +380,10 @@ public function authorize(\Magento\Object $payment, $amount) /** * Void payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @return $this */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { //Switching to order transaction if needed if ($payment->getAdditionalInformation( @@ -403,12 +403,12 @@ public function void(\Magento\Object $payment) /** * Capture payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return $this */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { $authorizationTransaction = $payment->getAuthorizationTransaction(); $authorizationPeriod = abs(intval($this->getConfigData('authorization_honor_period'))); @@ -429,7 +429,7 @@ public function capture(\Magento\Object $payment, $amount) $payment->setParentTransactionId($authorizationTransaction->getTxnId()); $payment->unsTransactionId(); $payment->setVoidOnlyAuthorization(true); - $payment->void(new \Magento\Object()); + $payment->void(new \Magento\Framework\Object()); //Revert payment state after voiding $payment->unsAuthorizationTransaction(); @@ -440,7 +440,7 @@ public function capture(\Magento\Object $payment, $amount) if ($authorizationTransaction->getIsClosed() || $voided) { if ($payment->getAdditionalInformation($this->_authorizationCountKey) > $maxAuthorizationNumber - 1) { - throw new \Magento\Model\Exception(__('The maximum number of child authorizations is reached.')); + throw new \Magento\Framework\Model\Exception(__('The maximum number of child authorizations is reached.')); } $api = $this->_callDoAuthorize($amount, $payment, $authorizationTransaction->getParentTxnId()); @@ -491,11 +491,11 @@ public function capture(\Magento\Object $payment, $amount) /** * Refund capture * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { $this->_pro->refund($payment, $amount); return $this; @@ -504,10 +504,10 @@ public function refund(\Magento\Object $payment, $amount) /** * Cancel payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @return $this */ - public function cancel(\Magento\Object $payment) + public function cancel(\Magento\Framework\Object $payment) { $this->void($payment); @@ -584,7 +584,7 @@ public function getApi() /** * Assign data to info model instance * - * @param array|\Magento\Object $data + * @param array|\Magento\Framework\Object $data * @return \Magento\Payment\Model\Info */ public function assignData($data) @@ -593,7 +593,7 @@ public function assignData($data) $key = ExpressCheckout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT; if (is_array($data)) { $this->getInfoInstance()->setAdditionalInformation($key, isset($data[$key]) ? $data[$key] : null); - } elseif ($data instanceof \Magento\Object) { + } elseif ($data instanceof \Magento\Framework\Object) { $this->getInfoInstance()->setAdditionalInformation($key, $data->getData($key)); } return $result; @@ -681,10 +681,10 @@ protected function _importToPayment($api, $payment) /** * Check void availability * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return bool */ - public function canVoid(\Magento\Object $payment) + public function canVoid(\Magento\Framework\Object $payment) { if ($payment instanceof \Magento\Sales\Model\Order\Invoice || $payment instanceof \Magento\Sales\Model\Order\Creditmemo @@ -735,7 +735,7 @@ public function canCapture() * Call DoAuthorize * * @param int $amount - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param string $parentTransactionId * @return \Magento\Paypal\Model\Api\AbstractApi */ diff --git a/app/code/Magento/Paypal/Model/Express/Checkout.php b/app/code/Magento/Paypal/Model/Express/Checkout.php index 42480acaa2deb..926dce9ac3865 100644 --- a/app/code/Magento/Paypal/Model/Express/Checkout.php +++ b/app/code/Magento/Paypal/Model/Express/Checkout.php @@ -172,12 +172,12 @@ class Checkout protected $_customerData; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -192,7 +192,7 @@ class Checkout protected $_storeManager; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_coreUrl; @@ -202,7 +202,7 @@ class Checkout protected $_cartFactory; /** - * @var \Magento\Logger\AdapterFactory + * @var \Magento\Framework\Logger\AdapterFactory */ protected $_logFactory; @@ -227,7 +227,7 @@ class Checkout protected $_apiTypeFactory; /** - * @var \Magento\Object\Copy + * @var \Magento\Framework\Object\Copy */ protected $_objectCopyService; @@ -257,70 +257,70 @@ class Checkout protected $_customerDetailsBuilder; /** - * @var \Magento\Encryption\EncryptorInterface + * @var \Magento\Framework\Encryption\EncryptorInterface */ protected $_encryptor; /** - * @var \Magento\Message\ManagerInterface + * @var \Magento\Framework\Message\ManagerInterface */ protected $_messageManager; /** * Set config, session and quote instances * - * @param \Magento\Logger $logger + * @param \Magento\Framework\Logger $logger * @param \Magento\Customer\Helper\Data $customerData * @param \Magento\Tax\Helper\Data $taxData * @param \Magento\Checkout\Helper\Data $checkoutData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Framework\App\Cache\Type\Config $configCacheType - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Paypal\Model\Info $paypalInfo * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\UrlInterface $coreUrl + * @param \Magento\Framework\UrlInterface $coreUrl * @param \Magento\Paypal\Model\CartFactory $cartFactory - * @param \Magento\Logger\AdapterFactory $logFactory + * @param \Magento\Framework\Logger\AdapterFactory $logFactory * @param \Magento\Checkout\Model\Type\OnepageFactory $onepageFactory * @param \Magento\Sales\Model\Service\QuoteFactory $serviceQuoteFactory * @param \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory * @param \Magento\Paypal\Model\Api\Type\Factory $apiTypeFactory - * @param \Magento\Object\Copy $objectCopyService + * @param \Magento\Framework\Object\Copy $objectCopyService * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService * @param \Magento\Customer\Service\V1\Data\AddressBuilderFactory $addressBuilder * @param \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder * @param \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder - * @param \Magento\Encryption\EncryptorInterface $encryptor - * @param \Magento\Message\ManagerInterface $messageManager + * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor + * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param array $params * @throws \Exception */ public function __construct( - \Magento\Logger $logger, + \Magento\Framework\Logger $logger, \Magento\Customer\Helper\Data $customerData, \Magento\Tax\Helper\Data $taxData, \Magento\Checkout\Helper\Data $checkoutData, \Magento\Customer\Model\Session $customerSession, \Magento\Framework\App\Cache\Type\Config $configCacheType, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Paypal\Model\Info $paypalInfo, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\UrlInterface $coreUrl, + \Magento\Framework\UrlInterface $coreUrl, \Magento\Paypal\Model\CartFactory $cartFactory, - \Magento\Logger\AdapterFactory $logFactory, + \Magento\Framework\Logger\AdapterFactory $logFactory, \Magento\Checkout\Model\Type\OnepageFactory $onepageFactory, \Magento\Sales\Model\Service\QuoteFactory $serviceQuoteFactory, \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory, \Magento\Paypal\Model\Api\Type\Factory $apiTypeFactory, - \Magento\Object\Copy $objectCopyService, + \Magento\Framework\Object\Copy $objectCopyService, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService, \Magento\Customer\Service\V1\Data\AddressBuilderFactory $addressBuilder, \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder, \Magento\Customer\Service\V1\Data\CustomerDetailsBuilder $customerDetailsBuilder, - \Magento\Encryption\EncryptorInterface $encryptor, - \Magento\Message\ManagerInterface $messageManager, + \Magento\Framework\Encryption\EncryptorInterface $encryptor, + \Magento\Framework\Message\ManagerInterface $messageManager, $params = array() ) { $this->_customerData = $customerData; @@ -460,14 +460,14 @@ public function setCustomerWithAddressChange( * @param string $returnUrl * @param string $cancelUrl * @return string - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function start($returnUrl, $cancelUrl) { $this->_quote->collectTotals(); if (!$this->_quote->getGrandTotal() && !$this->_quote->hasNominalItems()) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __( 'PayPal can\'t process orders with a zero balance due. ' . 'To finish your purchase, please go through the standard checkout process.' @@ -629,13 +629,13 @@ public function returnFromPaypal($token) * * @param string|null $token * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function prepareOrderReview($token = null) { $payment = $this->_quote->getPayment(); if (!$payment || !$payment->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_PAYER_ID)) { - throw new \Magento\Model\Exception(__('Payer is not identified.')); + throw new \Magento\Framework\Model\Exception(__('Payer is not identified.')); } $this->_quote->setMayEditShippingAddress( 1 != $this->_quote->getPayment()->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_SHIPPING_OVERRIDDEN) @@ -965,7 +965,7 @@ protected function _prepareShippingOptions(Address $address, $mayReturnEmpty = f $amountExclTax = $this->_taxData->getShippingPrice($amount, false, $address); $amountInclTax = $this->_taxData->getShippingPrice($amount, true, $address); - $options[$i] = new \Magento\Object( + $options[$i] = new \Magento\Framework\Object( [ 'is_default' => $isDefault, 'name' => trim("{$rate->getCarrierTitle()} - {$rate->getMethodTitle()}", ' -'), @@ -990,7 +990,7 @@ protected function _prepareShippingOptions(Address $address, $mayReturnEmpty = f } if ($mayReturnEmpty && is_null($userSelectedOption)) { - $options[] = new \Magento\Object( + $options[] = new \Magento\Framework\Object( [ 'is_default' => true, 'name' => __('N/A'), @@ -1024,11 +1024,11 @@ protected function _prepareShippingOptions(Address $address, $mayReturnEmpty = f * This function is used as a callback comparison function in shipping options sorting process * @see self::_prepareShippingOptions() * - * @param \Magento\Object $option1 - * @param \Magento\Object $option2 + * @param \Magento\Framework\Object $option1 + * @param \Magento\Framework\Object $option2 * @return int */ - protected static function cmpShippingOptions(\Magento\Object $option1, \Magento\Object $option2) + protected static function cmpShippingOptions(\Magento\Framework\Object $option1, \Magento\Framework\Object $option2) { if ($option1->getAmount() == $option2->getAmount()) { return 0; @@ -1072,7 +1072,7 @@ protected function _prepareGuestQuote() $quote->setCustomerId(null) ->setCustomerEmail($quote->getBillingAddress()->getEmail()) ->setCustomerIsGuest(true) - ->setCustomerGroupId(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID); + ->setCustomerGroupId(\Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID); return $this; } diff --git a/app/code/Magento/Paypal/Model/Express/Checkout/Factory.php b/app/code/Magento/Paypal/Model/Express/Checkout/Factory.php index 53d746e0d39b5..a8f78bcebaefb 100644 --- a/app/code/Magento/Paypal/Model/Express/Checkout/Factory.php +++ b/app/code/Magento/Paypal/Model/Express/Checkout/Factory.php @@ -33,16 +33,16 @@ class Factory /** * Object Manager instance * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; /** * Factory constructor * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Paypal/Model/Hostedpro.php b/app/code/Magento/Paypal/Model/Hostedpro.php index d1230554e7b8f..9bacd023c3167 100644 --- a/app/code/Magento/Paypal/Model/Hostedpro.php +++ b/app/code/Magento/Paypal/Model/Hostedpro.php @@ -89,17 +89,17 @@ class Hostedpro extends \Magento\Paypal\Model\Direct protected $_hostedproRequestFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Logger $logger - * @param \Magento\Module\ModuleListInterface $moduleList - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService * @param \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\App\RequestInterface $requestHttp * @param \Magento\Paypal\Model\CartFactory $cartFactory * @param \Magento\Paypal\Model\Hostedpro\RequestFactory $hostedproRequestFactory @@ -108,17 +108,17 @@ class Hostedpro extends \Magento\Paypal\Model\Direct * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Logger $logger, - \Magento\Module\ModuleListInterface $moduleList, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Module\ModuleListInterface $moduleList, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\RequestInterface $requestHttp, \Magento\Paypal\Model\CartFactory $cartFactory, \Magento\Paypal\Model\Hostedpro\RequestFactory $hostedproRequestFactory, @@ -179,7 +179,7 @@ public function validate() * Instantiate state and set it to state object * * @param string $paymentAction - * @param \Magento\Object $stateObject + * @param \Magento\Framework\Object $stateObject * @return void */ public function initialize($paymentAction, $stateObject) @@ -209,7 +209,7 @@ public function initialize($paymentAction, $stateObject) * * @param \Magento\Payment\Model\Info $payment * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _setPaymentFormUrl(\Magento\Payment\Model\Info $payment) { @@ -218,7 +218,7 @@ protected function _setPaymentFormUrl(\Magento\Payment\Model\Info $payment) if ($response) { $payment->setAdditionalInformation('secure_form_url', $response); } else { - throw new \Magento\Model\Exception('Cannot get secure form URL from PayPal'); + throw new \Magento\Framework\Model\Exception('Cannot get secure form URL from PayPal'); } } diff --git a/app/code/Magento/Paypal/Model/Hostedpro/Request.php b/app/code/Magento/Paypal/Model/Hostedpro/Request.php index fd8b2e93a2db9..545bf8262cf92 100644 --- a/app/code/Magento/Paypal/Model/Hostedpro/Request.php +++ b/app/code/Magento/Paypal/Model/Hostedpro/Request.php @@ -32,7 +32,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class Request extends \Magento\Object +class Request extends \Magento\Framework\Object { /** * Request's order model @@ -207,10 +207,10 @@ protected function _getOrderData(\Magento\Sales\Model\Order $order) /** * Get shipping address request data * - * @param \Magento\Object $address + * @param \Magento\Framework\Object $address * @return array */ - protected function _getShippingAddress(\Magento\Object $address) + protected function _getShippingAddress(\Magento\Framework\Object $address) { $request = array( 'first_name' => $address->getFirstname(), @@ -233,10 +233,10 @@ protected function _getShippingAddress(\Magento\Object $address) /** * Get billing address request data * - * @param \Magento\Object $address + * @param \Magento\Framework\Object $address * @return array */ - protected function _getBillingAddress(\Magento\Object $address) + protected function _getBillingAddress(\Magento\Framework\Object $address) { $request = array( 'billing_first_name' => $address->getFirstname(), diff --git a/app/code/Magento/Paypal/Model/Info.php b/app/code/Magento/Paypal/Model/Info.php index ef26cd11f4c64..a63d035ef7dae 100644 --- a/app/code/Magento/Paypal/Model/Info.php +++ b/app/code/Magento/Paypal/Model/Info.php @@ -228,7 +228,7 @@ public function getPublicPaymentInfo(\Magento\Payment\Model\Info $payment, $labe /** * Grab data from source and map it into payment * - * @param array|\Magento\Object|callback $from + * @param array|\Magento\Framework\Object|callback $from * @param \Magento\Payment\Model\Info $payment * @return void */ @@ -238,21 +238,21 @@ public function importToPayment($from, \Magento\Payment\Model\Info $payment) if (is_object($from)) { $from = array($from, 'getDataUsingMethod'); } - \Magento\Object\Mapper::accumulateByMap($from, array($payment, 'setAdditionalInformation'), $fullMap); + \Magento\Framework\Object\Mapper::accumulateByMap($from, array($payment, 'setAdditionalInformation'), $fullMap); } /** * Grab data from payment and map it into target * * @param \Magento\Payment\Model\Info $payment - * @param array|\Magento\Object|callback $to + * @param array|\Magento\Framework\Object|callback $to * @param array|null $map - * @return array|\Magento\Object + * @return array|\Magento\Framework\Object */ public function &exportFromPayment(\Magento\Payment\Model\Info $payment, $to, array $map = null) { $fullMap = array_merge($this->_paymentMap, $this->_systemMap); - \Magento\Object\Mapper::accumulateByMap( + \Magento\Framework\Object\Mapper::accumulateByMap( array($payment, 'getAdditionalInformation'), $to, $map ? $map : array_flip($fullMap) diff --git a/app/code/Magento/Paypal/Model/Ipn.php b/app/code/Magento/Paypal/Model/Ipn.php index 3f97ead9a72f2..a1fe5bf3b1a88 100644 --- a/app/code/Magento/Paypal/Model/Ipn.php +++ b/app/code/Magento/Paypal/Model/Ipn.php @@ -49,16 +49,16 @@ class Ipn extends \Magento\Paypal\Model\AbstractIpn implements IpnInterface /** * @param \Magento\Paypal\Model\ConfigFactory $configFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\HTTP\Adapter\CurlFactory $curlFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param Info $paypalInfo * @param array $data */ public function __construct( \Magento\Paypal\Model\ConfigFactory $configFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\HTTP\Adapter\CurlFactory $curlFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\HTTP\Adapter\CurlFactory $curlFactory, \Magento\Sales\Model\OrderFactory $orderFactory, Info $paypalInfo, array $data = array() @@ -143,7 +143,7 @@ protected function _getOrder() * Admin will be notified on errors. * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _processOrder() { @@ -165,7 +165,7 @@ protected function _processOrder() $this->_registerTransaction(); break; } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $comment = $this->_createIpnComment(__('Note: %1', $e->getMessage()), true); $comment->save(); throw $e; @@ -218,7 +218,7 @@ protected function _registerAdjustment() * Process regular IPN notifications * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @throws Exception */ protected function _registerTransaction() @@ -264,7 +264,7 @@ protected function _registerTransaction() default: throw new Exception("Cannot handle payment status '{$paymentStatus}'."); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $comment = $this->_createIpnComment(__('Note: %1', $e->getMessage()), true); $comment->save(); throw $e; diff --git a/app/code/Magento/Paypal/Model/IpnFactory.php b/app/code/Magento/Paypal/Model/IpnFactory.php index 6e1c54079d455..08c0856f8b0bd 100644 --- a/app/code/Magento/Paypal/Model/IpnFactory.php +++ b/app/code/Magento/Paypal/Model/IpnFactory.php @@ -28,7 +28,7 @@ class IpnFactory /** * Object Manager instance * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; @@ -40,10 +40,10 @@ class IpnFactory /** * Factory constructor * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param array $mapping */ - public function __construct(\Magento\ObjectManager $objectManager, array $mapping = array()) + public function __construct(\Magento\Framework\ObjectManager $objectManager, array $mapping = array()) { $this->_objectManager = $objectManager; $this->mapping = $mapping; diff --git a/app/code/Magento/Paypal/Model/Method/Agreement.php b/app/code/Magento/Paypal/Model/Method/Agreement.php index 23991cf5416f8..5e6937f0cab29 100644 --- a/app/code/Magento/Paypal/Model/Method/Agreement.php +++ b/app/code/Magento/Paypal/Model/Method/Agreement.php @@ -125,7 +125,7 @@ class Agreement extends \Magento\Paypal\Model\Payment\Method\Billing\AbstractAgr protected $_storeManager; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; @@ -135,28 +135,28 @@ class Agreement extends \Magento\Paypal\Model\Payment\Method\Billing\AbstractAgr protected $_cartFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Paypal\Model\CartFactory $cartFactory * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Paypal\Model\CartFactory $cartFactory, array $data = array() ) { @@ -257,7 +257,7 @@ public function placeBillingAgreement(\Magento\Paypal\Model\Billing\AbstractAgre * * @param \Magento\Paypal\Model\Billing\AbstractAgreement $agreement * @return $this - * @throws \Exception|\Magento\Model\Exception + * @throws \Exception|\Magento\Framework\Model\Exception */ public function updateBillingAgreementStatus(\Magento\Paypal\Model\Billing\AbstractAgreement $agreement) { @@ -269,7 +269,7 @@ public function updateBillingAgreementStatus(\Magento\Paypal\Model\Billing\Abstr ); try { $api->callUpdateBillingAgreement(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { // when BA was already canceled, just pretend that the operation succeeded if (!(\Magento\Paypal\Model\Billing\Agreement::STATUS_CANCELED == $targetStatus && $api->getIsBillingAgreementAlreadyCancelled()) @@ -283,11 +283,11 @@ public function updateBillingAgreementStatus(\Magento\Paypal\Model\Billing\Abstr /** * Authorize payment * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return $this */ - public function authorize(\Magento\Object $payment, $amount) + public function authorize(\Magento\Framework\Object $payment, $amount) { return $this->_placeOrder($payment, $amount); } @@ -295,10 +295,10 @@ public function authorize(\Magento\Object $payment, $amount) /** * Void payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @return $this */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { $this->_pro->void($payment); return $this; @@ -307,11 +307,11 @@ public function void(\Magento\Object $payment) /** * Capture payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { if (false === $this->_pro->capture($payment, $amount)) { $this->_placeOrder($payment, $amount); @@ -322,11 +322,11 @@ public function capture(\Magento\Object $payment, $amount) /** * Refund capture * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { $this->_pro->refund($payment, $amount); return $this; @@ -335,10 +335,10 @@ public function refund(\Magento\Object $payment, $amount) /** * Cancel payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @return $this */ - public function cancel(\Magento\Object $payment) + public function cancel(\Magento\Framework\Object $payment) { $this->_pro->cancel($payment); return $this; diff --git a/app/code/Magento/Paypal/Model/Method/ProTypeFactory.php b/app/code/Magento/Paypal/Model/Method/ProTypeFactory.php index 16621ed818588..34580f99fc7af 100644 --- a/app/code/Magento/Paypal/Model/Method/ProTypeFactory.php +++ b/app/code/Magento/Paypal/Model/Method/ProTypeFactory.php @@ -33,16 +33,16 @@ class ProTypeFactory /** * Object Manager instance * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; /** * Factory constructor * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } @@ -52,7 +52,7 @@ public function __construct(\Magento\ObjectManager $objectManager) * * @param string $className * @param array $data - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function create($className, array $data = array()) { diff --git a/app/code/Magento/Paypal/Model/Observer.php b/app/code/Magento/Paypal/Model/Observer.php index 368afda64c5c0..3997f9408a54f 100644 --- a/app/code/Magento/Paypal/Model/Observer.php +++ b/app/code/Magento/Paypal/Model/Observer.php @@ -25,7 +25,7 @@ */ namespace Magento\Paypal\Model; -use Magento\Event\Observer as EventObserver; +use Magento\Framework\Event\Observer as EventObserver; /** * PayPal module observer @@ -35,7 +35,7 @@ class Observer /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -54,7 +54,7 @@ class Observer protected $_coreData; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; @@ -69,7 +69,7 @@ class Observer protected $_view; /** - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_authorization; @@ -86,22 +86,22 @@ class Observer /** * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Paypal\Helper\Hss $paypalHss - * @param \Magento\Registry $coreRegistry - * @param \Magento\Logger $logger + * @param \Magento\Framework\Registry $coreRegistry + * @param \Magento\Framework\Logger $logger * @param Report\SettlementFactory $settlementFactory * @param \Magento\Framework\App\ViewInterface $view - * @param \Magento\AuthorizationInterface $authorization + * @param \Magento\Framework\AuthorizationInterface $authorization * @param \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory * @param \Magento\Checkout\Model\Session $checkoutSession */ public function __construct( \Magento\Core\Helper\Data $coreData, \Magento\Paypal\Helper\Hss $paypalHss, - \Magento\Registry $coreRegistry, - \Magento\Logger $logger, + \Magento\Framework\Registry $coreRegistry, + \Magento\Framework\Logger $logger, \Magento\Paypal\Model\Report\SettlementFactory $settlementFactory, \Magento\Framework\App\ViewInterface $view, - \Magento\AuthorizationInterface $authorization, + \Magento\Framework\AuthorizationInterface $authorization, \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory, \Magento\Checkout\Model\Session $checkoutSession ) { diff --git a/app/code/Magento/Paypal/Model/Payflow/Pro.php b/app/code/Magento/Paypal/Model/Payflow/Pro.php index de930d102b723..6bf9f8d5ea26b 100644 --- a/app/code/Magento/Paypal/Model/Payflow/Pro.php +++ b/app/code/Magento/Paypal/Model/Payflow/Pro.php @@ -52,11 +52,11 @@ class Pro extends \Magento\Paypal\Model\Pro /** * Refund a capture transaction * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return void */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { $captureTxnId = $this->_getParentTransactionId($payment); if ($captureTxnId) { @@ -79,10 +79,10 @@ protected function _isCaptureNeeded() /** * Get payflow transaction id from parent transaction * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return string */ - protected function _getParentTransactionId(\Magento\Object $payment) + protected function _getParentTransactionId(\Magento\Framework\Object $payment) { if ($payment->getParentTransactionId()) { return $payment->getTransaction( @@ -120,12 +120,12 @@ protected function _importCaptureResultToPayment($api, $payment) * * @param \Magento\Payment\Model\Info $payment * @param string $transactionId - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return void */ public function fetchTransactionInfo(\Magento\Payment\Model\Info $payment, $transactionId) { - throw new \Magento\Model\Exception(__('Fetch transaction details method does not exists in Payflow')); + throw new \Magento\Framework\Model\Exception(__('Fetch transaction details method does not exists in Payflow')); } /** diff --git a/app/code/Magento/Paypal/Model/Payflow/Request.php b/app/code/Magento/Paypal/Model/Payflow/Request.php index 317e6976e733f..5ee1e48f77d9f 100644 --- a/app/code/Magento/Paypal/Model/Payflow/Request.php +++ b/app/code/Magento/Paypal/Model/Payflow/Request.php @@ -32,7 +32,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class Request extends \Magento\Object +class Request extends \Magento\Framework\Object { /** * Set/Get attribute wrapper @@ -41,7 +41,7 @@ class Request extends \Magento\Object * @param string $method * @param array $args * @return mixed - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function __call($method, $args) { @@ -51,29 +51,29 @@ public function __call($method, $args) } switch (substr($method, 0, 3)) { case 'get': - //\Magento\Profiler::start('GETTER: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::start('GETTER: '.get_class($this).'::'.$method); $data = $this->getData($key, isset($args[0]) ? $args[0] : null); - //\Magento\Profiler::stop('GETTER: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::stop('GETTER: '.get_class($this).'::'.$method); return $data; case 'set': - //\Magento\Profiler::start('SETTER: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::start('SETTER: '.get_class($this).'::'.$method); $result = $this->setData($key, isset($args[0]) ? $args[0] : null); - //\Magento\Profiler::stop('SETTER: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::stop('SETTER: '.get_class($this).'::'.$method); return $result; case 'uns': - //\Magento\Profiler::start('UNS: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::start('UNS: '.get_class($this).'::'.$method); $result = $this->unsetData($key); - //\Magento\Profiler::stop('UNS: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::stop('UNS: '.get_class($this).'::'.$method); return $result; case 'has': - //\Magento\Profiler::start('HAS: '.get_class($this).'::'.$method); - //\Magento\Profiler::stop('HAS: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::start('HAS: '.get_class($this).'::'.$method); + //\Magento\Framework\Profiler::stop('HAS: '.get_class($this).'::'.$method); return isset($this->_data[$key]); } - throw new \Magento\Exception( + throw new \Magento\Framework\Exception( "Invalid method " . get_class($this) . "::" . $method . "(" . print_r($args, 1) . ")" ); } diff --git a/app/code/Magento/Paypal/Model/PayflowExpress.php b/app/code/Magento/Paypal/Model/PayflowExpress.php index dd323952210bb..911897733bd4d 100644 --- a/app/code/Magento/Paypal/Model/PayflowExpress.php +++ b/app/code/Magento/Paypal/Model/PayflowExpress.php @@ -55,25 +55,25 @@ class PayflowExpress extends \Magento\Paypal\Model\Express protected $_paypalInfoFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Paypal\Model\CartFactory $cartFactory * @param \Magento\Paypal\Model\InfoFactory $paypalInfoFactory * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Paypal\Model\Method\ProTypeFactory $proTypeFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Paypal\Model\CartFactory $cartFactory, \Magento\Paypal\Model\InfoFactory $paypalInfoFactory, array $data = array() diff --git a/app/code/Magento/Paypal/Model/Payflowlink.php b/app/code/Magento/Paypal/Model/Payflowlink.php index 35cb6458d4dd1..ef2053131af26 100644 --- a/app/code/Magento/Paypal/Model/Payflowlink.php +++ b/app/code/Magento/Paypal/Model/Payflowlink.php @@ -147,17 +147,17 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro protected $_websiteFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Logger $logger - * @param \Magento\Module\ModuleListInterface $moduleList - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Paypal\Model\ConfigFactory $configFactory - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom * @param \Magento\Paypal\Model\Payflow\RequestFactory $requestFactory * @param \Magento\Sales\Model\QuoteFactory $quoteFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory @@ -168,17 +168,17 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Logger $logger, - \Magento\Module\ModuleListInterface $moduleList, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Module\ModuleListInterface $moduleList, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Paypal\Model\ConfigFactory $configFactory, - \Magento\Math\Random $mathRandom, + \Magento\Framework\Math\Random $mathRandom, \Magento\Paypal\Model\Payflow\RequestFactory $requestFactory, \Magento\Sales\Model\QuoteFactory $quoteFactory, \Magento\Sales\Model\OrderFactory $orderFactory, @@ -243,7 +243,7 @@ public function isAvailable($quote = null) * Instantiate state and set it to state object * * @param string $paymentAction - * @param \Magento\Object $stateObject + * @param \Magento\Framework\Object $stateObject * @return void */ public function initialize($paymentAction, $stateObject) @@ -324,7 +324,7 @@ public function setResponseData(array $postData) * * @param array $responseData * @return void - * @throws \Magento\Model\Exception In case of validation error or order creation error + * @throws \Magento\Framework\Model\Exception In case of validation error or order creation error */ public function process($responseData) { @@ -343,7 +343,7 @@ public function process($responseData) * * @param \Magento\Sales\Model\Order $order * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _processOrder(\Magento\Sales\Model\Order $order) { @@ -392,7 +392,7 @@ protected function _processOrder(\Magento\Sales\Model\Order $order) } $this->_quoteFactory->create()->load($order->getQuoteId())->setIsActive(false)->save(); } catch (\Exception $e) { - throw new \Magento\Model\Exception(__('We cannot send the new order email.')); + throw new \Magento\Framework\Model\Exception(__('We cannot send the new order email.')); } } @@ -416,7 +416,7 @@ protected function _getFraudMessage() * Check response from Payflow gateway. * * @return false|\Magento\Sales\Model\Order in case of validation passed - * @throws \Magento\Model\Exception In other cases + * @throws \Magento\Framework\Model\Exception In other cases */ protected function _getOrderFromResponse() { @@ -437,7 +437,7 @@ protected function _getOrderFromResponse() if ($order->getState() != \Magento\Sales\Model\Order::STATE_CANCELED) { $order->registerCancellation($response->getRespmsg())->save(); } - throw new \Magento\Model\Exception($response->getRespmsg()); + throw new \Magento\Framework\Model\Exception($response->getRespmsg()); } $amountCompared = $response->getAmt() == $order->getPayment()->getBaseAmountAuthorized() ? true : false; @@ -445,12 +445,12 @@ protected function _getOrderFromResponse() $order->getState() != \Magento\Sales\Model\Order::STATE_PENDING_PAYMENT || !$amountCompared ) { - throw new \Magento\Model\Exception($this->_formatStr(self::RESPONSE_ERROR_MSG, 'Order')); + throw new \Magento\Framework\Model\Exception($this->_formatStr(self::RESPONSE_ERROR_MSG, 'Order')); } $fetchData = $this->fetchTransactionInfo($order->getPayment(), $response->getPnref()); if (!isset($fetchData['custref']) || $fetchData['custref'] != $order->getIncrementId()) { - throw new \Magento\Model\Exception($this->_formatStr(self::RESPONSE_ERROR_MSG, 'Transaction')); + throw new \Magento\Framework\Model\Exception($this->_formatStr(self::RESPONSE_ERROR_MSG, 'Transaction')); } return $order; @@ -460,7 +460,7 @@ protected function _getOrderFromResponse() * Build request for getting token * * @param \Magento\Sales\Model\Order\Payment $payment - * @return \Magento\Object + * @return \Magento\Framework\Object */ protected function _buildTokenRequest(\Magento\Sales\Model\Order\Payment $payment) { @@ -556,10 +556,10 @@ protected function _getStoreId() /** * Return request object with basic information for gateway request * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return \Magento\Paypal\Model\Payflow\Request */ - protected function _buildBasicRequest(\Magento\Object $payment) + protected function _buildBasicRequest(\Magento\Framework\Object $payment) { /** @var \Magento\Paypal\Model\Payflow\Request $request */ $request = $this->_requestFactory->create(); @@ -648,10 +648,10 @@ protected function _formatStr($format, $string) * If response is failed throw exception * Set token data in payment object * - * @param \Magento\Object $response + * @param \Magento\Framework\Object $response * @param \Magento\Sales\Model\Order\Payment $payment * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _processTokenErrors($response, $payment) { @@ -659,7 +659,7 @@ protected function _processTokenErrors($response, $payment) $response->getResult() != self::RESPONSE_CODE_APPROVED && $response->getResult() != self::RESPONSE_CODE_FRAUDSERVICE_FILTER ) { - throw new \Magento\Model\Exception($response->getRespmsg()); + throw new \Magento\Framework\Model\Exception($response->getRespmsg()); } else { $payment->setAdditionalInformation( 'secure_token_id', @@ -699,7 +699,7 @@ protected function _generateSecureSilentPostHash($payment) * Add transaction with correct transaction Id * * @deprecated since 1.6.2.0 - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param string $txnId * @return void */ @@ -711,11 +711,11 @@ protected function _addTransaction($payment, $txnId) * Initialize request * * @deprecated since 1.6.2.0 - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param mixed $amount * @return $this */ - protected function _initialize(\Magento\Object $payment, $amount) + protected function _initialize(\Magento\Framework\Object $payment, $amount) { return $this; } @@ -726,7 +726,7 @@ protected function _initialize(\Magento\Object $payment, $amount) * @deprecated since 1.6.2.0 * @param mixed|null $token * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function prepareOrderReview($token = null) { @@ -736,13 +736,13 @@ public function prepareOrderReview($token = null) * Additional authorization logic for Account Verification * * @deprecated since 1.6.2.0 - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param mixed $amount * @param \Magento\Paypal\Model\Payment\Transaction $transaction * @param string $txnId * @return $this */ - protected function _authorize(\Magento\Object $payment, $amount, $transaction, $txnId) + protected function _authorize(\Magento\Framework\Object $payment, $amount, $transaction, $txnId) { return $this; } @@ -751,10 +751,10 @@ protected function _authorize(\Magento\Object $payment, $amount, $transaction, $ * Operate with order or quote using information from silent post * * @deprecated since 1.6.2.0 - * @param \Magento\Object $document + * @param \Magento\Framework\Object $document * @return void */ - protected function _process(\Magento\Object $document) + protected function _process(\Magento\Framework\Object $document) { } @@ -776,7 +776,7 @@ protected function _checkTransaction($transaction, $amount) * * @deprecated since 1.6.2.0 * @return \Magento\Sales\Model\AbstractModel in case of validation passed - * @throws \Magento\Model\Exception In other cases + * @throws \Magento\Framework\Model\Exception In other cases */ protected function _getDocumentFromResponse() { @@ -820,7 +820,7 @@ protected function _getCallbackUrl($actionName) \Magento\Store\Model\Store::XML_PATH_SECURE_IN_FRONTEND, \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); - $websiteUrl = $this->_storeManager->getStore()->getBaseUrl(\Magento\UrlInterface::URL_TYPE_LINK, $secure); + $websiteUrl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LINK, $secure); } return $websiteUrl . 'paypal/' . $this->getCallbackController() . '/' . $actionName; diff --git a/app/code/Magento/Paypal/Model/Payflowpro.php b/app/code/Magento/Paypal/Model/Payflowpro.php index 0bc3f10524fc7..e2ed597084984 100644 --- a/app/code/Magento/Paypal/Model/Payflowpro.php +++ b/app/code/Magento/Paypal/Model/Payflowpro.php @@ -211,38 +211,38 @@ class Payflowpro extends \Magento\Payment\Model\Method\Cc protected $_configFactory; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Logger $logger - * @param \Magento\Module\ModuleListInterface $moduleList - * @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate * @param \Magento\Centinel\Model\Service $centinelService * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Paypal\Model\ConfigFactory $configFactory - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Logger $logger, - \Magento\Module\ModuleListInterface $moduleList, - \Magento\Stdlib\DateTime\TimezoneInterface $localeDate, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Module\ModuleListInterface $moduleList, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Centinel\Model\Service $centinelService, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Paypal\Model\ConfigFactory $configFactory, - \Magento\Math\Random $mathRandom, + \Magento\Framework\Math\Random $mathRandom, array $data = array() ) { $this->_storeManager = $storeManager; @@ -299,11 +299,11 @@ public function getConfigPaymentAction() /** * Authorize payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function authorize(\Magento\Object $payment, $amount) + public function authorize(\Magento\Framework\Object $payment, $amount) { $request = $this->_buildPlaceRequest($payment, $amount); $request->setTrxtype(self::TRXTYPE_AUTH_ONLY); @@ -343,11 +343,11 @@ protected function _getCaptureAmount($amount) /** * Capture payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { if ($payment->getReferenceTransactionId()) { $request = $this->_buildPlaceRequest($payment, $amount); @@ -388,10 +388,10 @@ public function capture(\Magento\Object $payment, $amount) /** * Void payment * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @return $this */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { $request = $this->_buildBasicRequest($payment); $request->setTrxtype(self::TRXTYPE_DELAYED_VOID); @@ -415,10 +415,10 @@ public function void(\Magento\Object $payment) /** * Check void availability * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return bool */ - public function canVoid(\Magento\Object $payment) + public function canVoid(\Magento\Framework\Object $payment) { if ($payment instanceof \Magento\Sales\Model\Order\Invoice || $payment instanceof \Magento\Sales\Model\Order\Creditmemo @@ -435,10 +435,10 @@ public function canVoid(\Magento\Object $payment) /** * Attempt to void the authorization on cancelling * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return $this */ - public function cancel(\Magento\Object $payment) + public function cancel(\Magento\Framework\Object $payment) { if (!$payment->getOrder()->getInvoiceCollection()->count()) { return $this->void($payment); @@ -450,11 +450,11 @@ public function cancel(\Magento\Object $payment) /** * Refund capture * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { $request = $this->_buildBasicRequest($payment); $request->setTrxtype(self::TRXTYPE_CREDIT); @@ -531,16 +531,16 @@ protected function _getTransactionUrl($testMode = null) /** * Post request to gateway and return response * - * @param \Magento\Object $request - * @return \Magento\Object + * @param \Magento\Framework\Object $request + * @return \Magento\Framework\Object * @throws \Exception */ - protected function _postRequest(\Magento\Object $request) + protected function _postRequest(\Magento\Framework\Object $request) { $debugData = array('request' => $request->getData()); - $client = new \Magento\HTTP\ZendClient(); - $result = new \Magento\Object(); + $client = new \Magento\Framework\HTTP\ZendClient(); + $result = new \Magento\Framework\Object(); $_config = array('maxredirects' => 5, 'timeout' => 30, 'verifypeer' => $this->getConfigData('verify_peer')); @@ -609,11 +609,11 @@ protected function _postRequest(\Magento\Object $request) /** * Return request object with information for 'authorization' or 'sale' action * - * @param \Magento\Object|Payment $payment + * @param \Magento\Framework\Object|Payment $payment * @param float $amount - * @return \Magento\Object + * @return \Magento\Framework\Object */ - protected function _buildPlaceRequest(\Magento\Object $payment, $amount) + protected function _buildPlaceRequest(\Magento\Framework\Object $payment, $amount) { $request = $this->_buildBasicRequest($payment); $request->setAmt(round($amount, 2)); @@ -624,7 +624,7 @@ protected function _buildPlaceRequest(\Magento\Object $payment, $amount) if ($this->getIsCentinelValidationEnabled()) { $params = array(); $params = $this->getCentinelValidator()->exportCmpiData($params); - $request = \Magento\Object\Mapper::accumulateByMap($params, $request, $this->_centinelFieldMap); + $request = \Magento\Framework\Object\Mapper::accumulateByMap($params, $request, $this->_centinelFieldMap); } $order = $payment->getOrder(); @@ -680,12 +680,12 @@ protected function _buildPlaceRequest(\Magento\Object $payment, $amount) /** * Return request object with basic information for gateway request * - * @param \Magento\Object|Payment $payment - * @return \Magento\Object + * @param \Magento\Framework\Object|Payment $payment + * @return \Magento\Framework\Object */ - protected function _buildBasicRequest(\Magento\Object $payment) + protected function _buildBasicRequest(\Magento\Framework\Object $payment) { - $request = new \Magento\Object(); + $request = new \Magento\Framework\Object(); $request->setUser( $this->getConfigData('user') )->setVendor( @@ -717,18 +717,18 @@ protected function _generateRequestId() /** * If response is failed throw exception * - * @param \Magento\Object $response + * @param \Magento\Framework\Object $response * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - protected function _processErrors(\Magento\Object $response) + protected function _processErrors(\Magento\Framework\Object $response) { if ($response->getResultCode() == self::RESPONSE_CODE_VOID_ERROR) { throw new \Magento\Paypal\Exception(__('You cannot void a verification transaction.')); } elseif ($response->getResultCode() != self::RESPONSE_CODE_APPROVED && $response->getResultCode() != self::RESPONSE_CODE_FRAUDSERVICE_FILTER ) { - throw new \Magento\Model\Exception($response->getRespmsg()); + throw new \Magento\Framework\Model\Exception($response->getRespmsg()); } } @@ -736,10 +736,10 @@ protected function _processErrors(\Magento\Object $response) * Adopt specified address object to be compatible with Paypal * Puerto Rico should be as state of USA and not as a country * - * @param \Magento\Object $address + * @param \Magento\Framework\Object $address * @return void */ - protected function _applyCountryWorkarounds(\Magento\Object $address) + protected function _applyCountryWorkarounds(\Magento\Framework\Object $address) { if ($address->getCountry() == 'PR') { $address->setCountry('US'); @@ -750,11 +750,11 @@ protected function _applyCountryWorkarounds(\Magento\Object $address) /** * Set reference transaction data into request * - * @param \Magento\Object $payment - * @param \Magento\Object $request + * @param \Magento\Framework\Object $payment + * @param \Magento\Framework\Object $request * @return $this */ - protected function _setReferenceTransaction(\Magento\Object $payment, $request) + protected function _setReferenceTransaction(\Magento\Framework\Object $payment, $request) { return $this; } diff --git a/app/code/Magento/Paypal/Model/Payment/Method/Billing/AbstractAgreement.php b/app/code/Magento/Paypal/Model/Payment/Method/Billing/AbstractAgreement.php index ec91b66a8ebd4..fa9970603fb45 100644 --- a/app/code/Magento/Paypal/Model/Payment/Method/Billing/AbstractAgreement.php +++ b/app/code/Magento/Paypal/Model/Payment/Method/Billing/AbstractAgreement.php @@ -58,18 +58,18 @@ abstract class AbstractAgreement extends \Magento\Payment\Model\Method\AbstractM protected $_agreementFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory * @param array $data */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory, array $data = array() ) { @@ -114,7 +114,7 @@ public function assignData($data) $id = false; if (is_array($data) && isset($data[$key])) { $id = $data[$key]; - } elseif ($data instanceof \Magento\Object && $data->getData($key)) { + } elseif ($data instanceof \Magento\Framework\Object && $data->getData($key)) { $id = $data->getData($key); } if ($id) { diff --git a/app/code/Magento/Paypal/Model/Payment/Transaction.php b/app/code/Magento/Paypal/Model/Payment/Transaction.php index ad10383fff0b3..6cea26b0e75e0 100644 --- a/app/code/Magento/Paypal/Model/Payment/Transaction.php +++ b/app/code/Magento/Paypal/Model/Payment/Transaction.php @@ -33,7 +33,7 @@ * @method string getCreatedAt() * @method \Magento\Paypal\Model\Payment\Transaction setCreatedAt(string $value) */ -class Transaction extends \Magento\Model\AbstractModel +class Transaction extends \Magento\Framework\Model\AbstractModel { /** * Whether to throw exceptions on different operations @@ -66,24 +66,24 @@ class Transaction extends \Magento\Model\AbstractModel protected $_orderWebsiteId; /** - * @var \Magento\Stdlib\DateTime\DateTimeFactory + * @var \Magento\Framework\Stdlib\DateTime\DateTimeFactory */ protected $_dateFactory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Stdlib\DateTime\DateTimeFactory $dateFactory - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, - \Magento\Stdlib\DateTime\DateTimeFactory $dateFactory, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, + \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_dateFactory = $dateFactory; @@ -161,12 +161,12 @@ protected function _afterLoadByTxnId() * @param string $key * @param mixed $value * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function setAdditionalInformation($key, $value) { if (is_object($value)) { - throw new \Magento\Model\Exception(__('Payment transactions disallow storing objects.')); + throw new \Magento\Framework\Model\Exception(__('Payment transactions disallow storing objects.')); } $info = $this->_getData('additional_information'); if (!$info) { @@ -232,7 +232,7 @@ public function isFailsafe($setFailsafe = null) * Verify data required for saving * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _beforeSave() { @@ -247,12 +247,12 @@ protected function _beforeSave() * * @param string $txnId * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _verifyTxnId($txnId) { if (null !== $txnId && 0 == strlen($txnId)) { - throw new \Magento\Model\Exception(__('You need to enter a transaction ID.')); + throw new \Magento\Framework\Model\Exception(__('You need to enter a transaction ID.')); } } @@ -262,12 +262,12 @@ protected function _verifyTxnId($txnId) * TODO for more restriction we can check for data consistency * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _verifyThisTransactionExists() { if (!$this->getId()) { - throw new \Magento\Model\Exception(__('This operation requires an existing transaction object.')); + throw new \Magento\Framework\Model\Exception(__('This operation requires an existing transaction object.')); } } } diff --git a/app/code/Magento/Paypal/Model/Pro.php b/app/code/Magento/Paypal/Model/Pro.php index b13e3e7f2003f..9c784e8a3b60d 100644 --- a/app/code/Magento/Paypal/Model/Pro.php +++ b/app/code/Magento/Paypal/Model/Pro.php @@ -198,11 +198,11 @@ public function getInfo() /** * Transfer transaction/payment information from API instance to order payment * - * @param \Magento\Object|AbstractApi $from + * @param \Magento\Framework\Object|AbstractApi $from * @param \Magento\Payment\Model\Info $to * @return $this */ - public function importPaymentInfo(\Magento\Object $from, \Magento\Payment\Model\Info $to) + public function importPaymentInfo(\Magento\Framework\Object $from, \Magento\Payment\Model\Info $to) { // update PayPal-specific payment information in the payment object $this->getInfo()->importToPayment($from, $to); @@ -231,11 +231,11 @@ public function importPaymentInfo(\Magento\Object $from, \Magento\Payment\Model\ /** * Void transaction * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function void(\Magento\Object $payment) + public function void(\Magento\Framework\Object $payment) { $authTransactionId = $this->_getParentTransactionId($payment); if ($authTransactionId) { @@ -243,7 +243,7 @@ public function void(\Magento\Object $payment) $api->setPayment($payment)->setAuthorizationId($authTransactionId)->callDoVoid(); $this->importPaymentInfo($api, $payment); } else { - throw new \Magento\Model\Exception(__('You need an authorization transaction to void.')); + throw new \Magento\Framework\Model\Exception(__('You need an authorization transaction to void.')); } } @@ -251,11 +251,11 @@ public function void(\Magento\Object $payment) * Attempt to capture payment * Will return false if the payment is not supposed to be captured * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return false|null */ - public function capture(\Magento\Object $payment, $amount) + public function capture(\Magento\Framework\Object $payment, $amount) { $authTransactionId = $this->_getParentTransactionId($payment); if (!$authTransactionId) { @@ -281,12 +281,12 @@ public function capture(\Magento\Object $payment, $amount) /** * Refund a capture transaction * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @param float $amount * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function refund(\Magento\Object $payment, $amount) + public function refund(\Magento\Framework\Object $payment, $amount) { $captureTxnId = $this->_getParentTransactionId($payment); if ($captureTxnId) { @@ -310,7 +310,7 @@ public function refund(\Magento\Object $payment, $amount) $api->callRefundTransaction(); $this->_importRefundResultToPayment($api, $payment, $canRefundMore); } else { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('We can\'t issue a refund transaction because there is no capture transaction.') ); } @@ -319,10 +319,10 @@ public function refund(\Magento\Object $payment, $amount) /** * Cancel payment * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return void */ - public function cancel(\Magento\Object $payment) + public function cancel(\Magento\Framework\Object $payment) { if (!$payment->getOrder()->getInvoiceCollection()->count()) { $this->void($payment); @@ -431,10 +431,10 @@ protected function _importRefundResultToPayment($api, $payment, $canRefundMore) /** * Parent transaction id getter * - * @param \Magento\Object $payment + * @param \Magento\Framework\Object $payment * @return string */ - protected function _getParentTransactionId(\Magento\Object $payment) + protected function _getParentTransactionId(\Magento\Framework\Object $payment) { return $payment->getParentTransactionId(); } diff --git a/app/code/Magento/Paypal/Model/Report/Settlement.php b/app/code/Magento/Paypal/Model/Report/Settlement.php index 5444e302444ea..01f39ad2984dd 100644 --- a/app/code/Magento/Paypal/Model/Report/Settlement.php +++ b/app/code/Magento/Paypal/Model/Report/Settlement.php @@ -42,7 +42,7 @@ * @method string getLastModified() * @method \Magento\Paypal\Model\Report\Settlement setLastModified(string $value) */ -class Settlement extends \Magento\Model\AbstractModel +class Settlement extends \Magento\Framework\Model\AbstractModel { /** * Default PayPal SFTP host @@ -159,7 +159,7 @@ class Settlement extends \Magento\Model\AbstractModel ); /** - * @var \Magento\Filesystem\Directory\WriteInterface + * @var \Magento\Framework\Filesystem\Directory\WriteInterface */ protected $_tmpDirectory; @@ -174,23 +174,23 @@ class Settlement extends \Magento\Model\AbstractModel protected $_scopeConfig; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Filesystem $filesystem * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Filesystem $filesystem, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::SYS_TMP_DIR); @@ -212,7 +212,7 @@ protected function _construct() /** * Stop saving process if file with same report date, account ID and last modified date was already ferched * - * @return \Magento\Model\AbstractModel + * @return \Magento\Framework\Model\AbstractModel */ protected function _beforeSave() { @@ -230,11 +230,11 @@ protected function _beforeSave() * Goes to specified host/path and fetches reports from there. * Save reports to database. * - * @param \Magento\Io\Sftp $connection + * @param \Magento\Framework\Io\Sftp $connection * @return int Number of report rows that were fetched and saved successfully - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function fetchAndSave(\Magento\Io\Sftp $connection) + public function fetchAndSave(\Magento\Framework\Io\Sftp $connection) { $fetched = 0; $listing = $this->_filterReportsList($connection->rawls()); @@ -243,7 +243,7 @@ public function fetchAndSave(\Magento\Io\Sftp $connection) $localCsv = 'PayPal_STL_' . uniqid(mt_rand()) . time() . '.csv'; if ($connection->read($filename, $this->_tmpDirectory->getAbsolutePath($localCsv))) { if (!$this->_tmpDirectory->isWritable($localCsv)) { - throw new \Magento\Model\Exception(__('We cannot create a target file for reading reports.')); + throw new \Magento\Framework\Model\Exception(__('We cannot create a target file for reading reports.')); } $encoded = $this->_tmpDirectory->readFile($localCsv); @@ -256,9 +256,9 @@ public function fetchAndSave(\Magento\Io\Sftp $connection) // Set last modified date, this value will be overwritten during parsing if (isset($attributes['mtime'])) { - $lastModified = new \Magento\Stdlib\DateTime\Date($attributes['mtime']); + $lastModified = new \Magento\Framework\Stdlib\DateTime\Date($attributes['mtime']); $this->setReportLastModified( - $lastModified->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT) + $lastModified->toString(\Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT) ); } @@ -290,7 +290,7 @@ public function fetchAndSave(\Magento\Io\Sftp $connection) * Connect to an SFTP server using specified configuration * * @param array $config - * @return \Magento\Io\Sftp + * @return \Magento\Framework\Io\Sftp * @throws \InvalidArgumentException */ public static function createConnection(array $config) @@ -307,7 +307,7 @@ public static function createConnection(array $config) ) { throw new \InvalidArgumentException('Required config elements: hostname, username, password, path'); } - $connection = new \Magento\Io\Sftp(); + $connection = new \Magento\Framework\Io\Sftp(); $connection->open( array('host' => $config['hostname'], 'username' => $config['username'], 'password' => $config['password']) ); @@ -340,9 +340,9 @@ public function parseCsv($localCsv, $format = 'new') switch ($lineType) { case 'RH': // Report header. - $lastModified = new \Magento\Stdlib\DateTime\Date($line[1]); + $lastModified = new \Magento\Framework\Stdlib\DateTime\Date($line[1]); $this->setReportLastModified( - $lastModified->toString(\Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT) + $lastModified->toString(\Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT) ); //$this->setAccountId($columns[2]); -- probably we'll just take that from the section header... break; diff --git a/app/code/Magento/Paypal/Model/Report/Settlement/Row.php b/app/code/Magento/Paypal/Model/Report/Settlement/Row.php index 37b23bcab1fcf..2af8cc3160aaf 100644 --- a/app/code/Magento/Paypal/Model/Report/Settlement/Row.php +++ b/app/code/Magento/Paypal/Model/Report/Settlement/Row.php @@ -68,7 +68,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class Row extends \Magento\Model\AbstractModel +class Row extends \Magento\Framework\Model\AbstractModel { /** * Assoc array event code => label diff --git a/app/code/Magento/Paypal/Model/Resource/Billing/Agreement.php b/app/code/Magento/Paypal/Model/Resource/Billing/Agreement.php index 1ea6bae7230ea..6034bfb010433 100644 --- a/app/code/Magento/Paypal/Model/Resource/Billing/Agreement.php +++ b/app/code/Magento/Paypal/Model/Resource/Billing/Agreement.php @@ -26,7 +26,7 @@ /** * Billing agreement resource model */ -class Agreement extends \Magento\Model\Resource\Db\AbstractDb +class Agreement extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Resource initialization diff --git a/app/code/Magento/Paypal/Model/Resource/Billing/Agreement/Collection.php b/app/code/Magento/Paypal/Model/Resource/Billing/Agreement/Collection.php index 74ea4c85eca0c..b12d65b110892 100644 --- a/app/code/Magento/Paypal/Model/Resource/Billing/Agreement/Collection.php +++ b/app/code/Magento/Paypal/Model/Resource/Billing/Agreement/Collection.php @@ -28,7 +28,7 @@ /** * Billing agreements resource collection */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Mapping for fields @@ -57,23 +57,23 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio /** * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Customer\Model\Resource\Customer $customerResource * @param \Magento\Eav\Helper\Data $eavHelper * @param mixed $connection - * @param \Magento\Model\Resource\Db\AbstractDb $resource + * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Customer\Model\Resource\Customer $customerResource, \Magento\Eav\Helper\Data $eavHelper, $connection = null, - \Magento\Model\Resource\Db\AbstractDb $resource = null + \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null ) { parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_eavHelper = $eavHelper; diff --git a/app/code/Magento/Paypal/Model/Resource/Cert.php b/app/code/Magento/Paypal/Model/Resource/Cert.php index f6fed37bcd313..23be49e5f9ea8 100644 --- a/app/code/Magento/Paypal/Model/Resource/Cert.php +++ b/app/code/Magento/Paypal/Model/Resource/Cert.php @@ -28,27 +28,27 @@ /** * PayPal resource model for certificate based authentication */ -class Cert extends \Magento\Model\Resource\Db\AbstractDb +class Cert extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_coreDate; /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $dateTime; /** * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Stdlib\DateTime\DateTime $coreDate - * @param \Magento\Stdlib\DateTime $dateTime + * @param \Magento\Framework\Stdlib\DateTime\DateTime $coreDate + * @param \Magento\Framework\Stdlib\DateTime $dateTime */ public function __construct( \Magento\Framework\App\Resource $resource, - \Magento\Stdlib\DateTime\DateTime $coreDate, - \Magento\Stdlib\DateTime $dateTime + \Magento\Framework\Stdlib\DateTime\DateTime $coreDate, + \Magento\Framework\Stdlib\DateTime $dateTime ) { $this->_coreDate = $coreDate; $this->dateTime = $dateTime; @@ -68,10 +68,10 @@ protected function _construct() /** * Set date of last update * - * @param \Magento\Model\AbstractModel $object - * @return \Magento\Model\Resource\Db\AbstractDb + * @param \Magento\Framework\Model\AbstractModel $object + * @return \Magento\Framework\Model\Resource\Db\AbstractDb */ - protected function _beforeSave(\Magento\Model\AbstractModel $object) + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) { $object->setUpdatedAt($this->dateTime->formatDate($this->_coreDate->gmtDate())); return parent::_beforeSave($object); diff --git a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php b/app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php index 0e4db5f91e7e9..8c1ac508b1138 100644 --- a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php +++ b/app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php @@ -33,7 +33,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class Transaction extends \Magento\Model\Resource\Db\AbstractDb +class Transaction extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Serializeable field: additional_information @@ -71,11 +71,11 @@ public function loadObjectByTxnId(\Magento\Paypal\Model\Payment\Transaction $tra /** * Serialize additional information, if any * - * @param \Magento\Model\AbstractModel $transaction + * @param \Magento\Framework\Model\AbstractModel $transaction * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - protected function _beforeSave(\Magento\Model\AbstractModel $transaction) + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $transaction) { $txnId = $transaction->getData('txn_id'); $idFieldName = $this->getIdFieldName(); @@ -113,7 +113,7 @@ private function _lookupByTxnId($txnId, $columns, $isRow = false) * * @param string $txnId * @param string|array|Zend_Db_Expr $columns - * @return \Magento\DB\Select + * @return \Magento\Framework\DB\Select */ private function _getLoadByUniqueKeySelect($txnId, $columns = '*') { diff --git a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php b/app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php index 21699d562eae7..85584314e4672 100644 --- a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php +++ b/app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php @@ -33,7 +33,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Created Before filter diff --git a/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php b/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php index 83b9d71a931f7..1f7e63d5ff3ce 100644 --- a/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php +++ b/app/code/Magento/Paypal/Model/Resource/Report/Settlement.php @@ -28,7 +28,7 @@ /** * Report settlement resource model */ -class Settlement extends \Magento\Model\Resource\Db\AbstractDb +class Settlement extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Table name @@ -38,15 +38,15 @@ class Settlement extends \Magento\Model\Resource\Db\AbstractDb protected $_rowsTable; /** - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_coreDate; /** * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Stdlib\DateTime\DateTime $coreDate + * @param \Magento\Framework\Stdlib\DateTime\DateTime $coreDate */ - public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Stdlib\DateTime\DateTime $coreDate) + public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Stdlib\DateTime\DateTime $coreDate) { $this->_coreDate = $coreDate; parent::__construct($resource); @@ -66,10 +66,10 @@ protected function _construct() /** * Save report rows collected in settlement model * - * @param \Magento\Model\AbstractModel|\Magento\Paypal\Model\Report\Settlement $object + * @param \Magento\Framework\Model\AbstractModel|\Magento\Paypal\Model\Report\Settlement $object * @return $this */ - protected function _afterSave(\Magento\Model\AbstractModel $object) + protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) { $rows = $object->getRows(); if (is_array($rows)) { @@ -85,12 +85,12 @@ protected function _afterSave(\Magento\Model\AbstractModel $object) /** * Converting dates */ - $completionDate = new \Magento\Stdlib\DateTime\Date($rows[$key]['transaction_completion_date']); + $completionDate = new \Magento\Framework\Stdlib\DateTime\Date($rows[$key]['transaction_completion_date']); $rows[$key]['transaction_completion_date'] = $this->_coreDate->date( null, $completionDate->getTimestamp() ); - $initiationDate = new \Magento\Stdlib\DateTime\Date($rows[$key]['transaction_initiation_date']); + $initiationDate = new \Magento\Framework\Stdlib\DateTime\Date($rows[$key]['transaction_initiation_date']); $rows[$key]['transaction_initiation_date'] = $this->_coreDate->date( null, $initiationDate->getTimestamp() diff --git a/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Options/TransactionEvents.php b/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Options/TransactionEvents.php index f51ec1ec3bf7d..c7586d204f354 100644 --- a/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Options/TransactionEvents.php +++ b/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Options/TransactionEvents.php @@ -32,7 +32,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class TransactionEvents implements \Magento\Option\ArrayInterface +class TransactionEvents implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Paypal\Model\Report\Settlement\Row diff --git a/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row.php b/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row.php index 667d4f9dc0898..35635c175db37 100644 --- a/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row.php +++ b/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row.php @@ -32,7 +32,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class Row extends \Magento\Model\Resource\Db\AbstractDb +class Row extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Resource model initialization. diff --git a/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row/Collection.php b/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row/Collection.php index 59a1a1527e641..3f4204884b723 100644 --- a/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row/Collection.php +++ b/app/code/Magento/Paypal/Model/Resource/Report/Settlement/Row/Collection.php @@ -34,7 +34,7 @@ */ namespace Magento\Paypal\Model\Resource\Report\Settlement\Row; -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Resource initializing diff --git a/app/code/Magento/Paypal/Model/Standard.php b/app/code/Magento/Paypal/Model/Standard.php index 9de5026a32e80..b65e7266dbd41 100644 --- a/app/code/Magento/Paypal/Model/Standard.php +++ b/app/code/Magento/Paypal/Model/Standard.php @@ -73,7 +73,7 @@ class Standard extends \Magento\Payment\Model\Method\AbstractMethod protected $_checkoutSession; /** - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; @@ -103,13 +103,13 @@ class Standard extends \Magento\Payment\Model\Method\AbstractMethod protected $_configFactory; /** - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Payment\Helper\Data $paymentData * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Logger\AdapterFactory $logAdapterFactory - * @param \Magento\Session\Generic $paypalSession + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Session\Generic $paypalSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\UrlInterface $urlBuilder + * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Paypal\Model\Api\StandardFactory $apiStandardFactory @@ -120,13 +120,13 @@ class Standard extends \Magento\Payment\Model\Method\AbstractMethod * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Logger\AdapterFactory $logAdapterFactory, - \Magento\Session\Generic $paypalSession, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Session\Generic $paypalSession, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\UrlInterface $urlBuilder, + \Magento\Framework\UrlInterface $urlBuilder, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Paypal\Model\Api\StandardFactory $apiStandardFactory, @@ -159,7 +159,7 @@ public function canUseForCurrency($currencyCode) /** * Get paypal session namespace * - * @return \Magento\Session\Generic + * @return \Magento\Framework\Session\Generic */ public function getSession() { @@ -190,7 +190,7 @@ public function getQuote() * Create main block for standard form * * @param string $name - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ public function createFormBlock($name) { diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php index ce8b17bc950ef..27738cb9e2557 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php +++ b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php @@ -36,35 +36,35 @@ class Cert extends \Magento\Framework\App\Config\Value protected $_certFactory; /** - * @var \Magento\Encryption\EncryptorInterface + * @var \Magento\Framework\Encryption\EncryptorInterface */ protected $_encryptor; /** - * @var \Magento\Filesystem\Directory\ReadInterface + * @var \Magento\Framework\Filesystem\Directory\ReadInterface */ protected $_tmpDirectory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param \Magento\Paypal\Model\CertFactory $certFactory - * @param \Magento\Encryption\EncryptorInterface $encryptor + * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Paypal\Model\CertFactory $certFactory, - \Magento\Encryption\EncryptorInterface $encryptor, + \Magento\Framework\Encryption\EncryptorInterface $encryptor, \Magento\Framework\App\Filesystem $filesystem, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_certFactory = $certFactory; @@ -77,7 +77,7 @@ public function __construct( * Process additional data before save config * * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _beforeSave() { @@ -95,7 +95,7 @@ protected function _beforeSave() ); if ($tmpPath && $this->_tmpDirectory->isExist($tmpPath)) { if (!$this->_tmpDirectory->stat($tmpPath)['size']) { - throw new \Magento\Model\Exception(__('The PayPal certificate file is empty.')); + throw new \Magento\Framework\Model\Exception(__('The PayPal certificate file is empty.')); } $this->setValue($_FILES['groups']['name'][$this->getGroupId()]['fields'][$this->getField()]['value']); $content = $this->_encryptor->encrypt($this->_tmpDirectory->readFile($tmpPath)); diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php b/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php index 26b366e41aa22..07604e4ee8d9e 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php +++ b/app/code/Magento/Paypal/Model/System/Config/Backend/Cron.php @@ -37,21 +37,21 @@ class Cron extends \Magento\Framework\App\Config\Value protected $_configValueFactory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param \Magento\Framework\App\Config\ValueFactory $configValueFactory - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Framework\App\Config\ValueFactory $configValueFactory, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_configValueFactory = $configValueFactory; diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php b/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php index e08a05b47def9..0c0b56e7cf8de 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php +++ b/app/code/Magento/Paypal/Model/System/Config/Backend/MerchantCountry.php @@ -43,23 +43,23 @@ class MerchantCountry extends \Magento\Framework\App\Config\Value protected $_storeManager; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $config, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Core\Helper\Data $coreData, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_coreData = $coreData; diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/AuthorizationAmounts.php b/app/code/Magento/Paypal/Model/System/Config/Source/AuthorizationAmounts.php index 83ddfda9016fe..2215087872624 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/AuthorizationAmounts.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/AuthorizationAmounts.php @@ -33,7 +33,7 @@ * @package Magento_Paypal * @author Magento Core Team */ -class AuthorizationAmounts implements \Magento\Option\ArrayInterface +class AuthorizationAmounts implements \Magento\Framework\Option\ArrayInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php b/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php index be85307f02687..42a43ea00326b 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php @@ -28,7 +28,7 @@ /** * Source model for buyer countries supported by PayPal */ -class BuyerCountry implements \Magento\Option\ArrayInterface +class BuyerCountry implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Paypal\Model\ConfigFactory diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/FetchingSchedule.php b/app/code/Magento/Paypal/Model/System/Config/Source/FetchingSchedule.php index 4035ef558dbcd..2e960a21587f4 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/FetchingSchedule.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/FetchingSchedule.php @@ -28,7 +28,7 @@ /** * Source model for available settlement report fetching intervals */ -class FetchingSchedule implements \Magento\Option\ArrayInterface +class FetchingSchedule implements \Magento\Framework\Option\ArrayInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/Logo.php b/app/code/Magento/Paypal/Model/System/Config/Source/Logo.php index 4cd14b9e80d11..af66c8683d8bc 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/Logo.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/Logo.php @@ -28,7 +28,7 @@ /** * Source model for available logo types */ -class Logo implements \Magento\Option\ArrayInterface +class Logo implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Paypal\Model\ConfigFactory diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php b/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php index d121a05ca491d..d335d3c8121e1 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php @@ -28,7 +28,7 @@ /** * Source model for merchant countries supported by PayPal */ -class MerchantCountry implements \Magento\Option\ArrayInterface +class MerchantCountry implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Paypal\Model\ConfigFactory diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions.php b/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions.php index 04423df352683..e63932dc30ae1 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions.php @@ -28,7 +28,7 @@ /** * Source model for available payment actions */ -class PaymentActions implements \Magento\Option\ArrayInterface +class PaymentActions implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Paypal\Model\ConfigFactory diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions/Express.php b/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions/Express.php index e17a8b528c51c..d5d64333dbbde 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions/Express.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/PaymentActions/Express.php @@ -28,7 +28,7 @@ /** * Source model for available paypal express payment actions */ -class Express implements \Magento\Option\ArrayInterface +class Express implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Paypal\Model\ConfigFactory diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/RequireBillingAddress.php b/app/code/Magento/Paypal/Model/System/Config/Source/RequireBillingAddress.php index e1a9badeddf9d..28a9c73e09507 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/RequireBillingAddress.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/RequireBillingAddress.php @@ -28,7 +28,7 @@ /** * Source model for Require Billing Address */ -class RequireBillingAddress implements \Magento\Option\ArrayInterface +class RequireBillingAddress implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Paypal\Model\ConfigFactory diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/UrlMethod.php b/app/code/Magento/Paypal/Model/System/Config/Source/UrlMethod.php index f824b4f7c3c1a..88ae8b99c3fd1 100644 --- a/app/code/Magento/Paypal/Model/System/Config/Source/UrlMethod.php +++ b/app/code/Magento/Paypal/Model/System/Config/Source/UrlMethod.php @@ -28,7 +28,7 @@ /** * Source model for url method: GET/POST */ -class UrlMethod implements \Magento\Option\ArrayInterface +class UrlMethod implements \Magento\Framework\Option\ArrayInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Paypal/etc/adminhtml/acl.xml b/app/code/Magento/Paypal/etc/adminhtml/acl.xml index 885c49e25d667..140c8b0093ee9 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/acl.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Paypal/etc/adminhtml/di.xml b/app/code/Magento/Paypal/etc/adminhtml/di.xml index 3c1ce12060fe6..decb22ebd79a4 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/di.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/di.xml @@ -23,30 +23,30 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + paypal - + Magento\Paypal\Model\Session\Storage adminhtml - + paypal_payflow - + Magento\Paypal\Model\PayflowSession\Storage adminhtml - + adminhtml diff --git a/app/code/Magento/Paypal/etc/adminhtml/events.xml b/app/code/Magento/Paypal/etc/adminhtml/events.xml index 801cdf126afff..d6e900bc1b444 100644 --- a/app/code/Magento/Paypal/etc/adminhtml/events.xml +++ b/app/code/Magento/Paypal/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Paypal/etc/di.xml b/app/code/Magento/Paypal/etc/di.xml index 1ea204b703fe7..10f2a2797b129 100644 --- a/app/code/Magento/Paypal/etc/di.xml +++ b/app/code/Magento/Paypal/etc/di.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + Magento\Sales\Model\Resource\Setup diff --git a/app/code/Magento/Paypal/etc/events.xml b/app/code/Magento/Paypal/etc/events.xml index da48e6e061acf..c3dfcc10998b0 100644 --- a/app/code/Magento/Paypal/etc/events.xml +++ b/app/code/Magento/Paypal/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Paypal/etc/frontend/di.xml b/app/code/Magento/Paypal/etc/frontend/di.xml index 9763308e29810..2a04f7376b6c0 100644 --- a/app/code/Magento/Paypal/etc/frontend/di.xml +++ b/app/code/Magento/Paypal/etc/frontend/di.xml @@ -23,30 +23,30 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + paypal - + Magento\Paypal\Model\Session\Storage frontend - + paypal_payflow - + Magento\Paypal\Model\PayflowSession\Storage frontend - + frontend diff --git a/app/code/Magento/Paypal/etc/frontend/events.xml b/app/code/Magento/Paypal/etc/frontend/events.xml index 82c33eae78291..027e377892ed7 100644 --- a/app/code/Magento/Paypal/etc/frontend/events.xml +++ b/app/code/Magento/Paypal/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Paypal/etc/module.xml b/app/code/Magento/Paypal/etc/module.xml index 8814ec3b40ef0..7b144b0e26a10 100644 --- a/app/code/Magento/Paypal/etc/module.xml +++ b/app/code/Magento/Paypal/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php b/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php index c0fa9948c72d6..9fda12f4553ae 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/install-1.6.0.0.php @@ -39,55 +39,55 @@ $installer->getTable('paypal_billing_agreement') )->addColumn( 'agreement_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Agreement Id' )->addColumn( 'customer_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false), 'Customer Id' )->addColumn( 'method_code', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 32, array('nullable' => false), 'Method Code' )->addColumn( 'reference_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 32, array('nullable' => false), 'Reference Id' )->addColumn( 'status', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 20, array('nullable' => false), 'Status' )->addColumn( 'created_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array('nullable' => false), 'Created At' )->addColumn( 'updated_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Updated At' )->addColumn( 'store_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true), 'Store Id' )->addColumn( 'agreement_label', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Agreement Label' @@ -102,15 +102,15 @@ 'customer_id', $installer->getTable('customer_entity'), 'entity_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('paypal_billing_agreement', 'store_id', 'store', 'store_id'), 'store_id', $installer->getTable('store'), 'store_id', - \Magento\DB\Ddl\Table::ACTION_SET_NULL, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_SET_NULL, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Sales Billing Agreement' ); @@ -123,13 +123,13 @@ $installer->getTable('paypal_billing_agreement_order') )->addColumn( 'agreement_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'primary' => true), 'Agreement Id' )->addColumn( 'order_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'primary' => true), 'Order Id' @@ -146,15 +146,15 @@ 'agreement_id', $installer->getTable('paypal_billing_agreement'), 'agreement_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('paypal_billing_agreement_order', 'order_id', 'sales_flat_order', 'entity_id'), 'order_id', $installer->getTable('sales_flat_order'), 'entity_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Sales Billing Agreement Order' ); @@ -167,31 +167,31 @@ $installer->getTable('paypal_settlement_report') )->addColumn( 'report_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Report Id' )->addColumn( 'report_date', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Report Date' )->addColumn( 'account_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 64, array(), 'Account Id' )->addColumn( 'filename', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 24, array(), 'Filename' )->addColumn( 'last_modified', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Last Modified' @@ -199,10 +199,10 @@ $installer->getIdxName( 'paypal_settlement_report', array('report_date', 'account_id'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('report_date', 'account_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->setComment( 'Paypal Settlement Report Table' ); @@ -215,103 +215,103 @@ $installer->getTable('paypal_settlement_report_row') )->addColumn( 'row_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Row Id' )->addColumn( 'report_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false), 'Report Id' )->addColumn( 'transaction_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 19, array(), 'Transaction Id' )->addColumn( 'invoice_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 127, array(), 'Invoice Id' )->addColumn( 'paypal_reference_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 19, array(), 'Paypal Reference Id' )->addColumn( 'paypal_reference_id_type', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 3, array(), 'Paypal Reference Id Type' )->addColumn( 'transaction_event_code', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 5, array(), 'Transaction Event Code' )->addColumn( 'transaction_initiation_date', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Transaction Initiation Date' )->addColumn( 'transaction_completion_date', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Transaction Completion Date' )->addColumn( 'transaction_debit_or_credit', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 2, array('nullable' => false, 'default' => 'CR'), 'Transaction Debit Or Credit' )->addColumn( 'gross_transaction_amount', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '20,6', array('nullable' => false, 'default' => '0.000000'), 'Gross Transaction Amount' )->addColumn( 'gross_transaction_currency', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 3, array('default' => ''), 'Gross Transaction Currency' )->addColumn( 'fee_debit_or_credit', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 2, array(), 'Fee Debit Or Credit' )->addColumn( 'fee_amount', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '20,6', array('nullable' => false, 'default' => '0.000000'), 'Fee Amount' )->addColumn( 'fee_currency', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 3, array(), 'Fee Currency' )->addColumn( 'custom_field', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Custom Field' )->addColumn( 'consumer_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 127, array(), 'Consumer Id' @@ -323,8 +323,8 @@ 'report_id', $installer->getTable('paypal_settlement_report'), 'report_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Paypal Settlement Report Row Table' ); @@ -337,25 +337,25 @@ $installer->getTable('paypal_cert') )->addColumn( 'cert_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Cert Id' )->addColumn( 'website_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Website Id' )->addColumn( 'content', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64K', array(), 'Content' )->addColumn( 'updated_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Updated At' @@ -367,8 +367,8 @@ 'website_id', $installer->getTable('store_website'), 'website_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Paypal Certificate Table' ); diff --git a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php index 03706c5e72ec6..f668ff601b20e 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.0-1.6.0.1.php @@ -34,25 +34,25 @@ $installer->getTable('paypal_payment_transaction') )->addColumn( 'transaction_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Entity Id' )->addColumn( 'txn_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 100, array(), 'Txn Id' )->addColumn( 'additional_information', - \Magento\DB\Ddl\Table::TYPE_BLOB, + \Magento\Framework\DB\Ddl\Table::TYPE_BLOB, '64K', array(), 'Additional Information' )->addColumn( 'created_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Created At' @@ -60,10 +60,10 @@ $installer->getIdxName( 'paypal_payment_transaction', array('txn_id'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('txn_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->setComment( 'PayPal Payflow Link Payment Transaction' ); diff --git a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php index 8ea2b8567ab5d..882da104ad62b 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -30,5 +30,5 @@ $installer->getConnection()->addColumn( $installer->getTable('paypal_settlement_report_row'), 'payment_tracking_id', - array('type' => \Magento\DB\Ddl\Table::TYPE_TEXT, 'comment' => 'Payment Tracking ID', 'length' => '255') + array('type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'comment' => 'Payment Tracking ID', 'length' => '255') ); diff --git a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.2-1.6.0.3.php b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.2-1.6.0.3.php index 4f5e26d0319b3..742e8d17d02d8 100644 --- a/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.2-1.6.0.3.php +++ b/app/code/Magento/Paypal/sql/paypal_setup/upgrade-1.6.0.2-1.6.0.3.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $this \Magento\Module\Setup */ +/** @var $this \Magento\Framework\Module\Setup */ $installer = $this; $connection = $installer->getConnection(); $installer->startSetup(); diff --git a/app/code/Magento/Paypal/view/frontend/layout/checkout_onepage_index.xml b/app/code/Magento/Paypal/view/frontend/layout/checkout_onepage_index.xml index 171811bc92d7b..19cd84f498be1 100644 --- a/app/code/Magento/Paypal/view/frontend/layout/checkout_onepage_index.xml +++ b/app/code/Magento/Paypal/view/frontend/layout/checkout_onepage_index.xml @@ -25,6 +25,6 @@ --> - + diff --git a/app/code/Magento/Paypal/view/frontend/layout/customer_account.xml b/app/code/Magento/Paypal/view/frontend/layout/customer_account.xml index a5e3bcbaf91e0..27210bb96e418 100644 --- a/app/code/Magento/Paypal/view/frontend/layout/customer_account.xml +++ b/app/code/Magento/Paypal/view/frontend/layout/customer_account.xml @@ -30,7 +30,7 @@ - + paypal/billing_agreement Billing Agreements diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml index e693cca0133e8..6986d991ad70a 100644 --- a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml +++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review.xml @@ -40,13 +40,11 @@ as="shipping_method" template="express/review/shipping/method.phtml"/> - + - - + diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml index 5e4d006832313..b42617064a440 100644 --- a/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml +++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_express_review_details.xml @@ -26,7 +26,7 @@ - + diff --git a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowexpress_review.xml b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowexpress_review.xml index 80042c4558ce8..d307d447492d7 100644 --- a/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowexpress_review.xml +++ b/app/code/Magento/Paypal/view/frontend/layout/paypal_payflowexpress_review.xml @@ -38,12 +38,10 @@ - + - diff --git a/app/code/Magento/Persistent/Block/Form/Remember.php b/app/code/Magento/Persistent/Block/Form/Remember.php index 65f4a15ab21c7..f148bcbf17d58 100644 --- a/app/code/Magento/Persistent/Block/Form/Remember.php +++ b/app/code/Magento/Persistent/Block/Form/Remember.php @@ -32,7 +32,7 @@ * @package Magento_Persistent * @author Magento Core Team */ -class Remember extends \Magento\View\Element\Template +class Remember extends \Magento\Framework\View\Element\Template { /** * Persistent data @@ -42,20 +42,20 @@ class Remember extends \Magento\View\Element\Template protected $_persistentData = null; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Persistent\Helper\Data $persistentData - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Persistent\Helper\Data $persistentData, - \Magento\Math\Random $mathRandom, + \Magento\Framework\Math\Random $mathRandom, array $data = array() ) { $this->_persistentData = $persistentData; diff --git a/app/code/Magento/Persistent/Block/Header/Additional.php b/app/code/Magento/Persistent/Block/Header/Additional.php index 399036ded93a0..708e78f254615 100644 --- a/app/code/Magento/Persistent/Block/Header/Additional.php +++ b/app/code/Magento/Persistent/Block/Header/Additional.php @@ -25,6 +25,8 @@ */ namespace Magento\Persistent\Block\Header; +use Magento\Customer\Service\V1\CustomerAccountServiceInterface; + /** * Remember Me block * @@ -32,26 +34,40 @@ * @package Magento_Persistent * @author Magento Core Team */ -class Additional extends \Magento\View\Element\Html\Link +class Additional extends \Magento\Framework\View\Element\Html\Link { /** - * Persistent session - * + * @var \Magento\Customer\Helper\View + */ + protected $_customerViewHelper; + + /** * @var \Magento\Persistent\Helper\Session */ - protected $_persistentSession = null; + protected $_persistentSessionHelper; /** - * @param \Magento\View\Element\Template\Context $context - * @param \Magento\Persistent\Helper\Session $persistentSession + * @var CustomerAccountServiceInterface + */ + protected $_customerAccountService; + + /** + * @param \Magento\Framework\View\Element\Template\Context $context + * @param \Magento\Customer\Helper\View $customerViewHelper + * @param \Magento\Persistent\Helper\Session $persistentSessionHelper + * @param CustomerAccountServiceInterface $customerAccountService * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, - \Magento\Persistent\Helper\Session $persistentSession, + \Magento\Framework\View\Element\Template\Context $context, + \Magento\Customer\Helper\View $customerViewHelper, + \Magento\Persistent\Helper\Session $persistentSessionHelper, + CustomerAccountServiceInterface $customerAccountService, array $data = array() ) { - $this->_persistentSession = $persistentSession; + $this->_customerViewHelper = $customerViewHelper; + $this->_persistentSessionHelper = $persistentSessionHelper; + $this->_customerAccountService = $customerAccountService; parent::__construct($context, $data); $this->_isScopePrivate = true; } @@ -73,8 +89,14 @@ public function getHref() */ protected function _toHtml() { - $text = __('(Not %1?)', $this->escapeHtml($this->_persistentSession->getCustomer()->getName())); - - return 'getLinkAttributes() . ' >' . $this->escapeHtml($text) . ''; + $persistentName = $this->_escaper->escapeHtml( + $this->_customerViewHelper->getCustomerName( + $this->_customerAccountService->getCustomer( + $this->_persistentSessionHelper->getSession()->getCustomerId() + ) + ) + ); + return 'getLinkAttributes() . ' >' . $this->escapeHtml(__('(Not %1?)', $persistentName)) + . ''; } } diff --git a/app/code/Magento/Persistent/Helper/Data.php b/app/code/Magento/Persistent/Helper/Data.php index 9c0ea4cf58d8f..c14bf21c77b8f 100644 --- a/app/code/Magento/Persistent/Helper/Data.php +++ b/app/code/Magento/Persistent/Helper/Data.php @@ -29,6 +29,8 @@ */ namespace Magento\Persistent\Helper; +use Magento\Store\Model\ScopeInterface; + class Data extends \Magento\Core\Helper\Data { const XML_PATH_ENABLED = 'persistent/options/enabled'; @@ -51,19 +53,12 @@ class Data extends \Magento\Core\Helper\Data protected $_configFileName = 'persistent.xml'; /** - * Persistent session - * - * @var Session - */ - protected $_persistentSession; - - /** - * @var \Magento\Escaper + * @var \Magento\Framework\Escaper */ protected $_escaper; /** - * @var \Magento\Module\Dir\Reader + * @var \Magento\Framework\Module\Dir\Reader */ protected $_modulesReader; @@ -72,10 +67,9 @@ class Data extends \Magento\Core\Helper\Data * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\State $appState - * @param \Magento\Pricing\PriceCurrencyInterface $priceCurrency - * @param Session $persistentSession - * @param \Magento\Module\Dir\Reader $modulesReader - * @param \Magento\Escaper $escaper + * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency + * @param \Magento\Framework\Module\Dir\Reader $modulesReader + * @param \Magento\Framework\Escaper $escaper * @param bool $dbCompatibleMode */ public function __construct( @@ -83,14 +77,12 @@ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\State $appState, - \Magento\Pricing\PriceCurrencyInterface $priceCurrency, - Session $persistentSession, - \Magento\Module\Dir\Reader $modulesReader, - \Magento\Escaper $escaper, + \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, + \Magento\Framework\Module\Dir\Reader $modulesReader, + \Magento\Framework\Escaper $escaper, $dbCompatibleMode = true ) { $this->_modulesReader = $modulesReader; - $this->_persistentSession = $persistentSession; $this->_escaper = $escaper; parent::__construct( @@ -113,7 +105,7 @@ public function isEnabled($store = null) { return $this->_scopeConfig->isSetFlag( self::XML_PATH_ENABLED, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $store ); } @@ -128,7 +120,7 @@ public function isRememberMeEnabled($store = null) { return $this->_scopeConfig->isSetFlag( self::XML_PATH_REMEMBER_ME_ENABLED, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $store ); } @@ -143,7 +135,7 @@ public function isRememberMeCheckedDefault($store = null) { return $this->_scopeConfig->isSetFlag( self::XML_PATH_REMEMBER_ME_DEFAULT, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $store ); } @@ -158,7 +150,7 @@ public function isShoppingCartPersist($store = null) { return $this->_scopeConfig->isSetFlag( self::XML_PATH_PERSIST_SHOPPING_CART, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $store ); } @@ -174,7 +166,7 @@ public function getLifeTime($store = null) $lifeTime = intval( $this->_scopeConfig->getValue( self::XML_PATH_LIFE_TIME, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + ScopeInterface::SCOPE_STORE, $store ) ); @@ -190,7 +182,7 @@ public function getClearOnLogout() { return $this->_scopeConfig->isSetFlag( self::XML_PATH_LOGOUT_CLEAR, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ScopeInterface::SCOPE_STORE ); } @@ -204,16 +196,6 @@ public function getUnsetCookieUrl() return $this->_getUrl('persistent/index/unsetCookie'); } - /** - * Retrieve name of persistent customer - * - * @return string - */ - public function getPersistentName() - { - return __('(Not %1?)', $this->_escaper->escapeHtml($this->_persistentSession->getCustomer()->getName())); - } - /** * Retrieve path for config file * @@ -227,7 +209,7 @@ public function getPersistentConfigFilePath() /** * Check whether specified action should be processed * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return bool */ public function canProcess($observer) diff --git a/app/code/Magento/Persistent/Helper/Session.php b/app/code/Magento/Persistent/Helper/Session.php index 53f179ddb311a..731775a7a4a56 100644 --- a/app/code/Magento/Persistent/Helper/Session.php +++ b/app/code/Magento/Persistent/Helper/Session.php @@ -37,13 +37,6 @@ class Session extends \Magento\Core\Helper\Data */ protected $_sessionModel; - /** - * Persistent customer - * - * @var null|\Magento\Customer\Model\Customer - */ - protected $_customer; - /** * Is "Remember Me" checked * @@ -65,13 +58,6 @@ class Session extends \Magento\Core\Helper\Data */ protected $_sessionFactory; - /** - * Customer factory - * - * @var \Magento\Customer\Model\CustomerFactory - */ - protected $_customerFactory; - /** * Checkout session * @@ -84,10 +70,9 @@ class Session extends \Magento\Core\Helper\Data * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\State $appState - * @param \Magento\Pricing\PriceCurrencyInterface $priceCurrency + * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency * @param Data $persistentData * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Persistent\Model\SessionFactory $sessionFactory * @param bool $dbCompatibleMode */ @@ -96,17 +81,16 @@ public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\State $appState, - \Magento\Pricing\PriceCurrencyInterface $priceCurrency, + \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, \Magento\Persistent\Helper\Data $persistentData, \Magento\Checkout\Model\Session $checkoutSession, - \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Persistent\Model\SessionFactory $sessionFactory, $dbCompatibleMode = true ) { $this->_persistentData = $persistentData; $this->_checkoutSession = $checkoutSession; - $this->_customerFactory = $customerFactory; $this->_sessionFactory = $sessionFactory; + parent::__construct( $context, $scopeConfig, @@ -187,18 +171,4 @@ public function setRememberMeChecked($checked = true) { $this->_isRememberMeChecked = $checked; } - - /** - * Return persistent customer - * - * @return \Magento\Customer\Model\Customer|bool - */ - public function getCustomer() - { - if (is_null($this->_customer)) { - $customerId = $this->getSession()->getCustomerId(); - $this->_customer = $this->_customerFactory->create()->load($customerId); - } - return $this->_customer; - } } diff --git a/app/code/Magento/Persistent/Model/Factory.php b/app/code/Magento/Persistent/Model/Factory.php index eb59f958eda1b..b71cab63623a2 100644 --- a/app/code/Magento/Persistent/Model/Factory.php +++ b/app/code/Magento/Persistent/Model/Factory.php @@ -31,16 +31,16 @@ class Factory /** * Object manager * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** * Construct * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Persistent/Model/Observer.php b/app/code/Magento/Persistent/Model/Observer.php index cde2d71af627b..d9b141ff98440 100644 --- a/app/code/Magento/Persistent/Model/Observer.php +++ b/app/code/Magento/Persistent/Model/Observer.php @@ -25,8 +25,6 @@ */ namespace Magento\Persistent\Model; -use Magento\Customer\Model\Converter as CustomerConverter; - /** * Persistent Observer * @@ -58,14 +56,14 @@ class Observer /** * Core event manager proxy * - * @var \Magento\Event\ManagerInterface + * @var \Magento\Framework\Event\ManagerInterface */ protected $_eventManager = null; /** * Layout model * - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -83,13 +81,6 @@ class Observer */ protected $_persistentConfigFactory; - /** - * Customer factory - * - * @var \Magento\Customer\Model\CustomerFactory - */ - protected $_customerFactory; - /** * Quote factory * @@ -107,17 +98,10 @@ class Observer /** * Url model * - * @var \Magento\UrlInterface + * @var \Magento\Framework\UrlInterface */ protected $_url; - /** - * Customer session - * - * @var \Magento\Customer\Model\Session - */ - protected $_customerSession; - /** * Checkout session * @@ -133,12 +117,12 @@ class Observer protected $_websiteCollectionFactory; /** - * @var \Magento\Escaper + * @var \Magento\Framework\Escaper */ protected $_escaper; /** - * @var \Magento\Message\ManagerInterface + * @var \Magento\Framework\Message\ManagerInterface */ protected $messageManager; @@ -148,51 +132,60 @@ class Observer protected $_expressRedirectHelper; /** - * @var CustomerConverter + * Customer view helper + * + * @var \Magento\Customer\Helper\View + */ + protected $_customerViewHelper; + + /** + * Customer account service + * + * @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface */ - protected $customerConverter; + protected $_customerAccountService; /** * Construct * - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Persistent\Helper\Session $persistentSession * @param \Magento\Persistent\Helper\Data $persistentData * @param \Magento\Store\Model\Resource\Website\CollectionFactory $websiteCollectionFactory * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\UrlInterface $url + * @param \Magento\Framework\UrlInterface $url * @param \Magento\Persistent\Model\SessionFactory $sessionFactory * @param \Magento\Sales\Model\QuoteFactory $quoteFactory - * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param \Magento\Persistent\Model\Persistent\ConfigFactory $persistentConfigFactory * @param \Magento\Framework\App\RequestInterface $requestHttp - * @param \Magento\View\LayoutInterface $layout - * @param \Magento\Escaper $escaper - * @param \Magento\Message\ManagerInterface $messageManager + * @param \Magento\Framework\View\LayoutInterface $layout + * @param \Magento\Framework\Escaper $escaper + * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Checkout\Helper\ExpressRedirect $expressRedirectHelper - * @param CustomerConverter $customerConverter + * @param \Magento\Customer\Helper\View $customerViewHelper + * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Persistent\Helper\Session $persistentSession, \Magento\Persistent\Helper\Data $persistentData, \Magento\Store\Model\Resource\Website\CollectionFactory $websiteCollectionFactory, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, - \Magento\UrlInterface $url, + \Magento\Framework\UrlInterface $url, \Magento\Persistent\Model\SessionFactory $sessionFactory, \Magento\Sales\Model\QuoteFactory $quoteFactory, - \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Persistent\Model\Persistent\ConfigFactory $persistentConfigFactory, \Magento\Framework\App\RequestInterface $requestHttp, - \Magento\View\LayoutInterface $layout, - \Magento\Escaper $escaper, - \Magento\Message\ManagerInterface $messageManager, + \Magento\Framework\View\LayoutInterface $layout, + \Magento\Framework\Escaper $escaper, + \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Checkout\Helper\ExpressRedirect $expressRedirectHelper, - CustomerConverter $customerConverter + \Magento\Customer\Helper\View $customerViewHelper, + \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService ) { $this->_eventManager = $eventManager; $this->_persistentSession = $persistentSession; @@ -203,20 +196,20 @@ public function __construct( $this->_url = $url; $this->_sessionFactory = $sessionFactory; $this->_quoteFactory = $quoteFactory; - $this->_customerFactory = $customerFactory; $this->_persistentConfigFactory = $persistentConfigFactory; $this->_requestHttp = $requestHttp; $this->_layout = $layout; $this->_escaper = $escaper; $this->messageManager = $messageManager; $this->_expressRedirectHelper = $expressRedirectHelper; - $this->customerConverter = $customerConverter; + $this->_customerViewHelper = $customerViewHelper; + $this->_customerAccountService = $customerAccountService; } /** * Apply persistent data * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ public function applyPersistentData($observer) @@ -236,7 +229,7 @@ public function applyPersistentData($observer) /** * Apply persistent data to specific block * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ public function applyBlockPersistentData($observer) @@ -245,7 +238,7 @@ public function applyBlockPersistentData($observer) return $this; } - /** @var $block \Magento\View\Element\AbstractBlock */ + /** @var $block \Magento\Framework\View\Element\AbstractBlock */ $block = $observer->getEvent()->getBlock(); if (!$block) { @@ -271,20 +264,19 @@ public function applyBlockPersistentData($observer) /** * Emulate 'welcome' block with persistent data * - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block * @return $this */ public function emulateWelcomeBlock($block) { - $escapedName = $this->_escaper->escapeHtml($this->_getPersistentCustomer()->getName(), null); + $escapedName = $this->_escaper->escapeHtml( + $this->_customerViewHelper->getCustomerName($this->_getPersistentCustomer()), + null + ); $this->_applyAccountLinksPersistentData(); - $welcomeMessage = __( - 'Welcome, %1!', - $escapedName - ) . ' ' . $this->_layout->getBlock( - 'header.additional' - )->toHtml(); + $welcomeMessage = __('Welcome, %1!', $escapedName) + . ' ' . $this->_layout->getBlock('header.additional')->toHtml(); $block->setWelcome($welcomeMessage); return $this; } @@ -304,7 +296,7 @@ protected function _applyAccountLinksPersistentData() /** * Emulate 'top links' block with persistent data * - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block * @return void */ public function emulateTopLinks($block) @@ -316,16 +308,16 @@ public function emulateTopLinks($block) /** * Emulate quote by persistent data * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function emulateQuote($observer) { $stopActions = array('persistent_index_saveMethod', 'customer_account_createpost'); - if (!$this->_persistentData->canProcess( - $observer - ) || !$this->_persistentSession->isPersistent() || $this->_customerSession->isLoggedIn() + if (!$this->_persistentData->canProcess($observer) + || !$this->_persistentSession->isPersistent() + || $this->_customerSession->isLoggedIn() ) { return; } @@ -337,9 +329,7 @@ public function emulateQuote($observer) } if ($this->_isShoppingCartPersist()) { - $this->_checkoutSession->setCustomerData( - $this->customerConverter->createCustomerFromModel($this->_getPersistentCustomer()) - ); + $this->_checkoutSession->setCustomerData($this->_getPersistentCustomer()); if (!$this->_checkoutSession->hasQuote()) { $this->_checkoutSession->getQuote(); } @@ -349,7 +339,7 @@ public function emulateQuote($observer) /** * Set persistent data into quote * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function setQuotePersistentData($observer) @@ -373,7 +363,7 @@ public function setQuotePersistentData($observer) /** * Set quote to be loaded even if not active * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function setLoadPersistentQuote($observer) @@ -390,7 +380,7 @@ public function setLoadPersistentQuote($observer) /** * Prevent clear checkout session * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function preventClearCheckoutSession($observer) @@ -405,7 +395,7 @@ public function preventClearCheckoutSession($observer) /** * Make persistent quote to be guest * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function makePersistentQuoteGuest($observer) @@ -420,7 +410,7 @@ public function makePersistentQuoteGuest($observer) /** * Check if checkout session should NOT be cleared * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return bool|\Magento\Persistent\Controller\Index */ protected function _checkClearCheckoutSessionNecessity($observer) @@ -441,7 +431,7 @@ protected function _checkClearCheckoutSessionNecessity($observer) /** * Reset session data when customer re-authenticates * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function customerAuthenticatedEvent($observer) @@ -459,7 +449,7 @@ public function customerAuthenticatedEvent($observer) /** * Unset persistent cookie and make customer's quote as a guest * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function removePersistentCookie($observer) @@ -480,7 +470,7 @@ public function removePersistentCookie($observer) /** * Disable guest checkout if we are in persistent mode * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function disableGuestCheckout($observer) @@ -493,10 +483,10 @@ public function disableGuestCheckout($observer) /** * Prevent express checkout * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function preventExpressCheckout(\Magento\Event\Observer $observer) + public function preventExpressCheckout(\Magento\Framework\Event\Observer $observer) { if (!$this->_isLoggedOut()) { return; @@ -520,11 +510,11 @@ public function preventExpressCheckout(\Magento\Event\Observer $observer) /** * Retrieve persistent customer instance * - * @return \Magento\Customer\Model\Customer + * @return \Magento\Customer\Service\V1\Data\Customer */ protected function _getPersistentCustomer() { - return $this->_customerFactory->create()->load($this->_persistentSession->getSession()->getCustomerId()); + return $this->_customerAccountService->getCustomer($this->_persistentSession->getSession()->getCustomerId()); } /** @@ -610,7 +600,7 @@ public function setQuoteGuest($checkQuote = false) )->setCustomerLastname( null )->setCustomerGroupId( - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID )->setIsPersistent( false )->removeAllAddresses(); @@ -626,10 +616,10 @@ public function setQuoteGuest($checkQuote = false) /** * Check and clear session data if persistent session expired * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function checkExpirePersistentQuote(\Magento\Event\Observer $observer) + public function checkExpirePersistentQuote(\Magento\Framework\Event\Observer $observer) { if (!$this->_persistentData->canProcess($observer)) { return; @@ -661,7 +651,7 @@ protected function _expirePersistentSession() ->setIsActive(true) ->setIsPersistent(false) ->setCustomerId(null) - ->setCustomerGroupId(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID); + ->setCustomerGroupId(\Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID); } } @@ -688,17 +678,17 @@ public function clearExpiredCronJob(\Magento\Cron\Model\Schedule $schedule) /** * Update customer id and customer group id if user is in persistent session * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ - public function updateCustomerCookies(\Magento\Event\Observer $observer) + public function updateCustomerCookies(\Magento\Framework\Event\Observer $observer) { if (!$this->_isPersistent()) { return; } $customerCookies = $observer->getEvent()->getCustomerCookies(); - if ($customerCookies instanceof \Magento\Object) { + if ($customerCookies instanceof \Magento\Framework\Object) { $persistentCustomer = $this->_getPersistentCustomer(); $customerCookies->setCustomerId($persistentCustomer->getId()); $customerCookies->setCustomerGroupId($persistentCustomer->getGroupId()); @@ -708,7 +698,7 @@ public function updateCustomerCookies(\Magento\Event\Observer $observer) /** * Set persistent data to customer session * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ public function emulateCustomer($observer) @@ -718,9 +708,7 @@ public function emulateCustomer($observer) } if ($this->_isLoggedOut()) { - /** @var $customer \Magento\Customer\Model\Customer */ - $customer = $this->_customerFactory->create(); - $customer->load($this->_persistentSession->getSession()->getCustomerId()); + $customer = $this->_getPersistentCustomer(); $this->_customerSession->setCustomerId($customer->getId())->setCustomerGroupId($customer->getGroupId()); } return $this; diff --git a/app/code/Magento/Persistent/Model/Observer/Session.php b/app/code/Magento/Persistent/Model/Observer/Session.php index 05009b094a84e..cb33cd8e2aac1 100644 --- a/app/code/Magento/Persistent/Model/Observer/Session.php +++ b/app/code/Magento/Persistent/Model/Observer/Session.php @@ -25,7 +25,7 @@ */ namespace Magento\Persistent\Model\Observer; -use Magento\Event\Observer; +use Magento\Framework\Event\Observer; /** * Persistent Session Observer @@ -56,7 +56,7 @@ class Session /** * Cookie model * - * @var \Magento\Stdlib\Cookie + * @var \Magento\Framework\Stdlib\Cookie */ protected $_cookie; @@ -81,7 +81,7 @@ class Session * @param \Magento\Persistent\Helper\Session $persistentSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Stdlib\Cookie $cookie + * @param \Magento\Framework\Stdlib\Cookie $cookie * @param \Magento\Persistent\Model\SessionFactory $sessionFactory */ public function __construct( @@ -89,7 +89,7 @@ public function __construct( \Magento\Persistent\Helper\Session $persistentSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, - \Magento\Stdlib\Cookie $cookie, + \Magento\Framework\Stdlib\Cookie $cookie, \Magento\Persistent\Model\SessionFactory $sessionFactory ) { $this->_persistentData = $persistentData; @@ -106,7 +106,7 @@ public function __construct( */ public function synchronizePersistentOnLogin(Observer $observer) { - /** @var $customer \Magento\Customer\Model\Customer */ + /** @var $customer \Magento\Customer\Service\V1\Data\Customer */ $customer = $observer->getEvent()->getCustomer(); // Check if customer is valid (remove persistent cookie for invalid customer) if (!$customer || !$customer->getId() || !$this->_persistentSession->isRememberMeChecked()) { @@ -152,6 +152,7 @@ public function synchronizePersistentOnLogin(Observer $observer) /** * Unload persistent session (if set in config) * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @param Observer $observer * @return void */ @@ -161,13 +162,6 @@ public function synchronizePersistentOnLogout(Observer $observer) return; } - /** @var $customer \Magento\Customer\Model\Customer */ - $customer = $observer->getEvent()->getCustomer(); - // Check if customer is valid - if (!$customer || !$customer->getId()) { - return; - } - $this->_sessionFactory->create()->removePersistentCookie(); // Unset persistent session diff --git a/app/code/Magento/Persistent/Model/Persistent/Config.php b/app/code/Magento/Persistent/Model/Persistent/Config.php index 1a7b4153feacc..43207d6ecf14e 100644 --- a/app/code/Magento/Persistent/Model/Persistent/Config.php +++ b/app/code/Magento/Persistent/Model/Persistent/Config.php @@ -38,12 +38,12 @@ class Config protected $_configFilePath; /** - * @var \Magento\Config\DomFactory + * @var \Magento\Framework\Config\DomFactory */ protected $_domFactory; /** - * @var \Magento\Module\Dir\Reader + * @var \Magento\Framework\Module\Dir\Reader */ protected $_moduleReader; @@ -55,7 +55,7 @@ class Config /** * Layout model * - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -76,22 +76,22 @@ class Config /** * Filesystem * - * @var \Magento\Filesystem\Directory\Read; + * @var \Magento\Framework\Filesystem\Directory\Read; */ protected $_modulesDirectory; /** - * @param \Magento\Config\DomFactory $domFactory - * @param \Magento\Module\Dir\Reader $moduleReader - * @param \Magento\View\LayoutInterface $layout + * @param \Magento\Framework\Config\DomFactory $domFactory + * @param \Magento\Framework\Module\Dir\Reader $moduleReader + * @param \Magento\Framework\View\LayoutInterface $layout * @param \Magento\Framework\App\State $appState * @param \Magento\Persistent\Model\Factory $persistentFactory * @param \Magento\Framework\App\Filesystem $filesystem */ public function __construct( - \Magento\Config\DomFactory $domFactory, - \Magento\Module\Dir\Reader $moduleReader, - \Magento\View\LayoutInterface $layout, + \Magento\Framework\Config\DomFactory $domFactory, + \Magento\Framework\Module\Dir\Reader $moduleReader, + \Magento\Framework\View\LayoutInterface $layout, \Magento\Framework\App\State $appState, \Magento\Persistent\Model\Factory $persistentFactory, \Magento\Framework\App\Filesystem $filesystem @@ -120,7 +120,7 @@ public function setConfigFilePath($path) * Get persistent XML config xpath * * @return \DOMXPath - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _getConfigDomXPath() { @@ -129,12 +129,12 @@ protected function _getConfigDomXPath() $isFile = $this->_modulesDirectory->isFile($filePath); $isReadable = $this->_modulesDirectory->isReadable($filePath); if (!$isFile || !$isReadable) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('We cannot load the configuration from file %1.', $this->_configFilePath) ); } $xml = $this->_modulesDirectory->readFile($filePath); - /** @var \Magento\Config\Dom $configDom */ + /** @var \Magento\Framework\Config\Dom $configDom */ $configDom = $this->_domFactory->createDom( array( 'xml' => $xml, @@ -230,7 +230,7 @@ public function fire() * @param array $info * @param bool $instance * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function fireOne($info, $instance = false) { @@ -250,7 +250,7 @@ public function fireOne($info, $instance = false) if (method_exists($object, $method)) { $object->{$method}($instance); } elseif ($this->_appState->getMode() == \Magento\Framework\App\State::MODE_DEVELOPER) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( 'Method "' . $method . '" is not defined in "' . get_class($object) . '"' ); } diff --git a/app/code/Magento/Persistent/Model/Resource/Session.php b/app/code/Magento/Persistent/Model/Resource/Session.php index 542e2cb415c44..aff5a278f4f95 100644 --- a/app/code/Magento/Persistent/Model/Resource/Session.php +++ b/app/code/Magento/Persistent/Model/Resource/Session.php @@ -28,7 +28,7 @@ /** * Persistent Session Resource Model */ -class Session extends \Magento\Model\Resource\Db\AbstractDb +class Session extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Use is object new method for object saving diff --git a/app/code/Magento/Persistent/Model/Session.php b/app/code/Magento/Persistent/Model/Session.php index ba901e632c49d..cff01abbc705b 100644 --- a/app/code/Magento/Persistent/Model/Session.php +++ b/app/code/Magento/Persistent/Model/Session.php @@ -27,8 +27,10 @@ /** * Persistent Session Model + * + * @method int getCustomerId() */ -class Session extends \Magento\Model\AbstractModel +class Session extends \Magento\Framework\Model\AbstractModel { /** * Persistent cookie key length @@ -90,48 +92,48 @@ class Session extends \Magento\Model\AbstractModel /** * Cookie model * - * @var \Magento\Stdlib\Cookie + * @var \Magento\Framework\Stdlib\Cookie */ protected $_cookie; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** - * @var \Magento\Session\Config\ConfigInterface + * @var \Magento\Framework\Session\Config\ConfigInterface */ protected $sessionConfig; /** * Construct * - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Core\Helper\Data $coreData * @param \Magento\Persistent\Helper\Data $persistentData - * @param \Magento\Stdlib\Cookie $cookie + * @param \Magento\Framework\Stdlib\Cookie $cookie * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Math\Random $mathRandom - * @param \Magento\Session\Config\ConfigInterface $sessionConfig - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Math\Random $mathRandom + * @param \Magento\Framework\Session\Config\ConfigInterface $sessionConfig + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Core\Helper\Data $coreData, \Magento\Persistent\Helper\Data $persistentData, - \Magento\Stdlib\Cookie $cookie, + \Magento\Framework\Stdlib\Cookie $cookie, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Math\Random $mathRandom, - \Magento\Session\Config\ConfigInterface $sessionConfig, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Math\Random $mathRandom, + \Magento\Framework\Session\Config\ConfigInterface $sessionConfig, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_coreData = $coreData; diff --git a/app/code/Magento/Persistent/etc/adminhtml/acl.xml b/app/code/Magento/Persistent/etc/adminhtml/acl.xml index 47575bdb0f413..40517e95737bd 100644 --- a/app/code/Magento/Persistent/etc/adminhtml/acl.xml +++ b/app/code/Magento/Persistent/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Persistent/etc/frontend/di.xml b/app/code/Magento/Persistent/etc/frontend/di.xml index 35db4cc1880a6..8a9b9f62c4eb6 100644 --- a/app/code/Magento/Persistent/etc/frontend/di.xml +++ b/app/code/Magento/Persistent/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Persistent/etc/frontend/events.xml b/app/code/Magento/Persistent/etc/frontend/events.xml index 6082fa9689718..26200acea0687 100644 --- a/app/code/Magento/Persistent/etc/frontend/events.xml +++ b/app/code/Magento/Persistent/etc/frontend/events.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + diff --git a/app/code/Magento/Persistent/etc/module.xml b/app/code/Magento/Persistent/etc/module.xml index a25a692b3d07b..5df3f0d2707d2 100644 --- a/app/code/Magento/Persistent/etc/module.xml +++ b/app/code/Magento/Persistent/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php b/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php index 9cd96f467dd06..4fbf057de5132 100644 --- a/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php +++ b/app/code/Magento/Persistent/sql/persistent_setup/install-1.0.0.0.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -35,48 +35,48 @@ $installer->getTable('persistent_session') )->addColumn( 'persistent_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'primary' => true, 'nullable' => false, 'unsigned' => true), 'Session id' )->addColumn( 'key', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, \Magento\Persistent\Model\Session::KEY_LENGTH, array('nullable' => false), 'Unique cookie key' )->addColumn( 'customer_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true), 'Customer id' )->addColumn( 'website_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Website ID' )->addColumn( 'info', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Session Data' )->addColumn( 'updated_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Updated At' )->addIndex( $installer->getIdxName('persistent_session', array('key')), array('key'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addIndex( $installer->getIdxName('persistent_session', array('customer_id')), array('customer_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addIndex( $installer->getIdxName('persistent_session', array('updated_at')), array('updated_at') @@ -85,13 +85,13 @@ 'customer_id', $installer->getTable('customer_entity'), 'entity_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('persistent_session', 'website_id', 'store_website', 'website_id'), 'website_id', $installer->getTable('store_website'), 'website_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Persistent Session' ); @@ -106,7 +106,7 @@ $installer->getTable('sales_flat_quote'), 'is_persistent', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_SMALLINT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, 'unsigned' => true, 'default' => '0', 'comment' => 'Is Quote Persistent' diff --git a/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml b/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml index 47cd5eed43787..f92cf75ab7997 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/checkout_onepage_index.xml @@ -26,10 +26,10 @@ - + - + diff --git a/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml b/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml index bb4142b03f22a..c1f545e5b1337 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml @@ -26,6 +26,6 @@ - + diff --git a/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml b/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml index bb4142b03f22a..c1f545e5b1337 100644 --- a/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml +++ b/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml @@ -26,6 +26,6 @@ - + diff --git a/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml b/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml index 004523b2696d6..e143906ac1f84 100644 --- a/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml +++ b/app/code/Magento/Persistent/view/frontend/remember_me_tooltip.phtml @@ -29,7 +29,7 @@ * "Remember Me" popup template (when click on "What's this?") * */ -/** @var $this \Magento\View\Element\Template */ +/** @var $this \Magento\Framework\View\Element\Template */ ?> ' . "\n"; } else { - if ($contentType == \Magento\View\Publisher::CONTENT_TYPE_CSS) { + if ($contentType == \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS) { $attributes = ' rel="stylesheet" type="text/css"' . ($attributes ?: ' media="all"'); } $groupTemplate = '' . "\n"; @@ -220,11 +220,11 @@ protected function _renderHtml($template, $assets) { $result = ''; try { - /** @var $asset \Magento\View\Asset\AssetInterface */ + /** @var $asset \Magento\Framework\View\Asset\AssetInterface */ foreach ($assets as $asset) { $result .= sprintf($template, $asset->getUrl()); } - } catch (\Magento\Exception $e) { + } catch (\Magento\Framework\Exception $e) { $this->_logger->logException($e); $result .= sprintf($template, $this->_getNotFoundUrl()); } @@ -432,7 +432,8 @@ protected function _getFaviconFile() \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); $path = $folderName . '/' . $scopeConfig; - $faviconFile = $this->_storeManager->getStore()->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) . $path; + $faviconFile = $this->_storeManager->getStore() + ->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . $path; if (!is_null($scopeConfig) && $this->_isFile($path)) { $url = $faviconFile; diff --git a/app/code/Magento/Theme/Block/Html/Head/AssetBlockInterface.php b/app/code/Magento/Theme/Block/Html/Head/AssetBlockInterface.php index fb305c84c8aaf..e89e67cb5caf4 100644 --- a/app/code/Magento/Theme/Block/Html/Head/AssetBlockInterface.php +++ b/app/code/Magento/Theme/Block/Html/Head/AssetBlockInterface.php @@ -31,7 +31,7 @@ interface AssetBlockInterface /** * Get block asset * - * @return \Magento\View\Asset\AssetInterface + * @return \Magento\Framework\View\Asset\AssetInterface */ public function getAsset(); } diff --git a/app/code/Magento/Theme/Block/Html/Head/Css.php b/app/code/Magento/Theme/Block/Html/Head/Css.php index 265e99746c681..d5d8afeca0ac7 100644 --- a/app/code/Magento/Theme/Block/Html/Head/Css.php +++ b/app/code/Magento/Theme/Block/Html/Head/Css.php @@ -26,23 +26,26 @@ /** * Css page block */ -class Css extends \Magento\View\Element\AbstractBlock implements AssetBlockInterface +class Css extends \Magento\Framework\View\Element\AbstractBlock implements AssetBlockInterface { /** - * @param \Magento\View\Element\Template\Context $context - * @param \Magento\View\Asset\ViewFileFactory $viewFileFactory + * @param \Magento\Framework\View\Element\Template\Context $context + * @param \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, - \Magento\View\Asset\ViewFileFactory $viewFileFactory, + \Magento\Framework\View\Element\Template\Context $context, + \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory, array $data = array() ) { parent::__construct($context, $data); $this->setAsset( $viewFileFactory->create( - array('file' => (string)$this->getFile(), 'contentType' => \Magento\View\Publisher::CONTENT_TYPE_CSS) + array( + 'file' => (string)$this->getFile(), + 'contentType' => \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, + ) ) ); } @@ -50,7 +53,7 @@ public function __construct( /** * Get block asset * - * @return \Magento\View\Asset\AssetInterface + * @return \Magento\Framework\View\Asset\AssetInterface */ public function getAsset() { diff --git a/app/code/Magento/Theme/Block/Html/Head/Link.php b/app/code/Magento/Theme/Block/Html/Head/Link.php index a9e413f42b3e8..18c006675b2dd 100644 --- a/app/code/Magento/Theme/Block/Html/Head/Link.php +++ b/app/code/Magento/Theme/Block/Html/Head/Link.php @@ -26,7 +26,7 @@ /** * Link page block */ -class Link extends \Magento\View\Element\Template implements AssetBlockInterface +class Link extends \Magento\Framework\View\Element\Template implements AssetBlockInterface { /** * Virtual content type @@ -34,13 +34,13 @@ class Link extends \Magento\View\Element\Template implements AssetBlockInterface const VIRTUAL_CONTENT_TYPE = 'link'; /** - * @param \Magento\View\Element\Template\Context $context - * @param \Magento\View\Asset\RemoteFactory $remoteFactory + * @param \Magento\Framework\View\Element\Template\Context $context + * @param \Magento\Framework\View\Asset\RemoteFactory $remoteFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, - \Magento\View\Asset\RemoteFactory $remoteFactory, + \Magento\Framework\View\Element\Template\Context $context, + \Magento\Framework\View\Asset\RemoteFactory $remoteFactory, array $data = array() ) { parent::__construct($context, $data); @@ -54,7 +54,7 @@ public function __construct( /** * Get block asset * - * @return \Magento\View\Asset\AssetInterface + * @return \Magento\Framework\View\Asset\AssetInterface */ public function getAsset() { diff --git a/app/code/Magento/Theme/Block/Html/Head/Script.php b/app/code/Magento/Theme/Block/Html/Head/Script.php index 7334a76bb3a13..16bc1630ee1d8 100644 --- a/app/code/Magento/Theme/Block/Html/Head/Script.php +++ b/app/code/Magento/Theme/Block/Html/Head/Script.php @@ -28,22 +28,25 @@ /** * Script page block */ -class Script extends \Magento\View\Element\AbstractBlock implements AssetBlockInterface +class Script extends \Magento\Framework\View\Element\AbstractBlock implements AssetBlockInterface { /** - * @param \Magento\View\Element\Template\Context $context - * @param \Magento\View\Asset\ViewFileFactory $viewFileFactory + * @param \Magento\Framework\View\Element\Template\Context $context + * @param \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, - \Magento\View\Asset\ViewFileFactory $viewFileFactory, + \Magento\Framework\View\Element\Template\Context $context, + \Magento\Framework\View\Asset\ViewFileFactory $viewFileFactory, array $data = array() ) { parent::__construct($context, $data); $this->setAsset( $viewFileFactory->create( - array('file' => (string)$this->getFile(), 'contentType' => \Magento\View\Publisher::CONTENT_TYPE_JS) + array( + 'file' => (string)$this->getFile(), + 'contentType' => \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, + ) ) ); } @@ -51,7 +54,7 @@ public function __construct( /** * Get block asset * - * @return \Magento\View\Asset\AssetInterface + * @return \Magento\Framework\View\Asset\AssetInterface */ public function getAsset() { diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index 93f7a4c5e888c..d5b9518432588 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -30,7 +30,7 @@ /** * Html page header block */ -class Header extends \Magento\View\Element\Template +class Header extends \Magento\Framework\View\Element\Template { /** * Current template name @@ -60,7 +60,7 @@ class Header extends \Magento\View\Element\Template protected $_customerViewHelper; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Core\Helper\File\Storage\Database $fileStorageHelper * @param \Magento\Framework\App\Http\Context $httpContext @@ -68,7 +68,7 @@ class Header extends \Magento\View\Element\Template * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Core\Helper\File\Storage\Database $fileStorageHelper, \Magento\Framework\App\Http\Context $httpContext, @@ -163,7 +163,8 @@ protected function _getLogoUrl() \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); $path = $folderName . '/' . $storeLogoPath; - $logoUrl = $this->_urlBuilder->getBaseUrl(array('_type' => \Magento\UrlInterface::URL_TYPE_MEDIA)) . $path; + $logoUrl = $this->_urlBuilder + ->getBaseUrl(array('_type' => \Magento\Framework\UrlInterface::URL_TYPE_MEDIA)) . $path; if (!is_null($storeLogoPath) && $this->_isFile($path)) { $url = $logoUrl; diff --git a/app/code/Magento/Theme/Block/Html/Notices.php b/app/code/Magento/Theme/Block/Html/Notices.php index d408ac40262e8..82a2901d0a830 100644 --- a/app/code/Magento/Theme/Block/Html/Notices.php +++ b/app/code/Magento/Theme/Block/Html/Notices.php @@ -26,13 +26,13 @@ /** * Html page notices block */ -class Notices extends \Magento\View\Element\Template +class Notices extends \Magento\Framework\View\Element\Template { /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param array $data */ - public function __construct(\Magento\View\Element\Template\Context $context, array $data = array()) + public function __construct(\Magento\Framework\View\Element\Template\Context $context, array $data = array()) { parent::__construct($context, $data); } diff --git a/app/code/Magento/Theme/Block/Html/Pager.php b/app/code/Magento/Theme/Block/Html/Pager.php index cd657a0a55a77..7d51c37199cc5 100644 --- a/app/code/Magento/Theme/Block/Html/Pager.php +++ b/app/code/Magento/Theme/Block/Html/Pager.php @@ -27,7 +27,7 @@ * Html pager block * @SuppressWarnings(PHPMD.ExcessivePublicCount) */ -class Pager extends \Magento\View\Element\Template +class Pager extends \Magento\Framework\View\Element\Template { /** * Current template name @@ -37,7 +37,7 @@ class Pager extends \Magento\View\Element\Template protected $_template = 'Magento_Theme::html/pager.phtml'; /** - * @var \Magento\Data\Collection + * @var \Magento\Framework\Data\Collection */ protected $_collection; @@ -175,7 +175,7 @@ public function setLimit($limit) /** * Set collection for pagination * - * @param \Magento\Data\Collection $collection + * @param \Magento\Framework\Data\Collection $collection * @return $this */ public function setCollection($collection) @@ -192,7 +192,7 @@ public function setCollection($collection) } /** - * @return \Magento\Data\Collection + * @return \Magento\Framework\Data\Collection */ public function getCollection() { diff --git a/app/code/Magento/Theme/Block/Html/Title.php b/app/code/Magento/Theme/Block/Html/Title.php index c26767c3d760a..ff7d1a358365b 100644 --- a/app/code/Magento/Theme/Block/Html/Title.php +++ b/app/code/Magento/Theme/Block/Html/Title.php @@ -26,7 +26,7 @@ /** * Html page title block */ -class Title extends \Magento\View\Element\Template +class Title extends \Magento\Framework\View\Element\Template { /** * Own page title to display on the page diff --git a/app/code/Magento/Theme/Block/Html/Topmenu.php b/app/code/Magento/Theme/Block/Html/Topmenu.php index 7c580056b07cc..657b8f09c4833 100644 --- a/app/code/Magento/Theme/Block/Html/Topmenu.php +++ b/app/code/Magento/Theme/Block/Html/Topmenu.php @@ -23,10 +23,13 @@ */ namespace Magento\Theme\Block\Html; +use Magento\Framework\View\Block\IdentityInterface; +use Magento\Framework\View\Element\Template; + /** * Html page top menu block */ -class Topmenu extends \Magento\View\Element\Template implements \Magento\View\Block\IdentityInterface +class Topmenu extends Template implements IdentityInterface { /** * Cache identities @@ -38,7 +41,7 @@ class Topmenu extends \Magento\View\Element\Template implements \Magento\View\Bl /** * Top menu data tree * - * @var \Magento\Data\Tree\Node + * @var \Magento\Framework\Data\Tree\Node */ protected $_menu; @@ -49,7 +52,7 @@ class Topmenu extends \Magento\View\Element\Template implements \Magento\View\Bl */ public function _construct() { - $this->_menu = new \Magento\Data\Tree\Node(array(), 'root', new \Magento\Data\Tree()); + $this->_menu = new \Magento\Framework\Data\Tree\Node(array(), 'root', new \Magento\Framework\Data\Tree()); } /** @@ -72,7 +75,7 @@ public function getHtml($outermostClass = '', $childrenWrapClass = '', $limit = $html = $this->_getHtml($this->_menu, $childrenWrapClass, $limit); - $transportObject = new \Magento\Object(array('html' => $html)); + $transportObject = new \Magento\Framework\Object(array('html' => $html)); $this->_eventManager->dispatch( 'page_block_html_topmenu_gethtml_after', array('menu' => $this->_menu, 'transportObject' => $transportObject) @@ -145,7 +148,7 @@ protected function _columnBrake($items, $limit) /** * Add sub menu HTML code for current menu item * - * @param \Magento\Data\Tree\Node $child + * @param \Magento\Framework\Data\Tree\Node $child * @param string $childLevel * @param string $childrenWrapClass * @param int $limit @@ -181,7 +184,7 @@ protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit) /** * Recursively generates top menu html from data that is specified in $menuTree * - * @param \Magento\Data\Tree\Node $menuTree + * @param \Magento\Framework\Data\Tree\Node $menuTree * @param string $childrenWrapClass * @param int $limit * @param array $colBrakes @@ -190,8 +193,12 @@ protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit) * @SuppressWarnings(PHPMD.CyclomaticComplexity) * @SuppressWarnings(PHPMD.NPathComplexity) */ - protected function _getHtml(\Magento\Data\Tree\Node $menuTree, $childrenWrapClass, $limit, $colBrakes = array()) - { + protected function _getHtml( + \Magento\Framework\Data\Tree\Node $menuTree, + $childrenWrapClass, + $limit, + $colBrakes = array() + ) { $html = ''; $children = $menuTree->getChildren(); @@ -246,10 +253,10 @@ protected function _getHtml(\Magento\Data\Tree\Node $menuTree, $childrenWrapClas /** * Generates string with all attributes that should be present in menu item element * - * @param \Magento\Data\Tree\Node $item + * @param \Magento\Framework\Data\Tree\Node $item * @return string */ - protected function _getRenderedMenuItemAttributes(\Magento\Data\Tree\Node $item) + protected function _getRenderedMenuItemAttributes(\Magento\Framework\Data\Tree\Node $item) { $html = ''; $attributes = $this->_getMenuItemAttributes($item); @@ -262,10 +269,10 @@ protected function _getRenderedMenuItemAttributes(\Magento\Data\Tree\Node $item) /** * Returns array of menu item's attributes * - * @param \Magento\Data\Tree\Node $item + * @param \Magento\Framework\Data\Tree\Node $item * @return array */ - protected function _getMenuItemAttributes(\Magento\Data\Tree\Node $item) + protected function _getMenuItemAttributes(\Magento\Framework\Data\Tree\Node $item) { $menuItemClasses = $this->_getMenuItemClasses($item); return array('class' => implode(' ', $menuItemClasses)); @@ -274,10 +281,10 @@ protected function _getMenuItemAttributes(\Magento\Data\Tree\Node $item) /** * Returns array of menu item's classes * - * @param \Magento\Data\Tree\Node $item + * @param \Magento\Framework\Data\Tree\Node $item * @return array */ - protected function _getMenuItemClasses(\Magento\Data\Tree\Node $item) + protected function _getMenuItemClasses(\Magento\Framework\Data\Tree\Node $item) { $classes = array(); diff --git a/app/code/Magento/Theme/Block/Html/Welcome.php b/app/code/Magento/Theme/Block/Html/Welcome.php index dd3c7594b5857..bda3edc4aa024 100644 --- a/app/code/Magento/Theme/Block/Html/Welcome.php +++ b/app/code/Magento/Theme/Block/Html/Welcome.php @@ -26,7 +26,7 @@ /** * Html page welcome block */ -class Welcome extends \Magento\View\Element\Template +class Welcome extends \Magento\Framework\View\Element\Template { /** * Get block message diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php index 9d5ad572088fa..dcab98ccab6c7 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php @@ -36,7 +36,7 @@ class Theme extends \Magento\Backend\App\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -47,12 +47,12 @@ class Theme extends \Magento\Backend\App\Action /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory */ public function __construct( \Magento\Backend\App\Action\Context $context, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Framework\App\Response\Http\FileFactory $fileFactory ) { $this->_coreRegistry = $coreRegistry; @@ -102,12 +102,12 @@ public function newAction() public function editAction() { $themeId = (int)$this->getRequest()->getParam('id'); - /** @var $theme \Magento\View\Design\ThemeInterface */ - $theme = $this->_objectManager->create('Magento\View\Design\ThemeInterface'); + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ + $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface'); try { - $theme->setType(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL); + $theme->setType(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL); if ($themeId && (!$theme->load($themeId)->getId() || !$theme->isVisible())) { - throw new \Magento\Model\Exception(__('We cannot find theme "%1".', $themeId)); + throw new \Magento\Framework\Model\Exception(__('We cannot find theme "%1".', $themeId)); } $this->_coreRegistry->register('current_theme', $theme); @@ -122,12 +122,12 @@ public function editAction() } $this->_setActiveMenu('Magento_Theme::system_design_theme'); $this->_view->renderLayout(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); $this->_redirect('adminhtml/*/'); } catch (\Exception $e) { $this->messageManager->addError(__('We cannot find the theme.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->_redirect('adminhtml/*/'); } } @@ -145,8 +145,8 @@ public function saveAction() $removeJsFiles = (array)$this->getRequest()->getParam('js_removed_files'); $reorderJsFiles = array_keys($this->getRequest()->getParam('js_order', array())); - /** @var $themeFactory \Magento\View\Design\Theme\FlyweightFactory */ - $themeFactory = $this->_objectManager->get('Magento\View\Design\Theme\FlyweightFactory'); + /** @var $themeFactory \Magento\Framework\View\Design\Theme\FlyweightFactory */ + $themeFactory = $this->_objectManager->get('Magento\Framework\View\Design\Theme\FlyweightFactory'); /** @var $cssService \Magento\Theme\Model\Theme\Customization\File\CustomCss */ $cssService = $this->_objectManager->get('Magento\Theme\Model\Theme\Customization\File\CustomCss'); /** @var $singleFile \Magento\Theme\Model\Theme\SingleFile */ @@ -161,35 +161,38 @@ public function saveAction() } else { $parentTheme = $themeFactory->create($themeData['parent_id']); $theme = $parentTheme->getDomainModel( - \Magento\View\Design\ThemeInterface::TYPE_PHYSICAL + \Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL )->createVirtualTheme( $parentTheme ); } if ($theme && !$theme->isEditable()) { - throw new \Magento\Model\Exception(__('Theme isn\'t editable.')); + throw new \Magento\Framework\Model\Exception(__('Theme isn\'t editable.')); } $theme->addData($themeData); if (isset($themeData['preview']['delete'])) { $theme->getThemeImage()->removePreviewImage(); } $theme->getThemeImage()->uploadPreviewImage('preview'); - $theme->setType(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL); + $theme->setType(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL); $theme->save(); $customization = $theme->getCustomization(); - $customization->reorder(\Magento\View\Design\Theme\Customization\File\Js::TYPE, $reorderJsFiles); + $customization->reorder( + \Magento\Framework\View\Design\Theme\Customization\File\Js::TYPE, + $reorderJsFiles + ); $customization->delete($removeJsFiles); $singleFile->update($theme, $customCssData); $this->messageManager->addSuccess(__('You saved the theme.')); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); $this->_getSession()->setThemeData($themeData); $this->_getSession()->setThemeCustomCssData($customCssData); $redirectBack = true; } catch (\Exception $e) { $this->messageManager->addError('The theme was not saved'); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $redirectBack ? $this->_redirect( 'adminhtml/*/edit', @@ -210,8 +213,8 @@ public function deleteAction() $themeId = $this->getRequest()->getParam('id'); try { if ($themeId) { - /** @var $theme \Magento\View\Design\ThemeInterface */ - $theme = $this->_objectManager->create('Magento\View\Design\ThemeInterface')->load($themeId); + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ + $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface')->load($themeId); if (!$theme->getId()) { throw new \InvalidArgumentException(sprintf('We cannot find a theme with id "%1".', $themeId)); } @@ -223,11 +226,11 @@ public function deleteAction() $theme->delete(); $this->messageManager->addSuccess(__('You deleted the theme.')); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException($e, __('We cannot delete the theme.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } /** * @todo Temporary solution. Theme module should not know about the existence of editor module. @@ -247,11 +250,11 @@ public function uploadCssAction() try { $cssFileContent = $serviceModel->uploadCssFile('css_file_uploader'); $result = array('error' => false, 'content' => $cssFileContent['content']); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); } catch (\Exception $e) { $result = array('error' => true, 'message' => __('We cannot upload the CSS file.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)); } @@ -260,21 +263,21 @@ public function uploadCssAction() * Upload js file * * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function uploadJsAction() { $themeId = $this->getRequest()->getParam('id'); /** @var $serviceModel \Magento\Theme\Model\Uploader\Service */ $serviceModel = $this->_objectManager->get('Magento\Theme\Model\Uploader\Service'); - /** @var $themeFactory \Magento\View\Design\Theme\FlyweightFactory */ - $themeFactory = $this->_objectManager->get('Magento\View\Design\Theme\FlyweightFactory'); - /** @var $jsService \Magento\View\Design\Theme\Customization\File\Js */ - $jsService = $this->_objectManager->get('Magento\View\Design\Theme\Customization\File\Js'); + /** @var $themeFactory \Magento\Framework\View\Design\Theme\FlyweightFactory */ + $themeFactory = $this->_objectManager->get('Magento\Framework\View\Design\Theme\FlyweightFactory'); + /** @var $jsService \Magento\Framework\View\Design\Theme\Customization\File\Js */ + $jsService = $this->_objectManager->get('Magento\Framework\View\Design\Theme\Customization\File\Js'); try { $theme = $themeFactory->create($themeId); if (!$theme) { - throw new \Magento\Model\Exception(__('We cannot find a theme with id "%1".', $themeId)); + throw new \Magento\Framework\Model\Exception(__('We cannot find a theme with id "%1".', $themeId)); } $jsFileData = $serviceModel->uploadJsFile('js_files_uploader'); $jsFile = $jsService->create(); @@ -283,18 +286,20 @@ public function uploadJsAction() $jsFile->setData('content', $jsFileData['content']); $jsFile->save(); - /** @var $customization \Magento\View\Design\Theme\Customization */ + /** @var $customization \Magento\Framework\View\Design\Theme\Customization */ $customization = $this->_objectManager->create( - 'Magento\View\Design\Theme\CustomizationInterface', + 'Magento\Framework\View\Design\Theme\CustomizationInterface', array('theme' => $theme) ); - $customJsFiles = $customization->getFilesByType(\Magento\View\Design\Theme\Customization\File\Js::TYPE); + $customJsFiles = $customization->getFilesByType( + \Magento\Framework\View\Design\Theme\Customization\File\Js::TYPE + ); $result = array('error' => false, 'files' => $customization->generateFileInfo($customJsFiles)); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); } catch (\Exception $e) { $result = array('error' => true, 'message' => __('We cannot upload the JS file.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)); } @@ -308,8 +313,8 @@ public function downloadCustomCssAction() { $themeId = $this->getRequest()->getParam('theme_id'); try { - /** @var $themeFactory \Magento\View\Design\Theme\FlyweightFactory */ - $themeFactory = $this->_objectManager->create('Magento\View\Design\Theme\FlyweightFactory'); + /** @var $themeFactory \Magento\Framework\View\Design\Theme\FlyweightFactory */ + $themeFactory = $this->_objectManager->create('Magento\Framework\View\Design\Theme\FlyweightFactory'); $theme = $themeFactory->create($themeId); if (!$theme) { throw new \InvalidArgumentException(sprintf('We cannot find a theme with id "%1".', $themeId)); @@ -318,7 +323,7 @@ public function downloadCustomCssAction() $customCssFiles = $theme->getCustomization()->getFilesByType( \Magento\Theme\Model\Theme\Customization\File\CustomCss::TYPE ); - /** @var $customCssFile \Magento\View\Design\Theme\FileInterface */ + /** @var $customCssFile \Magento\Framework\View\Design\Theme\FileInterface */ $customCssFile = reset($customCssFiles); if ($customCssFile && $customCssFile->getContent()) { return $this->_fileFactory->create( @@ -330,7 +335,7 @@ public function downloadCustomCssAction() } catch (\Exception $e) { $this->messageManager->addException($e, __('We cannot find file')); $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } } @@ -348,8 +353,8 @@ public function downloadCssAction() $helper = $this->_objectManager->get('Magento\Core\Helper\Theme'); $fileName = $helper->urlDecode($file); try { - /** @var $theme \Magento\View\Design\ThemeInterface */ - $theme = $this->_objectManager->create('Magento\View\Design\ThemeInterface')->load($themeId); + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ + $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface')->load($themeId); if (!$theme->getId()) { throw new \InvalidArgumentException(sprintf('We cannot find a theme with id "%1".', $themeId)); } @@ -369,7 +374,7 @@ public function downloadCssAction() } catch (\Exception $e) { $this->messageManager->addException($e, __('We cannot find file "%1".', $fileName)); $this->getResponse()->setRedirect($this->_redirect->getRefererUrl()); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } } diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php index a2fd692a16cdc..37fd92a5b8ba7 100644 --- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php +++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php @@ -77,7 +77,7 @@ public function treeJsonAction() ) ); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode(array())); } } @@ -93,11 +93,11 @@ public function newFolderAction() try { $path = $this->_getSession()->getStoragePath(); $result = $this->_getStorage()->createFolder($name, $path); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); } catch (\Exception $e) { $result = array('error' => true, 'message' => __('Sorry, there was an unknown error.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)); } @@ -172,7 +172,7 @@ public function previewImageAction() \Magento\Framework\App\Filesystem::MEDIA_DIR ); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->_redirect('core/index/notfound'); } } diff --git a/app/code/Magento/Theme/Helper/Layout.php b/app/code/Magento/Theme/Helper/Layout.php index f701097e56e1e..e510d26d30cb3 100644 --- a/app/code/Magento/Theme/Helper/Layout.php +++ b/app/code/Magento/Theme/Helper/Layout.php @@ -26,7 +26,7 @@ class Layout extends \Magento\Framework\App\Helper\AbstractHelper { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -38,12 +38,12 @@ class Layout extends \Magento\Framework\App\Helper\AbstractHelper /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Theme\Model\Layout\Config $config - * @param \Magento\View\LayoutInterface $layout + * @param \Magento\Framework\View\LayoutInterface $layout */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Theme\Model\Layout\Config $config, - \Magento\View\LayoutInterface $layout + \Magento\Framework\View\LayoutInterface $layout ) { $this->_layout = $layout; $this->_config = $config; @@ -99,7 +99,7 @@ public function applyTemplate($pageLayout = null) /** * Retrieve current applied page layout * - * @return \Magento\Object|boolean + * @return \Magento\Framework\Object|boolean */ public function getCurrentPageLayout() { diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php index e4992fd1a1987..06b8385a4eff5 100644 --- a/app/code/Magento/Theme/Helper/Storage.php +++ b/app/code/Magento/Theme/Helper/Storage.php @@ -93,12 +93,12 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper protected $_session; /** - * @var \Magento\View\Design\Theme\FlyweightFactory + * @var \Magento\Framework\View\Design\Theme\FlyweightFactory */ protected $_themeFactory; /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected $mediaDirectoryWrite; @@ -106,13 +106,13 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Framework\App\Filesystem $filesystem * @param \Magento\Backend\Model\Session $session - * @param \Magento\View\Design\Theme\FlyweightFactory $themeFactory + * @param \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Framework\App\Filesystem $filesystem, \Magento\Backend\Model\Session $session, - \Magento\View\Design\Theme\FlyweightFactory $themeFactory + \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory ) { parent::__construct($context); $this->filesystem = $filesystem; @@ -197,7 +197,7 @@ protected function _getTheme() * Get storage type * * @return string - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function getStorageType() { @@ -207,7 +207,7 @@ public function getStorageType() ); $type = (string)$this->_getRequest()->getParam(self::PARAM_CONTENT_TYPE); if (!in_array($type, $allowedTypes)) { - throw new \Magento\Exception('Invalid type'); + throw new \Magento\Framework\Exception('Invalid type'); } return $type; } @@ -300,7 +300,7 @@ public function getRequestParams() * Get allowed extensions by type * * @return string[] - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function getAllowedExtensionsByType() { @@ -312,7 +312,7 @@ public function getAllowedExtensionsByType() $extensions = array('jpg', 'jpeg', 'gif', 'png', 'xbm', 'wbmp'); break; default: - throw new \Magento\Exception('Invalid type'); + throw new \Magento\Framework\Exception('Invalid type'); } return $extensions; } @@ -321,7 +321,7 @@ public function getAllowedExtensionsByType() * Get storage type name for display. * * @return string - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function getStorageTypeName() { @@ -333,7 +333,7 @@ public function getStorageTypeName() $name = self::IMAGES; break; default: - throw new \Magento\Exception('Invalid type'); + throw new \Magento\Framework\Exception('Invalid type'); } return $name; diff --git a/app/code/Magento/Theme/Model/Config.php b/app/code/Magento/Theme/Model/Config.php index 6e03f8ad00ed6..55eaea4877de5 100644 --- a/app/code/Magento/Theme/Model/Config.php +++ b/app/code/Magento/Theme/Model/Config.php @@ -49,17 +49,17 @@ class Config /** * Application event manager * - * @var \Magento\Event\ManagerInterface + * @var \Magento\Framework\Event\ManagerInterface */ protected $_eventManager; /** - * @var \Magento\Cache\FrontendInterface + * @var \Magento\Framework\Cache\FrontendInterface */ protected $_configCache; /** - * @var \Magento\Cache\FrontendInterface + * @var \Magento\Framework\Cache\FrontendInterface */ protected $_layoutCache; @@ -67,17 +67,17 @@ class Config * @param \Magento\Framework\App\Config\ValueInterface $configData * @param \Magento\Framework\App\Config\Storage\WriterInterface $configWriter * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\Cache\FrontendInterface $configCache - * @param \Magento\Cache\FrontendInterface $layoutCache + * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Cache\FrontendInterface $configCache + * @param \Magento\Framework\Cache\FrontendInterface $layoutCache */ public function __construct( \Magento\Framework\App\Config\ValueInterface $configData, \Magento\Framework\App\Config\Storage\WriterInterface $configWriter, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Event\ManagerInterface $eventManager, - \Magento\Cache\FrontendInterface $configCache, - \Magento\Cache\FrontendInterface $layoutCache + \Magento\Framework\Event\ManagerInterface $eventManager, + \Magento\Framework\Cache\FrontendInterface $configCache, + \Magento\Framework\Cache\FrontendInterface $layoutCache ) { $this->_configData = $configData; $this->_configWriter = $configWriter; @@ -90,7 +90,7 @@ public function __construct( /** * Assign theme to the stores * - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Design\ThemeInterface $theme * @param array $stores * @param string $scope * @return $this @@ -152,7 +152,7 @@ protected function _getAssignedScopesCollection($scope, $configPath) */ protected function _unassignThemeFromStores($themeId, $stores, $scope, &$isReassigned) { - $configPath = \Magento\View\DesignInterface::XML_PATH_THEME_ID; + $configPath = \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID; foreach ($this->_getAssignedScopesCollection($scope, $configPath) as $config) { if ($config->getValue() == $themeId && !in_array($config->getScopeId(), $stores)) { $this->_configWriter->delete($configPath, $scope, $config->getScopeId()); @@ -173,7 +173,7 @@ protected function _unassignThemeFromStores($themeId, $stores, $scope, &$isReass */ protected function _assignThemeToStores($themeId, $stores, $scope, &$isReassigned) { - $configPath = \Magento\View\DesignInterface::XML_PATH_THEME_ID; + $configPath = \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID; if (count($stores) > 0) { foreach ($stores as $storeId) { $this->_configWriter->save($configPath, $themeId, $scope, $storeId); @@ -192,7 +192,7 @@ protected function _assignThemeToStores($themeId, $stores, $scope, &$isReassigne */ protected function _assignThemeToDefaultScope($themeId, &$isReassigned) { - $configPath = \Magento\View\DesignInterface::XML_PATH_THEME_ID; + $configPath = \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID; $this->_configWriter->save($configPath, $themeId, \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT); $isReassigned = true; return $this; diff --git a/app/code/Magento/Theme/Model/Config/Customization.php b/app/code/Magento/Theme/Model/Config/Customization.php index f5632b1c9fa04..deaab3c32c642 100644 --- a/app/code/Magento/Theme/Model/Config/Customization.php +++ b/app/code/Magento/Theme/Model/Config/Customization.php @@ -36,12 +36,12 @@ class Customization protected $_storeManager; /** - * @var \Magento\View\DesignInterface + * @var \Magento\Framework\View\DesignInterface */ protected $_design; /** - * @var \Magento\View\Design\Theme\ThemeProviderInterface + * @var \Magento\Framework\View\Design\Theme\ThemeProviderInterface */ protected $themeProvider; @@ -63,13 +63,13 @@ class Customization /** * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\View\DesignInterface $design - * @param \Magento\View\Design\Theme\ThemeProviderInterface $themeProvider + * @param \Magento\Framework\View\DesignInterface $design + * @param \Magento\Framework\View\Design\Theme\ThemeProviderInterface $themeProvider */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\View\DesignInterface $design, - \Magento\View\Design\Theme\ThemeProviderInterface $themeProvider + \Magento\Framework\View\DesignInterface $design, + \Magento\Framework\View\Design\Theme\ThemeProviderInterface $themeProvider ) { $this->_storeManager = $storeManager; $this->_design = $design; @@ -127,7 +127,7 @@ public function getStoresByThemes() /** * Check if current theme has assigned to any store * - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Design\ThemeInterface $theme * @param null|\Magento\Store\Model\Store $store * @return bool */ @@ -153,7 +153,7 @@ public function hasThemeAssigned() /** * Is theme assigned to specific store * - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Design\ThemeInterface $theme * @param \Magento\Store\Model\Store $store * @return bool */ @@ -171,7 +171,7 @@ protected function _isThemeAssignedToSpecificStore($theme, $store) protected function _getConfigurationThemeId($store) { return $this->_design->getConfigurationDesignTheme( - \Magento\Core\Model\App\Area::AREA_FRONTEND, + \Magento\Framework\App\Area::AREA_FRONTEND, array('store' => $store) ); } @@ -188,14 +188,14 @@ protected function _getConfigurationThemeId($store) protected function _prepareThemeCustomizations() { /** @var \Magento\Core\Model\Resource\Theme\Collection $themeCollection */ - $themeCollection = $this->themeProvider->getThemeCustomizations(\Magento\Core\Model\App\Area::AREA_FRONTEND); + $themeCollection = $this->themeProvider->getThemeCustomizations(\Magento\Framework\App\Area::AREA_FRONTEND); $assignedThemes = $this->getStoresByThemes(); $this->_assignedTheme = array(); $this->_unassignedTheme = array(); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { if (isset($assignedThemes[$theme->getId()])) { $theme->setAssignedStores($assignedThemes[$theme->getId()]); diff --git a/app/code/Magento/Theme/Model/CopyService.php b/app/code/Magento/Theme/Model/CopyService.php index 16aa223347aec..9121e524b7486 100644 --- a/app/code/Magento/Theme/Model/CopyService.php +++ b/app/code/Magento/Theme/Model/CopyService.php @@ -29,17 +29,17 @@ */ namespace Magento\Theme\Model; -use Magento\View\Design\ThemeInterface; +use Magento\Framework\View\Design\ThemeInterface; class CopyService { /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected $_directory; /** - * @var \Magento\View\Design\Theme\FileFactory + * @var \Magento\Framework\View\Design\Theme\FileFactory */ protected $_fileFactory; @@ -54,30 +54,30 @@ class CopyService protected $_updateFactory; /** - * @var \Magento\Event\ManagerInterface + * @var \Magento\Framework\Event\ManagerInterface */ protected $_eventManager; /** - * @var \Magento\View\Design\Theme\Customization\Path + * @var \Magento\Framework\View\Design\Theme\Customization\Path */ protected $_customizationPath; /** * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\View\Design\Theme\FileFactory $fileFactory + * @param \Magento\Framework\View\Design\Theme\FileFactory $fileFactory * @param \Magento\Core\Model\Layout\Link $link * @param \Magento\Core\Model\Layout\UpdateFactory $updateFactory - * @param \Magento\Event\ManagerInterface $eventManager - * @param \Magento\View\Design\Theme\Customization\Path $customization + * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Framework\View\Design\Theme\Customization\Path $customization */ public function __construct( \Magento\Framework\App\Filesystem $filesystem, - \Magento\View\Design\Theme\FileFactory $fileFactory, + \Magento\Framework\View\Design\Theme\FileFactory $fileFactory, \Magento\Core\Model\Layout\Link $link, \Magento\Core\Model\Layout\UpdateFactory $updateFactory, - \Magento\Event\ManagerInterface $eventManager, - \Magento\View\Design\Theme\Customization\Path $customization + \Magento\Framework\Event\ManagerInterface $eventManager, + \Magento\Framework\View\Design\Theme\Customization\Path $customization ) { $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); $this->_fileFactory = $fileFactory; diff --git a/app/code/Magento/Theme/Model/Layout/Config.php b/app/code/Magento/Theme/Model/Layout/Config.php index 3e4fd707ca719..1f62680ef4018 100644 --- a/app/code/Magento/Theme/Model/Layout/Config.php +++ b/app/code/Magento/Theme/Model/Layout/Config.php @@ -34,15 +34,15 @@ class Config */ protected $_pageLayouts = null; - /** @var \Magento\Config\DataInterface */ + /** @var \Magento\Framework\Config\DataInterface */ protected $_dataStorage; /** * Constructor * - * @param \Magento\Config\DataInterface $dataStorage + * @param \Magento\Framework\Config\DataInterface $dataStorage */ - public function __construct(\Magento\Config\DataInterface $dataStorage) + public function __construct(\Magento\Framework\Config\DataInterface $dataStorage) { $this->_dataStorage = $dataStorage; } @@ -58,7 +58,7 @@ protected function _initPageLayouts() $this->_pageLayouts = array(); foreach ($this->_dataStorage->get(null) as $layoutCode => $layoutConfig) { $layoutConfig['label'] = __($layoutConfig['label']); - $this->_pageLayouts[$layoutCode] = new \Magento\Object($layoutConfig); + $this->_pageLayouts[$layoutCode] = new \Magento\Framework\Object($layoutConfig); } } return $this; @@ -67,7 +67,7 @@ protected function _initPageLayouts() /** * Retrieve available page layouts * - * @return \Magento\Object[] + * @return \Magento\Framework\Object[] */ public function getPageLayouts() { @@ -79,7 +79,7 @@ public function getPageLayouts() * Retrieve page layout by code * * @param string $layoutCode - * @return \Magento\Object|boolean + * @return \Magento\Framework\Object|boolean */ public function getPageLayout($layoutCode) { diff --git a/app/code/Magento/Theme/Model/Layout/Config/Converter.php b/app/code/Magento/Theme/Model/Layout/Config/Converter.php index bd543633e38dd..6f96babb529cf 100644 --- a/app/code/Magento/Theme/Model/Layout/Config/Converter.php +++ b/app/code/Magento/Theme/Model/Layout/Config/Converter.php @@ -25,7 +25,7 @@ */ namespace Magento\Theme\Model\Layout\Config; -class Converter implements \Magento\Config\ConverterInterface +class Converter implements \Magento\Framework\Config\ConverterInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Theme/Model/Layout/Config/Reader.php b/app/code/Magento/Theme/Model/Layout/Config/Reader.php index fcabd770619ac..c2be6bfd9a71c 100644 --- a/app/code/Magento/Theme/Model/Layout/Config/Reader.php +++ b/app/code/Magento/Theme/Model/Layout/Config/Reader.php @@ -25,7 +25,7 @@ */ namespace Magento\Theme\Model\Layout\Config; -class Reader extends \Magento\Config\Reader\Filesystem +class Reader extends \Magento\Framework\Config\Reader\Filesystem { /** * List of identifier attributes for merging diff --git a/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php b/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php index c797a595ae4ea..c5aba62193bca 100644 --- a/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php +++ b/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php @@ -25,7 +25,7 @@ */ namespace Magento\Theme\Model\Layout\Config; -class SchemaLocator implements \Magento\Config\SchemaLocatorInterface +class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface { /** * Path to corresponding XSD file with validation rules for merged config @@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface protected $_perFileSchema = null; /** - * @param \Magento\Module\Dir\Reader $moduleReader + * @param \Magento\Framework\Module\Dir\Reader $moduleReader */ - public function __construct(\Magento\Module\Dir\Reader $moduleReader) + public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) { $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Theme') . '/page_layouts.xsd'; $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Theme') . '/page_layouts_file.xsd'; diff --git a/app/code/Magento/Theme/Model/Layout/Source/Layout.php b/app/code/Magento/Theme/Model/Layout/Source/Layout.php index 19c16de110cd0..e5fe221ef4c8c 100644 --- a/app/code/Magento/Theme/Model/Layout/Source/Layout.php +++ b/app/code/Magento/Theme/Model/Layout/Source/Layout.php @@ -23,7 +23,7 @@ */ namespace Magento\Theme\Model\Layout\Source; -class Layout implements \Magento\Option\ArrayInterface +class Layout implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Theme\Model\Layout\Config diff --git a/app/code/Magento/Theme/Model/Theme/Customization/File/CustomCss.php b/app/code/Magento/Theme/Model/Theme/Customization/File/CustomCss.php index dbf326d671fec..016b016a07cdc 100644 --- a/app/code/Magento/Theme/Model/Theme/Customization/File/CustomCss.php +++ b/app/code/Magento/Theme/Model/Theme/Customization/File/CustomCss.php @@ -29,7 +29,7 @@ */ namespace Magento\Theme\Model\Theme\Customization\File; -class CustomCss extends \Magento\View\Design\Theme\Customization\AbstractFile +class CustomCss extends \Magento\Framework\View\Design\Theme\Customization\AbstractFile { /**#@+ * Custom CSS file type customization @@ -69,7 +69,7 @@ public function getContentType() /** * {@inheritdoc} */ - protected function _prepareFileName(\Magento\View\Design\Theme\FileInterface $file) + protected function _prepareFileName(\Magento\Framework\View\Design\Theme\FileInterface $file) { if (!$file->getFileName()) { $file->setFileName(self::FILE_NAME); @@ -79,7 +79,7 @@ protected function _prepareFileName(\Magento\View\Design\Theme\FileInterface $fi /** * {@inheritdoc} */ - protected function _prepareSortOrder(\Magento\View\Design\Theme\FileInterface $file) + protected function _prepareSortOrder(\Magento\Framework\View\Design\Theme\FileInterface $file) { $file->setData('sort_order', self::SORT_ORDER); } diff --git a/app/code/Magento/Theme/Model/Theme/SingleFile.php b/app/code/Magento/Theme/Model/Theme/SingleFile.php index efe07fc920b6a..cd1461717f60f 100644 --- a/app/code/Magento/Theme/Model/Theme/SingleFile.php +++ b/app/code/Magento/Theme/Model/Theme/SingleFile.php @@ -32,14 +32,14 @@ class SingleFile { /** - * @var \Magento\View\Design\Theme\Customization\FileInterface + * @var \Magento\Framework\View\Design\Theme\Customization\FileInterface */ protected $_fileService; /** - * @param \Magento\View\Design\Theme\Customization\FileInterface $fileService + * @param \Magento\Framework\View\Design\Theme\Customization\FileInterface $fileService */ - public function __construct(\Magento\View\Design\Theme\Customization\FileInterface $fileService) + public function __construct(\Magento\Framework\View\Design\Theme\Customization\FileInterface $fileService) { $this->_fileService = $fileService; } @@ -47,11 +47,11 @@ public function __construct(\Magento\View\Design\Theme\Customization\FileInterfa /** * Creates or updates custom single file which belong to a selected theme * - * @param \Magento\View\Design\ThemeInterface $themeModel + * @param \Magento\Framework\View\Design\ThemeInterface $themeModel * @param string $fileContent - * @return \Magento\View\Design\Theme\FileInterface + * @return \Magento\Framework\View\Design\Theme\FileInterface */ - public function update(\Magento\View\Design\ThemeInterface $themeModel, $fileContent) + public function update(\Magento\Framework\View\Design\ThemeInterface $themeModel, $fileContent) { $customFiles = $themeModel->getCustomization()->getFilesByType($this->_fileService->getType()); $customCss = reset($customFiles); diff --git a/app/code/Magento/Theme/Model/Uploader/Service.php b/app/code/Magento/Theme/Model/Uploader/Service.php index 437fc915b7f8e..2ef9a774e6d68 100644 --- a/app/code/Magento/Theme/Model/Uploader/Service.php +++ b/app/code/Magento/Theme/Model/Uploader/Service.php @@ -37,14 +37,14 @@ class Service protected $_filePath; /** - * @var \Magento\Filesystem\Directory\ReadInterface + * @var \Magento\Framework\Filesystem\Directory\ReadInterface */ protected $_tmpDirectory; /** * File size * - * @var \Magento\File\Size + * @var \Magento\Framework\File\Size */ protected $_fileSize; @@ -74,13 +74,13 @@ class Service * Constructor * * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\File\Size $fileSize + * @param \Magento\Framework\File\Size $fileSize * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory * @param array $uploadLimits keys are 'css' and 'js' for file type, values defines maximum file size, example: 2M */ public function __construct( \Magento\Framework\App\Filesystem $filesystem, - \Magento\File\Size $fileSize, + \Magento\Framework\File\Size $fileSize, \Magento\Core\Model\File\UploaderFactory $uploaderFactory, array $uploadLimits = array() ) { @@ -100,7 +100,7 @@ public function __construct( * * @param string $file - Key in the $_FILES array * @return array - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function uploadCssFile($file) { @@ -112,7 +112,7 @@ public function uploadCssFile($file) $isValidFileSize = $this->_validateFileSize($fileUploader->getFileSize(), $this->getCssUploadMaxSize()); if (!$isValidFileSize) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('The CSS file must be less than %1M.', $this->getCssUploadMaxSizeInMb()) ); } @@ -126,7 +126,7 @@ public function uploadCssFile($file) * * @param string $file - Key in the $_FILES array * @return array - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function uploadJsFile($file) { @@ -138,7 +138,7 @@ public function uploadJsFile($file) $isValidFileSize = $this->_validateFileSize($fileUploader->getFileSize(), $this->getJsUploadMaxSize()); if (!$isValidFileSize) { - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('The JS file must be less than %1M.', $this->getJsUploadMaxSizeInMb()) ); } diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php index 7508a9b91b117..945a1adb54934 100644 --- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php +++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php @@ -69,17 +69,17 @@ class Storage protected $_helper; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @var \Magento\Image\AdapterFactory + * @var \Magento\Framework\Image\AdapterFactory */ protected $_imageFactory; /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected $mediaWriteDirectory; @@ -88,14 +88,14 @@ class Storage * * @param \Magento\Framework\App\Filesystem $filesystem * @param \Magento\Theme\Helper\Storage $helper - * @param \Magento\ObjectManager $objectManager - * @param \Magento\Image\AdapterFactory $imageFactory + * @param \Magento\Framework\ObjectManager $objectManager + * @param \Magento\Framework\Image\AdapterFactory $imageFactory */ public function __construct( \Magento\Framework\App\Filesystem $filesystem, \Magento\Theme\Helper\Storage $helper, - \Magento\ObjectManager $objectManager, - \Magento\Image\AdapterFactory $imageFactory + \Magento\Framework\ObjectManager $objectManager, + \Magento\Framework\Image\AdapterFactory $imageFactory ) { $this->mediaWriteDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); $this->_helper = $helper; @@ -108,7 +108,7 @@ public function __construct( * * @param string $targetPath * @return bool - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function uploadFile($targetPath) { @@ -120,7 +120,7 @@ public function uploadFile($targetPath) $result = $uploader->save($targetPath); if (!$result) { - throw new \Magento\Model\Exception(__('We cannot upload the file.')); + throw new \Magento\Framework\Model\Exception(__('We cannot upload the file.')); } $this->_createThumbnail($targetPath . '/' . $uploader->getUploadedFileName()); @@ -161,8 +161,8 @@ public function _createThumbnail($source) $image->keepAspectRatio(true); $image->resize(self::THUMBNAIL_WIDTH, self::THUMBNAIL_HEIGHT); $image->save($this->mediaWriteDirectory->getAbsolutePath($thumbnailPath)); - } catch (\Magento\Filesystem\FilesystemException $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + } catch (\Magento\Framework\Filesystem\FilesystemException $e) { + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); return false; } @@ -178,12 +178,12 @@ public function _createThumbnail($source) * @param string $name * @param string $path * @return array - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function createFolder($name, $path) { if (!preg_match(self::DIRECTORY_NAME_REGEXP, $name)) { - throw new \Magento\Model\Exception(__('Use only standard alphanumeric, dashes and underscores.')); + throw new \Magento\Framework\Model\Exception(__('Use only standard alphanumeric, dashes and underscores.')); } if (!$this->mediaWriteDirectory->isWritable($path)) { $path = $this->_helper->getStorageRoot(); @@ -192,7 +192,7 @@ public function createFolder($name, $path) $newPath = $path . '/' . $name; if ($this->mediaWriteDirectory->isExist($newPath)) { - throw new \Magento\Model\Exception(__('We found a directory with the same name.')); + throw new \Magento\Framework\Model\Exception(__('We found a directory with the same name.')); } $this->mediaWriteDirectory->create($newPath); @@ -233,12 +233,12 @@ public function deleteFile($file) * * @param string $currentPath * @return array - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function getDirsCollection($currentPath) { if (!$this->mediaWriteDirectory->isExist($currentPath)) { - throw new \Magento\Model\Exception(__('We cannot find a directory with this name.')); + throw new \Magento\Framework\Model\Exception(__('We cannot find a directory with this name.')); } $paths = $this->mediaWriteDirectory->search('.*', $currentPath); $directories = array(); @@ -306,7 +306,7 @@ public function getTreeArray() * * @param string $path * @return bool - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function deleteDirectory($path) { @@ -314,7 +314,7 @@ public function deleteDirectory($path) $pathCmp = rtrim($path, '/'); if ($rootCmp == $pathCmp) { - throw new \Magento\Model\Exception(__('We cannot delete root directory %1.', $path)); + throw new \Magento\Framework\Model\Exception(__('We cannot delete root directory %1.', $path)); } return $this->mediaWriteDirectory->delete($path); diff --git a/app/code/Magento/Theme/etc/adminhtml/acl.xml b/app/code/Magento/Theme/etc/adminhtml/acl.xml index f2a8fcb17b88f..b55c7d76241ca 100644 --- a/app/code/Magento/Theme/etc/adminhtml/acl.xml +++ b/app/code/Magento/Theme/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Theme/etc/adminhtml/di.xml b/app/code/Magento/Theme/etc/adminhtml/di.xml index af68272c7c96b..769b94cb7bd48 100644 --- a/app/code/Magento/Theme/etc/adminhtml/di.xml +++ b/app/code/Magento/Theme/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Magento\Theme\Helper\Storage\Proxy diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml index 748edd90e694a..bcd899b70ec26 100644 --- a/app/code/Magento/Theme/etc/di.xml +++ b/app/code/Magento/Theme/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Magento\Framework\App\Cache\Type\Config @@ -45,7 +45,7 @@ Magento\Theme\Model\Layout\Config\SchemaLocator - + Magento\Theme\Model\Layout\Config\Reader page_layouts_config diff --git a/app/code/Magento/Theme/etc/module.xml b/app/code/Magento/Theme/etc/module.xml index 04e0190daa9b8..3849ab4ab62d3 100644 --- a/app/code/Magento/Theme/etc/module.xml +++ b/app/code/Magento/Theme/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Theme/view/frontend/js/calendar.phtml b/app/code/Magento/Theme/view/frontend/js/calendar.phtml index bb16b6a7e7796..48b82372b7a3a 100644 --- a/app/code/Magento/Theme/view/frontend/js/calendar.phtml +++ b/app/code/Magento/Theme/view/frontend/js/calendar.phtml @@ -28,7 +28,7 @@ /** * Calendar localization script. Should be put into page header. * - * @see \Magento\View\Element\Html\Calendar + * @see \Magento\Framework\View\Element\Html\Calendar */ ?> diff --git a/app/code/Magento/Theme/view/frontend/js/cookie.phtml b/app/code/Magento/Theme/view/frontend/js/cookie.phtml index a180bcb4606db..4d12a89a3d255 100644 --- a/app/code/Magento/Theme/view/frontend/js/cookie.phtml +++ b/app/code/Magento/Theme/view/frontend/js/cookie.phtml @@ -28,7 +28,7 @@ /** * Cookie settings initialization script * - * @see \Magento\View\Element\Js\Cookie + * @see \Magento\Framework\View\Element\Js\Cookie */ ?> diff --git a/app/code/Magento/Theme/view/frontend/layout/default.xml b/app/code/Magento/Theme/view/frontend/layout/default.xml index 92ea678945654..d6c39a06f262b 100644 --- a/app/code/Magento/Theme/view/frontend/layout/default.xml +++ b/app/code/Magento/Theme/view/frontend/layout/default.xml @@ -26,14 +26,14 @@ - + - + maincontent Skip to content @@ -47,7 +47,7 @@ logo - + header links @@ -79,8 +79,8 @@ - - + + @@ -97,19 +97,19 @@ - + footer links - + - + diff --git a/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml b/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml index 02a1a5dd23505..358212b2ebced 100644 --- a/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml +++ b/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml @@ -118,6 +118,6 @@ mage/dataPost.js - + diff --git a/app/code/Magento/Theme/view/frontend/layout/page_calendar.xml b/app/code/Magento/Theme/view/frontend/layout/page_calendar.xml index 540ed23e876f5..a0c8e1b6973a3 100644 --- a/app/code/Magento/Theme/view/frontend/layout/page_calendar.xml +++ b/app/code/Magento/Theme/view/frontend/layout/page_calendar.xml @@ -27,7 +27,7 @@ - jquery/jquery-ui-timepicker-addon.js + jquery/jquery-ui-timepicker-addon-1.0.1.js @@ -37,6 +37,6 @@ - + diff --git a/app/code/Magento/Theme/view/frontend/link.phtml b/app/code/Magento/Theme/view/frontend/link.phtml index dd68ab2c9ae7c..4704ca0af6521 100644 --- a/app/code/Magento/Theme/view/frontend/link.phtml +++ b/app/code/Magento/Theme/view/frontend/link.phtml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** - * @var $this \Magento\View\Element\Html\Link + * @var $this \Magento\Framework\View\Element\Html\Link */ ?> getIsDisabled()): ?> diff --git a/app/code/Magento/Translation/Block/Js.php b/app/code/Magento/Translation/Block/Js.php index a04fd25fa6b4f..6b6506efc2eb2 100644 --- a/app/code/Magento/Translation/Block/Js.php +++ b/app/code/Magento/Translation/Block/Js.php @@ -24,9 +24,9 @@ namespace Magento\Translation\Block; -use Magento\View\Element\BlockInterface; +use Magento\Framework\View\Element\BlockInterface; use \Magento\Translation\Model\Js as DataProvider; -use \Magento\Translate\InlineInterface as InlineTranslator; +use \Magento\Framework\Translate\InlineInterface as InlineTranslator; class Js { diff --git a/app/code/Magento/Translation/Controller/Ajax.php b/app/code/Magento/Translation/Controller/Ajax.php index 5c866875676d2..258cde173a30e 100644 --- a/app/code/Magento/Translation/Controller/Ajax.php +++ b/app/code/Magento/Translation/Controller/Ajax.php @@ -26,17 +26,17 @@ class Ajax extends \Magento\Framework\App\Action\Action { /** - * @var \Magento\Translate\Inline\ParserInterface + * @var \Magento\Framework\Translate\Inline\ParserInterface */ protected $inlineParser; /** * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Translate\Inline\ParserInterface $inlineParser + * @param \Magento\Framework\Translate\Inline\ParserInterface $inlineParser */ public function __construct( \Magento\Framework\App\Action\Context $context, - \Magento\Translate\Inline\ParserInterface $inlineParser + \Magento\Framework\Translate\Inline\ParserInterface $inlineParser ) { parent::__construct($context); diff --git a/app/code/Magento/Translation/Model/Inline/Config.php b/app/code/Magento/Translation/Model/Inline/Config.php index 64529d167d449..3302001bdf4a7 100644 --- a/app/code/Magento/Translation/Model/Inline/Config.php +++ b/app/code/Magento/Translation/Model/Inline/Config.php @@ -26,7 +26,7 @@ /** * Inline Translation config */ -class Config implements \Magento\Translate\Inline\ConfigInterface +class Config implements \Magento\Framework\Translate\Inline\ConfigInterface { /** * Core store config diff --git a/app/code/Magento/Translation/Model/Inline/Parser.php b/app/code/Magento/Translation/Model/Inline/Parser.php index 0f5f666042ce6..fb8e5baeac5d1 100644 --- a/app/code/Magento/Translation/Model/Inline/Parser.php +++ b/app/code/Magento/Translation/Model/Inline/Parser.php @@ -28,7 +28,7 @@ */ namespace Magento\Translation\Model\Inline; -class Parser implements \Magento\Translate\Inline\ParserInterface +class Parser implements \Magento\Framework\Translate\Inline\ParserInterface { /** * data-translate html element attribute name @@ -128,7 +128,7 @@ class Parser implements \Magento\Translate\Inline\ParserInterface protected $_appState; /** - * @var \Magento\Translate\InlineInterface + * @var \Magento\Framework\Translate\InlineInterface */ protected $_translateInline; @@ -145,7 +145,7 @@ class Parser implements \Magento\Translate\Inline\ParserInterface * @param \Zend_Filter_Interface $inputFilter * @param \Magento\Framework\App\State $appState * @param \Magento\Framework\App\Cache\TypeListInterface $appCache, - * @param \Magento\Translate\InlineInterface $translateInline + * @param \Magento\Framework\Translate\InlineInterface $translateInline */ public function __construct( \Magento\Translation\Model\Resource\StringFactory $resource, @@ -153,7 +153,7 @@ public function __construct( \Zend_Filter_Interface $inputFilter, \Magento\Framework\App\State $appState, \Magento\Framework\App\Cache\TypeListInterface $appCache, - \Magento\Translate\InlineInterface $translateInline + \Magento\Framework\Translate\InlineInterface $translateInline ) { $this->_resourceFactory = $resource; $this->_storeManager = $storeManager; diff --git a/app/code/Magento/Translation/Model/Resource/String.php b/app/code/Magento/Translation/Model/Resource/String.php index f5b0dc6470f4f..80620c41605fd 100644 --- a/app/code/Magento/Translation/Model/Resource/String.php +++ b/app/code/Magento/Translation/Model/Resource/String.php @@ -23,10 +23,10 @@ */ namespace Magento\Translation\Model\Resource; -class String extends \Magento\Model\Resource\Db\AbstractDb +class String extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -42,13 +42,13 @@ class String extends \Magento\Model\Resource\Db\AbstractDb /** * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver * @param string|null $scope */ public function __construct( \Magento\Framework\App\Resource $resource, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Framework\App\ScopeResolverInterface $scopeResolver, $scope = null ) { @@ -71,12 +71,12 @@ protected function _construct() /** * Load * - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @param String $value * @param String $field * @return array|$this */ - public function load(\Magento\Model\AbstractModel $object, $value, $field = null) + public function load(\Magento\Framework\Model\AbstractModel $object, $value, $field = null) { if (is_string($value)) { $select = $this->_getReadAdapter()->select()->from( @@ -98,8 +98,8 @@ public function load(\Magento\Model\AbstractModel $object, $value, $field = null * * @param String $field * @param String $value - * @param \Magento\Model\AbstractModel $object - * @return \Magento\DB\Select + * @param \Magento\Framework\Model\AbstractModel $object + * @return \Magento\Framework\DB\Select */ protected function _getLoadSelect($field, $value, $object) { @@ -111,10 +111,10 @@ protected function _getLoadSelect($field, $value, $object) /** * After translation loading * - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @return $this */ - public function _afterLoad(\Magento\Model\AbstractModel $object) + public function _afterLoad(\Magento\Framework\Model\AbstractModel $object) { $adapter = $this->_getReadAdapter(); $select = $adapter->select()->from( @@ -131,10 +131,10 @@ public function _afterLoad(\Magento\Model\AbstractModel $object) /** * Before save * - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @return $this */ - protected function _beforeSave(\Magento\Model\AbstractModel $object) + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) { $adapter = $this->_getWriteAdapter(); $select = $adapter->select() @@ -151,10 +151,10 @@ protected function _beforeSave(\Magento\Model\AbstractModel $object) /** * After save * - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @return $this */ - protected function _afterSave(\Magento\Model\AbstractModel $object) + protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) { $adapter = $this->_getWriteAdapter(); $select = $adapter->select()->from( diff --git a/app/code/Magento/Translation/Model/Resource/Translate.php b/app/code/Magento/Translation/Model/Resource/Translate.php index 1b23cc83eb38e..3cf0b2bccead1 100644 --- a/app/code/Magento/Translation/Model/Resource/Translate.php +++ b/app/code/Magento/Translation/Model/Resource/Translate.php @@ -23,7 +23,7 @@ */ namespace Magento\Translation\Model\Resource; -class Translate extends \Magento\Model\Resource\Db\AbstractDb implements \Magento\Translate\ResourceInterface +class Translate extends \Magento\Framework\Model\Resource\Db\AbstractDb implements \Magento\Framework\Translate\ResourceInterface { /** * @var \Magento\Framework\App\State diff --git a/app/code/Magento/Translation/Model/String.php b/app/code/Magento/Translation/Model/String.php index 623e74785b80d..5e4ef6fe96520 100644 --- a/app/code/Magento/Translation/Model/String.php +++ b/app/code/Magento/Translation/Model/String.php @@ -36,7 +36,7 @@ */ namespace Magento\Translation\Model; -class String extends \Magento\Model\AbstractModel +class String extends \Magento\Framework\Model\AbstractModel { /** * @return void diff --git a/app/code/Magento/Translation/data/translation_setup/data-upgrade-1.0.0.0-1.0.0.1.php b/app/code/Magento/Translation/data/translation_setup/data-upgrade-1.0.0.0-1.0.0.1.php index b048123ce54df..5132151f3fba8 100644 --- a/app/code/Magento/Translation/data/translation_setup/data-upgrade-1.0.0.0-1.0.0.1.php +++ b/app/code/Magento/Translation/data/translation_setup/data-upgrade-1.0.0.0-1.0.0.1.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/Translation/etc/adminhtml/di.xml b/app/code/Magento/Translation/etc/adminhtml/di.xml index 5ade7363c26ea..d116257b411be 100644 --- a/app/code/Magento/Translation/etc/adminhtml/di.xml +++ b/app/code/Magento/Translation/etc/adminhtml/di.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + admin @@ -35,11 +35,11 @@ admin - + Magento_Translation::translate_inline.phtml adminhtml/ajax/translate - Magento\View\LayoutInterface\Proxy + Magento\Framework\View\LayoutInterface\Proxy Magento\Backend\Model\UrlInterface admin diff --git a/app/code/Magento/Translation/etc/cache.xml b/app/code/Magento/Translation/etc/cache.xml index 6ce62e610caa8..410f898b6500c 100644 --- a/app/code/Magento/Translation/etc/cache.xml +++ b/app/code/Magento/Translation/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Translation files. diff --git a/app/code/Magento/Translation/etc/di.xml b/app/code/Magento/Translation/etc/di.xml index 4012f60debd35..96740a99b106b 100644 --- a/app/code/Magento/Translation/etc/di.xml +++ b/app/code/Magento/Translation/etc/di.xml @@ -23,44 +23,44 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - - - - - - - - + + + + + + + + + Magento_Translation::translate_inline.phtml translation/ajax/index - Magento\View\LayoutInterface\Proxy - Magento\Translate\Inline\ConfigInterface\Proxy + Magento\Framework\View\LayoutInterface\Proxy + Magento\Framework\Translate\Inline\ConfigInterface\Proxy - Magento\Filter\Input\MaliciousCode + Magento\Framework\Filter\Input\MaliciousCode - + - Magento\Translate\Inline\Proxy + Magento\Framework\Translate\Inline\Proxy - + - Magento\Phrase\Renderer\Translate - Magento\Phrase\Renderer\Placeholder - Magento\Phrase\Renderer\Inline + Magento\Framework\Phrase\Renderer\Translate + Magento\Framework\Phrase\Renderer\Placeholder + Magento\Framework\Phrase\Renderer\Inline - + - Magento\Translate + Magento\Framework\Translate diff --git a/app/code/Magento/Translation/etc/module.xml b/app/code/Magento/Translation/etc/module.xml index 62204f30880ad..423abf670d029 100644 --- a/app/code/Magento/Translation/etc/module.xml +++ b/app/code/Magento/Translation/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php b/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php index 23af3e3911d91..451def825c657 100644 --- a/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php +++ b/app/code/Magento/Translation/sql/translation_setup/install-1.0.0.0.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -34,7 +34,7 @@ ->newTable($installer->getTable('translation')) ->addColumn( 'key_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array( 'identity' => true, @@ -45,16 +45,16 @@ 'Key Id of Translation' )->addColumn( 'string', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array( 'nullable' => false, - 'default' => \Magento\TranslateInterface::DEFAULT_STRING, + 'default' => \Magento\Framework\TranslateInterface::DEFAULT_STRING, ), 'Translation String' )->addColumn( 'store_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array( 'unsigned' => true, @@ -64,13 +64,13 @@ 'Store Id' )->addColumn( 'translate', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Translate' )->addColumn( 'locale', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 20, array( 'nullable' => false, @@ -79,21 +79,21 @@ 'Locale' )->addColumn( 'crc_string', - \Magento\DB\Ddl\Table::TYPE_BIGINT, + \Magento\Framework\DB\Ddl\Table::TYPE_BIGINT, null, array( 'nullable' => false, - 'default' => crc32(\Magento\TranslateInterface::DEFAULT_STRING) + 'default' => crc32(\Magento\Framework\TranslateInterface::DEFAULT_STRING) ), 'Translation String CRC32 Hash' )->addIndex( $installer->getIdxName( 'translation', array('store_id', 'locale', 'crc_string', 'string'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('store_id', 'locale', 'crc_string', 'string'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addIndex( $installer->getIdxName('translation', array('store_id')), array('store_id') @@ -102,8 +102,8 @@ 'store_id', $installer->getTable('store'), 'store_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment('Translations'); $installer->getConnection()->createTable($table); diff --git a/app/code/Magento/Ups/Model/Carrier.php b/app/code/Magento/Ups/Model/Carrier.php index a3c6e0f3751df..b65f70a814705 100644 --- a/app/code/Magento/Ups/Model/Carrier.php +++ b/app/code/Magento/Ups/Model/Carrier.php @@ -66,7 +66,7 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface /** * Raw rate request data * - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_rawRequest; @@ -126,12 +126,12 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface protected $_customizableContainerTypes = array('CP', 'CSP'); /** - * @var \Magento\Locale\FormatInterface + * @var \Magento\Framework\Locale\FormatInterface */ protected $_localeFormat; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; @@ -143,7 +143,7 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory @@ -154,8 +154,8 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface * @param \Magento\Directory\Model\CountryFactory $countryFactory * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Directory\Helper\Data $directoryData - * @param \Magento\Logger $logger - * @param \Magento\Locale\FormatInterface $localeFormat + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Locale\FormatInterface $localeFormat * @param Config $configHelper * @param array $data * @@ -164,7 +164,7 @@ class Carrier extends AbstractCarrierOnline implements CarrierInterface public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateFactory, \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, @@ -175,8 +175,8 @@ public function __construct( \Magento\Directory\Model\CountryFactory $countryFactory, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Directory\Helper\Data $directoryData, - \Magento\Logger $logger, - \Magento\Locale\FormatInterface $localeFormat, + \Magento\Framework\Logger $logger, + \Magento\Framework\Locale\FormatInterface $localeFormat, Config $configHelper, array $data = array() ) { @@ -231,7 +231,7 @@ public function setRequest(RateRequest $request) { $this->_request = $request; - $rowRequest = new \Magento\Object(); + $rowRequest = new \Magento\Framework\Object(); if ($request->getLimitMethod()) { $rowRequest->setAction($this->configHelper->getCode('action', 'single')); @@ -780,7 +780,7 @@ protected function _parseXmlResponse($xmlResponse) $costArr = array(); $priceArr = array(); if (strlen(trim($xmlResponse)) > 0) { - $xml = new \Magento\Simplexml\Config(); + $xml = new \Magento\Framework\Simplexml\Config(); $xml->loadString($xmlResponse); $arr = $xml->getXpath("//RatingServiceSelectionResponse/Response/ResponseStatusCode/text()"); $success = (int)$arr[0]; @@ -1008,7 +1008,7 @@ protected function _parseXmlTrackingResponse($trackingValue, $xmlResponse) $packageProgress = array(); if ($xmlResponse) { - $xml = new \Magento\Simplexml\Config(); + $xml = new \Magento\Framework\Simplexml\Config(); $xml->loadString($xmlResponse); $arr = $xml->getXpath("//TrackResponse/Response/ResponseStatusCode/text()"); $success = (int)$arr[0][0]; @@ -1159,10 +1159,10 @@ public function getAllowedMethods() /** * Form XML for shipment request * - * @param \Magento\Object $request + * @param \Magento\Framework\Object $request * @return string */ - protected function _formShipmentRequest(\Magento\Object $request) + protected function _formShipmentRequest(\Magento\Framework\Object $request) { $packageParams = $request->getPackageParams(); $height = $packageParams->getHeight(); @@ -1174,7 +1174,7 @@ protected function _formShipmentRequest(\Magento\Object $request) $itemsDesc = array(); $itemsShipment = $request->getPackageItems(); foreach ($itemsShipment as $itemShipment) { - $item = new \Magento\Object(); + $item = new \Magento\Framework\Object(); $item->setData($itemShipment); $itemsDesc[] = $item->getName(); } @@ -1382,7 +1382,7 @@ protected function _formShipmentRequest(\Magento\Object $request) * Send and process shipment accept request * * @param Element $shipmentConfirmResponse - * @return \Magento\Object + * @return \Magento\Framework\Object */ protected function _sendShipmentAcceptRequest(Element $shipmentConfirmResponse) { @@ -1417,7 +1417,7 @@ protected function _sendShipmentAcceptRequest(Element $shipmentConfirmResponse) $debugData['result'] = array('error' => $e->getMessage(), 'code' => $e->getCode()); } - $result = new \Magento\Object(); + $result = new \Magento\Framework\Object(); if (isset($response->Error)) { $result->setErrors((string)$response->Error->ErrorDescription); } else { @@ -1450,14 +1450,14 @@ public function getShipAcceptUrl() /** * Do shipment request to carrier web service, obtain Print Shipping Labels and process errors in response * - * @param \Magento\Object $request - * @return \Magento\Object + * @param \Magento\Framework\Object $request + * @return \Magento\Framework\Object * @throws \Exception */ - protected function _doShipmentRequest(\Magento\Object $request) + protected function _doShipmentRequest(\Magento\Framework\Object $request) { $this->_prepareShipmentRequest($request); - $result = new \Magento\Object(); + $result = new \Magento\Framework\Object(); $xmlRequest = $this->_formShipmentRequest($request); $xmlResponse = $this->_getCachedQuotes($xmlRequest); @@ -1531,10 +1531,10 @@ public function getShipConfirmUrl() /** * Return container types of carrier * - * @param \Magento\Object|null $params + * @param \Magento\Framework\Object|null $params * @return array|bool */ - public function getContainerTypes(\Magento\Object $params = null) + public function getContainerTypes(\Magento\Framework\Object $params = null) { if ($params === null) { return $this->_getAllowedContainers($params); @@ -1610,10 +1610,10 @@ public function getContainerTypesFilter() /** * Return delivery confirmation types of carrier * - * @param \Magento\Object|null $params + * @param \Magento\Framework\Object|null $params * @return array|bool */ - public function getDeliveryConfirmationTypes(\Magento\Object $params = null) + public function getDeliveryConfirmationTypes(\Magento\Framework\Object $params = null) { $countryRecipient = $params != null ? $params->getCountryRecipient() : null; $deliveryConfirmationTypes = array(); diff --git a/app/code/Magento/Ups/Model/Config/Source/Type.php b/app/code/Magento/Ups/Model/Config/Source/Type.php index 5f300dafca92e..22701c216c606 100644 --- a/app/code/Magento/Ups/Model/Config/Source/Type.php +++ b/app/code/Magento/Ups/Model/Config/Source/Type.php @@ -23,7 +23,7 @@ */ namespace Magento\Ups\Model\Config\Source; -use Magento\Data\OptionSourceInterface; +use Magento\Framework\Data\OptionSourceInterface; /** * Class Type diff --git a/app/code/Magento/Ups/etc/module.xml b/app/code/Magento/Ups/etc/module.xml index 3aa8d05e5f267..05c2a1cf0d552 100644 --- a/app/code/Magento/Ups/etc/module.xml +++ b/app/code/Magento/Ups/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/UrlRewrite/App/Request/RewriteService.php b/app/code/Magento/UrlRewrite/App/Request/RewriteService.php index c33572ea976cc..71ddf252f438d 100644 --- a/app/code/Magento/UrlRewrite/App/Request/RewriteService.php +++ b/app/code/Magento/UrlRewrite/App/Request/RewriteService.php @@ -65,11 +65,11 @@ public function applyRewrites(\Magento\Framework\App\RequestInterface $request) { // URL rewrite if (!$request->isStraight()) { - \Magento\Profiler::start('db_url_rewrite'); + \Magento\Framework\Profiler::start('db_url_rewrite'); /** @var $urlRewrite \Magento\UrlRewrite\Model\UrlRewrite */ $urlRewrite = $this->_rewriteFactory->create(); $urlRewrite->rewrite($request); - \Magento\Profiler::stop('db_url_rewrite'); + \Magento\Framework\Profiler::stop('db_url_rewrite'); } } } diff --git a/app/code/Magento/UrlRewrite/Helper/UrlRewrite.php b/app/code/Magento/UrlRewrite/Helper/UrlRewrite.php index bbf804d584dff..7e4f8b6775dbb 100644 --- a/app/code/Magento/UrlRewrite/Helper/UrlRewrite.php +++ b/app/code/Magento/UrlRewrite/Helper/UrlRewrite.php @@ -36,7 +36,7 @@ class UrlRewrite extends \Magento\Framework\App\Helper\AbstractHelper // Anchor is not supported in request path, e.g. 'foo#bar' /** - * @var \Magento\UrlRewrite\Model\Source\Urlrewrite\Options + * @var \Magento\UrlRewrite\Model\UrlRewrite\OptionProvider */ protected $_urlrewrite; @@ -80,7 +80,7 @@ protected function _validateRequestPath($requestPath) * Either returns TRUE (success) or throws error (validation failed) * * @param string $requestPath - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return bool */ public function validateRequestPath($requestPath) @@ -88,7 +88,7 @@ public function validateRequestPath($requestPath) try { $this->_validateRequestPath($requestPath); } catch (\Exception $e) { - throw new \Magento\Model\Exception($e->getMessage()); + throw new \Magento\Framework\Model\Exception($e->getMessage()); } return true; } @@ -98,7 +98,7 @@ public function validateRequestPath($requestPath) * Either returns TRUE (success) or throws error (validation failed) * * @param string $suffix - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return bool */ public function validateSuffix($suffix) @@ -110,11 +110,11 @@ public function validateSuffix($suffix) // Make message saying about suffix, not request path switch ($e->getCode()) { case self::VERR_MANYSLASHES: - throw new \Magento\Model\Exception( + throw new \Magento\Framework\Model\Exception( __('Two and more slashes together are not permitted in url rewrite suffix') ); case self::VERR_ANCHOR: - throw new \Magento\Model\Exception(__('Anchor symbol (#) is not supported in url rewrite suffix')); + throw new \Magento\Framework\Model\Exception(__('Anchor symbol (#) is not supported in url rewrite suffix')); } } return true; diff --git a/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite.php b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite.php index 47629a57e60ae..7b93f1822d269 100644 --- a/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite.php +++ b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite.php @@ -25,7 +25,7 @@ */ namespace Magento\UrlRewrite\Model\Resource; -class UrlRewrite extends \Magento\Model\Resource\Db\AbstractDb +class UrlRewrite extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Define main table @@ -61,7 +61,7 @@ protected function _initUniqueFields() */ protected function _getLoadSelect($field, $value, $object) { - /** @var $select \Magento\DB\Select */ + /** @var $select \Magento\Framework\DB\Select */ $select = parent::_getLoadSelect($field, $value, $object); if (!is_null($object->getStoreId())) { @@ -69,7 +69,7 @@ protected function _getLoadSelect($field, $value, $object) 'store_id IN(?)', array(\Magento\Store\Model\Store::DEFAULT_STORE_ID, $object->getStoreId()) ); - $select->order('store_id ' . \Magento\DB\Select::SQL_DESC); + $select->order('store_id ' . \Magento\Framework\DB\Select::SQL_DESC); $select->limit(1); } @@ -92,7 +92,7 @@ public function getRequestPathByIdPath($idPath, $store) } $select = $this->_getReadAdapter()->select(); - /** @var $select \Magento\DB\Select */ + /** @var $select \Magento\Framework\DB\Select */ $select->from( array('main_table' => $this->getMainTable()), 'request_path' diff --git a/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite/Collection.php b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite/Collection.php index 9833eab125ca7..de4b19b675e77 100644 --- a/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite/Collection.php +++ b/app/code/Magento/UrlRewrite/Model/Resource/UrlRewrite/Collection.php @@ -25,7 +25,7 @@ */ namespace Magento\UrlRewrite\Model\Resource\UrlRewrite; -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Store Manager Model @@ -35,22 +35,22 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio protected $_storeManager; /** - * @param \Magento\Data\Collection\EntityFactoryInterface $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param mixed $connection - * @param \Magento\Model\Resource\Db\AbstractDb $resource + * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource */ public function __construct( - \Magento\Data\Collection\EntityFactoryInterface $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Store\Model\StoreManagerInterface $storeManager, $connection = null, - \Magento\Model\Resource\Db\AbstractDb $resource = null + \Magento\Framework\Model\Resource\Db\AbstractDb $resource = null ) { parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource); $this->_storeManager = $storeManager; diff --git a/app/code/Magento/UrlRewrite/Model/UrlRewrite.php b/app/code/Magento/UrlRewrite/Model/UrlRewrite.php index 71fafaea0552c..04f122a16c228 100644 --- a/app/code/Magento/UrlRewrite/Model/UrlRewrite.php +++ b/app/code/Magento/UrlRewrite/Model/UrlRewrite.php @@ -44,7 +44,7 @@ * @method string getDescription() * @method \Magento\UrlRewrite\Model\UrlRewrite setDescription(string $value) */ -class UrlRewrite extends \Magento\Model\AbstractModel +class UrlRewrite extends \Magento\Framework\Model\AbstractModel { const TYPE_CATEGORY = 1; @@ -67,7 +67,7 @@ class UrlRewrite extends \Magento\Model\AbstractModel protected $_scopeConfig; /** - * @var \Magento\Stdlib\Cookie + * @var \Magento\Framework\Stdlib\Cookie */ protected $_cookie; @@ -82,25 +82,25 @@ class UrlRewrite extends \Magento\Model\AbstractModel protected $_httpContext; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Stdlib\Cookie $cookie + * @param \Magento\Framework\Stdlib\Cookie $cookie * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Framework\App\Http\Context $httpContext - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, - \Magento\Stdlib\Cookie $cookie, + \Magento\Framework\Stdlib\Cookie $cookie, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Http\Context $httpContext, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_scopeConfig = $scopeConfig; @@ -243,7 +243,7 @@ public function removeTag($tags) $removeTags = is_array($tags) ? $tags : explode(',', $tags); - foreach ($removeTags as $t) { + foreach ($removeTags as $k => $t) { if (!is_numeric($k)) { $t = $k . '=' . $t; } @@ -327,7 +327,7 @@ public function rewrite(\Magento\Framework\App\RequestInterface $request = null) } - $request->setAlias(\Magento\Url::REWRITE_REQUEST_PATH_ALIAS, $this->getRequestPath()); + $request->setAlias(\Magento\Framework\Url::REWRITE_REQUEST_PATH_ALIAS, $this->getRequestPath()); $external = substr($this->getTargetPath(), 0, 6); $isPermanentRedirectOption = $this->hasOption('RP'); if ($external === 'http:/' || $external === 'https:') { diff --git a/app/code/Magento/UrlRewrite/Model/UrlRewrite/OptionProvider.php b/app/code/Magento/UrlRewrite/Model/UrlRewrite/OptionProvider.php index 572522bc49700..c9b08f41c6e3d 100644 --- a/app/code/Magento/UrlRewrite/Model/UrlRewrite/OptionProvider.php +++ b/app/code/Magento/UrlRewrite/Model/UrlRewrite/OptionProvider.php @@ -25,7 +25,7 @@ */ namespace Magento\UrlRewrite\Model\UrlRewrite; -use Magento\Option\ArrayInterface; +use Magento\Framework\Option\ArrayInterface; class OptionProvider implements ArrayInterface { diff --git a/app/code/Magento/UrlRewrite/Model/UrlRewrite/TypeProvider.php b/app/code/Magento/UrlRewrite/Model/UrlRewrite/TypeProvider.php index 892afa728bbe2..1d6f90505d7ea 100644 --- a/app/code/Magento/UrlRewrite/Model/UrlRewrite/TypeProvider.php +++ b/app/code/Magento/UrlRewrite/Model/UrlRewrite/TypeProvider.php @@ -25,7 +25,7 @@ */ namespace Magento\UrlRewrite\Model\UrlRewrite; -use Magento\Option\ArrayInterface; +use Magento\Framework\Option\ArrayInterface; class TypeProvider implements ArrayInterface { diff --git a/app/code/Magento/UrlRewrite/etc/frontend/di.xml b/app/code/Magento/UrlRewrite/etc/frontend/di.xml index 3b5f6b02ebd10..f2dbb426520df 100644 --- a/app/code/Magento/UrlRewrite/etc/frontend/di.xml +++ b/app/code/Magento/UrlRewrite/etc/frontend/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/UrlRewrite/etc/module.xml b/app/code/Magento/UrlRewrite/etc/module.xml index 9146452e3ec02..bcec4aef7785b 100644 --- a/app/code/Magento/UrlRewrite/etc/module.xml +++ b/app/code/Magento/UrlRewrite/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php b/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php index eb5e0101a7089..04d9e16e963a3 100644 --- a/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php +++ b/app/code/Magento/UrlRewrite/sql/urlrewrite_setup/install-1.0.0.0.php @@ -34,49 +34,49 @@ $installer->getTable('core_url_rewrite') )->addColumn( 'url_rewrite_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Rewrite Id' )->addColumn( 'store_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Store Id' )->addColumn( 'id_path', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Id Path' )->addColumn( 'request_path', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Request Path' )->addColumn( 'target_path', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Target Path' )->addColumn( 'is_system', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'default' => '1'), 'Defines is Rewrite System' )->addColumn( 'options', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => true), 'Options' )->addColumn( 'description', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Deascription' @@ -84,18 +84,18 @@ $installer->getIdxName( 'core_url_rewrite', array('request_path', 'store_id'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('request_path', 'store_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addIndex( $installer->getIdxName( 'core_url_rewrite', array('id_path', 'is_system', 'store_id'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('id_path', 'is_system', 'store_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addIndex( $installer->getIdxName('core_url_rewrite', array('target_path', 'store_id')), array('target_path', 'store_id') @@ -110,8 +110,8 @@ 'store_id', $installer->getTable('store'), 'store_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Url Rewrites' ); diff --git a/app/code/Magento/User/Block/Buttons.php b/app/code/Magento/User/Block/Buttons.php index 687311c1a8041..3944bb1f27228 100644 --- a/app/code/Magento/User/Block/Buttons.php +++ b/app/code/Magento/User/Block/Buttons.php @@ -30,18 +30,18 @@ class Buttons extends \Magento\Backend\Block\Template /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/User/Block/Role/Edit.php b/app/code/Magento/User/Block/Role/Edit.php index 289522e2acd22..4a090c11561c1 100644 --- a/app/code/Magento/User/Block/Role/Edit.php +++ b/app/code/Magento/User/Block/Role/Edit.php @@ -30,22 +30,22 @@ class Edit extends \Magento\Backend\Block\Widget\Tabs /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/User/Block/Role/Grid/User.php b/app/code/Magento/User/Block/Role/Grid/User.php index 3dba4c709e2d8..d93699bf6aeed 100644 --- a/app/code/Magento/User/Block/Role/Grid/User.php +++ b/app/code/Magento/User/Block/Role/Grid/User.php @@ -33,7 +33,7 @@ class User extends \Magento\Backend\Block\Widget\Grid\Extended /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -45,23 +45,23 @@ class User extends \Magento\Backend\Block\Widget\Grid\Extended protected $_roleFactory; /** - * @var \Magento\Json\EncoderInterface + * @var \Magento\Framework\Json\EncoderInterface */ protected $_jsonEncoder; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Json\EncoderInterface $jsonEncoder - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\User\Model\RoleFactory $roleFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, - \Magento\Json\EncoderInterface $jsonEncoder, - \Magento\Registry $coreRegistry, + \Magento\Framework\Json\EncoderInterface $jsonEncoder, + \Magento\Framework\Registry $coreRegistry, \Magento\User\Model\RoleFactory $roleFactory, array $data = array() ) { diff --git a/app/code/Magento/User/Block/Role/Tab/Edit.php b/app/code/Magento/User/Block/Role/Tab/Edit.php index 694020b4fc09c..91c37d137b680 100644 --- a/app/code/Magento/User/Block/Role/Tab/Edit.php +++ b/app/code/Magento/User/Block/Role/Tab/Edit.php @@ -38,7 +38,7 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen /** * Root ACL Resource * - * @var \Magento\Acl\RootResource + * @var \Magento\Framework\Acl\RootResource */ protected $_rootResource; @@ -52,14 +52,14 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen /** * Acl builder * - * @var \Magento\Acl\Builder + * @var \Magento\Framework\Acl\Builder */ protected $_aclBuilder; /** * Acl resource provider * - * @var \Magento\Acl\Resource\ProviderInterface + * @var \Magento\Framework\Acl\Resource\ProviderInterface */ protected $_aclResourceProvider; @@ -68,19 +68,19 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Acl\RootResource $rootResource + * @param \Magento\Framework\Acl\RootResource $rootResource * @param \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory - * @param \Magento\Acl\Builder $aclBuilder - * @param \Magento\Acl\Resource\ProviderInterface $aclResourceProvider + * @param \Magento\Framework\Acl\Builder $aclBuilder + * @param \Magento\Framework\Acl\Resource\ProviderInterface $aclResourceProvider * @param \Magento\Integration\Helper\Data $integrationData * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Acl\RootResource $rootResource, + \Magento\Framework\Acl\RootResource $rootResource, \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory, - \Magento\Acl\Builder $aclBuilder, - \Magento\Acl\Resource\ProviderInterface $aclResourceProvider, + \Magento\Framework\Acl\Builder $aclBuilder, + \Magento\Framework\Acl\Resource\ProviderInterface $aclResourceProvider, \Magento\Integration\Helper\Data $integrationData, array $data = array() ) { diff --git a/app/code/Magento/User/Block/Role/Tab/Info.php b/app/code/Magento/User/Block/Role/Tab/Info.php index 02646c0c60ba0..2845abc2fba4b 100644 --- a/app/code/Magento/User/Block/Role/Tab/Info.php +++ b/app/code/Magento/User/Block/Role/Tab/Info.php @@ -79,7 +79,7 @@ public function _beforeToHtml() */ protected function _initForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('Role Information'))); diff --git a/app/code/Magento/User/Block/Role/Tab/Users.php b/app/code/Magento/User/Block/Role/Tab/Users.php index 40f6e25110a48..94d852da09f8c 100644 --- a/app/code/Magento/User/Block/Role/Tab/Users.php +++ b/app/code/Magento/User/Block/Role/Tab/Users.php @@ -39,14 +39,14 @@ class Users extends \Magento\Backend\Block\Widget\Tabs /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\Backend\Model\Auth\Session $authSession * @param \Magento\User\Model\Resource\User\CollectionFactory $userCollectionFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Backend\Model\Auth\Session $authSession, \Magento\User\Model\Resource\User\CollectionFactory $userCollectionFactory, array $data = array() diff --git a/app/code/Magento/User/Block/User/Edit.php b/app/code/Magento/User/Block/User/Edit.php index af9007236188f..e75476e4e7c80 100644 --- a/app/code/Magento/User/Block/User/Edit.php +++ b/app/code/Magento/User/Block/User/Edit.php @@ -37,18 +37,18 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/User/Block/User/Edit/Form.php b/app/code/Magento/User/Block/User/Edit/Form.php index 9df1efa8ec60e..2fdfeeb5374e2 100644 --- a/app/code/Magento/User/Block/User/Edit/Form.php +++ b/app/code/Magento/User/Block/User/Edit/Form.php @@ -43,7 +43,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array('data' => array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')) ); diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Main.php b/app/code/Magento/User/Block/User/Edit/Tab/Main.php index fe1aa1a8c4419..b4431dffa240f 100644 --- a/app/code/Magento/User/Block/User/Edit/Tab/Main.php +++ b/app/code/Magento/User/Block/User/Edit/Tab/Main.php @@ -36,24 +36,24 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic protected $_authSession; /** - * @var \Magento\Locale\ListsInterface + * @var \Magento\Framework\Locale\ListsInterface */ protected $_LocaleLists; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Backend\Model\Auth\Session $authSession - * @param \Magento\Locale\ListsInterface $localeLists + * @param \Magento\Framework\Locale\ListsInterface $localeLists * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Backend\Model\Auth\Session $authSession, - \Magento\Locale\ListsInterface $localeLists, + \Magento\Framework\Locale\ListsInterface $localeLists, array $data = array() ) { $this->_authSession = $authSession; @@ -72,7 +72,7 @@ protected function _prepareForm() /** @var $model \Magento\User\Model\User */ $model = $this->_coreRegistry->registry('permissions_user'); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $form->setHtmlIdPrefix('user_'); @@ -188,14 +188,14 @@ protected function _prepareForm() /** * Add password input fields * - * @param \Magento\Data\Form\Element\Fieldset $fieldset + * @param \Magento\Framework\Data\Form\Element\Fieldset $fieldset * @param string $passwordLabel * @param string $confirmationLabel * @param bool $isRequired * @return void */ protected function _addPasswordFields( - \Magento\Data\Form\Element\Fieldset $fieldset, + \Magento\Framework\Data\Form\Element\Fieldset $fieldset, $passwordLabel, $confirmationLabel, $isRequired = false diff --git a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php index 4d8095e6aee5d..b2b4eb48a0362 100644 --- a/app/code/Magento/User/Block/User/Edit/Tab/Roles.php +++ b/app/code/Magento/User/Block/User/Edit/Tab/Roles.php @@ -32,7 +32,7 @@ class Roles extends \Magento\Backend\Block\Widget\Grid\Extended /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -42,24 +42,24 @@ class Roles extends \Magento\Backend\Block\Widget\Grid\Extended protected $_userRolesFactory; /** - * @var \Magento\Json\EncoderInterface + * @var \Magento\Framework\Json\EncoderInterface */ protected $_jsonEncoder; /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Backend\Helper\Data $backendHelper - * @param \Magento\Json\EncoderInterface $jsonEncoder + * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\User\Model\Resource\Role\CollectionFactory $userRolesFactory - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Backend\Helper\Data $backendHelper, - \Magento\Json\EncoderInterface $jsonEncoder, + \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\User\Model\Resource\Role\CollectionFactory $userRolesFactory, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, array $data = array() ) { $this->_jsonEncoder = $jsonEncoder; diff --git a/app/code/Magento/User/Controller/Adminhtml/Auth.php b/app/code/Magento/User/Controller/Adminhtml/Auth.php index 532417c8c1036..1f7513a759fee 100644 --- a/app/code/Magento/User/Controller/Adminhtml/Auth.php +++ b/app/code/Magento/User/Controller/Adminhtml/Auth.php @@ -86,7 +86,7 @@ public function forgotpasswordAction() $this->messageManager->addSuccess( __( 'If there is an account associated with %1 you will receive an email with a link to reset your password.', - $this->_objectManager->get('Magento\Escaper')->escapeHtml($email) + $this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($email) ) ); // @codingStandardsIgnoreEnd @@ -174,7 +174,7 @@ public function resetPasswordPostAction() $this->getResponse()->setRedirect( $this->_objectManager->get('Magento\Backend\Helper\Data')->getHomePageUrl() ); - } catch (\Magento\Model\Exception $exception) { + } catch (\Magento\Framework\Model\Exception $exception) { $this->messageManager->addMessages($exception->getMessages()); $this->_redirect( 'adminhtml/auth/resetpassword', @@ -189,7 +189,7 @@ public function resetPasswordPostAction() * @param int $userId * @param string $resetPasswordToken * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _validateResetPasswordLinkToken($userId, $resetPasswordToken) { @@ -199,18 +199,18 @@ protected function _validateResetPasswordLinkToken($userId, $resetPasswordToken) $resetPasswordToken ) || empty($resetPasswordToken) || empty($userId) || $userId < 0 ) { - throw new \Magento\Model\Exception(__('Please correct the password reset token.')); + throw new \Magento\Framework\Model\Exception(__('Please correct the password reset token.')); } /** @var $user \Magento\User\Model\User */ $user = $this->_userFactory->create()->load($userId); if (!$user->getId()) { - throw new \Magento\Model\Exception(__('Please specify the correct account and try again.')); + throw new \Magento\Framework\Model\Exception(__('Please specify the correct account and try again.')); } $userToken = $user->getRpToken(); if (strcmp($userToken, $resetPasswordToken) != 0 || $user->isResetPasswordLinkTokenExpired()) { - throw new \Magento\Model\Exception(__('Your password reset link has expired.')); + throw new \Magento\Framework\Model\Exception(__('Your password reset link has expired.')); } } diff --git a/app/code/Magento/User/Controller/Adminhtml/User.php b/app/code/Magento/User/Controller/Adminhtml/User.php index 5dd25d0d9b5ab..74c2560672359 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User.php +++ b/app/code/Magento/User/Controller/Adminhtml/User.php @@ -28,7 +28,7 @@ class User extends \Magento\Backend\App\AbstractAction /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -41,12 +41,12 @@ class User extends \Magento\Backend\App\AbstractAction /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\User\Model\UserFactory $userFactory */ public function __construct( \Magento\Backend\App\Action\Context $context, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\User\Model\UserFactory $userFactory ) { parent::__construct($context); @@ -112,7 +112,7 @@ public function editAction() return; } } else { - $model->setInterfaceLocale(\Magento\Locale\ResolverInterface::DEFAULT_LOCALE); + $model->setInterfaceLocale(\Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE); } $this->_title->add($model->getId() ? $model->getName() : __('New User')); @@ -160,7 +160,7 @@ public function saveAction() $currentUser = $this->_objectManager->get('Magento\Backend\Model\Auth\Session')->getUser(); if ($userId == $currentUser->getId() && $this->_objectManager->get( - 'Magento\Locale\Validator' + 'Magento\Framework\Locale\Validator' )->isValid( $data['interface_locale'] ) @@ -177,7 +177,7 @@ public function saveAction() $this->messageManager->addSuccess(__('You saved the user.')); $this->_getSession()->setUserData(false); $this->_redirect('adminhtml/*/'); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addMessages($e->getMessages()); $this->_getSession()->setUserData($data); $this->_redirect('adminhtml/*/edit', array('_current' => true)); diff --git a/app/code/Magento/User/Controller/Adminhtml/User/Role.php b/app/code/Magento/User/Controller/Adminhtml/User/Role.php index da3ac59c511cb..c462050041dfd 100644 --- a/app/code/Magento/User/Controller/Adminhtml/User/Role.php +++ b/app/code/Magento/User/Controller/Adminhtml/User/Role.php @@ -30,7 +30,7 @@ class Role extends \Magento\Backend\App\AbstractAction /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -64,7 +64,7 @@ class Role extends \Magento\Backend\App\AbstractAction /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\User\Model\RoleFactory $roleFactory * @param \Magento\User\Model\UserFactory $userFactory * @param \Magento\User\Model\RulesFactory $rulesFactory @@ -72,7 +72,7 @@ class Role extends \Magento\Backend\App\AbstractAction */ public function __construct( \Magento\Backend\App\Action\Context $context, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\User\Model\RoleFactory $roleFactory, \Magento\User\Model\UserFactory $userFactory, \Magento\User\Model\RulesFactory $rulesFactory, @@ -226,7 +226,7 @@ public function saveRoleAction() $isAll = $this->getRequest()->getParam('all'); if ($isAll) { - $resource = array($this->_objectManager->get('Magento\Acl\RootResource')->getId()); + $resource = array($this->_objectManager->get('Magento\Framework\Acl\RootResource')->getId()); } $role = $this->_initRole('role_id'); @@ -262,7 +262,7 @@ public function saveRoleAction() $this->_addUserToRole($nRuid, $role->getId()); } $this->messageManager->addSuccess(__('You saved the role.')); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('An error occurred while saving this role.')); diff --git a/app/code/Magento/User/Helper/Data.php b/app/code/Magento/User/Helper/Data.php index e77b950d701bf..00c128f28948b 100644 --- a/app/code/Magento/User/Helper/Data.php +++ b/app/code/Magento/User/Helper/Data.php @@ -45,19 +45,19 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper protected $_config; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Backend\App\ConfigInterface $config - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom */ public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Backend\App\ConfigInterface $config, - \Magento\Math\Random $mathRandom + \Magento\Framework\Math\Random $mathRandom ) { $this->_config = $config; $this->mathRandom = $mathRandom; diff --git a/app/code/Magento/User/Model/Acl/Loader/Role.php b/app/code/Magento/User/Model/Acl/Loader/Role.php index 4aba7d4266c28..4054deab32508 100644 --- a/app/code/Magento/User/Model/Acl/Loader/Role.php +++ b/app/code/Magento/User/Model/Acl/Loader/Role.php @@ -26,7 +26,7 @@ use Magento\User\Model\Acl\Role\Group as RoleGroup; use Magento\User\Model\Acl\Role\User as RoleUser; -class Role implements \Magento\Acl\LoaderInterface +class Role implements \Magento\Framework\Acl\LoaderInterface { /** * @var \Magento\Framework\App\Resource @@ -61,10 +61,10 @@ public function __construct( /** * Populate ACL with roles from external storage * - * @param \Magento\Acl $acl + * @param \Magento\Framework\Acl $acl * @return void */ - public function populateAcl(\Magento\Acl $acl) + public function populateAcl(\Magento\Framework\Acl $acl) { $roleTableName = $this->_resource->getTableName('admin_role'); $adapter = $this->_resource->getConnection('core_read'); diff --git a/app/code/Magento/User/Model/Acl/Loader/Rule.php b/app/code/Magento/User/Model/Acl/Loader/Rule.php index c08e16b1cd9c0..25230c259ff89 100644 --- a/app/code/Magento/User/Model/Acl/Loader/Rule.php +++ b/app/code/Magento/User/Model/Acl/Loader/Rule.php @@ -23,7 +23,7 @@ */ namespace Magento\User\Model\Acl\Loader; -class Rule implements \Magento\Acl\LoaderInterface +class Rule implements \Magento\Framework\Acl\LoaderInterface { /** * @var \Magento\Framework\App\Resource @@ -31,13 +31,13 @@ class Rule implements \Magento\Acl\LoaderInterface protected $_resource; /** - * @param \Magento\Acl\RootResource $rootResource + * @param \Magento\Framework\Acl\RootResource $rootResource * @param \Magento\Framework\App\Resource $resource * @param array $data * @SuppressWarnings(PHPMD.UnusedFormalParameter): */ public function __construct( - \Magento\Acl\RootResource $rootResource, + \Magento\Framework\Acl\RootResource $rootResource, \Magento\Framework\App\Resource $resource, array $data = array() ) { @@ -48,10 +48,10 @@ public function __construct( /** * Populate ACL with rules from external storage * - * @param \Magento\Acl $acl + * @param \Magento\Framework\Acl $acl * @return void */ - public function populateAcl(\Magento\Acl $acl) + public function populateAcl(\Magento\Framework\Acl $acl) { $ruleTable = $this->_resource->getTableName("admin_rule"); diff --git a/app/code/Magento/User/Model/Resource/Permissions/Collection.php b/app/code/Magento/User/Model/Resource/Permissions/Collection.php index f31ab4b3fa57c..5ab0f3e814323 100644 --- a/app/code/Magento/User/Model/Resource/Permissions/Collection.php +++ b/app/code/Magento/User/Model/Resource/Permissions/Collection.php @@ -32,7 +32,7 @@ * @package Magento_User * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Initialize resource diff --git a/app/code/Magento/User/Model/Resource/Role.php b/app/code/Magento/User/Model/Resource/Role.php index 22bf0ed7bc532..ea45c024f84d9 100644 --- a/app/code/Magento/User/Model/Resource/Role.php +++ b/app/code/Magento/User/Model/Resource/Role.php @@ -28,7 +28,7 @@ /** * Admin role resource model */ -class Role extends \Magento\Model\Resource\Db\AbstractDb +class Role extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Users table @@ -47,24 +47,24 @@ class Role extends \Magento\Model\Resource\Db\AbstractDb /** * Cache * - * @var \Magento\Cache\FrontendInterface + * @var \Magento\Framework\Cache\FrontendInterface */ protected $_cache; /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $dateTime; /** * @param \Magento\Framework\App\Resource $resource * @param \Magento\Framework\App\CacheInterface $cache - * @param \Magento\Stdlib\DateTime $dateTime + * @param \Magento\Framework\Stdlib\DateTime $dateTime */ public function __construct( \Magento\Framework\App\Resource $resource, \Magento\Framework\App\CacheInterface $cache, - \Magento\Stdlib\DateTime $dateTime + \Magento\Framework\Stdlib\DateTime $dateTime ) { $this->dateTime = $dateTime; parent::__construct($resource); @@ -87,10 +87,10 @@ protected function _construct() /** * Process role before saving * - * @param \Magento\Model\AbstractModel $role + * @param \Magento\Framework\Model\AbstractModel $role * @return $this */ - protected function _beforeSave(\Magento\Model\AbstractModel $role) + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $role) { if (!$role->getId()) { $role->setCreated($this->dateTime->formatDate(true)); @@ -134,10 +134,10 @@ protected function _beforeSave(\Magento\Model\AbstractModel $role) /** * Process role after saving * - * @param \Magento\Model\AbstractModel $role + * @param \Magento\Framework\Model\AbstractModel $role * @return $this */ - protected function _afterSave(\Magento\Model\AbstractModel $role) + protected function _afterSave(\Magento\Framework\Model\AbstractModel $role) { $this->_updateRoleUsersAcl($role); $this->_cache->clean(\Zend_Cache::CLEANING_MODE_MATCHING_TAG, array(\Magento\Backend\Block\Menu::CACHE_TAGS)); @@ -147,10 +147,10 @@ protected function _afterSave(\Magento\Model\AbstractModel $role) /** * Process role after deleting * - * @param \Magento\Model\AbstractModel $role + * @param \Magento\Framework\Model\AbstractModel $role * @return $this */ - protected function _afterDelete(\Magento\Model\AbstractModel $role) + protected function _afterDelete(\Magento\Framework\Model\AbstractModel $role) { $adapter = $this->_getWriteAdapter(); diff --git a/app/code/Magento/User/Model/Resource/Role/Collection.php b/app/code/Magento/User/Model/Resource/Role/Collection.php index ff99e071531fc..3cce8f1b699cc 100644 --- a/app/code/Magento/User/Model/Resource/Role/Collection.php +++ b/app/code/Magento/User/Model/Resource/Role/Collection.php @@ -28,7 +28,7 @@ /** * Admin role collection */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Initialize resource model diff --git a/app/code/Magento/User/Model/Resource/Role/User/Collection.php b/app/code/Magento/User/Model/Resource/Role/User/Collection.php index d1f4e10817b11..16d87500f4049 100644 --- a/app/code/Magento/User/Model/Resource/Role/User/Collection.php +++ b/app/code/Magento/User/Model/Resource/Role/User/Collection.php @@ -32,7 +32,7 @@ * @package Magento_User * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Initialize resource model diff --git a/app/code/Magento/User/Model/Resource/Rules.php b/app/code/Magento/User/Model/Resource/Rules.php index 2a6a5b0c01f09..1a82b9a498289 100644 --- a/app/code/Magento/User/Model/Resource/Rules.php +++ b/app/code/Magento/User/Model/Resource/Rules.php @@ -26,45 +26,45 @@ /** * Admin rule resource model */ -class Rules extends \Magento\Model\Resource\Db\AbstractDb +class Rules extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Root ACL resource * - * @var \Magento\Acl\RootResource + * @var \Magento\Framework\Acl\RootResource */ protected $_rootResource; /** * Acl object cache * - * @var \Magento\Acl\CacheInterface + * @var \Magento\Framework\Acl\CacheInterface */ protected $_aclCache; /** - * @var \Magento\Acl\Builder + * @var \Magento\Framework\Acl\Builder */ protected $_aclBuilder; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; /** * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Acl\Builder $aclBuilder - * @param \Magento\Logger $logger - * @param \Magento\Acl\RootResource $rootResource - * @param \Magento\Acl\CacheInterface $aclCache + * @param \Magento\Framework\Acl\Builder $aclBuilder + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Acl\RootResource $rootResource + * @param \Magento\Framework\Acl\CacheInterface $aclCache */ public function __construct( \Magento\Framework\App\Resource $resource, - \Magento\Acl\Builder $aclBuilder, - \Magento\Logger $logger, - \Magento\Acl\RootResource $rootResource, - \Magento\Acl\CacheInterface $aclCache + \Magento\Framework\Acl\Builder $aclBuilder, + \Magento\Framework\Logger $logger, + \Magento\Framework\Acl\RootResource $rootResource, + \Magento\Framework\Acl\CacheInterface $aclCache ) { $this->_aclBuilder = $aclBuilder; parent::__construct($resource); @@ -88,7 +88,7 @@ protected function _construct() * * @param \Magento\User\Model\Rules $rule * @return void - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function saveRel(\Magento\User\Model\Rules $rule) { @@ -112,17 +112,17 @@ public function saveRel(\Magento\User\Model\Rules $rule) // If all was selected save it only and nothing else. if ($postedResources === array($this->_rootResource->getId())) { - $insertData = $this->_prepareDataForTable(new \Magento\Object($row), $this->getMainTable()); + $insertData = $this->_prepareDataForTable(new \Magento\Framework\Object($row), $this->getMainTable()); $adapter->insert($this->getMainTable(), $insertData); } else { $acl = $this->_aclBuilder->getAcl(); - /** @var $resource \Magento\Acl\Resource */ + /** @var $resource \Magento\Framework\Acl\Resource */ foreach ($acl->getResources() as $resourceId) { $row['permission'] = in_array($resourceId, $postedResources) ? 'allow' : 'deny'; $row['resource_id'] = $resourceId; - $insertData = $this->_prepareDataForTable(new \Magento\Object($row), $this->getMainTable()); + $insertData = $this->_prepareDataForTable(new \Magento\Framework\Object($row), $this->getMainTable()); $adapter->insert($this->getMainTable(), $insertData); } } @@ -130,7 +130,7 @@ public function saveRel(\Magento\User\Model\Rules $rule) $adapter->commit(); $this->_aclCache->clean(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $adapter->rollBack(); throw $e; } catch (\Exception $e) { diff --git a/app/code/Magento/User/Model/Resource/Rules/Collection.php b/app/code/Magento/User/Model/Resource/Rules/Collection.php index a343164a6d66b..f88508b9ae599 100644 --- a/app/code/Magento/User/Model/Resource/Rules/Collection.php +++ b/app/code/Magento/User/Model/Resource/Rules/Collection.php @@ -32,7 +32,7 @@ * @package Magento_User * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Initialize resource model diff --git a/app/code/Magento/User/Model/Resource/Setup.php b/app/code/Magento/User/Model/Resource/Setup.php index a352155c51d40..da215bd1e5866 100644 --- a/app/code/Magento/User/Model/Resource/Setup.php +++ b/app/code/Magento/User/Model/Resource/Setup.php @@ -29,7 +29,7 @@ * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ -class Setup extends \Magento\Module\Setup +class Setup extends \Magento\Framework\Module\Setup { /** * Role model factory @@ -60,7 +60,7 @@ class Setup extends \Magento\Module\Setup protected $_rulesFactory; /** - * @param \Magento\Module\Setup\Context $context + * @param \Magento\Framework\Module\Setup\Context $context * @param string $resourceName * @param \Magento\User\Model\Resource\Role\CollectionFactory $roleCollectionFactory * @param \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory @@ -70,14 +70,14 @@ class Setup extends \Magento\Module\Setup * @param string $connectionName */ public function __construct( - \Magento\Module\Setup\Context $context, + \Magento\Framework\Module\Setup\Context $context, $resourceName, \Magento\User\Model\Resource\Role\CollectionFactory $roleCollectionFactory, \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory, \Magento\User\Model\RoleFactory $roleFactory, \Magento\User\Model\RulesFactory $rulesFactory, $moduleName = 'Magento_User', - $connectionName = \Magento\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION + $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION ) { $this->_roleCollectionFactory = $roleCollectionFactory; $this->_rulesCollectionFactory = $rulesCollectionFactory; diff --git a/app/code/Magento/User/Model/Resource/User.php b/app/code/Magento/User/Model/Resource/User.php index f7c3bc66dfccd..07ca74f8ae8fe 100644 --- a/app/code/Magento/User/Model/Resource/User.php +++ b/app/code/Magento/User/Model/Resource/User.php @@ -30,10 +30,10 @@ /** * ACL user resource */ -class User extends \Magento\Model\Resource\Db\AbstractDb +class User extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** - * @var \Magento\Acl\CacheInterface + * @var \Magento\Framework\Acl\CacheInterface */ protected $_aclCache; @@ -45,7 +45,7 @@ class User extends \Magento\Model\Resource\Db\AbstractDb protected $_roleFactory; /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $dateTime; @@ -53,15 +53,15 @@ class User extends \Magento\Model\Resource\Db\AbstractDb * Construct * * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Acl\CacheInterface $aclCache + * @param \Magento\Framework\Acl\CacheInterface $aclCache * @param \Magento\User\Model\RoleFactory $roleFactory - * @param \Magento\Stdlib\DateTime $dateTime + * @param \Magento\Framework\Stdlib\DateTime $dateTime */ public function __construct( \Magento\Framework\App\Resource $resource, - \Magento\Acl\CacheInterface $aclCache, + \Magento\Framework\Acl\CacheInterface $aclCache, \Magento\User\Model\RoleFactory $roleFactory, - \Magento\Stdlib\DateTime $dateTime + \Magento\Framework\Stdlib\DateTime $dateTime ) { parent::__construct($resource); $this->_aclCache = $aclCache; @@ -139,7 +139,7 @@ public function hasAssigned2Role($user) { if (is_numeric($user)) { $userId = $user; - } elseif ($user instanceof \Magento\Model\AbstractModel) { + } elseif ($user instanceof \Magento\Framework\Model\AbstractModel) { $userId = $user->getUserId(); } else { return null; @@ -162,10 +162,10 @@ public function hasAssigned2Role($user) /** * Set created/modified values before user save * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return $this */ - protected function _beforeSave(\Magento\Model\AbstractModel $user) + protected function _beforeSave(\Magento\Framework\Model\AbstractModel $user) { if ($user->isObjectNew()) { $user->setCreated($this->dateTime->formatDate(true)); @@ -178,10 +178,10 @@ protected function _beforeSave(\Magento\Model\AbstractModel $user) /** * Unserialize user extra data after user save * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return $this */ - protected function _afterSave(\Magento\Model\AbstractModel $user) + protected function _afterSave(\Magento\Framework\Model\AbstractModel $user) { $user->setExtra(unserialize($user->getExtra())); if ($user->hasRoleId()) { @@ -216,12 +216,12 @@ protected function _createUserRole($parentId, ModelUser $user) /** @var \Magento\User\Model\Role $parentRole */ $parentRole = $this->_roleFactory->create()->load($parentId); } else { - $role = new \Magento\Object(); + $role = new \Magento\Framework\Object(); $role->setTreeLevel(0); } if ($parentRole->getId()) { - $data = new \Magento\Object( + $data = new \Magento\Framework\Object( array( 'parent_id' => $parentRole->getId(), 'tree_level' => $parentRole->getTreeLevel() + 1, @@ -241,10 +241,10 @@ protected function _createUserRole($parentId, ModelUser $user) /** * Unserialize user extra data after user load * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return $this */ - protected function _afterLoad(\Magento\Model\AbstractModel $user) + protected function _afterLoad(\Magento\Framework\Model\AbstractModel $user) { if (is_string($user->getExtra())) { $user->setExtra(unserialize($user->getExtra())); @@ -255,11 +255,11 @@ protected function _afterLoad(\Magento\Model\AbstractModel $user) /** * Delete user role record with user * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return bool - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ - public function delete(\Magento\Model\AbstractModel $user) + public function delete(\Magento\Framework\Model\AbstractModel $user) { $this->_beforeDelete($user); $adapter = $this->_getWriteAdapter(); @@ -271,7 +271,7 @@ public function delete(\Magento\Model\AbstractModel $user) $adapter->delete($this->getMainTable(), $conditions); $adapter->delete($this->getTable('admin_role'), $conditions); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { throw $e; return false; } catch (\Exception $e) { @@ -286,10 +286,10 @@ public function delete(\Magento\Model\AbstractModel $user) /** * Get user roles * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return array */ - public function getRoles(\Magento\Model\AbstractModel $user) + public function getRoles(\Magento\Framework\Model\AbstractModel $user) { if (!$user->getId()) { return array(); @@ -323,10 +323,10 @@ public function getRoles(\Magento\Model\AbstractModel $user) /** * Delete user role * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return $this */ - public function deleteFromRole(\Magento\Model\AbstractModel $user) + public function deleteFromRole(\Magento\Framework\Model\AbstractModel $user) { if ($user->getUserId() <= 0) { return $this; @@ -346,10 +346,10 @@ public function deleteFromRole(\Magento\Model\AbstractModel $user) /** * Check if role user exists * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return array */ - public function roleUserExists(\Magento\Model\AbstractModel $user) + public function roleUserExists(\Magento\Framework\Model\AbstractModel $user) { if ($user->getUserId() > 0) { $roleTable = $this->getTable('admin_role'); @@ -369,10 +369,10 @@ public function roleUserExists(\Magento\Model\AbstractModel $user) /** * Check if user exists * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return array */ - public function userExists(\Magento\Model\AbstractModel $user) + public function userExists(\Magento\Framework\Model\AbstractModel $user) { $adapter = $this->_getReadAdapter(); $select = $adapter->select(); @@ -397,10 +397,10 @@ public function userExists(\Magento\Model\AbstractModel $user) /** * Whether a user's identity is confirmed * - * @param \Magento\Model\AbstractModel $user + * @param \Magento\Framework\Model\AbstractModel $user * @return bool */ - public function isUserUnique(\Magento\Model\AbstractModel $user) + public function isUserUnique(\Magento\Framework\Model\AbstractModel $user) { return !$this->userExists($user); } @@ -408,7 +408,7 @@ public function isUserUnique(\Magento\Model\AbstractModel $user) /** * Save user extra data * - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @param string $data * @return $this */ diff --git a/app/code/Magento/User/Model/Resource/User/Collection.php b/app/code/Magento/User/Model/Resource/User/Collection.php index da464402a165d..f1c8cea051423 100644 --- a/app/code/Magento/User/Model/Resource/User/Collection.php +++ b/app/code/Magento/User/Model/Resource/User/Collection.php @@ -32,7 +32,7 @@ * @package Magento_User * @author Magento Core Team */ -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Define resource model diff --git a/app/code/Magento/User/Model/Resource/User/Locked/Collection.php b/app/code/Magento/User/Model/Resource/User/Locked/Collection.php index 29f552d953184..15810d68342f0 100644 --- a/app/code/Magento/User/Model/Resource/User/Locked/Collection.php +++ b/app/code/Magento/User/Model/Resource/User/Locked/Collection.php @@ -37,7 +37,7 @@ class Collection extends \Magento\User\Model\Resource\User\Collection /** * Collection Init Select * - * @param \Magento\Model\Resource\Db\AbstractDb $resource + * @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource * @return $this */ protected function _initSelect() diff --git a/app/code/Magento/User/Model/Role.php b/app/code/Magento/User/Model/Role.php index c436a8a92cac2..ae3bc63f6346a 100644 --- a/app/code/Magento/User/Model/Role.php +++ b/app/code/Magento/User/Model/Role.php @@ -43,7 +43,7 @@ * @method string getRoleName() * @method \Magento\User\Model\Role setRoleName(string $value) */ -class Role extends \Magento\Model\AbstractModel +class Role extends \Magento\Framework\Model\AbstractModel { /** * @var string @@ -56,16 +56,16 @@ class Role extends \Magento\Model\AbstractModel protected $_userRolesFactory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param Resource\Role\User\CollectionFactory $userRolesFactory * @param Resource\Role $resource * @param Resource\Role\Collection $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\User\Model\Resource\Role\User\CollectionFactory $userRolesFactory, \Magento\User\Model\Resource\Role $resource, \Magento\User\Model\Resource\Role\Collection $resourceCollection, diff --git a/app/code/Magento/User/Model/Rules.php b/app/code/Magento/User/Model/Rules.php index 579efc6e762c8..abfa69254f888 100644 --- a/app/code/Magento/User/Model/Rules.php +++ b/app/code/Magento/User/Model/Rules.php @@ -39,20 +39,20 @@ * @method string getPermission() * @method \Magento\User\Model\Rules setPermission(string $value) */ -class Rules extends \Magento\Model\AbstractModel +class Rules extends \Magento\Framework\Model\AbstractModel { /** * Class constructor * - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param Resource\Rules $resource * @param Resource\Permissions\Collection $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\User\Model\Resource\Rules $resource, \Magento\User\Model\Resource\Permissions\Collection $resourceCollection, array $data = array() diff --git a/app/code/Magento/User/Model/User.php b/app/code/Magento/User/Model/User.php index c75148c015975..634bdfac5bda7 100644 --- a/app/code/Magento/User/Model/User.php +++ b/app/code/Magento/User/Model/User.php @@ -54,7 +54,7 @@ * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.LongVariable) */ -class User extends \Magento\Model\AbstractModel implements \Magento\Backend\Model\Auth\Credential\StorageInterface +class User extends \Magento\Framework\Model\AbstractModel implements \Magento\Backend\Model\Auth\Credential\StorageInterface { /** * Configuration paths for email templates and identities @@ -108,7 +108,7 @@ class User extends \Magento\Model\AbstractModel implements \Magento\Backend\Mode /** * Factory for validator composite object * - * @var \Magento\Validator\ObjectFactory + * @var \Magento\Framework\Validator\ObjectFactory */ protected $_validatorObject; @@ -120,17 +120,17 @@ class User extends \Magento\Model\AbstractModel implements \Magento\Backend\Mode protected $_roleFactory; /** - * @var \Magento\Encryption\EncryptorInterface + * @var \Magento\Framework\Encryption\EncryptorInterface */ protected $_encryptor; /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $dateTime; /** - * @var \Magento\Mail\Template\TransportBuilder + * @var \Magento\Framework\Mail\Template\TransportBuilder */ protected $_transportBuilder; @@ -140,35 +140,35 @@ class User extends \Magento\Model\AbstractModel implements \Magento\Backend\Mode protected $_storeManager; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\User\Helper\Data $userData * @param \Magento\Backend\App\ConfigInterface $config - * @param \Magento\Validator\ObjectFactory $validatorObjectFactory + * @param \Magento\Framework\Validator\ObjectFactory $validatorObjectFactory * @param \Magento\User\Model\RoleFactory $roleFactory - * @param \Magento\Mail\Template\TransportBuilder $transportBuilder - * @param \Magento\Encryption\EncryptorInterface $encryptor - * @param \Magento\Stdlib\DateTime $dateTime - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder + * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor + * @param \Magento\Framework\Stdlib\DateTime $dateTime + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\User\Helper\Data $userData, \Magento\Backend\App\ConfigInterface $config, - \Magento\Validator\ObjectFactory $validatorObjectFactory, + \Magento\Framework\Validator\ObjectFactory $validatorObjectFactory, \Magento\User\Model\RoleFactory $roleFactory, - \Magento\Mail\Template\TransportBuilder $transportBuilder, - \Magento\Encryption\EncryptorInterface $encryptor, - \Magento\Stdlib\DateTime $dateTime, + \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, + \Magento\Framework\Encryption\EncryptorInterface $encryptor, + \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_encryptor = $encryptor; @@ -220,14 +220,14 @@ public function __wakeup() { parent::__wakeup(); $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); - $this->_eventManager = $objectManager->get('Magento\Event\ManagerInterface'); + $this->_eventManager = $objectManager->get('Magento\Framework\Event\ManagerInterface'); $this->_userData = $objectManager->get('Magento\User\Helper\Data'); $this->_config = $objectManager->get('Magento\Backend\App\ConfigInterface'); - $this->_registry = $objectManager->get('Magento\Registry'); - $this->_validatorObject = $objectManager->get('Magento\Validator\ObjectFactory'); + $this->_registry = $objectManager->get('Magento\Framework\Registry'); + $this->_validatorObject = $objectManager->get('Magento\Framework\Validator\ObjectFactory'); $this->_roleFactory = $objectManager->get('Magento\User\Model\RoleFactory'); - $this->_encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface'); - $this->_transportBuilder = $objectManager->get('Magento\Mail\Template\TransportBuilder'); + $this->_encryptor = $objectManager->get('Magento\Framework\Encryption\EncryptorInterface'); + $this->_transportBuilder = $objectManager->get('Magento\Framework\Mail\Template\TransportBuilder'); $this->_storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface'); } @@ -293,7 +293,7 @@ protected function _getValidationRulesBeforeSave() $emailValidity = new \Zend_Validate_EmailAddress(); $emailValidity->setMessage(__('Please enter a valid email.'), \Zend_Validate_EmailAddress::INVALID); - /** @var $validator \Magento\Validator\Object */ + /** @var $validator \Magento\Framework\Validator\Object */ $validator = $this->_validatorObject->create(); $validator->addRule( $userNameNotEmpty, @@ -318,10 +318,10 @@ protected function _getValidationRulesBeforeSave() /** * Add validation rules for the password management fields * - * @param \Magento\Validator\Object $validator + * @param \Magento\Framework\Validator\Object $validator * @return void */ - protected function _addPasswordValidation(\Magento\Validator\Object $validator) + protected function _addPasswordValidation(\Magento\Framework\Validator\Object $validator) { $passwordNotEmpty = new \Zend_Validate_NotEmpty(); $passwordNotEmpty->setMessage(__('Password is required field.'), \Zend_Validate_NotEmpty::IS_EMPTY); @@ -439,11 +439,11 @@ public function roleUserExists() public function sendPasswordResetConfirmationEmail() { // Set all required params and send emails - /** @var \Magento\Mail\TransportInterface $transport */ + /** @var \Magento\Framework\Mail\TransportInterface $transport */ $transport = $this->_transportBuilder->setTemplateIdentifier( $this->_config->getValue(self::XML_PATH_FORGOT_EMAIL_TEMPLATE) )->setTemplateOptions( - array('area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => 0) + array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => 0) )->setTemplateVars( array('user' => $this, 'store' => $this->_storeManager->getStore(0)) )->setFrom( @@ -465,11 +465,11 @@ public function sendPasswordResetConfirmationEmail() public function sendPasswordResetNotificationEmail() { // Set all required params and send emails - /** @var \Magento\Mail\TransportInterface $transport */ + /** @var \Magento\Framework\Mail\TransportInterface $transport */ $transport = $this->_transportBuilder->setTemplateIdentifier( $this->_config->getValue(self::XML_PATH_RESET_PASSWORD_TEMPLATE) )->setTemplateOptions( - array('area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => 0) + array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => 0) )->setTemplateVars( array('user' => $this, 'store' => $this->_storeManager->getStore(0)) )->setFrom( @@ -519,7 +519,7 @@ public function getAclRole() * @param string $username * @param string $password * @return bool - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @throws \Magento\Backend\Model\Auth\Exception * @throws \Magento\Backend\Model\Auth\Plugin\Exception */ @@ -550,7 +550,7 @@ public function authenticate($username, $password) 'admin_user_authenticate_after', array('username' => $username, 'password' => $password, 'user' => $this, 'result' => $result) ); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->unsetData(); throw $e; } @@ -633,12 +633,12 @@ protected function _getEncodedPassword($password) * * @param string $newToken * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function changeResetPasswordLinkToken($newToken) { if (!is_string($newToken) || empty($newToken)) { - throw new \Magento\Model\Exception(__('Please correct the password reset token.')); + throw new \Magento\Framework\Model\Exception(__('Please correct the password reset token.')); } $this->setRpToken($newToken); $this->setRpTokenCreatedAt($this->dateTime->now()); diff --git a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php index 6fbbafac803a3..a8536f7675e49 100644 --- a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php +++ b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -222,7 +222,7 @@ ); $tableName = $installer->getTable('admin_rule'); -/** @var \Magento\DB\Adapter\AdapterInterface $connection */ +/** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */ $connection = $installer->getConnection(); $select = $connection->select(); diff --git a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.3-1.6.1.4.php b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.3-1.6.1.4.php index c0a46819f73bf..bb7fc9bc48f80 100644 --- a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.3-1.6.1.4.php +++ b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.3-1.6.1.4.php @@ -24,14 +24,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); $tableName = $installer->getTable('admin_rule'); if ($tableName) { - /** @var \Magento\DB\Adapter\AdapterInterface $connection */ + /** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */ $connection = $installer->getConnection(); $remove = array( 'Magento_Catalog::catalog_attributes', diff --git a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.4-1.6.1.5.php b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.4-1.6.1.5.php index cd61107793271..19c515ace7689 100644 --- a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.4-1.6.1.5.php +++ b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.4-1.6.1.5.php @@ -22,14 +22,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); $tableName = $installer->getTable('admin_rule'); if ($tableName) { - /** @var \Magento\DB\Adapter\AdapterInterface $connection */ + /** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */ $connection = $installer->getConnection(); $connection->delete($tableName, array('resource_id = ?' => 'Magento_Oauth::oauth')); } diff --git a/app/code/Magento/User/etc/adminhtml/acl.xml b/app/code/Magento/User/etc/adminhtml/acl.xml index cb727cc541e14..6ee9fd9baccd4 100644 --- a/app/code/Magento/User/etc/adminhtml/acl.xml +++ b/app/code/Magento/User/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/User/etc/adminhtml/di.xml b/app/code/Magento/User/etc/adminhtml/di.xml index 98c18d3a10659..636b03d6fe597 100644 --- a/app/code/Magento/User/etc/adminhtml/di.xml +++ b/app/code/Magento/User/etc/adminhtml/di.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/User/etc/di.xml b/app/code/Magento/User/etc/di.xml index 15caac252044d..c6c6dee120177 100644 --- a/app/code/Magento/User/etc/di.xml +++ b/app/code/Magento/User/etc/di.xml @@ -23,27 +23,27 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - Magento\Acl\RootResource\Proxy - Magento\Acl\Cache\Proxy + Magento\Framework\Acl\RootResource\Proxy + Magento\Framework\Acl\Cache\Proxy - Magento\Acl\Cache\Proxy + Magento\Framework\Acl\Cache\Proxy - + Magento\User\Model\Resource\Setup - + Magento\User\Model\Acl\Loader\Rule Magento\User\Model\Acl\Loader\Role diff --git a/app/code/Magento/User/etc/module.xml b/app/code/Magento/User/etc/module.xml index f8365a8a1546e..ceb5662c291b4 100644 --- a/app/code/Magento/User/etc/module.xml +++ b/app/code/Magento/User/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php b/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php index 4ab35c4a92f78..77eac56060a48 100644 --- a/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php +++ b/app/code/Magento/User/sql/user_setup/install-1.6.0.0.php @@ -25,7 +25,7 @@ */ $installer = $this; -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); @@ -37,19 +37,19 @@ $installer->getTable('admin_assert') )->addColumn( 'assert_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Assert ID' )->addColumn( 'assert_type', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 20, array('nullable' => true, 'default' => null), 'Assert Type' )->addColumn( 'assert_data', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Assert Data' @@ -67,43 +67,43 @@ $installer->getTable('admin_role') )->addColumn( 'role_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Role ID' )->addColumn( 'parent_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Parent Role ID' )->addColumn( 'tree_level', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Role Tree Level' )->addColumn( 'sort_order', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Role Sort Order' )->addColumn( 'role_type', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 1, array('nullable' => false, 'default' => '0'), 'Role Type' )->addColumn( 'user_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'User ID' )->addColumn( 'role_name', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 50, array('nullable' => true, 'default' => null), 'Role Name' @@ -126,43 +126,43 @@ $installer->getTable('admin_rule') )->addColumn( 'rule_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Rule ID' )->addColumn( 'role_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Role ID' )->addColumn( 'resource_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => true, 'default' => null), 'Resource ID' )->addColumn( 'privileges', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 20, array('nullable' => true), 'Privileges' )->addColumn( 'assert_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Assert ID' )->addColumn( 'role_type', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 1, array(), 'Role Type' )->addColumn( 'permission', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 10, array(), 'Permission' @@ -177,8 +177,8 @@ 'role_id', $installer->getTable('admin_role'), 'role_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Admin Rule Table' ); @@ -193,79 +193,79 @@ $installer->getTable('admin_user') )->addColumn( 'user_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'User ID' )->addColumn( 'firstname', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 32, array('nullable' => true), 'User First Name' )->addColumn( 'lastname', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 32, array('nullable' => true), 'User Last Name' )->addColumn( 'email', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 128, array('nullable' => true), 'User Email' )->addColumn( 'username', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 40, array('nullable' => true), 'User Login' )->addColumn( 'password', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 40, array('nullable' => true), 'User Password' )->addColumn( 'created', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, - array('nullable' => false, 'default' => \Magento\DB\Ddl\Table::TIMESTAMP_INIT), + array('nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT), 'User Created Time' )->addColumn( 'modified', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'User Modified Time' )->addColumn( 'logdate', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'User Last Login Time' )->addColumn( 'lognum', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'User Login Number' )->addColumn( 'reload_acl_flag', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('nullable' => false, 'default' => '0'), 'Reload ACL' )->addColumn( 'is_active', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('nullable' => false, 'default' => '1'), 'User Is Active' )->addColumn( 'extra', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'User Extra Data' @@ -273,10 +273,10 @@ $installer->getIdxName( 'admin_user', array('username'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('username'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->setComment( 'Admin User Table' ); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php index a915f9402cc4f..2ffd3c57d1078 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.0.0-1.6.1.0.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -33,7 +33,7 @@ $installer->getTable('admin_user'), 'rp_token', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 256, 'nullable' => true, 'default' => null, @@ -46,7 +46,7 @@ $installer->getTable('admin_user'), 'rp_token_created_at', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, 'nullable' => true, 'default' => null, 'comment' => 'Reset Password Link Token Creation Date' diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php index a78ed25822095..f7a847cf73f8d 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.0-1.6.1.1.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.2-1.6.1.3.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.2-1.6.1.3.php index ce169d799c788..582a3278b0865 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.2-1.6.1.3.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.2-1.6.1.3.php @@ -23,11 +23,11 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup */ +/** @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $tableName = $installer->getTable('admin_rule'); -/** @var \Magento\DB\Adapter\AdapterInterface $connection */ +/** @var \Magento\Framework\DB\Adapter\AdapterInterface $connection */ $connection = $installer->getConnection(); $condition = $connection->prepareSqlCondition( diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php index 631577dc3589d..f63d6f8ccfd6a 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.3-1.6.1.4.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -34,10 +34,10 @@ $installer->getTable('admin_user'), 'interface_locale', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 5, 'nullable' => false, - 'default' => \Magento\Locale\ResolverInterface::DEFAULT_LOCALE, + 'default' => \Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE, 'comment' => 'Backend interface locale' ) ); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.4-1.6.1.5.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.4-1.6.1.5.php index 68bbeb53f8935..8fc2187014346 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.4-1.6.1.5.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.4-1.6.1.5.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -30,7 +30,7 @@ $connection->addColumn( $installer->getTable('admin_role'), 'user_type', - array('type' => \Magento\DB\Ddl\Table::TYPE_TEXT, 'length' => 16, 'nullable' => true, 'comment' => 'User type') + array('type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 16, 'nullable' => true, 'comment' => 'User type') ); $connection->dropColumn($installer->getTable('admin_rule'), 'role_type'); $installer->endSetup(); diff --git a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php index e7db2413fe435..a913915221867 100644 --- a/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php +++ b/app/code/Magento/User/sql/user_setup/upgrade-1.6.1.5-1.6.1.6.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $connection = $installer->getConnection(); @@ -33,7 +33,7 @@ 'password', 'password', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'nullable' => false, 'comment' => 'User Password' diff --git a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php b/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php index 8c3f32f185e6a..b83aed1ad1bc9 100644 --- a/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php +++ b/app/code/Magento/Usps/Block/Rma/Adminhtml/Rma/Edit/Tab/General/Shipping/Packaging/Plugin.php @@ -61,11 +61,11 @@ public function __construct(UspsHelper $uspsHelper, RequestInterface $request) /** * Add rule to isGirthAllowed() method * - * @param \Magento\Object $subject $subject + * @param \Magento\Framework\Object $subject $subject * @param bool $result * @return bool */ - public function afterIsGirthAllowed(\Magento\Object $subject, $result) + public function afterIsGirthAllowed(\Magento\Framework\Object $subject, $result) { return $result && $this->uspsHelper->displayGirthValue($this->request->getParam('method')); } @@ -73,11 +73,11 @@ public function afterIsGirthAllowed(\Magento\Object $subject, $result) /** * Add rule to isGirthAllowed() method * - * @param \Magento\Object $subject + * @param \Magento\Framework\Object $subject * @param \Closure $proceed * @return array */ - public function aroundCheckSizeAndGirthParameter(\Magento\Object $subject, \Closure $proceed) + public function aroundCheckSizeAndGirthParameter(\Magento\Framework\Object $subject, \Closure $proceed) { $carrier = $subject->getCarrier(); $size = $subject->getSourceSizeModel(); diff --git a/app/code/Magento/Usps/Model/Carrier.php b/app/code/Magento/Usps/Model/Carrier.php index 9ba1e9c35a218..2232b869d69bf 100644 --- a/app/code/Magento/Usps/Model/Carrier.php +++ b/app/code/Magento/Usps/Model/Carrier.php @@ -96,7 +96,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C /** * Raw rate request data * - * @var \Magento\Object|null + * @var \Magento\Framework\Object|null */ protected $_rawRequest = null; @@ -134,14 +134,14 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C protected $_productCollectionFactory; /** - * @var \Magento\HTTP\ZendClientFactory + * @var \Magento\Framework\HTTP\ZendClientFactory */ protected $_httpClientFactory; /** * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Magento\Logger\AdapterFactory $logAdapterFactory + * @param \Magento\Framework\Logger\AdapterFactory $logAdapterFactory * @param \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory @@ -154,7 +154,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C * @param \Magento\Directory\Helper\Data $directoryData * @param \Magento\Shipping\Helper\Carrier $carrierHelper * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory - * @param \Magento\HTTP\ZendClientFactory $httpClientFactory + * @param \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -162,7 +162,7 @@ class Carrier extends AbstractCarrierOnline implements \Magento\Shipping\Model\C public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory, - \Magento\Logger\AdapterFactory $logAdapterFactory, + \Magento\Framework\Logger\AdapterFactory $logAdapterFactory, \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory, \Magento\Shipping\Model\Rate\ResultFactory $rateFactory, \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory, @@ -175,7 +175,7 @@ public function __construct( \Magento\Directory\Helper\Data $directoryData, CarrierHelper $carrierHelper, \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory, - \Magento\HTTP\ZendClientFactory $httpClientFactory, + \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory, array $data = array() ) { $this->_carrierHelper = $carrierHelper; @@ -230,7 +230,7 @@ public function setRequest(\Magento\Sales\Model\Quote\Address\RateRequest $reque { $this->_request = $request; - $r = new \Magento\Object(); + $r = new \Magento\Framework\Object(); if ($request->getLimitMethod()) { $r->setService($request->getLimitMethod()); @@ -990,7 +990,7 @@ public function getTracking($trackings) */ protected function setTrackingReqeust() { - $r = new \Magento\Object(); + $r = new \Magento\Framework\Object(); $userId = $this->getConfigData('userid'); $r->setUserId($userId); @@ -1411,10 +1411,10 @@ protected function _filterServiceName($name) * As integration guide it is important to follow appropriate sequence for tags e.g.: must be * after * - * @param \Magento\Object $request + * @param \Magento\Framework\Object $request * @return string */ - protected function _formUsExpressShipmentRequest(\Magento\Object $request) + protected function _formUsExpressShipmentRequest(\Magento\Framework\Object $request) { $packageParams = $request->getPackageParams(); @@ -1477,12 +1477,12 @@ protected function _formUsExpressShipmentRequest(\Magento\Object $request) * As integration guide it is important to follow appropriate sequence for tags e.g.: must be * after * - * @param \Magento\Object $request + * @param \Magento\Framework\Object $request * @param string $serviceType * @return string * @throws \Exception */ - protected function _formUsSignatureConfirmationShipmentRequest(\Magento\Object $request, $serviceType) + protected function _formUsSignatureConfirmationShipmentRequest(\Magento\Framework\Object $request, $serviceType) { switch ($serviceType) { case 'PRIORITY': @@ -1578,10 +1578,10 @@ protected function _convertPoundOunces($weightInPounds) * As integration guide it is important to follow appropriate sequence for tags e.g.: must be * after * - * @param \Magento\Object $request + * @param \Magento\Framework\Object $request * @return string */ - protected function _formIntlShipmentRequest(\Magento\Object $request) + protected function _formIntlShipmentRequest(\Magento\Framework\Object $request) { $packageParams = $request->getPackageParams(); $height = $packageParams->getHeight(); @@ -1733,7 +1733,7 @@ protected function _formIntlShipmentRequest(\Magento\Object $request) $countriesOfManufacture = array(); $productIds = array(); foreach ($packageItems as $itemShipment) { - $item = new \Magento\Object(); + $item = new \Magento\Framework\Object(); $item->setData($itemShipment); $productIds[] = $item->getProductId(); @@ -1753,7 +1753,7 @@ protected function _formIntlShipmentRequest(\Magento\Object $request) $packagePoundsWeight = $packageOuncesWeight = 0; // for ItemDetail foreach ($packageItems as $itemShipment) { - $item = new \Magento\Object(); + $item = new \Magento\Framework\Object(); $item->setData($itemShipment); $itemWeight = $item->getWeight() * $item->getQty(); @@ -1829,13 +1829,13 @@ protected function _formIntlShipmentRequest(\Magento\Object $request) /** * Do shipment request to carrier web service, obtain Print Shipping Labels and process errors in response * - * @param \Magento\Object $request - * @return \Magento\Object + * @param \Magento\Framework\Object $request + * @return \Magento\Framework\Object */ - protected function _doShipmentRequest(\Magento\Object $request) + protected function _doShipmentRequest(\Magento\Framework\Object $request) { $this->_prepareShipmentRequest($request); - $result = new \Magento\Object(); + $result = new \Magento\Framework\Object(); $service = $this->getCode('service_to_code', $request->getShippingMethod()); $recipientUSCountry = $this->_isUSCountry($request->getRecipientAddressCountryCode()); @@ -1911,10 +1911,10 @@ protected function _doShipmentRequest(\Magento\Object $request) /** * Return container types of carrier * - * @param \Magento\Object|null $params + * @param \Magento\Framework\Object|null $params * @return array|bool */ - public function getContainerTypes(\Magento\Object $params = null) + public function getContainerTypes(\Magento\Framework\Object $params = null) { if (is_null($params)) { return $this->_getAllowedContainers(); @@ -1945,10 +1945,10 @@ public function getContainerTypesFilter() /** * Return delivery confirmation types of carrier * - * @param \Magento\Object|null $params + * @param \Magento\Framework\Object|null $params * @return array */ - public function getDeliveryConfirmationTypes(\Magento\Object $params = null) + public function getDeliveryConfirmationTypes(\Magento\Framework\Object $params = null) { if ($params == null) { return array(); @@ -1975,10 +1975,10 @@ public function isGirthAllowed($countyDest = null) /** * Return content types of package * - * @param \Magento\Object $params + * @param \Magento\Framework\Object $params * @return array */ - public function getContentTypes(\Magento\Object $params) + public function getContentTypes(\Magento\Framework\Object $params) { $countryShipper = $params->getCountryShipper(); $countryRecipient = $params->getCountryRecipient(); diff --git a/app/code/Magento/Usps/etc/adminhtml/di.xml b/app/code/Magento/Usps/etc/adminhtml/di.xml index 414a996b8c9c0..4e1e85a399cf8 100644 --- a/app/code/Magento/Usps/etc/adminhtml/di.xml +++ b/app/code/Magento/Usps/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Magento\Usps\Model\Source\Size diff --git a/app/code/Magento/Usps/etc/module.xml b/app/code/Magento/Usps/etc/module.xml index 18cbfcd6c38ad..06ee1a771dc7e 100644 --- a/app/code/Magento/Usps/etc/module.xml +++ b/app/code/Magento/Usps/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php index e7d8d0da90a5b..86fce01d8c25f 100644 --- a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php +++ b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Activate/Permissions/Tab/Webapi.php @@ -40,10 +40,10 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements /** @var string[] */ protected $_selectedResources; - /** @var \Magento\Acl\RootResource */ + /** @var \Magento\Framework\Acl\RootResource */ protected $_rootResource; - /** @var \Magento\Acl\Resource\ProviderInterface */ + /** @var \Magento\Framework\Acl\Resource\ProviderInterface */ protected $_resourceProvider; /** @var \Magento\Integration\Helper\Data */ @@ -59,22 +59,22 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements * Initialize dependencies. * * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Core\Helper\Data $coreHelper - * @param \Magento\Acl\RootResource $rootResource - * @param \Magento\Acl\Resource\ProviderInterface $resourceProvider + * @param \Magento\Framework\Acl\RootResource $rootResource + * @param \Magento\Framework\Acl\Resource\ProviderInterface $resourceProvider * @param \Magento\Integration\Helper\Data $integrationData * @param \Magento\Webapi\Helper\Data $webapiData * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Core\Helper\Data $coreHelper, - \Magento\Acl\RootResource $rootResource, - \Magento\Acl\Resource\ProviderInterface $resourceProvider, + \Magento\Framework\Acl\RootResource $rootResource, + \Magento\Framework\Acl\Resource\ProviderInterface $resourceProvider, \Magento\Integration\Helper\Data $integrationData, \Magento\Webapi\Helper\Data $webapiData, array $data = array() diff --git a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php index 33e217a0a6229..363a1d2bcda89 100644 --- a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php +++ b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php @@ -36,7 +36,7 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements /** * Root ACL Resource * - * @var \Magento\Acl\RootResource + * @var \Magento\Framework\Acl\RootResource */ protected $_rootResource; @@ -50,7 +50,7 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements /** * Acl resource provider * - * @var \Magento\Acl\Resource\ProviderInterface + * @var \Magento\Framework\Acl\Resource\ProviderInterface */ protected $_aclResourceProvider; @@ -64,11 +64,11 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements * Initialize dependencies. * * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Acl\RootResource $rootResource + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory + * @param \Magento\Framework\Acl\RootResource $rootResource * @param \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory - * @param \Magento\Acl\Resource\ProviderInterface $aclResourceProvider + * @param \Magento\Framework\Acl\Resource\ProviderInterface $aclResourceProvider * @param \Magento\Webapi\Helper\Data $webapiData * @param \Magento\Integration\Helper\Data $integrationData * @param array $data @@ -78,11 +78,11 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic implements */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Acl\RootResource $rootResource, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, + \Magento\Framework\Acl\RootResource $rootResource, \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory, - \Magento\Acl\Resource\ProviderInterface $aclResourceProvider, + \Magento\Framework\Acl\Resource\ProviderInterface $aclResourceProvider, \Magento\Webapi\Helper\Data $webapiData, \Magento\Integration\Helper\Data $integrationData, array $data = array() diff --git a/app/code/Magento/Webapi/Controller/ErrorProcessor.php b/app/code/Magento/Webapi/Controller/ErrorProcessor.php index b6ff4b79eb6ba..357e3737e100b 100644 --- a/app/code/Magento/Webapi/Controller/ErrorProcessor.php +++ b/app/code/Magento/Webapi/Controller/ErrorProcessor.php @@ -1,7 +1,5 @@ _coreHelper = $helper; @@ -96,52 +105,56 @@ public function __construct( * * Convert any exception into \Magento\Webapi\Exception. * - * @param \Exception $exception - * @return \Magento\Webapi\Exception + * @param \Exception $exception Exception to convert to a WebAPI exception + * + * @return WebapiException */ public function maskException(\Exception $exception) { - /** Log information about actual exception. */ - $reportId = $this->_logException($exception); - if ($exception instanceof \Magento\Webapi\ServiceException) { - if ($exception instanceof \Magento\Webapi\ServiceResourceNotFoundException) { - $httpCode = \Magento\Webapi\Exception::HTTP_NOT_FOUND; - } elseif ($exception instanceof \Magento\Webapi\ServiceAuthorizationException) { - $httpCode = \Magento\Webapi\Exception::HTTP_UNAUTHORIZED; + $stackTrace = ($this->_appState->getMode() === State::MODE_DEVELOPER) ? + $stackTrace = $exception->getTrace() : null; + + if ($exception instanceof LocalizedException) { + // Map HTTP codes for LocalizedExceptions according to exception type + if ($exception instanceof NoSuchEntityException) { + $httpCode = WebapiException::HTTP_NOT_FOUND; + } elseif (($exception instanceof AuthorizationException) + || ($exception instanceof AuthenticationException) + ) { + $httpCode = WebapiException::HTTP_UNAUTHORIZED; } else { - $httpCode = \Magento\Webapi\Exception::HTTP_BAD_REQUEST; + // Input, Expired, InvalidState exceptions will fall to here + $httpCode = WebapiException::HTTP_BAD_REQUEST; } - $wrappedErrors = array(); - if ($exception instanceof \Magento\Exception\InputException) { - $wrappedErrors = $exception->getErrors(); + if ($exception instanceof AbstractAggregateException) { + $errors = $exception->getErrors(); + } else { + $errors = null; } - $maskedException = new \Magento\Webapi\Exception( - $exception->getMessage(), + $maskedException = new WebapiException( + $exception->getRawMessage(), $exception->getCode(), $httpCode, $exception->getParameters(), - $exception->getName(), - $wrappedErrors + get_class($exception), + $errors, + $stackTrace ); - } else if ($exception instanceof \Magento\Webapi\Exception) { + + } else if ($exception instanceof WebapiException) { $maskedException = $exception; } else { - if ($this->_appState->getMode() !== State::MODE_DEVELOPER) { - /** Create exception with masked message. */ - $maskedException = new \Magento\Webapi\Exception( - __('Internal Error. Details are available in Magento log file. Report ID: %1', $reportId), - 0, - \Magento\Webapi\Exception::HTTP_INTERNAL_ERROR - ); - } else { - $maskedException = new \Magento\Webapi\Exception( - $exception->getMessage(), - $exception->getCode(), - \Magento\Webapi\Exception::HTTP_INTERNAL_ERROR - ); - } + $maskedException = new WebapiException( + $exception->getMessage(), + $exception->getCode(), + WebapiException::HTTP_INTERNAL_ERROR, + [], + '', + null, + $stackTrace + ); } return $maskedException; } diff --git a/app/code/Magento/Webapi/Controller/Request.php b/app/code/Magento/Webapi/Controller/Request.php index c7312a2842366..033f11f1dc1bc 100644 --- a/app/code/Magento/Webapi/Controller/Request.php +++ b/app/code/Magento/Webapi/Controller/Request.php @@ -34,12 +34,12 @@ class Request extends \Zend_Controller_Request_Http implements \Magento\Framewor * Modify pathInfo: strip down the front name and query parameters. * * @param \Magento\Framework\App\AreaList $areaList - * @param \Magento\Config\ScopeInterface $configScope + * @param \Magento\Framework\Config\ScopeInterface $configScope * @param null|string|\Zend_Uri $uri */ public function __construct( \Magento\Framework\App\AreaList $areaList, - \Magento\Config\ScopeInterface $configScope, + \Magento\Framework\Config\ScopeInterface $configScope, $uri = null ) { parent::__construct($uri); diff --git a/app/code/Magento/Webapi/Controller/Rest.php b/app/code/Magento/Webapi/Controller/Rest.php index 016418012f74b..b405110d7d777 100644 --- a/app/code/Magento/Webapi/Controller/Rest.php +++ b/app/code/Magento/Webapi/Controller/Rest.php @@ -24,12 +24,15 @@ namespace Magento\Webapi\Controller; use Magento\Authz\Service\AuthorizationV1Interface as AuthorizationService; -use Magento\Service\Data\AbstractObject; +use Magento\Framework\Service\Data\AbstractObject; +use Magento\Framework\Service\Data\Eav\AbstractObject as EavAbstractObject; +use Magento\Framework\Service\EavDataObjectConverter; use Magento\Webapi\Controller\Rest\Request as RestRequest; use Magento\Webapi\Controller\Rest\Response as RestResponse; use Magento\Webapi\Controller\Rest\Router; use Magento\Webapi\Model\PathProcessor; use Magento\Webapi\Model\Config\Converter; +use Magento\Framework\Exception\AuthorizationException; /** * Front controller for WebAPI REST area. @@ -49,19 +52,19 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface /** @var RestResponse */ protected $_response; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** @var \Magento\Framework\App\State */ protected $_appState; - /** @var \Magento\View\LayoutInterface */ + /** @var \Magento\Framework\View\LayoutInterface */ protected $_layout; - /** @var \Magento\Oauth\OauthInterface */ + /** @var \Magento\Framework\Oauth\OauthInterface */ protected $_oauthService; - /** @var \Magento\Oauth\Helper\Request */ + /** @var \Magento\Framework\Oauth\Helper\Request */ protected $_oauthHelper; /** @var AuthorizationService */ @@ -87,11 +90,11 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface * @param RestRequest $request * @param RestResponse $response * @param Router $router - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param \Magento\Framework\App\State $appState - * @param \Magento\View\LayoutInterface $layout - * @param \Magento\Oauth\OauthInterface $oauthService - * @param \Magento\Oauth\Helper\Request $oauthHelper + * @param \Magento\Framework\View\LayoutInterface $layout + * @param \Magento\Framework\Oauth\OauthInterface $oauthService + * @param \Magento\Framework\Oauth\Helper\Request $oauthHelper * @param AuthorizationService $authorizationService * @param ServiceArgsSerializer $serializer * @param ErrorProcessor $errorProcessor @@ -105,11 +108,11 @@ public function __construct( RestRequest $request, RestResponse $response, Router $router, - \Magento\ObjectManager $objectManager, + \Magento\Framework\ObjectManager $objectManager, \Magento\Framework\App\State $appState, - \Magento\View\LayoutInterface $layout, - \Magento\Oauth\OauthInterface $oauthService, - \Magento\Oauth\Helper\Request $oauthHelper, + \Magento\Framework\View\LayoutInterface $layout, + \Magento\Framework\Oauth\OauthInterface $oauthService, + \Magento\Framework\Oauth\Helper\Request $oauthHelper, AuthorizationService $authorizationService, ServiceArgsSerializer $serializer, ErrorProcessor $errorProcessor, @@ -142,7 +145,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) $path = $this->_pathProcessor->process($request->getPathInfo()); $this->_request->setPathInfo($path); $this->areaList->getArea($this->_appState->getAreaCode()) - ->load(\Magento\Core\Model\App\Area::PART_TRANSLATE); + ->load(\Magento\Framework\App\Area::PART_TRANSLATE); try { if (!$this->_appState->isInstalled()) { throw new \Magento\Webapi\Exception(__('Magento is not yet installed')); @@ -157,15 +160,9 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) $route = $this->_router->match($this->_request); if (!$this->_authorizationService->isAllowed($route->getAclResources())) { - // TODO: Consider passing Integration ID instead of Consumer ID - throw new \Magento\Webapi\ServiceAuthorizationException( - "Not Authorized.", - 0, - null, - array(), - 'authorization', - "Consumer ID = {$consumerId}", - implode($route->getAclResources(), ', ') + throw new AuthorizationException( + AuthorizationException::NOT_AUTHORIZED, + ['consumer_id' => $consumerId, 'resources' => implode(', ', $route->getAclResources())] ); } @@ -179,7 +176,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) $inputData = $this->_overrideParams($inputData, $route->getParameters()); $inputParams = $this->_serializer->getInputData($serviceClassName, $serviceMethodName, $inputData); $service = $this->_objectManager->get($serviceClassName); - /** @var \Magento\Service\Data\AbstractObject $outputData */ + /** @var \Magento\Framework\Service\Data\AbstractObject $outputData */ $outputData = call_user_func_array([$service, $serviceMethodName], $inputParams); $outputArray = $this->_processServiceOutput($outputData); $this->_response->prepareResponse($outputArray); @@ -208,20 +205,39 @@ protected function _processServiceOutput($data) $result = []; foreach ($data as $datum) { if ($datum instanceof AbstractObject) { - $result[] = $datum->__toArray(); - } else { - $result[] = $datum; + $datum = $this->processDataObject($datum->__toArray()); } + $result[] = $datum; } + return $result; } else if ($data instanceof AbstractObject) { - $result = $data->__toArray(); + return $this->processDataObject($data->__toArray()); } else if (is_null($data)) { - $result = []; + return []; } else { /** No processing is required for scalar types */ - $result = $data; + return $data; + } + } + + /** + * Convert data object to array and process available custom attributes + * + * @param array $dataObjectArray + * @return array + */ + protected function processDataObject($dataObjectArray) + { + if (isset($dataObjectArray[EavAbstractObject::CUSTOM_ATTRIBUTES_KEY])) { + $dataObjectArray = EavDataObjectConverter::convertCustomAttributesToSequentialArray($dataObjectArray); + } + //Check for nested custom_attributes + foreach ($dataObjectArray as $key => $value) { + if (is_array($value)) { + $dataObjectArray[$key] = $this->processDataObject($value); + } } - return $result; + return $dataObjectArray; } /** diff --git a/app/code/Magento/Webapi/Controller/Rest/Request.php b/app/code/Magento/Webapi/Controller/Rest/Request.php index 59df5d38a6245..cc9dc28f53709 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Request.php +++ b/app/code/Magento/Webapi/Controller/Rest/Request.php @@ -51,13 +51,13 @@ class Request extends \Magento\Webapi\Controller\Request * Initialize dependencies * * @param \Magento\Framework\App\AreaList $areaList - * @param \Magento\Config\ScopeInterface $configScope + * @param \Magento\Framework\Config\ScopeInterface $configScope * @param \Magento\Webapi\Controller\Rest\Request\Deserializer\Factory $deserializerFactory * @param null|string $uri */ public function __construct( \Magento\Framework\App\AreaList $areaList, - \Magento\Config\ScopeInterface $configScope, + \Magento\Framework\Config\ScopeInterface $configScope, \Magento\Webapi\Controller\Rest\Request\Deserializer\Factory $deserializerFactory, $uri = null ) { diff --git a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Factory.php b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Factory.php index 0910a08582d56..65a2cf924fe5a 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Factory.php +++ b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Factory.php @@ -28,7 +28,7 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -38,10 +38,10 @@ class Factory protected $_deserializers; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param array $deserializers */ - public function __construct(\Magento\ObjectManager $objectManager, array $deserializers = array()) + public function __construct(\Magento\Framework\ObjectManager $objectManager, array $deserializers = array()) { $this->_objectManager = $objectManager; $this->_deserializers = $deserializers; diff --git a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php index 0fc059c5f2ead..e5f234d5eb024 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php +++ b/app/code/Magento/Webapi/Controller/Rest/Request/Deserializer/Xml.php @@ -29,17 +29,17 @@ class Xml implements \Magento\Webapi\Controller\Rest\Request\DeserializerInterface { - /** @var \Magento\Xml\Parser */ + /** @var \Magento\Framework\Xml\Parser */ protected $_xmlParser; /** @var State */ protected $_appState; /** - * @param \Magento\Xml\Parser $xmlParser + * @param \Magento\Framework\Xml\Parser $xmlParser * @param State $appState */ - public function __construct(\Magento\Xml\Parser $xmlParser, State $appState) + public function __construct(\Magento\Framework\Xml\Parser $xmlParser, State $appState) { $this->_xmlParser = $xmlParser; $this->_appState = $appState; diff --git a/app/code/Magento/Webapi/Controller/Rest/Response.php b/app/code/Magento/Webapi/Controller/Rest/Response.php index 49fbe860955fd..a165ae92b2ffa 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Response.php +++ b/app/code/Magento/Webapi/Controller/Rest/Response.php @@ -90,33 +90,36 @@ public function sendResponse() */ protected function _renderMessages() { - $formattedMessages = $this->getMessages(); $responseHttpCode = null; /** @var \Exception $exception */ foreach ($this->getException() as $exception) { - /** @var \Magento\Webapi\Exception $maskedException */ $maskedException = $this->_errorProcessor->maskException($exception); $messageData = array( 'message' => $maskedException->getMessage(), - 'http_code' => $maskedException->getHttpCode() ); + if ($maskedException->getErrors()) { + $messageData['errors'] = []; + foreach ($maskedException->getErrors() as $errorMessage) { + $errorData['message'] = $errorMessage->getRawMessage(); + $errorData['parameters'] = $errorMessage->getParameters(); + $messageData['errors'][] = $errorData; + } + } + if ($maskedException->getCode()) { + $messageData['code'] = $maskedException->getCode(); + } if ($maskedException->getDetails()) { $messageData['parameters'] = $maskedException->getDetails(); } - if ($maskedException->getWrappedErrors()) { - $messageData['wrapped_errors'] = $maskedException->getWrappedErrors(); - } - if ($this->_appState->getMode() == \Magento\Framework\App\State::MODE_DEVELOPER) { $messageData['trace'] = $exception->getTraceAsString(); } - $formattedMessages['errors'][] = $messageData; $responseHttpCode = $maskedException->getHttpCode(); } // set HTTP code of the last error, Content-Type, and all rendered error messages to body $this->setHttpResponseCode($responseHttpCode); $this->setMimeType($this->_renderer->getMimeType()); - $this->setBody($this->_renderer->render($formattedMessages)); + $this->setBody($this->_renderer->render($messageData)); return $this; } diff --git a/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Factory.php b/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Factory.php index 6646f94d891a8..3ec3b2bc855f8 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Factory.php +++ b/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Factory.php @@ -28,7 +28,7 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -41,12 +41,12 @@ class Factory protected $_renders; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param \Magento\Webapi\Controller\Rest\Request $request * @param array $renders */ public function __construct( - \Magento\ObjectManager $objectManager, + \Magento\Framework\ObjectManager $objectManager, \Magento\Webapi\Controller\Rest\Request $request, array $renders = array() ) { diff --git a/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Xml.php b/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Xml.php index 7e594fc93a358..c076d5b391421 100644 --- a/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Xml.php +++ b/app/code/Magento/Webapi/Controller/Rest/Response/Renderer/Xml.php @@ -42,15 +42,15 @@ class Xml implements \Magento\Webapi\Controller\Rest\Response\RendererInterface */ const DEFAULT_ENTITY_ITEM_NAME = 'item'; - /** @var \Magento\Xml\Generator */ + /** @var \Magento\Framework\Xml\Generator */ protected $_xmlGenerator; /** * Initialize dependencies. * - * @param \Magento\Xml\Generator $xmlGenerator + * @param \Magento\Framework\Xml\Generator $xmlGenerator */ - public function __construct(\Magento\Xml\Generator $xmlGenerator) + public function __construct(\Magento\Framework\Xml\Generator $xmlGenerator) { $this->_xmlGenerator = $xmlGenerator; } @@ -68,7 +68,7 @@ public function getMimeType() /** * Format object|array to valid XML. * - * @param array|\Magento\Object $data + * @param array|\Magento\Framework\Object $data * @return string */ public function render($data) @@ -85,7 +85,7 @@ public function render($data) * * This method is recursive. * - * @param array|\Magento\Object $data + * @param array|\Magento\Framework\Object $data * @param bool $isRoot * @return array * @throws \InvalidArgumentException @@ -96,7 +96,7 @@ protected function _formatData($data, $isRoot = false) if ($isRoot) { $data = array($data); } - } elseif ($data instanceof \Magento\Object) { + } elseif ($data instanceof \Magento\Framework\Object) { $data = $data->toArray(); } else { $data = (array)$data; diff --git a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php index 92656717006ef..c48d78a54f58c 100644 --- a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php +++ b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php @@ -28,7 +28,7 @@ use Zend\Code\Reflection\ClassReflection; use Zend\Code\Reflection\MethodReflection; use Zend\Code\Reflection\ParameterReflection; -use Magento\ObjectManager; +use Magento\Framework\ObjectManager; use Magento\Webapi\Model\Config\ClassReflector\TypeProcessor; use Magento\Webapi\Model\Soap\Wsdl\ComplexTypeStrategy; diff --git a/app/code/Magento/Webapi/Controller/Soap.php b/app/code/Magento/Webapi/Controller/Soap.php index 1111b471c1bb4..be6d3304d6a56 100644 --- a/app/code/Magento/Webapi/Controller/Soap.php +++ b/app/code/Magento/Webapi/Controller/Soap.php @@ -63,16 +63,16 @@ class Soap implements \Magento\Framework\App\FrontControllerInterface /** @var \Magento\Framework\App\State */ protected $_appState; - /** @var \Magento\View\LayoutInterface */ + /** @var \Magento\Framework\View\LayoutInterface */ protected $_layout; /** - * @var \Magento\Oauth\OauthInterface + * @var \Magento\Framework\Oauth\OauthInterface */ protected $_oauthService; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -93,9 +93,9 @@ class Soap implements \Magento\Framework\App\FrontControllerInterface * @param \Magento\Webapi\Model\Soap\Server $soapServer * @param ErrorProcessor $errorProcessor * @param \Magento\Framework\App\State $appState - * @param \Magento\View\LayoutInterface $layout - * @param \Magento\Oauth\OauthInterface $oauthService - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\View\LayoutInterface $layout + * @param \Magento\Framework\Oauth\OauthInterface $oauthService + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param PathProcessor $pathProcessor * @param \Magento\Framework\App\AreaList $areaList * @@ -108,9 +108,9 @@ public function __construct( \Magento\Webapi\Model\Soap\Server $soapServer, ErrorProcessor $errorProcessor, \Magento\Framework\App\State $appState, - \Magento\View\LayoutInterface $layout, - \Magento\Oauth\OauthInterface $oauthService, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\View\LayoutInterface $layout, + \Magento\Framework\Oauth\OauthInterface $oauthService, + \Magento\Framework\Locale\ResolverInterface $localeResolver, PathProcessor $pathProcessor, \Magento\Framework\App\AreaList $areaList ) { @@ -138,7 +138,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) $path = $this->_pathProcessor->process($request->getPathInfo()); $this->_request->setPathInfo($path); $this->areaList->getArea($this->_appState->getAreaCode()) - ->load(\Magento\Core\Model\App\Area::PART_TRANSLATE); + ->load(\Magento\Framework\App\Area::PART_TRANSLATE); try { if (!$this->_appState->isInstalled()) { throw new WebapiException(__('Magento is not yet installed')); diff --git a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php index 1e2f0948cfd7b..933ddeffc3c32 100644 --- a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php +++ b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php @@ -24,8 +24,8 @@ namespace Magento\Webapi\Controller\Soap\Request; use Magento\Authz\Service\AuthorizationV1Interface as AuthorizationService; -use Magento\Service\Data\AbstractObject; -use Magento\Service\DataObjectConverter; +use Magento\Framework\Service\Data\AbstractObject; +use Magento\Framework\Service\DataObjectConverter; use Magento\Webapi\Model\Soap\Config as SoapConfig; use Magento\Webapi\Controller\Soap\Request as SoapRequest; use Magento\Webapi\Exception as WebapiException; @@ -46,7 +46,7 @@ class Handler /** @var SoapRequest */ protected $_request; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** @var SoapConfig */ @@ -65,7 +65,7 @@ class Handler * Initialize dependencies. * * @param SoapRequest $request - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param SoapConfig $apiConfig * @param AuthorizationService $authorizationService * @param DataObjectConverter $dataObjectConverter @@ -73,7 +73,7 @@ class Handler */ public function __construct( SoapRequest $request, - \Magento\ObjectManager $objectManager, + \Magento\Framework\ObjectManager $objectManager, SoapConfig $apiConfig, AuthorizationService $authorizationService, DataObjectConverter $dataObjectConverter, diff --git a/app/code/Magento/Webapi/Exception.php b/app/code/Magento/Webapi/Exception.php index d3d7d7f2e6bb4..aafc664012dcc 100644 --- a/app/code/Magento/Webapi/Exception.php +++ b/app/code/Magento/Webapi/Exception.php @@ -25,6 +25,9 @@ */ namespace Magento\Webapi; +use Magento\Framework\Exception\ErrorMessage; +use Magento\Webapi\Model\Soap\Fault; + class Exception extends \RuntimeException { /**#@+ @@ -68,11 +71,18 @@ class Exception extends \RuntimeException protected $_name; /** - * Wrapped error details. + * Stacktrace * - * @var array + * @var string */ - protected $_wrappedErrors; + protected $_stackTrace; + + /** + * List of errors + * + * @var null|ErrorMessage[] + */ + protected $_errors; /** * Initialize exception with HTTP code. @@ -82,7 +92,9 @@ class Exception extends \RuntimeException * @param int $httpCode * @param array $details Additional exception details * @param string $name Exception name - * @param array $wrappedErrors Wrapped error details + * @param ErrorMessage[]|null $errors Array of errors messages + * @param string $stackTrace + * * @throws \InvalidArgumentException */ public function __construct( @@ -91,7 +103,8 @@ public function __construct( $httpCode = self::HTTP_BAD_REQUEST, array $details = array(), $name = '', - array $wrappedErrors = array() + $errors = null, + $stackTrace = null ) { /** Only HTTP error codes are allowed. No success or redirect codes must be used. */ if ($httpCode < 400 || $httpCode > 599) { @@ -101,7 +114,8 @@ public function __construct( $this->_httpCode = $httpCode; $this->_details = $details; $this->_name = $name; - $this->_wrappedErrors = $wrappedErrors; + $this->_errors = $errors; + $this->_stackTrace = $stackTrace; } /** @@ -121,10 +135,7 @@ public function getHttpCode() */ public function getOriginator() { - return $this->getHttpCode() < - 500 ? - \Magento\Webapi\Model\Soap\Fault::FAULT_CODE_SENDER : - \Magento\Webapi\Model\Soap\Fault::FAULT_CODE_RECEIVER; + return $this->getHttpCode() < 500 ? Fault::FAULT_CODE_SENDER : Fault::FAULT_CODE_RECEIVER; } /** @@ -148,12 +159,12 @@ public function getName() } /** - * Retrieve wrapped errors. + * Retrieve list of errors. * - * @return array + * @return null|ErrorMessage[] */ - public function getWrappedErrors() + public function getErrors() { - return $this->_wrappedErrors; + return $this->_errors; } } diff --git a/app/code/Magento/Webapi/Helper/Data.php b/app/code/Magento/Webapi/Helper/Data.php index 07a8e447bb6ab..8631495a1ef4b 100644 --- a/app/code/Magento/Webapi/Helper/Data.php +++ b/app/code/Magento/Webapi/Helper/Data.php @@ -24,18 +24,18 @@ namespace Magento\Webapi\Helper; use Magento\Integration\Controller\Adminhtml\Integration as IntegrationController; -use Magento\Service\Data\AbstractObject; +use Magento\Framework\Service\Data\AbstractObject; class Data extends \Magento\Framework\App\Helper\AbstractHelper { - /** @var \Magento\Registry */ + /** @var \Magento\Framework\Registry */ protected $_registry; /** * @param \Magento\Framework\App\Helper\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry */ - public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Registry $registry) + public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\Registry $registry) { $this->_registry = $registry; parent::__construct($context); diff --git a/app/code/Magento/Webapi/Model/Cache/Type.php b/app/code/Magento/Webapi/Model/Cache/Type.php index 0669c84772e69..c0c47b0a3f337 100644 --- a/app/code/Magento/Webapi/Model/Cache/Type.php +++ b/app/code/Magento/Webapi/Model/Cache/Type.php @@ -29,7 +29,7 @@ */ namespace Magento\Webapi\Model\Cache; -class Type extends \Magento\Cache\Frontend\Decorator\TagScope +class Type extends \Magento\Framework\Cache\Frontend\Decorator\TagScope { /** * Cache type code unique among all cache types diff --git a/app/code/Magento/Webapi/Model/Cache/TypeIntegration.php b/app/code/Magento/Webapi/Model/Cache/TypeIntegration.php index 95ee4a028c976..180cfca2b100d 100644 --- a/app/code/Magento/Webapi/Model/Cache/TypeIntegration.php +++ b/app/code/Magento/Webapi/Model/Cache/TypeIntegration.php @@ -28,7 +28,7 @@ /** * System / Cache Management / Cache type "Integration Api Configuration" */ -class TypeIntegration extends \Magento\Cache\Frontend\Decorator\TagScope +class TypeIntegration extends \Magento\Framework\Cache\Frontend\Decorator\TagScope { /** * Cache type code unique among all cache types diff --git a/app/code/Magento/Webapi/Model/Config.php b/app/code/Magento/Webapi/Model/Config.php index f912195e062e0..260da516f1fa6 100644 --- a/app/code/Magento/Webapi/Model/Config.php +++ b/app/code/Magento/Webapi/Model/Config.php @@ -53,7 +53,7 @@ class Config /** * Module configuration reader * - * @var \Magento\Module\Dir\Reader + * @var \Magento\Framework\Module\Dir\Reader */ protected $_moduleReader; diff --git a/app/code/Magento/Webapi/Model/Config/Converter.php b/app/code/Magento/Webapi/Model/Config/Converter.php index 1ad58cd7bd198..438e35526b44d 100644 --- a/app/code/Magento/Webapi/Model/Config/Converter.php +++ b/app/code/Magento/Webapi/Model/Config/Converter.php @@ -26,7 +26,7 @@ /** * Converter of webapi.xml content into array format. */ -class Converter implements \Magento\Config\ConverterInterface +class Converter implements \Magento\Framework\Config\ConverterInterface { /**#@+ * Array keys for config internal representation. diff --git a/app/code/Magento/Webapi/Model/Config/Integration/Converter.php b/app/code/Magento/Webapi/Model/Config/Integration/Converter.php index ca61cda01fc40..3c1703129bbb0 100644 --- a/app/code/Magento/Webapi/Model/Config/Integration/Converter.php +++ b/app/code/Magento/Webapi/Model/Config/Integration/Converter.php @@ -26,7 +26,7 @@ /** * Converter of api.xml content into array format. */ -class Converter implements \Magento\Config\ConverterInterface +class Converter implements \Magento\Framework\Config\ConverterInterface { /**#@+ * Array keys for config internal representation. diff --git a/app/code/Magento/Webapi/Model/Config/Integration/Reader.php b/app/code/Magento/Webapi/Model/Config/Integration/Reader.php index a1139a0d28304..6033eb005d48b 100644 --- a/app/code/Magento/Webapi/Model/Config/Integration/Reader.php +++ b/app/code/Magento/Webapi/Model/Config/Integration/Reader.php @@ -26,7 +26,7 @@ /** * Service config data reader. */ -class Reader extends \Magento\Config\Reader\Filesystem +class Reader extends \Magento\Framework\Config\Reader\Filesystem { /** * List of id attributes for merge @@ -39,23 +39,23 @@ class Reader extends \Magento\Config\Reader\Filesystem ); /** - * @param \Magento\Config\FileResolverInterface $fileResolver + * @param \Magento\Framework\Config\FileResolverInterface $fileResolver * @param Converter $converter * @param SchemaLocator $schemaLocator - * @param \Magento\Config\ValidationStateInterface $validationState + * @param \Magento\Framework\Config\ValidationStateInterface $validationState * @param string $fileName * @param array $idAttributes * @param string $domDocumentClass * @param string $defaultScope */ public function __construct( - \Magento\Config\FileResolverInterface $fileResolver, + \Magento\Framework\Config\FileResolverInterface $fileResolver, Converter $converter, SchemaLocator $schemaLocator, - \Magento\Config\ValidationStateInterface $validationState, + \Magento\Framework\Config\ValidationStateInterface $validationState, $fileName = 'integration\api.xml', $idAttributes = array(), - $domDocumentClass = 'Magento\Config\Dom', + $domDocumentClass = 'Magento\Framework\Config\Dom', $defaultScope = 'global' ) { parent::__construct( diff --git a/app/code/Magento/Webapi/Model/Config/Integration/SchemaLocator.php b/app/code/Magento/Webapi/Model/Config/Integration/SchemaLocator.php index 800e7da541f0a..dc87c2b87ae47 100644 --- a/app/code/Magento/Webapi/Model/Config/Integration/SchemaLocator.php +++ b/app/code/Magento/Webapi/Model/Config/Integration/SchemaLocator.php @@ -26,7 +26,7 @@ /** * Integration config schema locator. */ -class SchemaLocator implements \Magento\Config\SchemaLocatorInterface +class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface { /** * Path to corresponding XSD file with validation rules for merged config @@ -43,9 +43,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface protected $_perFileSchema = null; /** - * @param \Magento\Module\Dir\Reader $moduleReader + * @param \Magento\Framework\Module\Dir\Reader $moduleReader */ - public function __construct(\Magento\Module\Dir\Reader $moduleReader) + public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) { $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Webapi') . '/integration/api.xsd'; } diff --git a/app/code/Magento/Webapi/Model/Config/Reader.php b/app/code/Magento/Webapi/Model/Config/Reader.php index 292d6ad133cb3..f1112ebd308ce 100644 --- a/app/code/Magento/Webapi/Model/Config/Reader.php +++ b/app/code/Magento/Webapi/Model/Config/Reader.php @@ -26,7 +26,7 @@ /** * Service config data reader. */ -class Reader extends \Magento\Config\Reader\Filesystem +class Reader extends \Magento\Framework\Config\Reader\Filesystem { /** * List of id attributes for merge @@ -40,23 +40,23 @@ class Reader extends \Magento\Config\Reader\Filesystem ]; /** - * @param \Magento\Config\FileResolverInterface $fileResolver + * @param \Magento\Framework\Config\FileResolverInterface $fileResolver * @param Converter $converter * @param SchemaLocator $schemaLocator - * @param \Magento\Config\ValidationStateInterface $validationState + * @param \Magento\Framework\Config\ValidationStateInterface $validationState * @param string $fileName * @param array $idAttributes * @param string $domDocumentClass * @param string $defaultScope */ public function __construct( - \Magento\Config\FileResolverInterface $fileResolver, + \Magento\Framework\Config\FileResolverInterface $fileResolver, Converter $converter, SchemaLocator $schemaLocator, - \Magento\Config\ValidationStateInterface $validationState, + \Magento\Framework\Config\ValidationStateInterface $validationState, $fileName = 'webapi.xml', $idAttributes = array(), - $domDocumentClass = 'Magento\Config\Dom', + $domDocumentClass = 'Magento\Framework\Config\Dom', $defaultScope = 'global' ) { parent::__construct( diff --git a/app/code/Magento/Webapi/Model/Config/SchemaLocator.php b/app/code/Magento/Webapi/Model/Config/SchemaLocator.php index eebabdad1c096..bf1871f06bf38 100644 --- a/app/code/Magento/Webapi/Model/Config/SchemaLocator.php +++ b/app/code/Magento/Webapi/Model/Config/SchemaLocator.php @@ -26,7 +26,7 @@ /** * Web API config schema locator. */ -class SchemaLocator implements \Magento\Config\SchemaLocatorInterface +class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface { /** * Path to corresponding XSD file with validation rules for merged config @@ -43,9 +43,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface protected $_perFileSchema = null; /** - * @param \Magento\Module\Dir\Reader $moduleReader + * @param \Magento\Framework\Module\Dir\Reader $moduleReader */ - public function __construct(\Magento\Module\Dir\Reader $moduleReader) + public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) { $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Webapi') . '/webapi.xsd'; } diff --git a/app/code/Magento/Webapi/Model/PathProcessor.php b/app/code/Magento/Webapi/Model/PathProcessor.php index 860cd2e021dd2..710ef1cc54b9f 100644 --- a/app/code/Magento/Webapi/Model/PathProcessor.php +++ b/app/code/Magento/Webapi/Model/PathProcessor.php @@ -24,7 +24,7 @@ */ namespace Magento\Webapi\Model; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; class PathProcessor { @@ -72,7 +72,7 @@ public function process($pathInfo) return $path; } else { // store does not exist - throw new NoSuchEntityException('storeCode', $storeCode); + throw NoSuchEntityException::singleField('storeCode', $storeCode); } } } diff --git a/app/code/Magento/Webapi/Model/Plugin/AuthorizationServiceV1.php b/app/code/Magento/Webapi/Model/Plugin/AuthorizationServiceV1.php index a4a9f70dcdc49..eba5c1f758e98 100644 --- a/app/code/Magento/Webapi/Model/Plugin/AuthorizationServiceV1.php +++ b/app/code/Magento/Webapi/Model/Plugin/AuthorizationServiceV1.php @@ -26,7 +26,7 @@ use Magento\Authz\Model\UserIdentifier; use Magento\Integration\Service\IntegrationV1 as IntegrationService; use Magento\Integration\Model\Integration; -use Magento\Logger; +use Magento\Framework\Logger; /** * Wrap isAllowed() method from AuthorizationV1 service to avoid checking roles of deactivated integration. diff --git a/app/code/Magento/Webapi/Model/Plugin/Setup.php b/app/code/Magento/Webapi/Model/Plugin/Setup.php index 28e5b2dd01829..13525a8c61662 100644 --- a/app/code/Magento/Webapi/Model/Plugin/Setup.php +++ b/app/code/Magento/Webapi/Model/Plugin/Setup.php @@ -28,7 +28,7 @@ use Magento\Webapi\Model\IntegrationConfig; /** - * Plugin for Magento\Module\Setup model to manage resource permissions of + * Plugin for Magento\Framework\Module\Setup model to manage resource permissions of * integration installed from config file */ class Setup diff --git a/app/code/Magento/Webapi/Model/Rest/Config.php b/app/code/Magento/Webapi/Model/Rest/Config.php index 82ba5d62d9558..33f4f298eef9f 100644 --- a/app/code/Magento/Webapi/Model/Rest/Config.php +++ b/app/code/Magento/Webapi/Model/Rest/Config.php @@ -65,14 +65,14 @@ class Config /** @var ModelConfig */ protected $_config; - /** @var \Magento\Controller\Router\Route\Factory */ + /** @var \Magento\Framework\Controller\Router\Route\Factory */ protected $_routeFactory; /** * @param ModelConfig $config - * @param \Magento\Controller\Router\Route\Factory $routeFactory + * @param \Magento\Framework\Controller\Router\Route\Factory $routeFactory */ - public function __construct(ModelConfig $config, \Magento\Controller\Router\Route\Factory $routeFactory) + public function __construct(ModelConfig $config, \Magento\Framework\Controller\Router\Route\Factory $routeFactory) { $this->_config = $config; $this->_routeFactory = $routeFactory; diff --git a/app/code/Magento/Webapi/Model/Soap/Config.php b/app/code/Magento/Webapi/Model/Soap/Config.php index 10c1ebb56038f..c9abded2381be 100644 --- a/app/code/Magento/Webapi/Model/Soap/Config.php +++ b/app/code/Magento/Webapi/Model/Soap/Config.php @@ -24,7 +24,7 @@ namespace Magento\Webapi\Model\Soap; use Magento\Webapi\Model\Config\Converter; -use Magento\Filesystem\Directory\ReadInterface; +use Magento\Framework\Filesystem\Directory\ReadInterface; /** * Webapi Config Model for Soap. @@ -54,7 +54,7 @@ class Config /** @var \Magento\Webapi\Model\Config */ protected $_config; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** @@ -81,14 +81,14 @@ class Config /** * Initialize dependencies. * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param \Magento\Framework\App\Filesystem $filesystem * @param \Magento\Webapi\Model\Config $config * @param \Magento\Webapi\Model\Config\ClassReflector $classReflector * @param \Magento\Webapi\Helper\Data $helper */ public function __construct( - \Magento\ObjectManager $objectManager, + \Magento\Framework\ObjectManager $objectManager, \Magento\Framework\App\Filesystem $filesystem, \Magento\Webapi\Model\Config $config, \Magento\Webapi\Model\Config\ClassReflector $classReflector, diff --git a/app/code/Magento/Webapi/Model/Soap/Fault.php b/app/code/Magento/Webapi/Model/Soap/Fault.php index 1cca0498fdf56..462dc6f889577 100644 --- a/app/code/Magento/Webapi/Model/Soap/Fault.php +++ b/app/code/Magento/Webapi/Model/Soap/Fault.php @@ -42,13 +42,16 @@ class Fault extends \RuntimeException */ const NODE_DETAIL_PARAMETERS = 'Parameters'; const NODE_DETAIL_WRAPPED_ERRORS = 'WrappedErrors'; + const NODE_DETAIL_WRAPPED_EXCEPTION = 'WrappedException'; /** Note that parameter node must be unique in scope of all complex types declared in WSDL */ const NODE_DETAIL_PARAMETER = 'GenericFaultParameter'; const NODE_DETAIL_PARAMETER_KEY = 'key'; const NODE_DETAIL_PARAMETER_VALUE = 'value'; const NODE_DETAIL_WRAPPED_ERROR = 'WrappedError'; - const NODE_DETAIL_WRAPPED_ERROR_FIELD_NAME = 'fieldName'; - const NODE_DETAIL_WRAPPED_ERROR_CODE = 'code'; + const NODE_DETAIL_WRAPPED_ERROR_MESSAGE = 'message'; + const NODE_DETAIL_WRAPPED_ERROR_PARAMETERS = 'parameters'; + const NODE_DETAIL_WRAPPED_ERROR_PARAMETER = 'parameter'; + const NODE_DETAIL_WRAPPED_ERROR_KEY = 'key'; const NODE_DETAIL_WRAPPED_ERROR_VALUE = 'value'; const NODE_DETAIL_TRACE = 'Trace'; const NODE_DETAIL_WRAPPER = 'GenericFault'; @@ -96,7 +99,7 @@ class Fault extends \RuntimeException protected $_soapServer; /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; @@ -109,20 +112,20 @@ class Fault extends \RuntimeException * @param \Magento\Framework\App\RequestInterface $request * @param Server $soapServer * @param \Magento\Webapi\Exception $previousException - * @param \Magento\Locale\ResolverInterface $localeResolver + * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param State $appState */ public function __construct( \Magento\Framework\App\RequestInterface $request, Server $soapServer, \Magento\Webapi\Exception $previousException, - \Magento\Locale\ResolverInterface $localeResolver, + \Magento\Framework\Locale\ResolverInterface $localeResolver, State $appState ) { parent::__construct($previousException->getMessage(), $previousException->getCode(), $previousException); $this->_soapCode = $previousException->getOriginator(); $this->_parameters = $previousException->getDetails(); - $this->_wrappedErrors = $previousException->getWrappedErrors(); + $this->_wrappedErrors = $previousException->getErrors(); $this->_request = $request; $this->_soapServer = $soapServer; $this->_localeResolver = $localeResolver; @@ -189,6 +192,9 @@ public function getFaultName() protected function _setFaultName($exceptionName) { if ($exceptionName) { + // makes exception name xml safe + $exceptionName = str_replace(['\\', '/'], '_', $exceptionName); + $contentType = $this->_request->getHeader('Content-Type'); /** SOAP action is specified in content type header if content type is application/soap+xml */ if (preg_match('|application/soap\+xml.+action="(.+)".*|', $contentType, $matches)) { @@ -394,17 +400,28 @@ protected function _getWrappedErrorsXml($wrappedErrors) */ protected function _generateErrorNodeXML($error) { - $fieldNameNode = self::NODE_DETAIL_WRAPPED_ERROR_FIELD_NAME; - $codeNode = self::NODE_DETAIL_WRAPPED_ERROR_CODE; - $valueNode = self::NODE_DETAIL_WRAPPED_ERROR_VALUE; $wrappedErrorNode = self::NODE_DETAIL_WRAPPED_ERROR; + $messageNode = self::NODE_DETAIL_WRAPPED_ERROR_MESSAGE; - $fieldName = isset($error['fieldName']) ? $error['fieldName'] : ""; - $code = isset($error['code']) ? $error['code'] : ""; - $value = isset($error['value']) ? $error['value'] : ""; + $parameters = $error->getParameters(); + $rawMessage = $error->getRawMessage(); + $xml = "$rawMessage"; - return "$fieldName" - . "$code" . htmlspecialchars($value) - . ""; + if (!empty($parameters)) { + $parametersNode = self::NODE_DETAIL_WRAPPED_ERROR_PARAMETERS; + $xml .= ""; + foreach ($parameters as $key => $value) { + $parameterNode = self::NODE_DETAIL_WRAPPED_ERROR_PARAMETER; + $keyNode = self::NODE_DETAIL_PARAMETER_KEY; + $valueNode = self::NODE_DETAIL_WRAPPED_ERROR_VALUE; + $xml .= "" . + "$key$value" . + ""; + } + $xml .= ""; + } + $xml .= ""; + + return $xml; } } diff --git a/app/code/Magento/Webapi/Model/Soap/Server.php b/app/code/Magento/Webapi/Model/Soap/Server.php index b3e4d80243299..a12bcc43cc28c 100644 --- a/app/code/Magento/Webapi/Model/Soap/Server.php +++ b/app/code/Magento/Webapi/Model/Soap/Server.php @@ -47,11 +47,11 @@ class Server protected $_areaList; /** - * @var \Magento\Config\ScopeInterface + * @var \Magento\Framework\Config\ScopeInterface */ protected $_configScope; - /** @var \Magento\DomDocument\Factory */ + /** @var \Magento\Framework\DomDocument\Factory */ protected $_domDocumentFactory; /** @var \Magento\Webapi\Controller\Soap\Request */ @@ -75,9 +75,9 @@ class Server * Initialize dependencies, initialize WSDL cache. * * @param \Magento\Framework\App\AreaList $areaList - * @param \Magento\Config\ScopeInterface $configScope + * @param \Magento\Framework\Config\ScopeInterface $configScope * @param \Magento\Webapi\Controller\Soap\Request $request - * @param \Magento\DomDocument\Factory $domDocumentFactory + * @param \Magento\Framework\DomDocument\Factory $domDocumentFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Webapi\Model\Soap\Server\Factory $soapServerFactory * @param \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor @@ -86,9 +86,9 @@ class Server */ public function __construct( \Magento\Framework\App\AreaList $areaList, - \Magento\Config\ScopeInterface $configScope, + \Magento\Framework\Config\ScopeInterface $configScope, \Magento\Webapi\Controller\Soap\Request $request, - \Magento\DomDocument\Factory $domDocumentFactory, + \Magento\Framework\DomDocument\Factory $domDocumentFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Webapi\Model\Soap\Server\Factory $soapServerFactory, \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor $typeProcessor, diff --git a/app/code/Magento/Webapi/Model/Soap/Server/Factory.php b/app/code/Magento/Webapi/Model/Soap/Server/Factory.php index 81cc8d6406671..b22d33ed25846 100644 --- a/app/code/Magento/Webapi/Model/Soap/Server/Factory.php +++ b/app/code/Magento/Webapi/Model/Soap/Server/Factory.php @@ -28,7 +28,7 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -40,11 +40,11 @@ class Factory /** * Initialize the class * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param \Magento\Webapi\Controller\Soap\Request\Handler $soapHandler */ public function __construct( - \Magento\ObjectManager $objectManager, + \Magento\Framework\ObjectManager $objectManager, \Magento\Webapi\Controller\Soap\Request\Handler $soapHandler ) { $this->_objectManager = $objectManager; diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl/Factory.php b/app/code/Magento/Webapi/Model/Soap/Wsdl/Factory.php index 6fcac6c7f898a..484e18d11f5be 100644 --- a/app/code/Magento/Webapi/Model/Soap/Wsdl/Factory.php +++ b/app/code/Magento/Webapi/Model/Soap/Wsdl/Factory.php @@ -29,14 +29,14 @@ class Factory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } diff --git a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php index 805e6c5a0875f..1a35175e4bdfb 100644 --- a/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php +++ b/app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php @@ -418,20 +418,15 @@ protected function _addGenericFaultComplexTypeNodes($wsdl) $wrappedErrorComplexType = Fault::NODE_DETAIL_WRAPPED_ERROR; $wrappedErrorData = array( 'parameters' => array( - Fault::NODE_DETAIL_WRAPPED_ERROR_FIELD_NAME => array( + Fault::NODE_DETAIL_WRAPPED_ERROR_MESSAGE => array( 'type' => 'string', 'required' => true, 'documentation' => '', ), - Fault::NODE_DETAIL_WRAPPED_ERROR_CODE => array( - 'type' => 'string', - 'required' => true, - 'documentation' => '', - ), - Fault::NODE_DETAIL_WRAPPED_ERROR_VALUE => array( - 'type' => 'string', - 'required' => true, - 'documentation' => '', + Fault::NODE_DETAIL_WRAPPED_ERROR_PARAMETERS => array( + 'type' => "{$faultParamsComplexType}[]", + 'required' => false, + 'documentation' => 'Message parameters.', ), ) ); diff --git a/app/code/Magento/Webapi/ServiceException.php b/app/code/Magento/Webapi/ServiceException.php index eb61ea42f3efc..bc955d7f2018e 100644 --- a/app/code/Magento/Webapi/ServiceException.php +++ b/app/code/Magento/Webapi/ServiceException.php @@ -25,7 +25,7 @@ */ namespace Magento\Webapi; -class ServiceException extends \Magento\Model\Exception +class ServiceException extends \Magento\Framework\Model\Exception { /** @var array */ protected $_parameters; diff --git a/app/code/Magento/Webapi/etc/cache.xml b/app/code/Magento/Webapi/etc/cache.xml index 736505b65daf6..ccf42cb5ad269 100644 --- a/app/code/Magento/Webapi/etc/cache.xml +++ b/app/code/Magento/Webapi/etc/cache.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + REST and SOAP configurations, generated WSDL file. diff --git a/app/code/Magento/Webapi/etc/di.xml b/app/code/Magento/Webapi/etc/di.xml index aaec7282d0fb0..c2f96a9f6f357 100644 --- a/app/code/Magento/Webapi/etc/di.xml +++ b/app/code/Magento/Webapi/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + @@ -36,9 +36,9 @@ - - - + + + diff --git a/app/code/Magento/Webapi/etc/frontend/di.xml b/app/code/Magento/Webapi/etc/frontend/di.xml index 2b3b42865eded..9ff3a43bb4ea8 100644 --- a/app/code/Magento/Webapi/etc/frontend/di.xml +++ b/app/code/Magento/Webapi/etc/frontend/di.xml @@ -24,7 +24,7 @@ */ --> - + diff --git a/app/code/Magento/Webapi/etc/module.xml b/app/code/Magento/Webapi/etc/module.xml index 46e7bd67be22c..ef697999f93b9 100644 --- a/app/code/Magento/Webapi/etc/module.xml +++ b/app/code/Magento/Webapi/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Webapi/etc/webapi_rest/di.xml b/app/code/Magento/Webapi/etc/webapi_rest/di.xml index b53e6e715c2da..7fda81d650574 100644 --- a/app/code/Magento/Webapi/etc/webapi_rest/di.xml +++ b/app/code/Magento/Webapi/etc/webapi_rest/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + @@ -31,7 +31,7 @@ - + @@ -86,7 +86,7 @@ Magento\Webapi\Controller\Rest\Request\Proxy Magento\Webapi\Controller\Rest\Response\Proxy Magento\Webapi\Controller\Rest\Router\Proxy - Magento\Oauth\Helper\Request\Proxy + Magento\Framework\Oauth\Helper\Request\Proxy Magento\Authz\Service\AuthorizationV1Interface\Proxy diff --git a/app/code/Magento/Webapi/etc/webapi_soap/di.xml b/app/code/Magento/Webapi/etc/webapi_soap/di.xml index dc1b7f2e05ba2..b3f571fb668f0 100644 --- a/app/code/Magento/Webapi/etc/webapi_soap/di.xml +++ b/app/code/Magento/Webapi/etc/webapi_soap/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + @@ -31,7 +31,7 @@ - + diff --git a/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php b/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php index cac4a22282d9c..b647a6132b615 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/install-1.0.0.0.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -33,20 +33,24 @@ $installer->getTable('webapi_role') )->addColumn( 'role_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Webapi role ID' )->addColumn( 'role_name', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => false), 'Role name is displayed in Adminhtml interface' )->addIndex( - $installer->getIdxName('webapi_role', array('role_name'), \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE), + $installer->getIdxName( + 'webapi_role', + array('role_name'), + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + ), array('role_name'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->setComment( 'Roles of unified webapi ACL' ); @@ -56,37 +60,45 @@ $installer->getTable('webapi_user') )->addColumn( 'user_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Webapi user ID' )->addColumn( 'user_name', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => false), 'User name is displayed in Adminhtml interface' )->addColumn( 'role_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'default' => null, 'nullable' => true), 'User role from webapi_role' )->addIndex( - $installer->getIdxName('webapi_user', array('role_id'), \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX), + $installer->getIdxName( + 'webapi_user', + array('role_id'), + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX + ), array('role_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX) )->addIndex( - $installer->getIdxName('webapi_user', array('user_name'), \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE), + $installer->getIdxName( + 'webapi_user', + array('user_name'), + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + ), array('user_name'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addForeignKey( $installer->getFkName('webapi_user', 'role_id', 'webapi_role', 'role_id'), 'role_id', $installer->getTable('webapi_role'), 'role_id', - \Magento\DB\Ddl\Table::ACTION_SET_NULL, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_SET_NULL, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Users of unified webapi' ); @@ -96,33 +108,37 @@ $installer->getTable('webapi_rule') )->addColumn( 'rule_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Rule ID' )->addColumn( 'resource_id', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => false), 'Resource name. Must match resource calls in xml.' )->addColumn( 'role_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false), 'User role from webapi_role' )->addIndex( - $installer->getIdxName('webapi_rule', array('role_id'), \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX), + $installer->getIdxName( + 'webapi_rule', + array('role_id'), + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX + ), array('role_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX) )->addForeignKey( $installer->getFkName('webapi_rule', 'role_id', 'webapi_role', 'role_id'), 'role_id', $installer->getTable('webapi_role'), 'role_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Permissions of roles to resources' ); diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php index df0913d3f868d..0c8b235061c83 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.0-1.0.0.1.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Module\Setup $installer */ +/* @var \Magento\Framework\Module\Setup $installer */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); @@ -34,7 +34,7 @@ $table, 'api_secret', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'nullable' => false, 'comment' => 'API Secret used for authentication.' diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php index 53b3f2263c9f0..13894ac9c4d5e 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.1-1.0.0.2.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Module\Setup $installer */ +/* @var \Magento\Framework\Module\Setup $installer */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); @@ -32,19 +32,28 @@ $connection->dropIndex( $table, - $installer->getIdxName('webapi_user', array('user_name'), \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + $installer->getIdxName( + 'webapi_user', + array('user_name'), + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + ) ); $connection->addColumn( $table, 'company_name', - array('type' => \Magento\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'nullable' => true, 'comment' => 'Company Name') + array( + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, + 'length' => 255, + 'nullable' => true, + 'comment' => 'Company Name' + ) ); $connection->addColumn( $table, 'contact_email', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'nullable' => false, 'comment' => 'Contact Email' @@ -54,14 +63,23 @@ $table, 'user_name', 'api_key', - array('type' => \Magento\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'nullable' => false, 'comment' => 'Web API key') + array( + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, + 'length' => 255, + 'nullable' => false, + 'comment' => 'Web API key' + ) ); $connection->addIndex( $table, - $installer->getIdxName('webapi_user', array('api_key'), \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE), + $installer->getIdxName( + 'webapi_user', + array('api_key'), + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + ), 'api_key', - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ); $installer->endSetup(); diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php index 20807a821fcc4..7bb63515a7c01 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.2-1.0.0.3.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Module\Setup $installer */ +/* @var \Magento\Framework\Module\Setup $installer */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); @@ -35,7 +35,7 @@ 'api_secret', 'secret', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'nullable' => false, 'comment' => 'Secret used for authentication.' diff --git a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php index d77670c51d229..ed311385098e4 100644 --- a/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php +++ b/app/code/Magento/Webapi/sql/webapi_setup/upgrade-1.0.0.3-1.0.0.4.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var \Magento\Module\Setup $installer */ +/* @var \Magento\Framework\Module\Setup $installer */ $installer = $this; $installer->startSetup(); $connection = $installer->getConnection(); diff --git a/app/code/Magento/Weee/Block/Element/Weee/Tax.php b/app/code/Magento/Weee/Block/Element/Weee/Tax.php index e55898ad6a637..041930f2f9931 100644 --- a/app/code/Magento/Weee/Block/Element/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Element/Weee/Tax.php @@ -24,6 +24,6 @@ namespace Magento\Weee\Block\Element\Weee; -class Tax extends \Magento\Data\Form\Element\AbstractElement +class Tax extends \Magento\Framework\Data\Form\Element\AbstractElement { } diff --git a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php index f1eab4db6b058..01a3f3b161d73 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -25,12 +25,12 @@ */ namespace Magento\Weee\Block\Renderer\Weee; -use Magento\Data\Form\Element\AbstractElement; +use Magento\Framework\Data\Form\Element\AbstractElement; /** * Adminhtml weee tax item renderer */ -class Tax extends \Magento\Backend\Block\Widget implements \Magento\Data\Form\Element\Renderer\RendererInterface +class Tax extends \Magento\Backend\Block\Widget implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * @var AbstractElement|null @@ -55,7 +55,7 @@ class Tax extends \Magento\Backend\Block\Widget implements \Magento\Data\Form\El /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -73,14 +73,14 @@ class Tax extends \Magento\Backend\Block\Widget implements \Magento\Data\Form\El * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Directory\Model\Config\Source\Country $sourceCountry * @param \Magento\Directory\Helper\Data $directoryHelper - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Directory\Model\Config\Source\Country $sourceCountry, \Magento\Directory\Helper\Data $directoryHelper, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_sourceCountry = $sourceCountry; @@ -90,7 +90,7 @@ public function __construct( } /** - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function getProduct() { diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php index 68968e822d97d..40f7de33210cb 100644 --- a/app/code/Magento/Weee/Helper/Data.php +++ b/app/code/Magento/Weee/Helper/Data.php @@ -46,7 +46,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -79,7 +79,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Weee\Model\Tax $weeeTax * @param \Magento\Tax\Helper\Data $taxData - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig */ public function __construct( @@ -87,7 +87,7 @@ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Weee\Model\Tax $weeeTax, \Magento\Tax\Helper\Data $taxData, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig ) { $this->_storeManager = $storeManager; @@ -226,22 +226,22 @@ public function getAmount($product, $website = null) * @param Store $store * @return bool|int */ - public function typeOfDisplay($compareTo = null, $zone = \Magento\Pricing\Render::ZONE_DEFAULT, $store = null) + public function typeOfDisplay($compareTo = null, $zone = \Magento\Framework\Pricing\Render::ZONE_DEFAULT, $store = null) { if (!$this->isEnabled($store)) { return false; } switch ($zone) { - case \Magento\Pricing\Render::ZONE_ITEM_VIEW: + case \Magento\Framework\Pricing\Render::ZONE_ITEM_VIEW: $type = $this->getPriceDisplayType($store); break; - case \Magento\Pricing\Render::ZONE_ITEM_LIST: + case \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST: $type = $this->getListPriceDisplayType($store); break; - case \Magento\Pricing\Render::ZONE_SALES: + case \Magento\Framework\Pricing\Render::ZONE_SALES: $type = $this->getSalesPriceDisplayType($store); break; - case \Magento\Pricing\Render::ZONE_EMAIL: + case \Magento\Framework\Pricing\Render::ZONE_EMAIL: $type = $this->getEmailPriceDisplayType($store); break; default: @@ -268,11 +268,11 @@ public function typeOfDisplay($compareTo = null, $zone = \Magento\Pricing\Render * Proxy for \Magento\Weee\Model\Tax::getProductWeeeAttributes() * * @param \Magento\Catalog\Model\Product $product - * @param null|false|\Magento\Object $shipping - * @param null|false|\Magento\Object $billing + * @param null|false|\Magento\Framework\Object $shipping + * @param null|false|\Magento\Framework\Object $billing * @param Website $website * @param bool $calculateTaxes - * @return \Magento\Object[] + * @return \Magento\Framework\Object[] */ public function getProductWeeeAttributes( $product, @@ -339,7 +339,7 @@ public function setApplied($item, $value) * Returns array of weee attributes allowed for display * * @param \Magento\Catalog\Model\Product $product - * @return \Magento\Object[] + * @return \Magento\Framework\Object[] */ public function getProductWeeeAttributesForDisplay($product) { @@ -353,11 +353,11 @@ public function getProductWeeeAttributesForDisplay($product) * Get Product Weee attributes for price renderer * * @param \Magento\Catalog\Model\Product $product - * @param null|false|\Magento\Object $shipping Shipping Address - * @param null|false|\Magento\Object $billing Billing Address + * @param null|false|\Magento\Framework\Object $shipping Shipping Address + * @param null|false|\Magento\Framework\Object $billing Billing Address * @param null|Website $website * @param bool $calculateTaxes - * @return \Magento\Object[] + * @return \Magento\Framework\Object[] */ public function getProductWeeeAttributesForRenderer( $product, @@ -451,19 +451,19 @@ public function isEnabled($store = null) /** * Returns all summed WEEE taxes with all local taxes applied * - * @param \Magento\Object[] $attributes Array of \Magento\Object, result from getProductWeeeAttributes() + * @param \Magento\Framework\Object[] $attributes Array of \Magento\Framework\Object, result from getProductWeeeAttributes() * @return float - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function getAmountInclTaxes($attributes) { if (!is_array($attributes)) { - throw new \Magento\Exception('$attributes must be an array'); + throw new \Magento\Framework\Exception('$attributes must be an array'); } $amount = 0; foreach ($attributes as $attribute) { - /* @var $attribute \Magento\Object */ + /* @var $attribute \Magento\Framework\Object */ $amount += $attribute->getAmount() + $attribute->getTaxAmount(); } diff --git a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php index 4d8913eab8c88..80b9840759743 100644 --- a/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php +++ b/app/code/Magento/Weee/Model/Attribute/Backend/Weee/Tax.php @@ -25,7 +25,7 @@ */ namespace Magento\Weee\Model\Attribute\Backend\Weee; -use Magento\Model\Exception; +use Magento\Framework\Model\Exception; class Tax extends \Magento\Catalog\Model\Product\Attribute\Backend\Price { @@ -45,7 +45,7 @@ class Tax extends \Magento\Catalog\Model\Product\Attribute\Backend\Price protected $_directoryHelper; /** - * @param \Magento\Logger $logger + * @param \Magento\Framework\Logger $logger * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Catalog\Helper\Data $catalogData @@ -54,7 +54,7 @@ class Tax extends \Magento\Catalog\Model\Product\Attribute\Backend\Price * @param \Magento\Weee\Model\Resource\Attribute\Backend\Weee\Tax $attributeTax */ public function __construct( - \Magento\Logger $logger, + \Magento\Framework\Logger $logger, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Catalog\Helper\Data $catalogData, diff --git a/app/code/Magento/Weee/Model/Config/Source/Display.php b/app/code/Magento/Weee/Model/Config/Source/Display.php index ad4867448533e..954399a26fccc 100644 --- a/app/code/Magento/Weee/Model/Config/Source/Display.php +++ b/app/code/Magento/Weee/Model/Config/Source/Display.php @@ -25,7 +25,7 @@ */ namespace Magento\Weee\Model\Config\Source; -class Display implements \Magento\Option\ArrayInterface +class Display implements \Magento\Framework\Option\ArrayInterface { /** * Retrieve list of available options to display FPT diff --git a/app/code/Magento/Weee/Model/Observer.php b/app/code/Magento/Weee/Model/Observer.php index ddf3264859316..27e81540a8868 100644 --- a/app/code/Magento/Weee/Model/Observer.php +++ b/app/code/Magento/Weee/Model/Observer.php @@ -25,7 +25,7 @@ */ namespace Magento\Weee\Model; -class Observer extends \Magento\Model\AbstractModel +class Observer extends \Magento\Framework\Model\AbstractModel { /** * @var \Magento\Catalog\Model\Product\Type @@ -45,7 +45,7 @@ class Observer extends \Magento\Model\AbstractModel protected $_weeeTax; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -55,27 +55,27 @@ class Observer extends \Magento\Model\AbstractModel protected $productTypeConfig; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry - * @param \Magento\View\LayoutInterface $layout + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\View\LayoutInterface $layout * @param Tax $weeeTax * @param \Magento\Weee\Helper\Data $weeeData * @param \Magento\Catalog\Model\Product\Type $productType * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, - \Magento\View\LayoutInterface $layout, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, + \Magento\Framework\View\LayoutInterface $layout, Tax $weeeTax, \Magento\Weee\Helper\Data $weeeData, \Magento\Catalog\Model\Product\Type $productType, \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_layout = $layout; @@ -89,12 +89,12 @@ public function __construct( /** * Assign custom renderer for product create/edit form weee attribute element * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function setWeeeRendererInForm(\Magento\Event\Observer $observer) + public function setWeeeRendererInForm(\Magento\Framework\Event\Observer $observer) { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $observer->getEvent()->getForm(); $attributes = $this->_weeeTax->getWeeeAttributeCodes(true); @@ -111,10 +111,10 @@ public function setWeeeRendererInForm(\Magento\Event\Observer $observer) /** * Exclude WEEE attributes from standard form generation * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function updateExcludedFieldList(\Magento\Event\Observer $observer) + public function updateExcludedFieldList(\Magento\Framework\Event\Observer $observer) { //adminhtml_catalog_product_form_prepare_excluded_field_list @@ -131,7 +131,7 @@ public function updateExcludedFieldList(\Magento\Event\Observer $observer) /** * Get empty select object * - * @return \Magento\DB\Select + * @return \Magento\Framework\DB\Select */ protected function _getSelect() { @@ -141,10 +141,10 @@ protected function _getSelect() /** * Add new attribute type to manage attributes interface * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function addWeeeTaxAttributeType(\Magento\Event\Observer $observer) + public function addWeeeTaxAttributeType(\Magento\Framework\Event\Observer $observer) { // adminhtml_product_attribute_types @@ -171,10 +171,10 @@ public function addWeeeTaxAttributeType(\Magento\Event\Observer $observer) /** * Automaticaly assign backend model to weee attributes * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function assignBackendModelToAttribute(\Magento\Event\Observer $observer) + public function assignBackendModelToAttribute(\Magento\Framework\Event\Observer $observer) { $backendModel = \Magento\Weee\Model\Attribute\Backend\Weee\Tax::getBackendModelName(); /** @var $object \Magento\Eav\Model\Entity\Attribute\AbstractAttribute */ @@ -199,10 +199,10 @@ public function assignBackendModelToAttribute(\Magento\Event\Observer $observer) /** * Add custom element type for attributes form * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function updateElementTypes(\Magento\Event\Observer $observer) + public function updateElementTypes(\Magento\Framework\Event\Observer $observer) { $response = $observer->getEvent()->getResponse(); $types = $response->getTypes(); @@ -214,10 +214,10 @@ public function updateElementTypes(\Magento\Event\Observer $observer) /** * Update WEEE amounts discount percents * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function updateDiscountPercents(\Magento\Event\Observer $observer) + public function updateDiscountPercents(\Magento\Framework\Event\Observer $observer) { if (!$this->_weeeData->isEnabled()) { return $this; @@ -237,10 +237,10 @@ public function updateDiscountPercents(\Magento\Event\Observer $observer) /** * Update options of the product view page * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function updateProductOptions(\Magento\Event\Observer $observer) + public function updateProductOptions(\Magento\Framework\Event\Observer $observer) { if (!$this->_weeeData->isEnabled()) { return $this; @@ -270,10 +270,10 @@ public function updateProductOptions(\Magento\Event\Observer $observer) /** * Process bundle options selection for prepare view json * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function updateBundleProductOptions(\Magento\Event\Observer $observer) + public function updateBundleProductOptions(\Magento\Framework\Event\Observer $observer) { if (!$this->_weeeData->isEnabled()) { return $this; diff --git a/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php b/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php index b874cb736ce01..70baefdb6676a 100644 --- a/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php +++ b/app/code/Magento/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php @@ -32,7 +32,7 @@ * @package Magento_Weee * @author Magento Core Team */ -class Tax extends \Magento\Model\Resource\Db\AbstractDb +class Tax extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * @var \Magento\Store\Model\StoreManagerInterface diff --git a/app/code/Magento/Weee/Model/Resource/Tax.php b/app/code/Magento/Weee/Model/Resource/Tax.php index b0424630e1140..d82b828511131 100644 --- a/app/code/Magento/Weee/Model/Resource/Tax.php +++ b/app/code/Magento/Weee/Model/Resource/Tax.php @@ -31,18 +31,18 @@ /** * Wee tax resource model */ -class Tax extends \Magento\Model\Resource\Db\AbstractDb +class Tax extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $dateTime; /** * @param \Magento\Framework\App\Resource $resource - * @param \Magento\Stdlib\DateTime $dateTime + * @param \Magento\Framework\Stdlib\DateTime $dateTime */ - public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Stdlib\DateTime $dateTime) + public function __construct(\Magento\Framework\App\Resource $resource, \Magento\Framework\Stdlib\DateTime $dateTime) { $this->dateTime = $dateTime; parent::__construct($resource); @@ -61,7 +61,7 @@ protected function _construct() /** * Fetch one * - * @param \Magento\DB\Select|string $select + * @param \Magento\Framework\DB\Select|string $select * @return string */ public function fetchOne($select) @@ -72,7 +72,7 @@ public function fetchOne($select) /** * Fetch column * - * @param \Magento\DB\Select|string $select + * @param \Magento\Framework\DB\Select|string $select * @return array */ public function fetchCol($select) diff --git a/app/code/Magento/Weee/Model/Tax.php b/app/code/Magento/Weee/Model/Tax.php index 2f9a710fed099..2e51a864c880f 100644 --- a/app/code/Magento/Weee/Model/Tax.php +++ b/app/code/Magento/Weee/Model/Tax.php @@ -29,7 +29,7 @@ use Magento\Store\Model\Website; use Magento\Customer\Model\Converter as CustomerConverter; -class Tax extends \Magento\Model\AbstractModel +class Tax extends \Magento\Framework\Model\AbstractModel { /** * Including FPT only @@ -101,8 +101,8 @@ class Tax extends \Magento\Model\AbstractModel protected $customerConverter; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Tax\Model\CalculationFactory $calculationFactory @@ -111,12 +111,12 @@ class Tax extends \Magento\Model\AbstractModel * @param \Magento\Weee\Helper\Data $weeeData * @param \Magento\Weee\Model\Resource\Tax $resource * @param CustomerConverter $customerConverter - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Tax\Model\CalculationFactory $calculationFactory, @@ -125,7 +125,7 @@ public function __construct( \Magento\Weee\Helper\Data $weeeData, \Magento\Weee\Model\Resource\Tax $resource, CustomerConverter $customerConverter, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_attributeFactory = $attributeFactory; @@ -150,8 +150,8 @@ protected function _construct() /** * @param Product $product - * @param null|false|\Magento\Object $shipping - * @param null|false|\Magento\Object $billing + * @param null|false|\Magento\Framework\Object $shipping + * @param null|false|\Magento\Framework\Object $billing * @param Website $website * @param bool $calculateTax * @param bool $ignoreDiscount @@ -214,7 +214,7 @@ public function getWeeeTaxAttributeCodes($forceEnabled = false) * @param Website $website * @param bool $calculateTax * @param bool $ignoreDiscount - * @return \Magento\Object[] + * @return \Magento\Framework\Object[] */ public function getProductWeeeAttributes( $product, @@ -278,7 +278,7 @@ public function getProductWeeeAttributes( 1 ); - $order = array('state ' . \Magento\DB\Select::SQL_DESC, 'website_id ' . \Magento\DB\Select::SQL_DESC); + $order = array('state ' . \Magento\Framework\DB\Select::SQL_DESC, 'website_id ' . \Magento\Framework\DB\Select::SQL_DESC); $attributeSelect->order($order); $value = $this->getResource()->getReadConnection()->fetchOne($attributeSelect); @@ -306,7 +306,7 @@ public function getProductWeeeAttributes( } } - $one = new \Magento\Object(); + $one = new \Magento\Framework\Object(); $one->setName(__($attribute->getFrontend()->getLabel())) ->setAmount($amount) ->setTaxAmount($taxAmount) diff --git a/app/code/Magento/Weee/Pricing/Adjustment.php b/app/code/Magento/Weee/Pricing/Adjustment.php index 4257db497f6ef..d23c03acc1b03 100644 --- a/app/code/Magento/Weee/Pricing/Adjustment.php +++ b/app/code/Magento/Weee/Pricing/Adjustment.php @@ -26,8 +26,8 @@ namespace Magento\Weee\Pricing; -use Magento\Pricing\Adjustment\AdjustmentInterface; -use Magento\Pricing\Object\SaleableInterface; +use Magento\Framework\Pricing\Adjustment\AdjustmentInterface; +use Magento\Framework\Pricing\Object\SaleableInterface; use Magento\Weee\Helper\Data as WeeeHelper; /** diff --git a/app/code/Magento/Weee/Pricing/Render/Adjustment.php b/app/code/Magento/Weee/Pricing/Render/Adjustment.php index ae7425365d82a..d190872dec822 100644 --- a/app/code/Magento/Weee/Pricing/Render/Adjustment.php +++ b/app/code/Magento/Weee/Pricing/Render/Adjustment.php @@ -18,17 +18,15 @@ * 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_Pricing * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ namespace Magento\Weee\Pricing\Render; -use Magento\View\Element\Template; -use Magento\Pricing\Render\AbstractAdjustment; -use Magento\Pricing\PriceCurrencyInterface; +use Magento\Framework\View\Element\Template; +use Magento\Framework\Pricing\Render\AbstractAdjustment; +use Magento\Framework\Pricing\PriceCurrencyInterface; use Magento\Weee\Model\Tax; /** @@ -143,7 +141,7 @@ public function showExclDescrIncl() /** * Obtain Weee tax attributes * - * @return array|\Magento\Object[] + * @return array|\Magento\Framework\Object[] */ public function getWeeeTaxAttributes() { @@ -153,10 +151,10 @@ public function getWeeeTaxAttributes() /** * Render Weee tax attributes * - * @param \Magento\Object $attribute + * @param \Magento\Framework\Object $attribute * @return string */ - public function renderWeeeTaxAttribute(\Magento\Object $attribute) + public function renderWeeeTaxAttribute(\Magento\Framework\Object $attribute) { return $attribute->getData('name') . ': ' . $this->convertAndFormatCurrency($attribute->getData('amount')); } @@ -176,7 +174,7 @@ protected function typeOfDisplay($compareTo = null, $store = null) /** * Get Weee attributes for display * - * @return \Magento\Object[] + * @return \Magento\Framework\Object[] */ protected function getWeeeAttributesForDisplay() { diff --git a/app/code/Magento/Weee/etc/adminhtml/events.xml b/app/code/Magento/Weee/etc/adminhtml/events.xml index b04a3f9a8ab9f..03c8de8025298 100644 --- a/app/code/Magento/Weee/etc/adminhtml/events.xml +++ b/app/code/Magento/Weee/etc/adminhtml/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Weee/etc/di.xml b/app/code/Magento/Weee/etc/di.xml index 25f6141f16808..4b93eda0eea33 100644 --- a/app/code/Magento/Weee/etc/di.xml +++ b/app/code/Magento/Weee/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Magento\Weee\Model\Tax\Proxy @@ -31,12 +31,12 @@ - Magento\View\Layout\Proxy + Magento\Framework\View\Layout\Proxy Magento\Weee\Model\Tax\Proxy Magento\Weee\Helper\Data\Proxy - + Magento\Sales\Model\Resource\Setup @@ -44,7 +44,7 @@ - + diff --git a/app/code/Magento/Weee/etc/events.xml b/app/code/Magento/Weee/etc/events.xml index d27f17f636276..e1eba181bbac1 100644 --- a/app/code/Magento/Weee/etc/events.xml +++ b/app/code/Magento/Weee/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Weee/etc/fieldset.xml b/app/code/Magento/Weee/etc/fieldset.xml index 6454fe9463e64..3a5fcafee0fd3 100644 --- a/app/code/Magento/Weee/etc/fieldset.xml +++ b/app/code/Magento/Weee/etc/fieldset.xml @@ -26,7 +26,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd">
diff --git a/app/code/Magento/Weee/etc/module.xml b/app/code/Magento/Weee/etc/module.xml index ea9a8505c5172..4ee18de9cfc0b 100644 --- a/app/code/Magento/Weee/etc/module.xml +++ b/app/code/Magento/Weee/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php b/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php index c66b41db5756b..e5009540ce24f 100644 --- a/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php +++ b/app/code/Magento/Weee/sql/weee_setup/install-1.6.0.0.php @@ -33,49 +33,49 @@ $installer->getTable('weee_tax') )->addColumn( 'value_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'nullable' => false, 'primary' => true), 'Value Id' )->addColumn( 'website_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Website Id' )->addColumn( 'entity_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Entity Id' )->addColumn( 'country', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 2, array('nullable' => true), 'Country' )->addColumn( 'value', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '12,4', array('nullable' => false, 'default' => '0.0000'), 'Value' )->addColumn( 'state', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => false, 'default' => '*'), 'State' )->addColumn( 'attribute_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false), 'Attribute Id' )->addColumn( 'entity_type_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false), 'Entity Type Id' @@ -96,29 +96,29 @@ 'country', $installer->getTable('directory_country'), 'country_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('weee_tax', 'entity_id', 'catalog_product_entity', 'entity_id'), 'entity_id', $installer->getTable('catalog_product_entity'), 'entity_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('weee_tax', 'website_id', 'store_website', 'website_id'), 'website_id', $installer->getTable('store_website'), 'website_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('weee_tax', 'attribute_id', 'eav_attribute', 'attribute_id'), 'attribute_id', $installer->getTable('eav_attribute'), 'attribute_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Weee Tax' ); @@ -131,25 +131,25 @@ $installer->getTable('weee_discount') )->addColumn( 'entity_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Entity Id' )->addColumn( 'website_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Website Id' )->addColumn( 'customer_group_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false), 'Customer Group Id' )->addColumn( 'value', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '12,4', array('nullable' => false, 'default' => '0.0000'), 'Value' @@ -167,22 +167,22 @@ 'customer_group_id', $installer->getTable('customer_group'), 'customer_group_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('weee_discount', 'entity_id', 'catalog_product_entity', 'entity_id'), 'entity_id', $installer->getTable('catalog_product_entity'), 'entity_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('weee_discount', 'website_id', 'store_website', 'website_id'), 'website_id', $installer->getTable('store_website'), 'website_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Weee Discount' ); diff --git a/app/code/Magento/Weee/view/frontend/pricing/adjustment.phtml b/app/code/Magento/Weee/view/frontend/pricing/adjustment.phtml index 1376a6a37f7ea..2f67a786065c2 100644 --- a/app/code/Magento/Weee/view/frontend/pricing/adjustment.phtml +++ b/app/code/Magento/Weee/view/frontend/pricing/adjustment.phtml @@ -29,7 +29,7 @@ /** @var \Magento\Weee\Pricing\Render\Adjustment $this */ $weeeSeparator = $openBrace = $closeBrace = ''; -//if ($this->getZone() !== \Magento\Pricing\Render::ZONE_ITEM_OPTION) { +//if ($this->getZone() !== \Magento\Framework\Pricing\Render::ZONE_ITEM_OPTION) { $openBrace = '('; $closeBrace = ')'; //} diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php index f5037bf4bf2ca..a3f599b9de982 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php @@ -36,25 +36,25 @@ class Chooser extends \Magento\Backend\Block\Template { /** - * @var \Magento\Data\Form\Element\Factory + * @var \Magento\Framework\Data\Form\Element\Factory */ protected $_elementFactory; /** - * @var \Magento\Json\EncoderInterface + * @var \Magento\Framework\Json\EncoderInterface */ protected $_jsonEncoder; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Json\EncoderInterface $jsonEncoder - * @param \Magento\Data\Form\Element\Factory $elementFactory + * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder + * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Json\EncoderInterface $jsonEncoder, - \Magento\Data\Form\Element\Factory $elementFactory, + \Magento\Framework\Json\EncoderInterface $jsonEncoder, + \Magento\Framework\Data\Form\Element\Factory $elementFactory, array $data = array() ) { $this->_jsonEncoder = $jsonEncoder; @@ -75,7 +75,7 @@ public function getSourceUrl() /** * Chooser form element getter * - * @return \Magento\Data\Form\Element\AbstractElement + * @return \Magento\Framework\Data\Form\Element\AbstractElement */ public function getElement() { @@ -85,16 +85,16 @@ public function getElement() /** * Convert Array config to Object * - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function getConfig() { - if ($this->_getData('config') instanceof \Magento\Object) { + if ($this->_getData('config') instanceof \Magento\Framework\Object) { return $this->_getData('config'); } $configArray = $this->_getData('config'); - $config = new \Magento\Object(); + $config = new \Magento\Framework\Object(); $this->setConfig($config); if (!is_array($configArray)) { return $this->_getData('config'); @@ -155,7 +155,7 @@ public function getHiddenEnabled() protected function _toHtml() { $element = $this->getElement(); - /* @var $fieldset \Magento\Data\Form\Element\Fieldset */ + /* @var $fieldset \Magento\Framework\Data\Form\Element\Fieldset */ $fieldset = $element->getForm()->getElement($this->getFieldsetId()); $chooserId = $this->getUniqId(); $config = $this->getConfig(); diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php index 230f3994d7269..aaa3c47eab255 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Form.php @@ -42,15 +42,15 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Widget\Model\WidgetFactory $widgetFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Widget\Model\WidgetFactory $widgetFactory, array $data = array() ) { @@ -65,7 +65,7 @@ public function __construct( */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $fieldset = $form->addFieldset('base_fieldset', array('legend' => __('Widget'))); diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php index f9846bb437420..517788e4822a5 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit.php @@ -38,18 +38,18 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_coreRegistry = $registry; diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php index 35e809f3e684d..8c5573046e799 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Container.php @@ -33,10 +33,10 @@ * @method \Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Container setTheme($theme) * @method \Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Container setArea($area) */ -class Container extends \Magento\View\Element\Html\Select +class Container extends \Magento\Framework\View\Element\Html\Select { /** - * @var \Magento\View\Layout\ProcessorFactory + * @var \Magento\Framework\View\Layout\ProcessorFactory */ protected $_layoutProcessorFactory; @@ -46,14 +46,14 @@ class Container extends \Magento\View\Element\Html\Select protected $_themesFactory; /** - * @param \Magento\View\Element\Context $context - * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory + * @param \Magento\Framework\View\Element\Context $context + * @param \Magento\Framework\View\Layout\ProcessorFactory $layoutProcessorFactory * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory * @param array $data */ public function __construct( - \Magento\View\Element\Context $context, - \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory, + \Magento\Framework\View\Element\Context $context, + \Magento\Framework\View\Layout\ProcessorFactory $layoutProcessorFactory, \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory, array $data = array() ) { @@ -80,13 +80,13 @@ protected function _construct() /** * Add necessary options * - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _beforeToHtml() { if (!$this->getOptions()) { $layoutMergeParams = array('theme' => $this->_getThemeInstance($this->getTheme())); - /** @var $layoutProcessor \Magento\View\Layout\ProcessorInterface */ + /** @var $layoutProcessor \Magento\Framework\View\Layout\ProcessorInterface */ $layoutProcessor = $this->_layoutProcessorFactory->create($layoutMergeParams); $layoutProcessor->addPageHandles(array($this->getLayoutHandle())); $layoutProcessor->addPageHandles(array('default')); diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php index 5bebfcdb718cd..083d7d271f61f 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstraction.php @@ -31,10 +31,10 @@ * @method getArea() * @method getTheme() */ -class DesignAbstraction extends \Magento\View\Element\Html\Select +class DesignAbstraction extends \Magento\Framework\View\Element\Html\Select { /** - * @var \Magento\View\Layout\ProcessorFactory + * @var \Magento\Framework\View\Layout\ProcessorFactory */ protected $_layoutProcessorFactory; @@ -49,15 +49,15 @@ class DesignAbstraction extends \Magento\View\Element\Html\Select protected $_appState; /** - * @param \Magento\View\Element\Context $context - * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory + * @param \Magento\Framework\View\Element\Context $context + * @param \Magento\Framework\View\Layout\ProcessorFactory $layoutProcessorFactory * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory * @param \Magento\Framework\App\State $appState * @param array $data */ public function __construct( - \Magento\View\Element\Context $context, - \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory, + \Magento\Framework\View\Element\Context $context, + \Magento\Framework\View\Layout\ProcessorFactory $layoutProcessorFactory, \Magento\Core\Model\Resource\Theme\CollectionFactory $themesFactory, \Magento\Framework\App\State $appState, array $data = array() @@ -71,7 +71,7 @@ public function __construct( /** * Add necessary options * - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _beforeToHtml() { @@ -104,7 +104,7 @@ protected function _getThemeInstance($themeId) * Retrieve new layout merge model instance * * @param array $arguments - * @return \Magento\View\Layout\ProcessorInterface + * @return \Magento\Framework\View\Layout\ProcessorInterface */ protected function _getLayoutProcessor(array $arguments) { @@ -129,7 +129,7 @@ protected function _addDesignAbstractionOptions(array $designAbstractions) // Group the layout options $customLayouts = array(); $pageLayouts = array(); - /** @var $layoutProcessor \Magento\View\Layout\ProcessorInterface */ + /** @var $layoutProcessor \Magento\Framework\View\Layout\ProcessorInterface */ $layoutProcessor = $this->_layoutProcessorFactory->create(); foreach ($designAbstractions as $pageTypeName => $pageTypeInfo) { if ($layoutProcessor->isPageLayoutDesignAbstraction($pageTypeInfo)) { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php index 8d1205d671a71..8c782958e9e38 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php @@ -31,21 +31,21 @@ * @method getArea() * @method getTheme() */ -class Layout extends \Magento\View\Element\Html\Select +class Layout extends \Magento\Framework\View\Element\Html\Select { /** - * @var \Magento\View\Layout\PageType\Config + * @var \Magento\Framework\View\Layout\PageType\Config */ protected $_config; /** - * @param \Magento\View\Element\Context $context - * @param \Magento\View\Layout\PageType\Config $config + * @param \Magento\Framework\View\Element\Context $context + * @param \Magento\Framework\View\Layout\PageType\Config $config * @param array $data */ public function __construct( - \Magento\View\Element\Context $context, - \Magento\View\Layout\PageType\Config $config, + \Magento\Framework\View\Element\Context $context, + \Magento\Framework\View\Layout\PageType\Config $config, array $data = array() ) { $this->_config = $config; @@ -55,7 +55,7 @@ public function __construct( /** * Add necessary options * - * @return \Magento\View\Element\AbstractBlock + * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _beforeToHtml() { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php index 101193a7fe7c1..44188f4e63369 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php @@ -50,7 +50,7 @@ protected function _toHtml() $html .= $widgetTemplate['label']; } else { $html = $this->getLayout()->createBlock( - 'Magento\View\Element\Html\Select' + 'Magento\Framework\View\Element\Html\Select' )->setName( 'template' )->setClass( diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php index 89b6c8f8dd9f8..5600250d3ae5f 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php @@ -42,7 +42,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array('data' => array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')) ); diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php index 83edc8ca29fa7..0d9d0e7ae3761 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -41,24 +41,24 @@ class Main extends \Magento\Backend\Block\Widget\Form\Generic implements \Magent protected $_store; /** - * @var \Magento\View\Design\Theme\LabelFactory + * @var \Magento\Framework\View\Design\Theme\LabelFactory */ protected $_themeLabelFactory; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Store\Model\System\Store $store - * @param \Magento\View\Design\Theme\LabelFactory $themeLabelFactory + * @param \Magento\Framework\View\Design\Theme\LabelFactory $themeLabelFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, \Magento\Store\Model\System\Store $store, - \Magento\View\Design\Theme\LabelFactory $themeLabelFactory, + \Magento\Framework\View\Design\Theme\LabelFactory $themeLabelFactory, array $data = array() ) { $this->_store = $store; @@ -136,7 +136,7 @@ protected function _prepareForm() { $widgetInstance = $this->getWidgetInstance(); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array('data' => array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')) ); @@ -162,7 +162,7 @@ protected function _prepareForm() ) ); - /** @var $label \Magento\View\Design\Theme\Label */ + /** @var $label \Magento\Framework\View\Design\Theme\Label */ $label = $this->_themeLabelFactory->create(); $options = $label->getLabelsCollection(__('-- Please Select --')); $fieldset->addField( diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 6899e60e61238..b3dbeb2fff853 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -25,14 +25,14 @@ */ namespace Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main; -use Magento\Data\Form\Element\AbstractElement; +use Magento\Framework\Data\Form\Element\AbstractElement; /** * Widget Instance page groups (predefined layouts group) to display on * * @method \Magento\Widget\Model\Widget\Instance getWidgetInstance() */ -class Layout extends \Magento\Backend\Block\Template implements \Magento\Data\Form\Element\Renderer\RendererInterface +class Layout extends \Magento\Backend\Block\Template implements \Magento\Framework\Data\Form\Element\Renderer\RendererInterface { /** * @var AbstractElement|null @@ -145,7 +145,7 @@ public function getTemplateChooserUrl() public function getDisplayOnSelectHtml() { $selectBlock = $this->getLayout()->createBlock( - 'Magento\View\Element\Html\Select' + 'Magento\Framework\View\Element\Html\Select' )->setName( 'widget_instance[{{id}}][page_group]' )->setId( diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php index c7af72d444629..1ffa1049c755a 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php @@ -105,8 +105,8 @@ protected function _preparelayout() /** * Add field to Options form based on option configuration * - * @param \Magento\Object $parameter - * @return \Magento\Data\Form\Element\AbstractElement + * @param \Magento\Framework\Object $parameter + * @return \Magento\Framework\Data\Form\Element\AbstractElement */ protected function _addField($parameter) { diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php index ee1be4ff66ab8..20d071f09d561 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php @@ -39,27 +39,27 @@ class Settings extends \Magento\Backend\Block\Widget\Form\Generic implements /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; /** - * @var \Magento\View\Design\Theme\LabelFactory + * @var \Magento\Framework\View\Design\Theme\LabelFactory */ protected $_themeLabelFactory; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\View\Design\Theme\LabelFactory $themeLabelFactory + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory + * @param \Magento\Framework\View\Design\Theme\LabelFactory $themeLabelFactory * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\View\Design\Theme\LabelFactory $themeLabelFactory, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, + \Magento\Framework\View\Design\Theme\LabelFactory $themeLabelFactory, array $data = array() ) { $this->_themeLabelFactory = $themeLabelFactory; @@ -132,7 +132,7 @@ public function getWidgetInstance() */ protected function _prepareForm() { - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create( array('data' => array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')) ); @@ -153,7 +153,7 @@ protected function _prepareForm() ) ); - /** @var $label \Magento\View\Design\Theme\Label */ + /** @var $label \Magento\Framework\View\Design\Theme\Label */ $label = $this->_themeLabelFactory->create(); $options = $label->getLabelsCollection(__('-- Please Select --')); $fieldset->addField( diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php index 00a54f436870c..4a9508e834d36 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Options.php @@ -47,23 +47,23 @@ class Options extends \Magento\Backend\Block\Widget\Form\Generic protected $_widget; /** - * @var \Magento\Option\ArrayPool + * @var \Magento\Framework\Option\ArrayPool */ protected $_sourceModelPool; /** * @param \Magento\Backend\Block\Template\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Data\FormFactory $formFactory - * @param \Magento\Option\ArrayPool $sourceModelPool + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Data\FormFactory $formFactory + * @param \Magento\Framework\Option\ArrayPool $sourceModelPool * @param \Magento\Widget\Model\Widget $widget * @param array $data */ public function __construct( \Magento\Backend\Block\Template\Context $context, - \Magento\Registry $registry, - \Magento\Data\FormFactory $formFactory, - \Magento\Option\ArrayPool $sourceModelPool, + \Magento\Framework\Registry $registry, + \Magento\Framework\Data\FormFactory $formFactory, + \Magento\Framework\Option\ArrayPool $sourceModelPool, \Magento\Widget\Model\Widget $widget, array $data = array() ) { @@ -90,14 +90,14 @@ protected function _prepareForm() /** * Form getter/instantiation * - * @return \Magento\Data\Form + * @return \Magento\Framework\Data\Form */ public function getForm() { - if ($this->_form instanceof \Magento\Data\Form) { + if ($this->_form instanceof \Magento\Framework\Data\Form) { return $this->_form; } - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); $this->setForm($form); return $form; @@ -106,11 +106,11 @@ public function getForm() /** * Fieldset getter/instantiation * - * @return \Magento\Data\Form\Element\Fieldset + * @return \Magento\Framework\Data\Form\Element\Fieldset */ public function getMainFieldset() { - if ($this->_getData('main_fieldset') instanceof \Magento\Data\Form\Element\Fieldset) { + if ($this->_getData('main_fieldset') instanceof \Magento\Framework\Data\Form\Element\Fieldset) { return $this->_getData('main_fieldset'); } $mainFieldsetHtmlId = 'options_fieldset' . md5($this->getWidgetType()); @@ -131,14 +131,14 @@ public function getMainFieldset() /** * Add fields to main fieldset based on specified widget type * - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return $this */ public function addFields() { // get configuration node and translation helper if (!$this->getWidgetType()) { - throw new \Magento\Model\Exception(__('Please specify a Widget Type.')); + throw new \Magento\Framework\Model\Exception(__('Please specify a Widget Type.')); } $config = $this->_widget->getConfigAsObject($this->getWidgetType()); if (!$config->getParameters()) { @@ -154,8 +154,8 @@ public function addFields() /** * Add field to Options form based on parameter configuration * - * @param \Magento\Object $parameter - * @return \Magento\Data\Form\Element\AbstractElement + * @param \Magento\Framework\Object $parameter + * @return \Magento\Framework\Data\Form\Element\AbstractElement */ protected function _addField($parameter) { @@ -220,7 +220,7 @@ protected function _addField($parameter) '', array('data' => $helper->getData()) ); - if ($helperBlock instanceof \Magento\Object) { + if ($helperBlock instanceof \Magento\Framework\Object) { $helperBlock->setConfig( $helper->getData() )->setFieldsetId( diff --git a/app/code/Magento/Widget/Block/BlockInterface.php b/app/code/Magento/Widget/Block/BlockInterface.php index 6754b4c566b15..ecffe828e0bdc 100644 --- a/app/code/Magento/Widget/Block/BlockInterface.php +++ b/app/code/Magento/Widget/Block/BlockInterface.php @@ -53,7 +53,7 @@ public function addData(array $arr); * * @param string|array $key * @param mixed $value - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function setData($key, $value = null); } diff --git a/app/code/Magento/Widget/Controller/Adminhtml/Widget.php b/app/code/Magento/Widget/Controller/Adminhtml/Widget.php index 98ca02c4b3033..9780307783002 100644 --- a/app/code/Magento/Widget/Controller/Adminhtml/Widget.php +++ b/app/code/Magento/Widget/Controller/Adminhtml/Widget.php @@ -40,7 +40,7 @@ class Widget extends \Magento\Backend\App\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -58,13 +58,13 @@ class Widget extends \Magento\Backend\App\Action * @param \Magento\Backend\App\Action\Context $context * @param \Magento\Widget\Model\Widget\Config $widgetConfig * @param \Magento\Widget\Model\Widget $widget - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry */ public function __construct( \Magento\Backend\App\Action\Context $context, \Magento\Widget\Model\Widget\Config $widgetConfig, \Magento\Widget\Model\Widget $widget, - \Magento\Registry $coreRegistry + \Magento\Framework\Registry $coreRegistry ) { $this->_widgetConfig = $widgetConfig; $this->_widget = $widget; @@ -110,7 +110,7 @@ public function loadOptionsAction() } $this->_view->renderLayout(); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $result = array('error' => true, 'message' => $e->getMessage()); $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result)); } diff --git a/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php b/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php index 5df810afd0df5..974609ead1d86 100644 --- a/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php +++ b/app/code/Magento/Widget/Controller/Adminhtml/Widget/Instance.php @@ -34,7 +34,7 @@ class Instance extends \Magento\Backend\App\Action /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -44,35 +44,35 @@ class Instance extends \Magento\Backend\App\Action protected $_widgetFactory; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** - * @var \Magento\Translate\InlineInterface + * @var \Magento\Framework\Translate\InlineInterface */ protected $_translateInline; /** * @param \Magento\Backend\App\Action\Context $context - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory - * @param \Magento\Logger $logger - * @param \Magento\Math\Random $mathRandom - * @param \Magento\Translate\InlineInterface $translateInline + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Math\Random $mathRandom + * @param \Magento\Framework\Translate\InlineInterface $translateInline */ public function __construct( \Magento\Backend\App\Action\Context $context, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory, - \Magento\Logger $logger, - \Magento\Math\Random $mathRandom, - \Magento\Translate\InlineInterface $translateInline + \Magento\Framework\Logger $logger, + \Magento\Framework\Math\Random $mathRandom, + \Magento\Framework\Translate\InlineInterface $translateInline ) { $this->_translateInline = $translateInline; $this->_coreRegistry = $coreRegistry; @@ -195,7 +195,7 @@ protected function setBody($body) */ public function validateAction() { - $response = new \Magento\Object(); + $response = new \Magento\Framework\Object(); $response->setError(false); $widgetInstance = $this->_initWidgetInstance(); $result = $widgetInstance->validate(); diff --git a/app/code/Magento/Widget/Model/Config/Converter.php b/app/code/Magento/Widget/Model/Config/Converter.php index 78d34dcb18f9a..6ad4963918209 100644 --- a/app/code/Magento/Widget/Model/Config/Converter.php +++ b/app/code/Magento/Widget/Model/Config/Converter.php @@ -23,7 +23,7 @@ */ namespace Magento\Widget\Model\Config; -class Converter implements \Magento\Config\ConverterInterface +class Converter implements \Magento\Framework\Config\ConverterInterface { /** * {@inheritdoc} diff --git a/app/code/Magento/Widget/Model/Config/Data.php b/app/code/Magento/Widget/Model/Config/Data.php index e1e33dfd03ef5..2f4e369b054ed 100644 --- a/app/code/Magento/Widget/Model/Config/Data.php +++ b/app/code/Magento/Widget/Model/Config/Data.php @@ -23,7 +23,7 @@ */ namespace Magento\Widget\Model\Config; -class Data extends \Magento\Config\Data\Scoped +class Data extends \Magento\Framework\Config\Data\Scoped { /** * Scope priority loading scheme diff --git a/app/code/Magento/Widget/Model/Config/FileResolver.php b/app/code/Magento/Widget/Model/Config/FileResolver.php index 538bde6bffbf2..4f9ef44a50f2e 100644 --- a/app/code/Magento/Widget/Model/Config/FileResolver.php +++ b/app/code/Magento/Widget/Model/Config/FileResolver.php @@ -25,39 +25,39 @@ */ namespace Magento\Widget\Model\Config; -class FileResolver implements \Magento\Config\FileResolverInterface +class FileResolver implements \Magento\Framework\Config\FileResolverInterface { /** * Module configuration file reader * - * @var \Magento\Module\Dir\Reader + * @var \Magento\Framework\Module\Dir\Reader */ protected $_moduleReader; /** - * @var \Magento\Filesystem\Directory\ReadInterface + * @var \Magento\Framework\Filesystem\Directory\ReadInterface */ protected $themesDirectory; /** - * @var \Magento\Config\FileIteratorFactory + * @var \Magento\Framework\Config\FileIteratorFactory */ protected $iteratorFactory; /** - * @var \Magento\Filesystem\Directory\ReadInterface + * @var \Magento\Framework\Filesystem\Directory\ReadInterface */ protected $modulesDirectory; /** * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Module\Dir\Reader $moduleReader - * @param \Magento\Config\FileIteratorFactory $iteratorFactory + * @param \Magento\Framework\Module\Dir\Reader $moduleReader + * @param \Magento\Framework\Config\FileIteratorFactory $iteratorFactory */ public function __construct( \Magento\Framework\App\Filesystem $filesystem, - \Magento\Module\Dir\Reader $moduleReader, - \Magento\Config\FileIteratorFactory $iteratorFactory + \Magento\Framework\Module\Dir\Reader $moduleReader, + \Magento\Framework\Config\FileIteratorFactory $iteratorFactory ) { $this->themesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::THEMES_DIR); $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); diff --git a/app/code/Magento/Widget/Model/Config/Reader.php b/app/code/Magento/Widget/Model/Config/Reader.php index 825600ed1335e..36fdbfc3ff5cc 100644 --- a/app/code/Magento/Widget/Model/Config/Reader.php +++ b/app/code/Magento/Widget/Model/Config/Reader.php @@ -23,7 +23,7 @@ */ namespace Magento\Widget\Model\Config; -class Reader extends \Magento\Config\Reader\Filesystem +class Reader extends \Magento\Framework\Config\Reader\Filesystem { /** * List of identifier attributes for merging @@ -39,23 +39,23 @@ class Reader extends \Magento\Config\Reader\Filesystem ); /** - * @param \Magento\Config\FileResolverInterface $fileResolver + * @param \Magento\Framework\Config\FileResolverInterface $fileResolver * @param Converter $converter - * @param \Magento\Config\SchemaLocatorInterface $schemaLocator - * @param \Magento\Config\ValidationStateInterface $validationState + * @param \Magento\Framework\Config\SchemaLocatorInterface $schemaLocator + * @param \Magento\Framework\Config\ValidationStateInterface $validationState * @param string $fileName * @param array $idAttributes * @param string $domDocumentClass * @param string $defaultScope */ public function __construct( - \Magento\Config\FileResolverInterface $fileResolver, + \Magento\Framework\Config\FileResolverInterface $fileResolver, Converter $converter, - \Magento\Config\SchemaLocatorInterface $schemaLocator, - \Magento\Config\ValidationStateInterface $validationState, + \Magento\Framework\Config\SchemaLocatorInterface $schemaLocator, + \Magento\Framework\Config\ValidationStateInterface $validationState, $fileName = 'widget.xml', $idAttributes = array(), - $domDocumentClass = 'Magento\Config\Dom', + $domDocumentClass = 'Magento\Framework\Config\Dom', $defaultScope = 'global' ) { parent::__construct( diff --git a/app/code/Magento/Widget/Model/Config/SchemaLocator.php b/app/code/Magento/Widget/Model/Config/SchemaLocator.php index f422bee6b9166..02823a1301661 100644 --- a/app/code/Magento/Widget/Model/Config/SchemaLocator.php +++ b/app/code/Magento/Widget/Model/Config/SchemaLocator.php @@ -25,7 +25,7 @@ */ namespace Magento\Widget\Model\Config; -class SchemaLocator implements \Magento\Config\SchemaLocatorInterface +class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface { /** * Path to corresponding XSD file with validation rules for merged config @@ -42,9 +42,9 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface protected $_perFileSchema = null; /** - * @param \Magento\Module\Dir\Reader $moduleReader + * @param \Magento\Framework\Module\Dir\Reader $moduleReader */ - public function __construct(\Magento\Module\Dir\Reader $moduleReader) + public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader) { $this->_schema = $moduleReader->getModuleDir('etc', 'Magento_Widget') . '/widget.xsd'; $this->_perFileSchema = $moduleReader->getModuleDir('etc', 'Magento_Widget') . '/widget_file.xsd'; diff --git a/app/code/Magento/Widget/Model/NamespaceResolver.php b/app/code/Magento/Widget/Model/NamespaceResolver.php index 2fabd15eb7fcc..d0ad316e2f1f9 100644 --- a/app/code/Magento/Widget/Model/NamespaceResolver.php +++ b/app/code/Magento/Widget/Model/NamespaceResolver.php @@ -33,14 +33,14 @@ class NamespaceResolver protected $_moduleNamespaces; /** - * @var \Magento\Module\ModuleListInterface + * @var \Magento\Framework\Module\ModuleListInterface */ protected $_moduleList; /** - * @param \Magento\Module\ModuleListInterface $moduleList + * @param \Magento\Framework\Module\ModuleListInterface $moduleList */ - public function __construct(\Magento\Module\ModuleListInterface $moduleList) + public function __construct(\Magento\Framework\Module\ModuleListInterface $moduleList) { $this->_moduleList = $moduleList; } @@ -66,8 +66,8 @@ public function determineOmittedNamespace($name, $asFullModuleName = false) $explodeString = strpos( $name, - \Magento\Autoload\IncludePath::NS_SEPARATOR - ) === false ? '_' : \Magento\Autoload\IncludePath::NS_SEPARATOR; + \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR + ) === false ? '_' : \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR; $name = explode($explodeString, strtolower($name)); $partsNum = count($name); diff --git a/app/code/Magento/Widget/Model/Resource/Widget.php b/app/code/Magento/Widget/Model/Resource/Widget.php index bd7f1e28a8c3c..6f38e23437987 100644 --- a/app/code/Magento/Widget/Model/Resource/Widget.php +++ b/app/code/Magento/Widget/Model/Resource/Widget.php @@ -34,7 +34,7 @@ */ namespace Magento\Widget\Model\Resource; -class Widget extends \Magento\Model\Resource\Db\AbstractDb +class Widget extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Define main table diff --git a/app/code/Magento/Widget/Model/Resource/Widget/Instance.php b/app/code/Magento/Widget/Model/Resource/Widget/Instance.php index 3d7269e1fa3e2..2af13252f99d9 100644 --- a/app/code/Magento/Widget/Model/Resource/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Resource/Widget/Instance.php @@ -34,9 +34,9 @@ */ namespace Magento\Widget\Model\Resource\Widget; -use Magento\Model\AbstractModel; +use Magento\Framework\Model\AbstractModel; -class Instance extends \Magento\Model\Resource\Db\AbstractDb +class Instance extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Define main table @@ -187,7 +187,7 @@ protected function _prepareStoreIds($storeIds) * Perform actions before object delete. * Collect page ids and layout update ids and set to object for further delete * - * @param AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @return $this */ protected function _beforeDelete(AbstractModel $object) diff --git a/app/code/Magento/Widget/Model/Resource/Widget/Instance/Collection.php b/app/code/Magento/Widget/Model/Resource/Widget/Instance/Collection.php index 624d11ca5a9eb..b9ad6f1ac1b77 100644 --- a/app/code/Magento/Widget/Model/Resource/Widget/Instance/Collection.php +++ b/app/code/Magento/Widget/Model/Resource/Widget/Instance/Collection.php @@ -34,7 +34,7 @@ */ namespace Magento\Widget\Model\Resource\Widget\Instance; -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Fields map for corellation names & real selected fields diff --git a/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/ThemeId.php b/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/ThemeId.php index a63715a7b59cf..9b10bc822fe08 100644 --- a/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/ThemeId.php +++ b/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/ThemeId.php @@ -32,7 +32,7 @@ */ namespace Magento\Widget\Model\Resource\Widget\Instance\Options; -class ThemeId implements \Magento\Option\ArrayInterface +class ThemeId implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Widget\Model\Widget\Instance diff --git a/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/Types.php b/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/Types.php index d79344049eaca..fda46b7a66170 100644 --- a/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/Types.php +++ b/app/code/Magento/Widget/Model/Resource/Widget/Instance/Options/Types.php @@ -32,7 +32,7 @@ */ namespace Magento\Widget\Model\Resource\Widget\Instance\Options; -class Types implements \Magento\Option\ArrayInterface +class Types implements \Magento\Framework\Option\ArrayInterface { /** * @var \Magento\Widget\Model\Widget\Instance diff --git a/app/code/Magento/Widget/Model/Template/Filter.php b/app/code/Magento/Widget/Model/Template/Filter.php index aad0aa65e4740..8fa4f630b715d 100644 --- a/app/code/Magento/Widget/Model/Template/Filter.php +++ b/app/code/Magento/Widget/Model/Template/Filter.php @@ -41,29 +41,29 @@ class Filter extends \Magento\Cms\Model\Template\Filter protected $_widget; /** - * @param \Magento\Stdlib\String $string - * @param \Magento\Logger $logger - * @param \Magento\Escaper $escaper - * @param \Magento\View\Url $viewUrl + * @param \Magento\Framework\Stdlib\String $string + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Escaper $escaper + * @param \Magento\Framework\View\Url $viewUrl * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Core\Model\VariableFactory $coreVariableFactory * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\View\LayoutInterface $layout - * @param \Magento\View\LayoutFactory $layoutFactory + * @param \Magento\Framework\View\LayoutInterface $layout + * @param \Magento\Framework\View\LayoutFactory $layoutFactory * @param \Magento\Framework\App\State $appState * @param \Magento\Widget\Model\Resource\Widget $widgetResource * @param \Magento\Widget\Model\Widget $widget */ public function __construct( - \Magento\Stdlib\String $string, - \Magento\Logger $logger, - \Magento\Escaper $escaper, - \Magento\View\Url $viewUrl, + \Magento\Framework\Stdlib\String $string, + \Magento\Framework\Logger $logger, + \Magento\Framework\Escaper $escaper, + \Magento\Framework\View\Url $viewUrl, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Core\Model\VariableFactory $coreVariableFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\View\LayoutInterface $layout, - \Magento\View\LayoutFactory $layoutFactory, + \Magento\Framework\View\LayoutInterface $layout, + \Magento\Framework\View\LayoutFactory $layoutFactory, \Magento\Framework\App\State $appState, \Magento\Widget\Model\Resource\Widget $widgetResource, \Magento\Widget\Model\Widget $widget diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php index 70f83186c6516..87804bb6639d0 100644 --- a/app/code/Magento/Widget/Model/Widget.php +++ b/app/code/Magento/Widget/Model/Widget.php @@ -46,19 +46,19 @@ class Widget protected $_configCacheType; /** - * @var \Magento\View\Url + * @var \Magento\Framework\View\Url */ protected $_viewUrl; /** - * @var \Magento\View\FileSystem + * @var \Magento\Framework\View\FileSystem */ protected $_viewFileSystem; /** * Core data * - * @var \Magento\Escaper + * @var \Magento\Framework\Escaper */ protected $_escaper; @@ -68,16 +68,16 @@ class Widget protected $_widgetsArray = array(); /** - * @param \Magento\Escaper $escaper + * @param \Magento\Framework\Escaper $escaper * @param \Magento\Widget\Model\Config\Data $dataStorage - * @param \Magento\View\Url $viewUrl - * @param \Magento\View\FileSystem $viewFileSystem + * @param \Magento\Framework\View\Url $viewUrl + * @param \Magento\Framework\View\FileSystem $viewFileSystem */ public function __construct( - \Magento\Escaper $escaper, + \Magento\Framework\Escaper $escaper, \Magento\Widget\Model\Config\Data $dataStorage, - \Magento\View\Url $viewUrl, - \Magento\View\FileSystem $viewFileSystem + \Magento\Framework\View\Url $viewUrl, + \Magento\Framework\View\FileSystem $viewFileSystem ) { $this->_escaper = $escaper; $this->_dataStorage = $dataStorage; @@ -108,10 +108,10 @@ public function getWidgetByClassType($type) } /** - * Return widget XML configuration as \Magento\Object and makes some data preparations + * Return widget XML configuration as \Magento\Framework\Object and makes some data preparations * * @param string $type Widget type - * @return null|\Magento\Simplexml\Element + * @return null|\Magento\Framework\Simplexml\Element */ public function getConfigAsXml($type) { @@ -119,16 +119,16 @@ public function getConfigAsXml($type) } /** - * Return widget XML configuration as \Magento\Object and makes some data preparations + * Return widget XML configuration as \Magento\Framework\Object and makes some data preparations * * @param string $type Widget type - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function getConfigAsObject($type) { $widget = $this->getWidgetByClassType($type); - $object = new \Magento\Object(); + $object = new \Magento\Framework\Object(); if ($widget === null) { return $object; } @@ -161,7 +161,7 @@ public function getConfigAsObject($type) // prepare helper block object if (isset($data['helper_block'])) { - $helper = new \Magento\Object(); + $helper = new \Magento\Framework\Object(); if (isset($data['helper_block']['data']) && is_array($data['helper_block']['data'])) { $helper->addData($data['helper_block']['data']); } @@ -171,7 +171,7 @@ public function getConfigAsObject($type) $data['helper_block'] = $helper; } - $newParams[$key] = new \Magento\Object($data); + $newParams[$key] = new \Magento\Framework\Object($data); $sortOrder++; } } @@ -321,7 +321,7 @@ public function getPlaceholderImageUrls() } /** - * Remove attributes from widget array so that emulates how \Magento\Simplexml\Element::asCanonicalArray works + * Remove attributes from widget array so that emulates how \Magento\Framework\Simplexml\Element::asCanonicalArray works * * @param array $inputArray * @return array @@ -366,8 +366,8 @@ protected function _sortWidgets($firstElement, $secondElement) /** * Widget parameters sort callback * - * @param \Magento\Object $firstElement - * @param \Magento\Object $secondElement + * @param \Magento\Framework\Object $firstElement + * @param \Magento\Framework\Object $secondElement * @return int */ protected function _sortParameters($firstElement, $secondElement) diff --git a/app/code/Magento/Widget/Model/Widget/Config.php b/app/code/Magento/Widget/Model/Widget/Config.php index e62da1747db47..c0624f116a501 100644 --- a/app/code/Magento/Widget/Model/Widget/Config.php +++ b/app/code/Magento/Widget/Model/Widget/Config.php @@ -30,7 +30,7 @@ class Config { /** - * @var \Magento\View\Url + * @var \Magento\Framework\View\Url */ protected $_viewUrl; @@ -57,13 +57,13 @@ class Config /** * @param \Magento\Backend\Model\UrlInterface $backendUrl * @param \Magento\Core\Helper\Data $coreHelper - * @param \Magento\View\Url $viewUrl + * @param \Magento\Framework\View\Url $viewUrl * @param \Magento\Widget\Model\WidgetFactory $widgetFactory */ public function __construct( \Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Core\Helper\Data $coreHelper, - \Magento\View\Url $viewUrl, + \Magento\Framework\View\Url $viewUrl, \Magento\Widget\Model\WidgetFactory $widgetFactory ) { $this->_backendUrl = $backendUrl; @@ -75,7 +75,7 @@ public function __construct( /** * Return config settings for widgets insertion plugin based on editor element config * - * @param \Magento\Object $config + * @param \Magento\Framework\Object $config * @return array */ public function getPluginSettings($config) @@ -95,7 +95,7 @@ public function getPluginSettings($config) /** * Return Widgets Insertion Plugin Window URL * - * @param \Magento\Object $config Editor element config + * @param \Magento\Framework\Object $config Editor element config * @return string */ public function getWidgetWindowUrl($config) diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php index 8f38aabefa0ed..78583b201538d 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance.php +++ b/app/code/Magento/Widget/Model/Widget/Instance.php @@ -43,7 +43,7 @@ * @package Magento_Widget * @author Magento Core Team */ -class Instance extends \Magento\Model\AbstractModel +class Instance extends \Magento\Framework\Model\AbstractModel { const SPECIFIC_ENTITIES = 'specific'; @@ -74,7 +74,7 @@ class Instance extends \Magento\Model\AbstractModel protected $_specificEntitiesLayoutHandles = array(); /** - * @var \Magento\Simplexml\Element + * @var \Magento\Framework\Simplexml\Element */ protected $_widgetConfigXml = null; @@ -86,7 +86,7 @@ class Instance extends \Magento\Model\AbstractModel protected $_eventPrefix = 'widget_widget_instance'; /** - * @var \Magento\View\FileSystem + * @var \Magento\Framework\View\FileSystem */ protected $_viewFileSystem; @@ -111,51 +111,51 @@ class Instance extends \Magento\Model\AbstractModel protected $_relatedCacheTypes; /** - * @var \Magento\Escaper + * @var \Magento\Framework\Escaper */ protected $_escaper; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** - * @var \Magento\Filesystem\Directory\ReadInterface + * @var \Magento\Framework\Filesystem\Directory\ReadInterface */ protected $_directory; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry - * @param \Magento\Escaper $escaper - * @param \Magento\View\FileSystem $viewFileSystem + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry + * @param \Magento\Framework\Escaper $escaper + * @param \Magento\Framework\View\FileSystem $viewFileSystem * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList * @param \Magento\Catalog\Model\Product\Type $productType * @param \Magento\Widget\Model\Config\Reader $reader * @param \Magento\Widget\Model\Widget $widgetModel * @param \Magento\Widget\Model\NamespaceResolver $namespaceResolver - * @param \Magento\Math\Random $mathRandom + * @param \Magento\Framework\Math\Random $mathRandom * @param \Magento\Framework\App\Filesystem $filesystem - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param string[] $relatedCacheTypes * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, - \Magento\Escaper $escaper, - \Magento\View\FileSystem $viewFileSystem, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, + \Magento\Framework\Escaper $escaper, + \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\Catalog\Model\Product\Type $productType, \Magento\Widget\Model\Config\Reader $reader, \Magento\Widget\Model\Widget $widgetModel, \Magento\Widget\Model\NamespaceResolver $namespaceResolver, - \Magento\Math\Random $mathRandom, + \Magento\Framework\Math\Random $mathRandom, \Magento\Framework\App\Filesystem $filesystem, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $relatedCacheTypes = array(), array $data = array() ) { @@ -348,7 +348,7 @@ public function getArea() { //TODO Shouldn't we get "area" from theme model which we can load using "theme_id"? if (!$this->_getData('area')) { - return \Magento\View\DesignInterface::DEFAULT_AREA; + return \Magento\Framework\View\DesignInterface::DEFAULT_AREA; } return $this->_getData('area'); } @@ -555,7 +555,7 @@ public function generateLayoutUpdateXml($container, $templatePath = '') array( 'area' => $this->getArea(), 'themeId' => $this->getThemeId(), - 'module' => \Magento\View\Element\AbstractBlock::extractModuleName($this->getType()) + 'module' => \Magento\Framework\View\Element\AbstractBlock::extractModuleName($this->getType()) ) ); if (!$this->getId() && !$this->isCompleteToCreate() || $templatePath && !is_readable($templateFilename)) { diff --git a/app/code/Magento/Widget/Model/Widget/Instance/OptionsFactory.php b/app/code/Magento/Widget/Model/Widget/Instance/OptionsFactory.php index 00f7d043d3cc6..e66e403b92832 100644 --- a/app/code/Magento/Widget/Model/Widget/Instance/OptionsFactory.php +++ b/app/code/Magento/Widget/Model/Widget/Instance/OptionsFactory.php @@ -28,14 +28,14 @@ class OptionsFactory { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager */ - public function __construct(\Magento\ObjectManager $objectManager) + public function __construct(\Magento\Framework\ObjectManager $objectManager) { $this->_objectManager = $objectManager; } @@ -45,7 +45,7 @@ public function __construct(\Magento\ObjectManager $objectManager) * * @param string $type * @param array $data - * @return \Magento\Option\ArrayInterface + * @return \Magento\Framework\Option\ArrayInterface */ public function create($type, array $data = array()) { diff --git a/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php b/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php index 320eb1c48fc36..0cbeabbb18635 100644 --- a/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/Magento/Widget/data/widget_setup/data-upgrade-1.6.0.0-1.6.0.1.php @@ -24,15 +24,15 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $installer \Magento\Module\Setup\Migration */ +/** @var $installer \Magento\Framework\Module\Setup\Migration */ $installer = $this->createMigrationSetup(); $installer->startSetup(); $installer->appendClassAliasReplace( 'widget_instance', 'instance_type', - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN, + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN, array('instance_id') ); $installer->doUpdateClassAliases(); diff --git a/app/code/Magento/Widget/etc/adminhtml/acl.xml b/app/code/Magento/Widget/etc/adminhtml/acl.xml index a45cad8dabe9c..9649bb305af23 100644 --- a/app/code/Magento/Widget/etc/adminhtml/acl.xml +++ b/app/code/Magento/Widget/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Widget/etc/adminhtml/di.xml b/app/code/Magento/Widget/etc/adminhtml/di.xml index 4fb444cd4275b..bf123d7c0fd4c 100644 --- a/app/code/Magento/Widget/etc/adminhtml/di.xml +++ b/app/code/Magento/Widget/etc/adminhtml/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Widget/etc/di.xml b/app/code/Magento/Widget/etc/di.xml index e86df2653c54d..9f3a46f00b689 100644 --- a/app/code/Magento/Widget/etc/di.xml +++ b/app/code/Magento/Widget/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + widget.xml diff --git a/app/code/Magento/Widget/etc/module.xml b/app/code/Magento/Widget/etc/module.xml index f71f6c932ecb3..8af5a37c3bec5 100644 --- a/app/code/Magento/Widget/etc/module.xml +++ b/app/code/Magento/Widget/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php b/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php index 78c6ecf2a1009..5d40e3305e7cd 100644 --- a/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php +++ b/app/code/Magento/Widget/sql/widget_setup/install-1.6.0.0.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -37,25 +37,25 @@ $installer->getTable('widget') )->addColumn( 'widget_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Widget Id' )->addColumn( 'widget_code', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Widget code for template directive' )->addColumn( 'widget_type', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Widget Type' )->addColumn( 'parameters', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array('nullable' => true), 'Parameters' @@ -76,7 +76,7 @@ ) => array( 'columns' => array( 'widget_id' => array( - 'type' => \Magento\DB\Ddl\Table::TYPE_INTEGER, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, 'identity' => true, 'unsigned' => true, 'nullable' => false, @@ -84,7 +84,7 @@ 'comment' => 'Widget Id' ), 'parameters' => array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => '64K', 'comment' => 'Parameters' ) @@ -100,7 +100,7 @@ 'code', 'widget_code', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_TEXT, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'comment' => 'Widget code for template directive' ) @@ -110,7 +110,7 @@ $installer->getTable('widget'), 'type', 'widget_type', - array('type' => \Magento\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'comment' => 'Widget Type') + array('type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'length' => 255, 'comment' => 'Widget Type') ); $installer->getConnection()->addIndex( @@ -127,43 +127,43 @@ $installer->getTable('widget_instance') )->addColumn( 'instance_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Instance Id' )->addColumn( 'instance_type', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Instance Type' )->addColumn( 'package_theme', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Package Theme' )->addColumn( 'title', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Widget Title' )->addColumn( 'store_ids', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => false, 'default' => '0'), 'Store ids' )->addColumn( 'widget_parameters', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Widget parameters' )->addColumn( 'sort_order', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Sort order' @@ -179,49 +179,49 @@ $installer->getTable('widget_instance_page') )->addColumn( 'page_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Page Id' )->addColumn( 'instance_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Instance Id' )->addColumn( 'page_group', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 25, array(), 'Block Group Type' )->addColumn( 'layout_handle', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Layout Handle' )->addColumn( 'block_reference', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Container' )->addColumn( 'page_for', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 25, array(), 'For instance entities' )->addColumn( 'entities', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Catalog entities (comma separated)' )->addColumn( 'page_template', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array(), 'Path to widget template' @@ -233,8 +233,8 @@ 'instance_id', $installer->getTable('widget_instance'), 'instance_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Instance of Widget on Page' ); @@ -247,13 +247,13 @@ $installer->getTable('widget_instance_page_layout') )->addColumn( 'page_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Page Id' )->addColumn( 'layout_update_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Layout Update Id' @@ -267,24 +267,24 @@ $installer->getIdxName( 'widget_instance_page_layout', array('layout_update_id', 'page_id'), - \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE ), array('layout_update_id', 'page_id'), - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addForeignKey( $installer->getFkName('widget_instance_page_layout', 'page_id', 'widget_instance_page', 'page_id'), 'page_id', $installer->getTable('widget_instance_page'), 'page_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addForeignKey( $installer->getFkName('widget_instance_page_layout', 'layout_update_id', 'core_layout_update', 'layout_update_id'), 'layout_update_id', $installer->getTable('core_layout_update'), 'layout_update_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Layout updates' ); diff --git a/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php index 31c274b8d7aaa..e6ce68225b835 100644 --- a/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php +++ b/app/code/Magento/Widget/sql/widget_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer = $this; $installer->startSetup(); @@ -36,7 +36,7 @@ 'package_theme', 'theme_id', array( - 'type' => \Magento\DB\Ddl\Table::TYPE_INTEGER, + 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, 'unsigned' => true, 'nullable' => false, 'comment' => 'Theme id' @@ -49,8 +49,8 @@ 'theme_id', $installer->getTable('core_theme'), 'theme_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE ); $installer->endSetup(); diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php index 8419df450a4cc..d2e3a422fc08f 100644 --- a/app/code/Magento/Wishlist/Block/AbstractBlock.php +++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php @@ -250,7 +250,7 @@ public function hasDescription($item) */ public function getFormatedDate($date) { - return $this->formatDate($date, \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM); + return $this->formatDate($date, \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM); } /** diff --git a/app/code/Magento/Wishlist/Block/Customer/Sharing.php b/app/code/Magento/Wishlist/Block/Customer/Sharing.php index 15957b0b53f2d..ad098626aaa91 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Sharing.php +++ b/app/code/Magento/Wishlist/Block/Customer/Sharing.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Customer; -class Sharing extends \Magento\View\Element\Template +class Sharing extends \Magento\Framework\View\Element\Template { /** * Entered Data cache @@ -51,20 +51,20 @@ class Sharing extends \Magento\View\Element\Template protected $_wishlistConfig; /** - * @var \Magento\Session\Generic + * @var \Magento\Framework\Session\Generic */ protected $_wishlistSession; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Wishlist\Model\Config $wishlistConfig - * @param \Magento\Session\Generic $wishlistSession + * @param \Magento\Framework\Session\Generic $wishlistSession * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Wishlist\Model\Config $wishlistConfig, - \Magento\Session\Generic $wishlistSession, + \Magento\Framework\Session\Generic $wishlistSession, array $data = array() ) { $this->_wishlistConfig = $wishlistConfig; diff --git a/app/code/Magento/Wishlist/Block/Customer/Sidebar.php b/app/code/Magento/Wishlist/Block/Customer/Sidebar.php index 9e301f4ef97d8..a6f4ac74ab0eb 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Sidebar.php +++ b/app/code/Magento/Wishlist/Block/Customer/Sidebar.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Customer; -class Sidebar extends \Magento\Wishlist\Block\AbstractBlock implements \Magento\View\Block\IdentityInterface +class Sidebar extends \Magento\Wishlist\Block\AbstractBlock implements \Magento\Framework\View\Block\IdentityInterface { /** * Retrieve block title diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php index 339f20f6dd863..56ddead98b3e5 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php @@ -49,7 +49,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock protected $_helperPool; /** - * @var \Magento\Data\Form\FormKey + * @var \Magento\Framework\Data\Form\FormKey */ protected $_formKey; @@ -58,7 +58,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock * @param \Magento\Framework\App\Http\Context $httpContext * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Catalog\Helper\Product\ConfigurationPool $helperPool - * @param \Magento\Data\Form\FormKey $formKey + * @param \Magento\Framework\Data\Form\FormKey $formKey * @param array $data * @param array $priceBlockTypes */ @@ -67,7 +67,7 @@ public function __construct( \Magento\Framework\App\Http\Context $httpContext, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Catalog\Helper\Product\ConfigurationPool $helperPool, - \Magento\Data\Form\FormKey $formKey, + \Magento\Framework\Data\Form\FormKey $formKey, array $data = array(), array $priceBlockTypes = array() ) { diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php index e1727df8a30fe..43fe57581e06e 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Block\Customer\Wishlist; -class Button extends \Magento\View\Element\Template +class Button extends \Magento\Framework\View\Element\Template { /** * Wishlist config @@ -50,13 +50,13 @@ class Button extends \Magento\View\Element\Template protected $_wishlistData = null; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Wishlist\Model\Config $wishlistConfig * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Wishlist\Model\Config $wishlistConfig, array $data = array() diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php index d13c7add28720..a59540b4f19e8 100644 --- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php +++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php @@ -33,13 +33,13 @@ */ namespace Magento\Wishlist\Block\Customer\Wishlist; -class Items extends \Magento\View\Element\Template +class Items extends \Magento\Framework\View\Element\Template { /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param array $data */ - public function __construct(\Magento\View\Element\Template\Context $context, array $data = array()) + public function __construct(\Magento\Framework\View\Element\Template\Context $context, array $data = array()) { parent::__construct($context, $data); $this->_isScopePrivate = true; diff --git a/app/code/Magento/Wishlist/Block/Item/Configure.php b/app/code/Magento/Wishlist/Block/Item/Configure.php index e4844c4a60948..f18e81df7f87e 100644 --- a/app/code/Magento/Wishlist/Block/Item/Configure.php +++ b/app/code/Magento/Wishlist/Block/Item/Configure.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Item; -class Configure extends \Magento\View\Element\Template +class Configure extends \Magento\Framework\View\Element\Template { /** * Wishlist data @@ -46,20 +46,20 @@ class Configure extends \Magento\View\Element\Template /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Wishlist\Helper\Data $wishlistData - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Wishlist\Helper\Data $wishlistData, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, array $data = array() ) { $this->_wishlistData = $wishlistData; diff --git a/app/code/Magento/Wishlist/Block/Link.php b/app/code/Magento/Wishlist/Block/Link.php index 6ecc67920f314..485e45c82ba1a 100644 --- a/app/code/Magento/Wishlist/Block/Link.php +++ b/app/code/Magento/Wishlist/Block/Link.php @@ -27,7 +27,7 @@ */ namespace Magento\Wishlist\Block; -class Link extends \Magento\View\Element\Html\Link implements \Magento\View\Block\IdentityInterface +class Link extends \Magento\Framework\View\Element\Html\Link implements \Magento\Framework\View\Block\IdentityInterface { /** * Template name @@ -42,12 +42,12 @@ class Link extends \Magento\View\Element\Html\Link implements \Magento\View\Bloc protected $_wishlistHelper; /** - * @param \Magento\View\Element\Template\Context $context + * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Wishlist\Helper\Data $wishlistHelper * @param array $data */ public function __construct( - \Magento\View\Element\Template\Context $context, + \Magento\Framework\View\Element\Template\Context $context, \Magento\Wishlist\Helper\Data $wishlistHelper, array $data = array() ) { diff --git a/app/code/Magento/Wishlist/Block/Share/Email/Rss.php b/app/code/Magento/Wishlist/Block/Share/Email/Rss.php index c651c1a4d103b..8a56c8f5c9de2 100644 --- a/app/code/Magento/Wishlist/Block/Share/Email/Rss.php +++ b/app/code/Magento/Wishlist/Block/Share/Email/Rss.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Block\Share\Email; -class Rss extends \Magento\View\Element\Template +class Rss extends \Magento\Framework\View\Element\Template { /** * @var string diff --git a/app/code/Magento/Wishlist/Controller/AbstractController.php b/app/code/Magento/Wishlist/Controller/AbstractController.php index 23ac62aaafbd7..b46b29568131e 100644 --- a/app/code/Magento/Wishlist/Controller/AbstractController.php +++ b/app/code/Magento/Wishlist/Controller/AbstractController.php @@ -74,7 +74,7 @@ protected function _processLocalizedQty($qty) { if (!$this->_localFilter) { $this->_localFilter = new \Zend_Filter_LocalizedToNormalized( - array('locale' => $this->_objectManager->get('Magento\Locale\ResolverInterface')->getLocaleCode()) + array('locale' => $this->_objectManager->get('Magento\Framework\Locale\ResolverInterface')->getLocaleCode()) ); } $qty = $this->_localFilter->filter((double)$qty); @@ -137,7 +137,7 @@ public function allcartAction() if ($item->addToCart($cart, $isOwner)) { $addedItems[] = $item->getProduct(); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { if ($e->getCode() == \Magento\Wishlist\Model\Item::EXCEPTION_CODE_NOT_SALABLE) { $notSalable[] = $item; } elseif ($e->getCode() == \Magento\Wishlist\Model\Item::EXCEPTION_CODE_HAS_REQUIRED_OPTIONS) { @@ -151,7 +151,7 @@ public function allcartAction() $cart->getQuote()->deleteItem($cartItem); } } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $messages[] = __('We cannot add this item to your shopping cart.'); } } @@ -160,7 +160,7 @@ public function allcartAction() $indexUrl = $this->_objectManager->get('Magento\Wishlist\Helper\Data')->getListUrl($wishlist->getId()); } else { $indexUrl = $this->_objectManager->create( - 'Magento\UrlInterface' + 'Magento\Framework\UrlInterface' )->getUrl( 'wishlist/shared', array('code' => $wishlist->getSharingCode()) diff --git a/app/code/Magento/Wishlist/Controller/Index.php b/app/code/Magento/Wishlist/Controller/Index.php index 26f30fe7a6e32..a9efd3241009a 100644 --- a/app/code/Magento/Wishlist/Controller/Index.php +++ b/app/code/Magento/Wishlist/Controller/Index.php @@ -61,17 +61,17 @@ class Index extends \Magento\Wishlist\Controller\AbstractController implements /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; /** - * @var \Magento\Mail\Template\TransportBuilder + * @var \Magento\Framework\Mail\Template\TransportBuilder */ protected $_transportBuilder; /** - * @var \Magento\Translate\Inline\StateInterface + * @var \Magento\Framework\Translate\Inline\StateInterface */ protected $inlineTranslation; @@ -84,22 +84,22 @@ class Index extends \Magento\Wishlist\Controller\AbstractController implements * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Wishlist\Model\Config $wishlistConfig * @param \Magento\Framework\App\Response\Http\FileFactory $fileResponseFactory - * @param \Magento\Mail\Template\TransportBuilder $transportBuilder - * @param \Magento\Translate\Inline\StateInterface $inlineTranslation + * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder + * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation * @param \Magento\Customer\Helper\View $customerHelperView */ public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, \Magento\Customer\Model\Session $customerSession, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Wishlist\Model\Config $wishlistConfig, \Magento\Framework\App\Response\Http\FileFactory $fileResponseFactory, - \Magento\Mail\Template\TransportBuilder $transportBuilder, - \Magento\Translate\Inline\StateInterface $inlineTranslation, + \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, + \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, \Magento\Customer\Helper\View $customerHelperView ) { $this->_coreRegistry = $coreRegistry; @@ -181,11 +181,11 @@ protected function _getWishlist($wishlistId = null) if (!$wishlist->getId() || $wishlist->getCustomerId() != $customerId) { $wishlist = null; - throw new \Magento\Model\Exception(__("The requested wish list doesn't exist.")); + throw new \Magento\Framework\Model\Exception(__("The requested wish list doesn't exist.")); } $this->_coreRegistry->register('wishlist', $wishlist); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); return false; } catch (\Exception $e) { @@ -261,11 +261,11 @@ public function addAction() } try { - $buyRequest = new \Magento\Object($requestParams); + $buyRequest = new \Magento\Framework\Object($requestParams); $result = $wishlist->addNewItem($product, $buyRequest); if (is_string($result)) { - throw new \Magento\Model\Exception($result); + throw new \Magento\Framework\Model\Exception($result); } $wishlist->save(); @@ -290,17 +290,17 @@ public function addAction() $helper = $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate(); $message = __( '%1 has been added to your wishlist. Click here to continue shopping.', - $this->_objectManager->get('Magento\Escaper')->escapeHtml($product->getName()), - $this->_objectManager->get('Magento\Escaper')->escapeUrl($referer) + $this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($product->getName()), + $this->_objectManager->get('Magento\Framework\Escaper')->escapeUrl($referer) ); $this->messageManager->addSuccess($message); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError( __('An error occurred while adding item to wish list: %1', $e->getMessage()) ); } catch (\Exception $e) { $this->messageManager->addError(__('An error occurred while adding item to wish list.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('*', array('wishlist_id' => $wishlist->getId())); @@ -320,7 +320,7 @@ public function configureAction() $item = $this->_objectManager->create('Magento\Wishlist\Model\Item'); $item->loadWithOptions($id); if (!$item->getId()) { - throw new \Magento\Model\Exception(__('We can\'t load the wish list item.')); + throw new \Magento\Framework\Model\Exception(__('We can\'t load the wish list item.')); } $wishlist = $this->_getWishlist($item->getWishlistId()); if (!$wishlist) { @@ -329,7 +329,7 @@ public function configureAction() $this->_coreRegistry->register('wishlist_item', $item); - $params = new \Magento\Object(); + $params = new \Magento\Framework\Object(); $params->setCategoryId(false); $params->setConfigureMode(true); $buyRequest = $item->getBuyRequest(); @@ -348,13 +348,13 @@ public function configureAction() $this, $params ); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); $this->_redirect('*'); return; } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t configure the product.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->_redirect('*'); return; } @@ -392,7 +392,7 @@ public function updateItemOptionsAction() return; } - $buyRequest = new \Magento\Object($this->getRequest()->getParams()); + $buyRequest = new \Magento\Framework\Object($this->getRequest()->getParams()); $wishlist->updateItem($id, $buyRequest)->save(); @@ -406,11 +406,11 @@ public function updateItemOptionsAction() $message = __('%1 has been updated in your wish list.', $product->getName()); $this->messageManager->addSuccess($message); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addError(__('An error occurred while updating wish list.')); - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); } $this->_redirect('*/*', array('wishlist_id' => $wishlist->getId())); } @@ -464,7 +464,7 @@ public function updateAction() try { $item->delete(); } catch (\Exception $e) { - $this->_objectManager->get('Magento\Logger')->logException($e); + $this->_objectManager->get('Magento\Framework\Logger')->logException($e); $this->messageManager->addError(__('Can\'t delete item from wishlist')); } } @@ -480,7 +480,7 @@ public function updateAction() $this->messageManager->addError( __( 'Can\'t save description %1', - $this->_objectManager->get('Magento\Escaper')->escapeHtml($description) + $this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($description) ) ); } @@ -524,7 +524,7 @@ public function removeAction() try { $item->delete(); $wishlist->save(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError( __('An error occurred while deleting the item from wish list: %1', $e->getMessage()) ); @@ -574,7 +574,7 @@ public function cartAction() $item->setQty($qty); } - /* @var $session \Magento\Session\Generic */ + /* @var $session \Magento\Framework\Session\Generic */ $session = $this->_objectManager->get('Magento\Wishlist\Model\Session'); $cart = $this->_objectManager->get('Magento\Checkout\Model\Cart'); @@ -603,7 +603,7 @@ public function cartAction() if (!$cart->getQuote()->getHasError()) { $message = __( 'You added %1 to your shopping cart.', - $this->_objectManager->get('Magento\Escaper')->escapeHtml($item->getProduct()->getName()) + $this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($item->getProduct()->getName()) ); $this->messageManager->addSuccess($message); } @@ -616,7 +616,7 @@ public function cartAction() $redirectUrl = $this->_redirect->getRefererUrl(); } $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { if ($e->getCode() == \Magento\Wishlist\Model\Item::EXCEPTION_CODE_NOT_SALABLE) { $this->messageManager->addError(__('This product(s) is out of stock.')); } elseif ($e->getCode() == \Magento\Wishlist\Model\Item::EXCEPTION_CODE_HAS_REQUIRED_OPTIONS) { @@ -656,7 +656,7 @@ public function fromcartAction() try { $item = $cart->getQuote()->getItemById($itemId); if (!$item) { - throw new \Magento\Model\Exception(__("The requested cart item doesn't exist.")); + throw new \Magento\Framework\Model\Exception(__("The requested cart item doesn't exist.")); } $productId = $item->getProductId(); @@ -668,11 +668,11 @@ public function fromcartAction() $cart->getQuote()->removeItem($itemId); $cart->save(); $this->_objectManager->get('Magento\Wishlist\Helper\Data')->calculate(); - $productName = $this->_objectManager->get('Magento\Escaper')->escapeHtml($item->getProduct()->getName()); - $wishlistName = $this->_objectManager->get('Magento\Escaper')->escapeHtml($wishlist->getName()); + $productName = $this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($item->getProduct()->getName()); + $wishlistName = $this->_objectManager->get('Magento\Framework\Escaper')->escapeHtml($wishlist->getName()); $this->messageManager->addSuccess(__("%1 has been moved to wish list %2", $productName, $wishlistName)); $wishlist->save(); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { $this->messageManager->addError($e->getMessage()); } catch (\Exception $e) { $this->messageManager->addException($e, __('We can\'t move the item to the wish list.')); @@ -786,7 +786,7 @@ public function sendAction() ) )->setTemplateOptions( array( - 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeManager->getStore()->getStoreId() ) )->setTemplateVars( diff --git a/app/code/Magento/Wishlist/Controller/Shared.php b/app/code/Magento/Wishlist/Controller/Shared.php index 467a91c2a8fa0..82c872eb21d9b 100644 --- a/app/code/Magento/Wishlist/Controller/Shared.php +++ b/app/code/Magento/Wishlist/Controller/Shared.php @@ -39,7 +39,7 @@ class Shared extends AbstractController /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry = null; @@ -47,13 +47,13 @@ class Shared extends AbstractController * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator * @param \Magento\Customer\Model\Session $customerSession - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry */ public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Core\App\Action\FormKeyValidator $formKeyValidator, \Magento\Customer\Model\Session $customerSession, - \Magento\Registry $coreRegistry + \Magento\Framework\Registry $coreRegistry ) { $this->_coreRegistry = $coreRegistry; parent::__construct($context, $formKeyValidator, $customerSession); @@ -121,7 +121,7 @@ public function cartAction() $item = $this->_objectManager->create('Magento\Wishlist\Model\Item')->load($itemId); - /* @var $session \Magento\Session\Generic */ + /* @var $session \Magento\Framework\Session\Generic */ $session = $this->_objectManager->get('Magento\Wishlist\Model\Session'); $cart = $this->_objectManager->get('Magento\Checkout\Model\Cart'); @@ -141,7 +141,7 @@ public function cartAction() if ($this->_objectManager->get('Magento\Checkout\Helper\Cart')->getShouldRedirectToCart()) { $redirectUrl = $this->_objectManager->get('Magento\Checkout\Helper\Cart')->getCartUrl(); } - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { if ($e->getCode() == \Magento\Wishlist\Model\Item::EXCEPTION_CODE_NOT_SALABLE) { $this->messageManager->addError(__('This product(s) is out of stock.')); } else { diff --git a/app/code/Magento/Wishlist/Helper/Data.php b/app/code/Magento/Wishlist/Helper/Data.php index c2876d925d2c8..119d2021c15b9 100644 --- a/app/code/Magento/Wishlist/Helper/Data.php +++ b/app/code/Magento/Wishlist/Helper/Data.php @@ -82,7 +82,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_coreRegistry; @@ -121,7 +121,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper /** * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Core\Helper\Data $coreData - * @param \Magento\Registry $coreRegistry + * @param \Magento\Framework\Registry $coreRegistry * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Wishlist\Model\WishlistFactory $wishlistFactory @@ -132,7 +132,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper public function __construct( \Magento\Framework\App\Helper\Context $context, \Magento\Core\Helper\Data $coreData, - \Magento\Registry $coreRegistry, + \Magento\Framework\Registry $coreRegistry, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Customer\Model\Session $customerSession, \Magento\Wishlist\Model\WishlistFactory $wishlistFactory, diff --git a/app/code/Magento/Wishlist/Model/Config/Source/Summary.php b/app/code/Magento/Wishlist/Model/Config/Source/Summary.php index b317256dc8e58..99a97240b2005 100644 --- a/app/code/Magento/Wishlist/Model/Config/Source/Summary.php +++ b/app/code/Magento/Wishlist/Model/Config/Source/Summary.php @@ -25,7 +25,7 @@ */ namespace Magento\Wishlist\Model\Config\Source; -class Summary implements \Magento\Option\ArrayInterface +class Summary implements \Magento\Framework\Option\ArrayInterface { /** * @return array diff --git a/app/code/Magento/Wishlist/Model/Item.php b/app/code/Magento/Wishlist/Model/Item.php index 563957b7c93d0..f6d94a7a4fc7f 100644 --- a/app/code/Magento/Wishlist/Model/Item.php +++ b/app/code/Magento/Wishlist/Model/Item.php @@ -42,7 +42,7 @@ use Magento\Wishlist\Model\Item\OptionFactory; use Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory; -class Item extends \Magento\Model\AbstractModel implements +class Item extends \Magento\Framework\Model\AbstractModel implements \Magento\Catalog\Model\Product\Configuration\Item\ItemInterface { const EXCEPTION_CODE_NOT_SALABLE = 901; @@ -105,7 +105,7 @@ class Item extends \Magento\Model\AbstractModel implements protected $_storeManager; /** - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; @@ -135,31 +135,31 @@ class Item extends \Magento\Model\AbstractModel implements protected $productTypeConfig; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param \Magento\Catalog\Model\ProductFactory $productFactory * @param \Magento\Catalog\Model\Resource\Url $catalogUrl * @param OptionFactory $wishlistOptFactory * @param CollectionFactory $wishlOptionCollectionFactory * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Catalog\Model\Resource\Url $catalogUrl, OptionFactory $wishlistOptFactory, CollectionFactory $wishlOptionCollectionFactory, \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->productTypeConfig = $productTypeConfig; @@ -230,14 +230,14 @@ protected function _compareOptions($options1, $options2) * * @param Option $option * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ protected function _addOptionCode($option) { if (!isset($this->_optionsByCode[$option->getCode()])) { $this->_optionsByCode[$option->getCode()] = $option; } else { - throw new \Magento\Model\Exception(__('An item option with code %1 already exists.', $option->getCode())); + throw new \Magento\Framework\Model\Exception(__('An item option with code %1 already exists.', $option->getCode())); } return $this; } @@ -313,15 +313,15 @@ protected function _afterSave() * Validate wish list item data * * @return bool - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function validate() { if (!$this->getWishlistId()) { - throw new \Magento\Model\Exception(__('We can\'t specify a wish list.')); + throw new \Magento\Framework\Model\Exception(__('We can\'t specify a wish list.')); } if (!$this->getProductId()) { - throw new \Magento\Model\Exception(__('Cannot specify product.')); + throw new \Magento\Framework\Model\Exception(__('Cannot specify product.')); } return true; @@ -372,7 +372,7 @@ public function loadByProductWishlist($wishlistId, $productId, $sharedStores) /** * Retrieve item product instance * - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception * @return \Magento\Catalog\Model\Product */ public function getProduct() @@ -380,7 +380,7 @@ public function getProduct() $product = $this->_getData('product'); if (is_null($product)) { if (!$this->getProductId()) { - throw new \Magento\Model\Exception(__('Cannot specify product.')); + throw new \Magento\Framework\Model\Exception(__('Cannot specify product.')); } $product = $this->_productFactory->create()->setStoreId($this->getStoreId())->load($this->getProductId()); @@ -405,7 +405,7 @@ public function getProduct() * @param \Magento\Checkout\Model\Cart $cart * @param bool $delete delete the item after successful add to cart * @return bool - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function addToCart(\Magento\Checkout\Model\Cart $cart, $delete = false) { @@ -425,7 +425,7 @@ public function addToCart(\Magento\Checkout\Model\Cart $cart, $delete = false) if (!isset($urlData[$product->getId()])) { return false; } - $product->setUrlDataObject(new \Magento\Object($urlData)); + $product->setUrlDataObject(new \Magento\Framework\Object($urlData)); $visibility = $product->getUrlDataObject()->getVisibility(); if (!in_array($visibility, $product->getVisibleInSiteVisibilities())) { return false; @@ -433,7 +433,7 @@ public function addToCart(\Magento\Checkout\Model\Cart $cart, $delete = false) } if (!$product->isSalable()) { - throw new \Magento\Model\Exception(null, self::EXCEPTION_CODE_NOT_SALABLE); + throw new \Magento\Framework\Model\Exception(null, self::EXCEPTION_CODE_NOT_SALABLE); } $buyRequest = $this->getBuyRequest(); @@ -473,18 +473,18 @@ public function getProductUrl() * Returns formatted buy request - object, holding request received from * product view page with keys and options for configured product * - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function getBuyRequest() { $option = $this->getOptionByCode('info_buyRequest'); $initialData = $option ? unserialize($option->getValue()) : null; - if ($initialData instanceof \Magento\Object) { + if ($initialData instanceof \Magento\Framework\Object) { $initialData = $initialData->getData(); } - $buyRequest = new \Magento\Object($initialData); + $buyRequest = new \Magento\Framework\Object($initialData); $buyRequest->setOriginalQty($buyRequest->getQty())->setQty($this->getQty() * 1); return $buyRequest; } @@ -492,12 +492,12 @@ public function getBuyRequest() /** * Merge data to item info_buyRequest option * - * @param array|\Magento\Object $buyRequest + * @param array|\Magento\Framework\Object $buyRequest * @return $this */ public function mergeBuyRequest($buyRequest) { - if ($buyRequest instanceof \Magento\Object) { + if ($buyRequest instanceof \Magento\Framework\Object) { $buyRequest = $buyRequest->getData(); } @@ -522,7 +522,7 @@ public function mergeBuyRequest($buyRequest) * Set buy request - object, holding request received from * product view page with keys and options for configured product * - * @param \Magento\Object $buyRequest + * @param \Magento\Framework\Object $buyRequest * @return $this */ public function setBuyRequest($buyRequest) @@ -538,7 +538,7 @@ public function setBuyRequest($buyRequest) * Check product representation in item * * @param \Magento\Catalog\Model\Product $product - * @param \Magento\Object $buyRequest + * @param \Magento\Framework\Object $buyRequest * @return bool */ public function isRepresent($product, $buyRequest) @@ -659,9 +659,9 @@ public function getOptionsByCode() /** * Add option to item * - * @param Option|\Magento\Object|array $option + * @param Option|\Magento\Framework\Object|array $option * @return $this - * @throws \Magento\Model\Exception + * @throws \Magento\Framework\Model\Exception */ public function addOption($option) { @@ -669,12 +669,12 @@ public function addOption($option) $option = $this->_wishlistOptFactory->create()->setData($option)->setItem($this); } elseif ($option instanceof Option) { $option->setItem($this); - } elseif ($option instanceof \Magento\Object) { + } elseif ($option instanceof \Magento\Framework\Object) { $option = $this->_wishlistOptFactory->create()->setData($option->getData()) ->setProduct($option->getProduct()) ->setItem($this); } else { - throw new \Magento\Model\Exception(__('Invalid item option format.')); + throw new \Magento\Framework\Model\Exception(__('Invalid item option format.')); } $exOption = $this->getOptionByCode($option->getCode()); @@ -754,11 +754,11 @@ public function setCustomDownloadUrl($url) * * We have to customize only controller url, so return it. * - * @return null|\Magento\Object + * @return null|\Magento\Framework\Object */ public function getFileDownloadParams() { - $params = new \Magento\Object(); + $params = new \Magento\Framework\Object(); $params->setUrl($this->_customOptionDownloadUrl); return $params; } diff --git a/app/code/Magento/Wishlist/Model/Item/Option.php b/app/code/Magento/Wishlist/Model/Item/Option.php index 618c53abbd3b8..f5228657f8466 100644 --- a/app/code/Magento/Wishlist/Model/Item/Option.php +++ b/app/code/Magento/Wishlist/Model/Item/Option.php @@ -29,7 +29,7 @@ use Magento\Catalog\Model\Product; use Magento\Wishlist\Model\Item; -class Option extends \Magento\Model\AbstractModel implements +class Option extends \Magento\Framework\Model\AbstractModel implements \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface { /** diff --git a/app/code/Magento/Wishlist/Model/Observer.php b/app/code/Magento/Wishlist/Model/Observer.php index d2a00e3b79aa3..f00c92366bdd3 100644 --- a/app/code/Magento/Wishlist/Model/Observer.php +++ b/app/code/Magento/Wishlist/Model/Observer.php @@ -31,7 +31,7 @@ */ namespace Magento\Wishlist\Model; -class Observer extends \Magento\Model\AbstractModel +class Observer extends \Magento\Framework\Model\AbstractModel { /** * Wishlist data @@ -56,32 +56,32 @@ class Observer extends \Magento\Model\AbstractModel protected $_wishlistFactory; /** - * @var \Magento\Message\ManagerInterface + * @var \Magento\Framework\Message\ManagerInterface */ protected $messageManager; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Wishlist\Helper\Data $wishlistData * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Customer\Model\Session $customerSession * @param WishlistFactory $wishlistFactory - * @param \Magento\Message\ManagerInterface $messageManager - * @param \Magento\Model\Resource\AbstractResource $resource - * @param \Magento\Data\Collection\Db $resourceCollection + * @param \Magento\Framework\Message\ManagerInterface $messageManager + * @param \Magento\Framework\Model\Resource\AbstractResource $resource + * @param \Magento\Framework\Data\Collection\Db $resourceCollection * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Wishlist\Helper\Data $wishlistData, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Customer\Model\Session $customerSession, WishlistFactory $wishlistFactory, - \Magento\Message\ManagerInterface $messageManager, - \Magento\Model\Resource\AbstractResource $resource = null, - \Magento\Data\Collection\Db $resourceCollection = null, + \Magento\Framework\Message\ManagerInterface $messageManager, + \Magento\Framework\Model\Resource\AbstractResource $resource = null, + \Magento\Framework\Data\Collection\Db $resourceCollection = null, array $data = array() ) { $this->_wishlistData = $wishlistData; @@ -109,7 +109,7 @@ protected function _getWishlist($customerId) /** * Check move quote item to wishlist request * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ public function processCartUpdateBefore($observer) @@ -151,7 +151,7 @@ public function processCartUpdateBefore($observer) } /** - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return void */ public function processAddToCart($observer) @@ -207,10 +207,10 @@ public function processAddToCart($observer) /** * Customer login processing * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function customerLogin(\Magento\Event\Observer $observer) + public function customerLogin(\Magento\Framework\Event\Observer $observer) { $this->_wishlistData->calculate(); @@ -220,10 +220,10 @@ public function customerLogin(\Magento\Event\Observer $observer) /** * Customer logout processing * - * @param \Magento\Event\Observer $observer + * @param \Magento\Framework\Event\Observer $observer * @return $this */ - public function customerLogout(\Magento\Event\Observer $observer) + public function customerLogout(\Magento\Framework\Event\Observer $observer) { $this->_customerSession->setWishlistItemCount(0); diff --git a/app/code/Magento/Wishlist/Model/Resource/Item.php b/app/code/Magento/Wishlist/Model/Resource/Item.php index 0ed6419f89222..4970973b43a61 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Model\Resource; -class Item extends \Magento\Model\Resource\Db\AbstractDb +class Item extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Initialize connection and define main table diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php index 9a389aca9e8cb..09eff73951c7c 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Model\Resource\Item; -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Product Visibility Filter to product collection flag @@ -112,7 +112,7 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio protected $_storeManager; /** - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; @@ -158,13 +158,13 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio /** * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData * @param \Magento\Sales\Helper\Admin $adminhtmlSales * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param \Magento\Wishlist\Model\Config $wishlistConfig * @param \Magento\Catalog\Model\Product\Visibility $productVisibility * @param \Magento\Framework\App\Resource $coreResource @@ -180,13 +180,13 @@ class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollectio */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\CatalogInventory\Helper\Data $catalogInventoryData, \Magento\Sales\Helper\Admin $adminhtmlSales, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Wishlist\Model\Config $wishlistConfig, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Framework\App\Resource $coreResource, @@ -274,7 +274,7 @@ protected function _assignOptions() */ protected function _assignProducts() { - \Magento\Profiler::start('WISHLIST:' . __METHOD__, array('group' => 'WISHLIST', 'method' => __METHOD__)); + \Magento\Framework\Profiler::start('WISHLIST:' . __METHOD__, array('group' => 'WISHLIST', 'method' => __METHOD__)); $productIds = array(); $isBackendArea = $this->_appState->getAreaCode() === \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE; @@ -336,7 +336,7 @@ protected function _assignProducts() } } - \Magento\Profiler::stop('WISHLIST:' . __METHOD__); + \Magento\Framework\Profiler::stop('WISHLIST:' . __METHOD__); return $this; } @@ -484,13 +484,13 @@ public function addDaysFilter($constraints) $now = $this->_date->date(); $gmtOffset = (int)$this->_date->getGmtOffset(); if (isset($constraints['from'])) { - $lastDay = new \Magento\Stdlib\DateTime\Date($now, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT); + $lastDay = new \Magento\Framework\Stdlib\DateTime\Date($now, \Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT); $lastDay->subSecond($gmtOffset)->subDay(intval($constraints['from'])); $filter['to'] = $lastDay; } if (isset($constraints['to'])) { - $firstDay = new \Magento\Stdlib\DateTime\Date($now, \Magento\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT); + $firstDay = new \Magento\Framework\Stdlib\DateTime\Date($now, \Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT); $firstDay->subSecond($gmtOffset)->subDay(intval($constraints['to']) + 1); $filter['from'] = $firstDay; } diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php index c662547ed259e..5edfff8208590 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php @@ -34,19 +34,19 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection { /** - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ protected $_registryManager; /** * @param \Magento\Core\Model\EntityFactory $entityFactory - * @param \Magento\Logger $logger - * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy - * @param \Magento\Event\ManagerInterface $eventManager + * @param \Magento\Framework\Logger $logger + * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy + * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\CatalogInventory\Helper\Data $catalogInventoryData * @param \Magento\Sales\Helper\Admin $adminhtmlSales * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param \Magento\Wishlist\Model\Config $wishlistConfig * @param \Magento\Catalog\Model\Product\Visibility $productVisibility * @param \Magento\Framework\App\Resource $coreResource @@ -56,20 +56,20 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection * @param \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory * @param \Magento\Wishlist\Model\Resource\Item $resource * @param \Magento\Framework\App\State $appState - * @param \Magento\Registry $registry + * @param \Magento\Framework\Registry $registry * @param \Zend_Db_Adapter_Abstract $connection * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Core\Model\EntityFactory $entityFactory, - \Magento\Logger $logger, - \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, - \Magento\Event\ManagerInterface $eventManager, + \Magento\Framework\Logger $logger, + \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy, + \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\CatalogInventory\Helper\Data $catalogInventoryData, \Magento\Sales\Helper\Admin $adminhtmlSales, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Stdlib\DateTime\DateTime $date, \Magento\Wishlist\Model\Config $wishlistConfig, \Magento\Catalog\Model\Product\Visibility $productVisibility, \Magento\Framework\App\Resource $coreResource, @@ -79,7 +79,7 @@ public function __construct( \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory, \Magento\Wishlist\Model\Resource\Item $resource, \Magento\Framework\App\State $appState, - \Magento\Registry $registry, + \Magento\Framework\Registry $registry, $connection = null ) { $this->_registryManager = $registry; @@ -124,7 +124,7 @@ protected function _initSelect() * * @param string $field * @param string $direction - * @return \Magento\Data\Collection\Db + * @return \Magento\Framework\Data\Collection\Db */ public function setOrder($field, $direction = self::SORT_ORDER_DESC) { @@ -145,7 +145,7 @@ public function setOrder($field, $direction = self::SORT_ORDER_DESC) * @param string|array $field * @param null|string|array $condition * @see self::_getConditionSql for $condition - * @return \Magento\Data\Collection\Db + * @return \Magento\Framework\Data\Collection\Db */ public function addFieldToFilter($field, $condition = null) { diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Option.php b/app/code/Magento/Wishlist/Model/Resource/Item/Option.php index fc44a53bf950f..4da9028f8bb42 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Option.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Option.php @@ -33,7 +33,7 @@ */ namespace Magento\Wishlist\Model\Resource\Item; -class Option extends \Magento\Model\Resource\Db\AbstractDb +class Option extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * @return void diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Option/Collection.php b/app/code/Magento/Wishlist/Model/Resource/Item/Option/Collection.php index 33e9dfb4bc746..6436268add18d 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Item/Option/Collection.php +++ b/app/code/Magento/Wishlist/Model/Resource/Item/Option/Collection.php @@ -37,7 +37,7 @@ use Magento\Catalog\Model\Product; use Magento\Wishlist\Model\Item; -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Array of option ids grouped by item id diff --git a/app/code/Magento/Wishlist/Model/Resource/Wishlist.php b/app/code/Magento/Wishlist/Model/Resource/Wishlist.php index cd727a342c0a3..4164758edc1b4 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Resource/Wishlist.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Model\Resource; -class Wishlist extends \Magento\Model\Resource\Db\AbstractDb +class Wishlist extends \Magento\Framework\Model\Resource\Db\AbstractDb { /** * Store wishlist items count @@ -65,7 +65,7 @@ protected function _construct() * * @param string $field * @param mixed $value - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object * @return \Zend_Db_Select */ protected function _getLoadSelect($field, $value, $object) diff --git a/app/code/Magento/Wishlist/Model/Resource/Wishlist/Collection.php b/app/code/Magento/Wishlist/Model/Resource/Wishlist/Collection.php index fb6e02e93e17c..073ef786f512c 100644 --- a/app/code/Magento/Wishlist/Model/Resource/Wishlist/Collection.php +++ b/app/code/Magento/Wishlist/Model/Resource/Wishlist/Collection.php @@ -34,7 +34,7 @@ */ namespace Magento\Wishlist\Model\Resource\Wishlist; -class Collection extends \Magento\Model\Resource\Db\Collection\AbstractCollection +class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection { /** * Initialize resource diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php index ff3bbc4146137..a89f0895afd57 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist.php +++ b/app/code/Magento/Wishlist/Model/Wishlist.php @@ -25,8 +25,7 @@ */ namespace Magento\Wishlist\Model; -use Magento\Model\Exception; -use Magento\Customer\Model\Customer; +use Magento\Framework\Model\Exception; use Magento\Wishlist\Model\Resource\Item\CollectionFactory; use Magento\Wishlist\Model\Resource\Wishlist as ResourceWishlist; use Magento\Wishlist\Model\Resource\Wishlist\Collection; @@ -43,7 +42,7 @@ * @method string getUpdatedAt() * @method \Magento\Wishlist\Model\Wishlist setUpdatedAt(string $value) */ -class Wishlist extends \Magento\Model\AbstractModel implements \Magento\Object\IdentityInterface +class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\Object\IdentityInterface { /** * Cache tag @@ -98,7 +97,7 @@ class Wishlist extends \Magento\Model\AbstractModel implements \Magento\Object\I protected $_storeManager; /** - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_date; @@ -118,12 +117,12 @@ class Wishlist extends \Magento\Model\AbstractModel implements \Magento\Object\I protected $_productFactory; /** - * @var \Magento\Math\Random + * @var \Magento\Framework\Math\Random */ protected $mathRandom; /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $dateTime; @@ -133,36 +132,36 @@ class Wishlist extends \Magento\Model\AbstractModel implements \Magento\Object\I protected $_useCurrentWebsite; /** - * @param \Magento\Model\Context $context - * @param \Magento\Registry $registry + * @param \Magento\Framework\Model\Context $context + * @param \Magento\Framework\Registry $registry * @param \Magento\Catalog\Helper\Product $catalogProduct * @param \Magento\Wishlist\Helper\Data $wishlistData * @param ResourceWishlist $resource * @param Collection $resourceCollection * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Stdlib\DateTime\DateTime $date + * @param \Magento\Framework\Stdlib\DateTime\DateTime $date * @param ItemFactory $wishlistItemFactory * @param CollectionFactory $wishlistCollectionFactory * @param \Magento\Catalog\Model\ProductFactory $productFactory - * @param \Magento\Math\Random $mathRandom - * @param \Magento\Stdlib\DateTime $dateTime + * @param \Magento\Framework\Math\Random $mathRandom + * @param \Magento\Framework\Stdlib\DateTime $dateTime * @param bool $useCurrentWebsite * @param array $data */ public function __construct( - \Magento\Model\Context $context, - \Magento\Registry $registry, + \Magento\Framework\Model\Context $context, + \Magento\Framework\Registry $registry, \Magento\Catalog\Helper\Product $catalogProduct, \Magento\Wishlist\Helper\Data $wishlistData, ResourceWishlist $resource, Collection $resourceCollection, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Stdlib\DateTime\DateTime $date, + \Magento\Framework\Stdlib\DateTime\DateTime $date, ItemFactory $wishlistItemFactory, CollectionFactory $wishlistCollectionFactory, \Magento\Catalog\Model\ProductFactory $productFactory, - \Magento\Math\Random $mathRandom, - \Magento\Stdlib\DateTime $dateTime, + \Magento\Framework\Math\Random $mathRandom, + \Magento\Framework\Stdlib\DateTime $dateTime, $useCurrentWebsite = true, array $data = array() ) { @@ -381,7 +380,7 @@ public function addItem(Item $item) * Returns new item or string on error. * * @param int|\Magento\Catalog\Model\Product $product - * @param \Magento\Object|array|string|null $buyRequest + * @param \Magento\Framework\Object|array|string|null $buyRequest * @param bool $forciblySetQty * @return Item|string */ @@ -408,14 +407,14 @@ public function addNewItem($product, $buyRequest = null, $forciblySetQty = false /* @var $product \Magento\Catalog\Model\Product */ $product = $this->_productFactory->create()->setStoreId($storeId)->load($productId); - if ($buyRequest instanceof \Magento\Object) { + if ($buyRequest instanceof \Magento\Framework\Object) { $_buyRequest = $buyRequest; } elseif (is_string($buyRequest)) { - $_buyRequest = new \Magento\Object(unserialize($buyRequest)); + $_buyRequest = new \Magento\Framework\Object(unserialize($buyRequest)); } elseif (is_array($buyRequest)) { - $_buyRequest = new \Magento\Object($buyRequest); + $_buyRequest = new \Magento\Framework\Object($buyRequest); } else { - $_buyRequest = new \Magento\Object(); + $_buyRequest = new \Magento\Framework\Object(); } $cartCandidates = $product->getTypeInstance()->processConfiguration($_buyRequest, $product); @@ -596,7 +595,7 @@ public function isOwner($customerId) * It's passed to \Magento\Catalog\Helper\Product->addParamsToBuyRequest() to compose resulting buyRequest. * * Basically it can hold - * - 'current_config', \Magento\Object or array - current buyRequest that configures product in this item, + * - 'current_config', \Magento\Framework\Object or array - current buyRequest that configures product in this item, * used to restore currently attached files * - 'files_prefix': string[a-z0-9_] - prefix that was added at frontend to names of file options (file inputs), * so they won't intersect with other submitted options @@ -604,8 +603,8 @@ public function isOwner($customerId) * For more options see \Magento\Catalog\Helper\Product->addParamsToBuyRequest() * * @param int|Item $itemId - * @param \Magento\Object $buyRequest - * @param null|array|\Magento\Object $params + * @param \Magento\Framework\Object $buyRequest + * @param null|array|\Magento\Framework\Object $params * @return $this * @throws Exception * @@ -627,9 +626,9 @@ public function updateItem($itemId, $buyRequest, $params = null) $productId = $product->getId(); if ($productId) { if (!$params) { - $params = new \Magento\Object(); + $params = new \Magento\Framework\Object(); } else if (is_array($params)) { - $params = new \Magento\Object($params); + $params = new \Magento\Framework\Object($params); } $params->setCurrentConfig($item->getBuyRequest()); $buyRequest = $this->_catalogProduct->addParamsToBuyRequest($buyRequest, $params); @@ -652,7 +651,7 @@ public function updateItem($itemId, $buyRequest, $params = null) * Error message */ if (is_string($resultItem)) { - throw new Exception(__($resultItem)); + throw new \Magento\Framework\Model\Exception(__($resultItem)); } if ($resultItem->getId() != $itemId) { @@ -666,7 +665,7 @@ public function updateItem($itemId, $buyRequest, $params = null) $resultItem->setOrigData('qty', 0); } } else { - throw new Exception(__('The product does not exist.')); + throw new \Magento\Framework\Model\Exception(__('The product does not exist.')); } return $this; } diff --git a/app/code/Magento/Wishlist/etc/adminhtml/acl.xml b/app/code/Magento/Wishlist/etc/adminhtml/acl.xml index 243fe772f4be2..cee009df6cb86 100644 --- a/app/code/Magento/Wishlist/etc/adminhtml/acl.xml +++ b/app/code/Magento/Wishlist/etc/adminhtml/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Wishlist/etc/adminhtml/di.xml b/app/code/Magento/Wishlist/etc/adminhtml/di.xml index ffbd634e80283..d13ed14850b1d 100644 --- a/app/code/Magento/Wishlist/etc/adminhtml/di.xml +++ b/app/code/Magento/Wishlist/etc/adminhtml/di.xml @@ -23,18 +23,18 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + false - + wishlist - + Magento\Wishlist\Model\Session\Storage adminhtml diff --git a/app/code/Magento/Wishlist/etc/di.xml b/app/code/Magento/Wishlist/etc/di.xml index 13c26ae6989ec..824f2a7cf45c5 100644 --- a/app/code/Magento/Wishlist/etc/di.xml +++ b/app/code/Magento/Wishlist/etc/di.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Magento\Wishlist\Model\Resource\Item diff --git a/app/code/Magento/Wishlist/etc/events.xml b/app/code/Magento/Wishlist/etc/events.xml index 01a1539d92634..51a6607b84217 100644 --- a/app/code/Magento/Wishlist/etc/events.xml +++ b/app/code/Magento/Wishlist/etc/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Wishlist/etc/frontend/di.xml b/app/code/Magento/Wishlist/etc/frontend/di.xml index bd937e293212b..0c7c3a88d4796 100644 --- a/app/code/Magento/Wishlist/etc/frontend/di.xml +++ b/app/code/Magento/Wishlist/etc/frontend/di.xml @@ -23,19 +23,19 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + wishlist - + Magento\Wishlist\Model\Session\Storage frontend - + frontend diff --git a/app/code/Magento/Wishlist/etc/frontend/events.xml b/app/code/Magento/Wishlist/etc/frontend/events.xml index 682eb8bb82901..d91ca6ff26ae5 100644 --- a/app/code/Magento/Wishlist/etc/frontend/events.xml +++ b/app/code/Magento/Wishlist/etc/frontend/events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Wishlist/etc/module.xml b/app/code/Magento/Wishlist/etc/module.xml index 05eeedea6b20f..525db7a1cd460 100644 --- a/app/code/Magento/Wishlist/etc/module.xml +++ b/app/code/Magento/Wishlist/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/app/code/Magento/Wishlist/etc/view.xml b/app/code/Magento/Wishlist/etc/view.xml index 31b99f83b1f4b..a055c85ac8a36 100644 --- a/app/code/Magento/Wishlist/etc/view.xml +++ b/app/code/Magento/Wishlist/etc/view.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + 113 diff --git a/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php b/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php index af2f098333245..0c52b02d42729 100644 --- a/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php +++ b/app/code/Magento/Wishlist/sql/wishlist_setup/install-1.6.0.0.php @@ -25,7 +25,7 @@ */ $installer = $this; -/* @var $installer \Magento\Module\Setup */ +/* @var $installer \Magento\Framework\Module\Setup */ $installer->startSetup(); @@ -36,31 +36,31 @@ $installer->getTable('wishlist') )->addColumn( 'wishlist_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Wishlist ID' )->addColumn( 'customer_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Customer ID' )->addColumn( 'shared', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Sharing flag (0 or 1)' )->addColumn( 'sharing_code', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 32, array(), 'Sharing encrypted code' )->addColumn( 'updated_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Last updated date' @@ -68,16 +68,16 @@ $installer->getIdxName('wishlist', 'shared'), 'shared' )->addIndex( - $installer->getIdxName('wishlist', 'customer_id', \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE), + $installer->getIdxName('wishlist', 'customer_id', \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE), 'customer_id', - array('type' => \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) + array('type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE) )->addForeignKey( $installer->getFkName('wishlist', 'customer_id', 'customer_entity', 'entity_id'), 'customer_id', $installer->getTable('customer_entity'), 'entity_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Wishlist main Table' ); @@ -90,43 +90,43 @@ $installer->getTable('wishlist_item') )->addColumn( 'wishlist_item_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Wishlist item ID' )->addColumn( 'wishlist_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Wishlist ID' )->addColumn( 'product_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false, 'default' => '0'), 'Product ID' )->addColumn( 'store_id', - \Magento\DB\Ddl\Table::TYPE_SMALLINT, + \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, array('unsigned' => true, 'nullable' => true), 'Store ID' )->addColumn( 'added_at', - \Magento\DB\Ddl\Table::TYPE_TIMESTAMP, + \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, null, array(), 'Add date and time' )->addColumn( 'description', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array(), 'Short description of wish list item' )->addColumn( 'qty', - \Magento\DB\Ddl\Table::TYPE_DECIMAL, + \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL, '12,4', array('nullable' => false), 'Qty' @@ -138,8 +138,8 @@ 'wishlist_id', $installer->getTable('wishlist'), 'wishlist_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addIndex( $installer->getIdxName('wishlist_item', 'product_id'), 'product_id' @@ -148,8 +148,8 @@ 'product_id', $installer->getTable('catalog_product_entity'), 'entity_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->addIndex( $installer->getIdxName('wishlist_item', 'store_id'), 'store_id' @@ -158,8 +158,8 @@ 'store_id', $installer->getTable('store'), 'store_id', - \Magento\DB\Ddl\Table::ACTION_SET_NULL, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_SET_NULL, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Wishlist items' ); @@ -172,31 +172,31 @@ $installer->getTable('wishlist_item_option') )->addColumn( 'option_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Option Id' )->addColumn( 'wishlist_item_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false), 'Wishlist Item Id' )->addColumn( 'product_id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('unsigned' => true, 'nullable' => false), 'Product Id' )->addColumn( 'code', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 255, array('nullable' => false), 'Code' )->addColumn( 'value', - \Magento\DB\Ddl\Table::TYPE_TEXT, + \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, '64k', array('nullable' => true), 'Value' @@ -205,8 +205,8 @@ 'wishlist_item_id', $installer->getTable('wishlist_item'), 'wishlist_item_id', - \Magento\DB\Ddl\Table::ACTION_CASCADE, - \Magento\DB\Ddl\Table::ACTION_CASCADE + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE, + \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE )->setComment( 'Wishlist Item Option Table' ); diff --git a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml index 42f105b996cc3..8b69eb337b977 100644 --- a/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml +++ b/app/code/Magento/Wishlist/view/adminhtml/customer/edit/tab/wishlist.phtml @@ -25,7 +25,7 @@ */ /** - * @var $this \Magento\View\Element\Template + * @var $this \Magento\Framework\View\Element\Template */ ?> '; /** @var $block \Magento\Authorizenet\Block\Directpost\Iframe */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Authorizenet\Block\Directpost\Iframe' ); diff --git a/dev/tests/integration/testsuite/Magento/Authz/Service/AuthorizationV1Test.php b/dev/tests/integration/testsuite/Magento/Authz/Service/AuthorizationV1Test.php index 9ad27dba6d573..6f3f5635bc901 100644 --- a/dev/tests/integration/testsuite/Magento/Authz/Service/AuthorizationV1Test.php +++ b/dev/tests/integration/testsuite/Magento/Authz/Service/AuthorizationV1Test.php @@ -38,7 +38,7 @@ protected function setUp() { parent::setUp(); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $loggerMock = $this->getMockBuilder('Magento\\Logger')->disableOriginalConstructor()->getMock(); + $loggerMock = $this->getMockBuilder('Magento\\Framework\\Logger')->disableOriginalConstructor()->getMock(); $loggerMock->expects($this->any())->method('logException')->will($this->returnSelf()); $this->_service = $objectManager->create( 'Magento\\Authz\\Service\\AuthorizationV1', diff --git a/dev/tests/integration/testsuite/Magento/Backend/App/AbstractActionTest.php b/dev/tests/integration/testsuite/Magento/Backend/App/AbstractActionTest.php index 2cb53f3742264..3b62ee447f53c 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/App/AbstractActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/App/AbstractActionTest.php @@ -38,7 +38,7 @@ public function testPreDispatchWithEmptyUrlRedirectsToStartupPage() { $this->markTestSkipped('Session destruction doesn\'t work'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -101,15 +101,19 @@ public function testAclInNodes($blockName, $resource, $isLimitedAccess) \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD ); - /** @var $acl \Magento\Acl */ - $acl = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Acl\Builder')->getAcl(); + /** @var $acl \Magento\Framework\Acl */ + $acl = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\Acl\Builder') + ->getAcl(); if ($isLimitedAccess) { $acl->deny(null, $resource); } $this->dispatch('backend/admin/dashboard'); - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $actualBlocks = $layout->getAllBlocks(); $this->assertNotEmpty($actualBlocks); diff --git a/dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php b/dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php index 3670466b0777f..845cc13396f53 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/App/Router/DefaultRouterTest.php @@ -37,7 +37,7 @@ class DefaultRouterTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; @@ -97,8 +97,8 @@ public function testMatchCustomNoRouteAction() array('_getRoutes'), array( 'reader' => $this->objectManager->get('Magento\Framework\App\Route\Config\Reader'), - 'cache' => $this->objectManager->get('Magento\Config\CacheInterface'), - 'configScope' => $this->objectManager->get('Magento\Config\ScopeInterface'), + 'cache' => $this->objectManager->get('Magento\Framework\Config\CacheInterface'), + 'configScope' => $this->objectManager->get('Magento\Framework\Config\ScopeInterface'), 'areaList' => $this->objectManager->get('Magento\Framework\App\AreaList'), 'cacheId' => 'RoutesConfig' ) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/GraphTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/GraphTest.php index ed262255c16c7..651eab5af2d25 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/GraphTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Dashboard/GraphTest.php @@ -40,8 +40,8 @@ protected function setUp() { parent::setUp(); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\View\LayoutInterface $layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); + /** @var \Magento\Framework\View\LayoutInterface $layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); $this->_block = $layout->createBlock('Magento\Backend\Block\Dashboard\Graph'); $this->_block->setDataHelper($objectManager->get('Magento\Backend\Helper\Dashboard\Order')); } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeadTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeadTest.php index cbc603420cf87..76e4d0b298533 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeadTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeadTest.php @@ -33,7 +33,7 @@ public function testConstruct() $this->assertInstanceOf( 'Magento\Backend\Block\Page\Head', \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Page\Head' ) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeaderTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeaderTest.php index 08532977f21ce..01021bf0bdf82 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Page/HeaderTest.php @@ -41,7 +41,7 @@ protected function setUp() { parent::setUp(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Page\Header' ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Account/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Account/Edit/FormTest.php index 464019d038b4d..1f9ddc6a0fd6a 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Account/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Account/Edit/FormTest.php @@ -45,8 +45,10 @@ public function testPrepareForm() ); $session->setUser($user); - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var \Magento\Backend\Block\System\Account\Edit\Form */ $block = $layout->createBlock('Magento\Backend\Block\System\Account\Edit\Form'); @@ -54,7 +56,7 @@ public function testPrepareForm() $form = $block->getForm(); - $this->assertInstanceOf('Magento\Data\Form', $form); + $this->assertInstanceOf('Magento\Framework\Data\Form', $form); $this->assertEquals('post', $form->getData('method')); $this->assertEquals($block->getUrl('adminhtml/system_account/save'), $form->getData('action')); $this->assertEquals('edit_form', $form->getId()); @@ -92,7 +94,7 @@ public function testPrepareForm() foreach ($expectedFieldset as $fieldId => $field) { $element = $form->getElement($fieldId); - $this->assertInstanceOf('Magento\Data\Form\Element\AbstractElement', $element); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\AbstractElement', $element); $this->assertEquals($field['name'], $element->getName(), 'Wrong \'' . $fieldId . '\' field name'); $this->assertEquals($field['type'], $element->getType(), 'Wrong \'' . $fieldId . ' field type'); $this->assertEquals( diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php index 223d85f56da0a..ebcc51e4307c6 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php @@ -76,7 +76,7 @@ protected function _initObjects() $this->_configRoot = $this->_configRootStub; } $this->_fieldRenderer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\System\Config\Form\Field' ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php index c1730e753de49..ab3dee66d9464 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php @@ -33,12 +33,12 @@ class FormTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @var \Magento\Data\FormFactory + * @var \Magento\Framework\Data\FormFactory */ protected $_formFactory; @@ -65,26 +65,26 @@ class FormTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_formFactory = $this->_objectManager->create('Magento\Data\FormFactory'); + $this->_formFactory = $this->_objectManager->create('Magento\Framework\Data\FormFactory'); } public function testDependenceHtml() { - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => 'adminhtml') ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); /** @var $block \Magento\Backend\Block\System\Config\Form */ $block = $layout->createBlock('Magento\Backend\Block\System\Config\Form', 'block'); - /** @var $childBlock \Magento\View\Element\Text */ - $childBlock = $layout->addBlock('Magento\View\Element\Text', 'element_dependence', 'block'); + /** @var $childBlock \Magento\Framework\View\Element\Text */ + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Text', 'element_dependence', 'block'); $expectedValue = 'dependence_html_relations'; $this->assertNotContains($expectedValue, $block->toHtml()); @@ -110,7 +110,7 @@ public function testInitFieldsUseDefaultCheckbox( $this->_setupFieldsInheritCheckbox($useConfigField, $isConfigDataEmpty, $configDataValue); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -120,7 +120,7 @@ public function testInitFieldsUseDefaultCheckbox( /* @TODO Eliminate stub by proper mock / config fixture usage */ /** @var $block \Magento\Backend\Block\System\Config\FormStub */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\System\Config\FormStub' ); @@ -200,7 +200,7 @@ public function testInitFieldsUseConfigPath($useConfigField, $isConfigDataEmpty, $this->_setupFieldsInheritCheckbox($useConfigField, $isConfigDataEmpty, $configDataValue); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -210,7 +210,7 @@ public function testInitFieldsUseConfigPath($useConfigField, $isConfigDataEmpty, /* @TODO Eliminate stub by proper mock / config fixture usage */ /** @var $block \Magento\Backend\Block\System\Config\FormStub */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\System\Config\FormStub' ); @@ -256,21 +256,21 @@ protected function _setupFieldsInheritCheckbox($useConfigField, $isConfigDataEmp State::PARAM_BAN_CACHE => true, )); \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Config\ScopeInterface') + ->get('Magento\Framework\Config\ScopeInterface') ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); $fileResolverMock = $this->getMockBuilder( 'Magento\Framework\App\Config\FileResolver' )->disableOriginalConstructor()->getMock(); $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Framework\App\Filesystem'); - /** @var $directory \Magento\Filesystem\Directory\Read */ + /** @var $directory \Magento\Framework\Filesystem\Directory\Read */ $directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); $fileIteratorFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\FileIteratorFactory' + 'Magento\Framework\Config\FileIteratorFactory' ); $fileIterator = $fileIteratorFactory->create( $directory, @@ -325,7 +325,7 @@ public function testInitFormAddsFieldsets() ); /** @var $block \Magento\Backend\Block\System\Config\Form */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\System\Config\Form' ); @@ -366,8 +366,8 @@ public function testInitFormAddsFieldsets() ); $elements = $block->getForm()->getElements(); foreach ($elements as $element) { - /** @var $element \Magento\Data\Form\Element\Fieldset */ - $this->assertInstanceOf('Magento\Data\Form\Element\Fieldset', $element); + /** @var $element \Magento\Framework\Data\Form\Element\Fieldset */ + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Fieldset', $element); $this->assertArrayHasKey($element->getId(), $expectedIds); $fields = $element->getElements(); $this->assertEquals(count($expectedIds[$element->getId()]), count($fields)); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Design/Edit/Tab/GeneralTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Design/Edit/Tab/GeneralTest.php index f20d36e9e3d7b..b31bc4b545d4b 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Design/Edit/Tab/GeneralTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Design/Edit/Tab/GeneralTest.php @@ -39,17 +39,17 @@ public function testPrepareForm() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->setDefaultDesignTheme(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'design', - $objectManager->create('Magento\Core\Model\Design') + $objectManager->create('Magento\Framework\App\DesignInterface') ); - $layout = $objectManager->create('Magento\View\Layout'); + $layout = $objectManager->create('Magento\Framework\View\Layout'); $block = $layout->addBlock('Magento\Backend\Block\System\Design\Edit\Tab\General'); $prepareFormMethod = new \ReflectionMethod( 'Magento\Backend\Block\System\Design\Edit\Tab\General', diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/DeleteTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/DeleteTest.php index 5363e455c75ac..6f69ac12bda9f 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/DeleteTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/DeleteTest.php @@ -33,12 +33,14 @@ class DeleteTest extends \PHPUnit_Framework_TestCase { public function testGetHeaderText() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\System\Store\Delete */ $block = $layout->createBlock('Magento\Backend\Block\System\Store\Delete', 'block'); - $dataObject = new \Magento\Object(); + $dataObject = new \Magento\Framework\Object(); $form = $block->getChildBlock('form'); $form->setDataObject($dataObject); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/GroupTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/GroupTest.php index 3e3b035f45e4c..12919916a7664 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/GroupTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/GroupTest.php @@ -51,11 +51,11 @@ protected function setUp() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); foreach ($registryData as $key => $value) { - $objectManager->get('Magento\Registry')->register($key, $value); + $objectManager->get('Magento\Framework\Registry')->register($key, $value); } - /** @var $layout \Magento\View\Layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); $this->_block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit\Form\Group'); @@ -66,9 +66,9 @@ protected function tearDown() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('store_type'); - $objectManager->get('Magento\Registry')->unregister('store_data'); - $objectManager->get('Magento\Registry')->unregister('store_action'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_type'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_action'); } public function testPrepareForm() diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/StoreTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/StoreTest.php index 3cb01a4671f20..a741ccde9c793 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/StoreTest.php @@ -51,11 +51,11 @@ protected function setUp() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); foreach ($registryData as $key => $value) { - $objectManager->get('Magento\Registry')->register($key, $value); + $objectManager->get('Magento\Framework\Registry')->register($key, $value); } - /** @var $layout \Magento\View\Layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); $this->_block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit\Form\Store'); @@ -66,9 +66,9 @@ protected function tearDown() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('store_type'); - $objectManager->get('Magento\Registry')->unregister('store_data'); - $objectManager->get('Magento\Registry')->unregister('store_action'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_type'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_action'); } public function testPrepareForm() diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/WebsiteTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/WebsiteTest.php index 86e9c4988e9c8..e2f981a4faf4c 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/WebsiteTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/Edit/Form/WebsiteTest.php @@ -49,11 +49,11 @@ protected function setUp() 'store_action' => 'add' ); foreach ($registryData as $key => $value) { - $objectManager->get('Magento\Registry')->register($key, $value); + $objectManager->get('Magento\Framework\Registry')->register($key, $value); } - /** @var $layout \Magento\View\Layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); $this->_block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit\Form\Website'); @@ -64,9 +64,9 @@ protected function tearDown() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('store_type'); - $objectManager->get('Magento\Registry')->unregister('store_data'); - $objectManager->get('Magento\Registry')->unregister('store_action'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_type'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_action'); } public function testPrepareForm() diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/EditTest.php index c147a3f9d228e..ead963fbd348b 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Store/EditTest.php @@ -35,9 +35,9 @@ protected function tearDown() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('store_type'); - $objectManager->get('Magento\Registry')->unregister('store_data'); - $objectManager->get('Magento\Registry')->unregister('store_action'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_type'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('store_action'); } /** @@ -51,7 +51,7 @@ protected function _initStoreTypesInRegistry($registryData) if ($key == 'store_data') { $value = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($value); } - $objectManager->get('Magento\Registry')->register($key, $value); + $objectManager->get('Magento\Framework\Registry')->register($key, $value); } } @@ -65,8 +65,10 @@ public function testStoreTypeFormCreated($registryData, $expected) { $this->_initStoreTypesInRegistry($registryData); - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\System\Store\Edit */ $block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit', 'block'); $block->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); @@ -105,8 +107,10 @@ public function testGetHeaderText($registryData, $expected) { $this->_initStoreTypesInRegistry($registryData); - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\System\Store\Edit */ $block = $layout->createBlock('Magento\Backend\Block\System\Store\Edit', 'block'); $block->setArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Variable/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Variable/EditTest.php index 8a90c62c02574..fc11f267f0c29 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Variable/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Variable/EditTest.php @@ -47,10 +47,10 @@ public function testConstruct() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $variable = $objectManager->create('Magento\Core\Model\Variable')->setData($data)->save(); - $objectManager->get('Magento\Registry')->register('current_variable', $variable); + $objectManager->get('Magento\Framework\Registry')->register('current_variable', $variable); $objectManager->get('Magento\Framework\App\RequestInterface')->setParam('variable_id', $variable->getId()); $block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\System\Variable\Edit', 'variable' diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/TemplateTest.php index 1d404ea3b2382..890b4b57c11be 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/TemplateTest.php @@ -42,7 +42,7 @@ protected function setUp() { parent::setUp(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Template' ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php index 6c98beeb056d5..dadb5aad84556 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/EditTest.php @@ -42,9 +42,9 @@ class EditTest extends \PHPUnit_Framework_TestCase */ public function testPrepareLayout($blockAttributes, $expected) { - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/TreeTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/TreeTest.php index d421476a0c186..51cbb35795245 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/TreeTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Category/TreeTest.php @@ -46,7 +46,7 @@ protected function setUp() parent::setUp(); $this->_treeBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Urlrewrite\Catalog\Category\Tree' ); @@ -90,7 +90,7 @@ public function testGetTreeArray() */ public function testGetLoadTreeUrl() { - $row = new \Magento\Object(array('id' => 1)); + $row = new \Magento\Framework\Object(array('id' => 1)); $this->assertStringStartsWith( 'http://localhost/index.php', $this->_treeBlock->getLoadTreeUrl($row), diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Edit/FormTest.php index 8e3ed4898b0da..77080836e27e1 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Edit/FormTest.php @@ -36,12 +36,14 @@ class FormTest extends \PHPUnit_Framework_TestCase * Get form instance * * @param array $args - * @return \Magento\Data\Form + * @return \Magento\Framework\Data\Form */ protected function _getFormInstance($args = array()) { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\Urlrewrite\Catalog\Edit\Form */ $block = $layout->createBlock( 'Magento\Backend\Block\Urlrewrite\Catalog\Edit\Form', @@ -73,10 +75,10 @@ public function testFormPostInitNew($productData, $categoryData, $action, $idPat { $args = array(); if ($productData) { - $args['product'] = new \Magento\Object($productData); + $args['product'] = new \Magento\Framework\Object($productData); } if ($categoryData) { - $args['category'] = new \Magento\Object($categoryData); + $args['category'] = new \Magento\Framework\Object($categoryData); } $form = $this->_getFormInstance($args); $this->assertContains($action, $form->getAction()); @@ -104,10 +106,10 @@ public function testGetEntityStores($productData, $categoryData, $expectedStores { $args = array(); if ($productData) { - $args['product'] = new \Magento\Object($productData); + $args['product'] = new \Magento\Framework\Object($productData); } if ($categoryData) { - $args['category'] = new \Magento\Object($categoryData); + $args['category'] = new \Magento\Framework\Object($categoryData); } $form = $this->_getFormInstance($args); $this->assertEquals($expectedStores, $form->getElement('store_id')->getValues()); @@ -124,7 +126,7 @@ public function testGetEntityStores($productData, $categoryData, $expectedStores */ public function testGetEntityStoresProductStoresException() { - $args = array('product' => new \Magento\Object(array('id' => 1))); + $args = array('product' => new \Magento\Framework\Object(array('id' => 1))); $this->_getFormInstance($args); } @@ -140,8 +142,8 @@ public function testGetEntityStoresProductStoresException() public function testGetEntityStoresProductCategoryStoresException() { $args = array( - 'product' => new \Magento\Object(array('id' => 1, 'store_ids' => array(1))), - 'category' => new \Magento\Object(array('id' => 1, 'store_ids' => array(3))) + 'product' => new \Magento\Framework\Object(array('id' => 1, 'store_ids' => array(1))), + 'category' => new \Magento\Framework\Object(array('id' => 1, 'store_ids' => array(3))) ); $this->_getFormInstance($args); } @@ -157,7 +159,7 @@ public function testGetEntityStoresProductCategoryStoresException() */ public function testGetEntityStoresCategoryStoresException() { - $args = array('category' => new \Magento\Object(array('id' => 1))); + $args = array('category' => new \Magento\Framework\Object(array('id' => 1))); $this->_getFormInstance($args); } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php index 8367913ba1a3b..8563f9097ae98 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/EditTest.php @@ -42,9 +42,9 @@ class EditTest extends \PHPUnit_Framework_TestCase */ public function testPrepareLayout($blockAttributes, $expected) { - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/GridTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/GridTest.php index b523589943f93..9f3a6ff26c4d4 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Catalog/Product/GridTest.php @@ -39,7 +39,7 @@ public function testPrepareGrid() { /** @var $gridBlock \Magento\Backend\Block\Urlrewrite\Catalog\Product\Grid */ $gridBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Urlrewrite\Catalog\Product\Grid' ); @@ -55,7 +55,7 @@ public function testPrepareGrid() $this->assertStringStartsWith('http://localhost/index.php', $gridBlock->getGridUrl(), 'Grid URL is invalid'); - $row = new \Magento\Object(array('id' => 1)); + $row = new \Magento\Framework\Object(array('id' => 1)); $this->assertStringStartsWith( 'http://localhost/index.php/backend/admin/index/edit/product/1', $gridBlock->getRowUrl($row), diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/FormTest.php index 82ad4ce8b8212..c5157ab3b3b01 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/Edit/FormTest.php @@ -36,12 +36,14 @@ class FormTest extends \PHPUnit_Framework_TestCase * Get form instance * * @param array $args - * @return \Magento\Data\Form + * @return \Magento\Framework\Data\Form */ protected function _getFormInstance($args = array()) { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\Urlrewrite\Cms\Page\Edit\Form */ $block = $layout->createBlock( 'Magento\Backend\Block\Urlrewrite\Cms\Page\Edit\Form', diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php index 23907fc7c5743..7dbe5313ef606 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/EditTest.php @@ -42,9 +42,9 @@ class EditTest extends \PHPUnit_Framework_TestCase */ public function testPrepareLayout($blockAttributes, $expected) { - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/GridTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/GridTest.php index 46528898ba474..070c5e6325b13 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Cms/Page/GridTest.php @@ -39,7 +39,7 @@ public function testPrepareGrid() { /** @var \Magento\Backend\Block\Urlrewrite\Cms\Page\Grid $gridBlock */ $gridBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Urlrewrite\Cms\Page\Grid' ); @@ -55,7 +55,7 @@ public function testPrepareGrid() $this->assertStringStartsWith('http://localhost/index.php', $gridBlock->getGridUrl(), 'Grid URL is invalid'); - $row = new \Magento\Object(array('id' => 1)); + $row = new \Magento\Framework\Object(array('id' => 1)); $this->assertStringStartsWith( 'http://localhost/index.php/backend/admin/index/edit/cms_page/1', $gridBlock->getRowUrl($row), @@ -75,7 +75,7 @@ public function testPrepareGridForMultipleStores() { /** @var \Magento\Backend\Block\Urlrewrite\Cms\Page\Grid $gridBlock */ $gridBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Urlrewrite\Cms\Page\Grid' ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Edit/FormTest.php index 1e364e071af40..93fc837844fce 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/Edit/FormTest.php @@ -36,12 +36,14 @@ class FormTest extends \PHPUnit_Framework_TestCase * Get form instance * * @param array $args - * @return \Magento\Data\Form + * @return \Magento\Framework\Data\Form */ protected function _getFormInstance($args = array()) { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\Urlrewrite\Edit\Form */ $block = $layout->createBlock('Magento\Backend\Block\Urlrewrite\Edit\Form', 'block', array('data' => $args)); $block->setTemplate(null); @@ -56,8 +58,8 @@ protected function _getFormInstance($args = array()) public function testPrepareForm() { // Test form was configured correctly - $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Object(array('id' => 3)))); - $this->assertInstanceOf('Magento\Data\Form', $form); + $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Framework\Object(array('id' => 3)))); + $this->assertInstanceOf('Magento\Framework\Data\Form', $form); $this->assertNotEmpty($form->getAction()); $this->assertEquals('edit_form', $form->getId()); $this->assertEquals('post', $form->getMethod()); @@ -100,7 +102,7 @@ public function testSessionRestore() $sessionValues ); // Re-init form to use newly set session data - $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Object())); + $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Framework\Object())); // Check that all fields values are restored from session foreach ($sessionValues as $field => $value) { @@ -116,10 +118,10 @@ public function testSessionRestore() */ public function testStoreElementSingleStore() { - $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Object(array('id' => 3)))); - /** @var $storeElement \Magento\Data\Form\Element\AbstractElement */ + $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Framework\Object(array('id' => 3)))); + /** @var $storeElement \Magento\Framework\Data\Form\Element\AbstractElement */ $storeElement = $form->getElement('store_id'); - $this->assertInstanceOf('Magento\Data\Form\Element\Hidden', $storeElement); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Hidden', $storeElement); // Check that store value set correctly $defaultStore = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( @@ -138,12 +140,12 @@ public function testStoreElementSingleStore() */ public function testStoreElementMultiStores() { - $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Object(array('id' => 3)))); - /** @var $storeElement \Magento\Data\Form\Element\AbstractElement */ + $form = $this->_getFormInstance(array('url_rewrite' => new \Magento\Framework\Object(array('id' => 3)))); + /** @var $storeElement \Magento\Framework\Data\Form\Element\AbstractElement */ $storeElement = $form->getElement('store_id'); // Check store selection elements has correct type - $this->assertInstanceOf('Magento\Data\Form\Element\Select', $storeElement); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Select', $storeElement); // Check store selection elements has correct renderer $this->assertInstanceOf( @@ -180,7 +182,7 @@ public function fieldsStateDataProvider() { return array( array( - new \Magento\Object(), + new \Magento\Framework\Object(), array( 'is_system' => true, 'id_path' => false, @@ -191,7 +193,7 @@ public function fieldsStateDataProvider() ) ), array( - new \Magento\Object(array('id' => 3)), + new \Magento\Framework\Object(array('id' => 3)), array( 'is_system' => true, 'id_path' => false, diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php index c0aeaf2c15175..2df77ab7a882e 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Urlrewrite/EditTest.php @@ -43,9 +43,9 @@ class EditTest extends \PHPUnit_Framework_TestCase public function testPrepareLayout($blockAttributes, $expected) { - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ContainerTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ContainerTest.php index d07491853daaf..b55204a83f011 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ContainerTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ContainerTest.php @@ -32,7 +32,7 @@ public function testPseudoConstruct() { /** @var $block \Magento\Backend\Block\Widget\Container */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Widget\Container', '', @@ -89,9 +89,9 @@ public function testUpdateButton() */ protected function _buildBlock($titles) { - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); /** @var $block \Magento\Backend\Block\Widget\Container */ diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php index 0870916d958cf..5bb64ba2e188a 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php @@ -34,8 +34,10 @@ class ContainerTest extends \PHPUnit_Framework_TestCase public function testGetFormHtml() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); // Create block with blocking _prepateLayout(), which is used by block to instantly add 'form' child /** @var $block \Magento\Backend\Block\Widget\Form\Container */ $block = $this->getMock( @@ -45,7 +47,7 @@ public function testGetFormHtml() ); $layout->addBlock($block, 'block'); - $form = $layout->addBlock('Magento\View\Element\Text', 'form', 'block'); + $form = $layout->addBlock('Magento\Framework\View\Element\Text', 'form', 'block'); $expectedHtml = 'html'; $this->assertNotEquals($expectedHtml, $block->getFormHtml()); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php index b86193dd9127c..234342de1db22 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/FormTest.php @@ -39,13 +39,13 @@ public function testSetFieldset() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->setDefaultDesignTheme(); - $layout = $objectManager->create('Magento\View\Layout'); + $layout = $objectManager->create('Magento\Framework\View\Layout'); $formBlock = $layout->addBlock('Magento\Backend\Block\Widget\Form'); - $fieldSet = $objectManager->create('Magento\Data\Form\Element\Fieldset'); + $fieldSet = $objectManager->create('Magento\Framework\Data\Form\Element\Fieldset'); $arguments = array( 'data' => array( 'attribute_code' => 'date', @@ -61,7 +61,7 @@ public function testSetFieldset() $fields = $fieldSet->getElements(); $this->assertEquals(1, count($fields)); - $this->assertInstanceOf('Magento\Data\Form\Element\Date', $fields[0]); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Date', $fields[0]); $this->assertNotEmpty($fields[0]->getDateFormat()); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php index c45d38f286c0a..63fb23d6d3580 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php @@ -57,7 +57,7 @@ protected function setUp() '', false ); - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->_layoutMock->expects( $this->any() )->method( @@ -67,11 +67,11 @@ protected function setUp() ); $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array('layout' => $this->_layoutMock) ); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Widget\Grid\ColumnSet', '', diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ContainerTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ContainerTest.php index 570d0b9714e64..0f83074902a56 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ContainerTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ContainerTest.php @@ -32,7 +32,7 @@ public function testPseudoConstruct() { /** @var $block \Magento\Backend\Block\Widget\Grid\Container */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Widget\Grid\Container', '', diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ExtendedTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ExtendedTest.php index d1ee605c3468c..4d6d02d194507 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ExtendedTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ExtendedTest.php @@ -37,7 +37,7 @@ class ExtendedTest extends \PHPUnit_Framework_TestCase protected $_block; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layoutMock; @@ -46,7 +46,7 @@ protected function setUp() parent::setUp(); $this->_layoutMock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Backend\Block\Template\Context', diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ItemTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ItemTest.php index edd8647d54d93..8acd6154e94db 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ItemTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/ItemTest.php @@ -33,11 +33,13 @@ class ItemTest extends \PHPUnit_Framework_TestCase { public function testGetAdditionalActionBlock() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\Widget\Grid\Massaction\Item */ $block = $layout->createBlock('Magento\Backend\Block\Widget\Grid\Massaction\Item', 'block'); - $expected = $layout->addBlock('Magento\View\Element\Template', 'additional_action', 'block'); + $expected = $layout->addBlock('Magento\Framework\View\Element\Template', 'additional_action', 'block'); $this->assertSame($expected, $block->getAdditionalActionBlock()); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/Massaction/AdditionalTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/Massaction/AdditionalTest.php index 88cbc7cf4a11f..62e426f6f8bc4 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/Massaction/AdditionalTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/Massaction/AdditionalTest.php @@ -30,7 +30,13 @@ class AdditionalTest extends \PHPUnit_Framework_TestCase */ public function testToHtml() { - $interpreter = $this->getMock('Magento\View\Layout\Argument\Interpreter\Options', array(), array(), '', false); + $interpreter = $this->getMock( + 'Magento\Framework\View\Layout\Argument\Interpreter\Options', + array(), + array(), + '', + false + ); /** * @var Additional $block */ diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php index 5fd015d38799e..02b8009cada08 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php @@ -39,7 +39,7 @@ class MassactionTest extends \PHPUnit_Framework_TestCase protected $_block; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -52,7 +52,7 @@ protected function setUp() $this->_setFixtureTheme(); $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\LayoutInterface', + 'Magento\Framework\View\LayoutInterface', array('area' => 'adminhtml') ); $this->_layout->getUpdate()->load('layout_test_grid_handle'); @@ -86,7 +86,7 @@ public function testMassactionDefaultValues() { /** @var $blockEmpty \Magento\Backend\Block\Widget\Grid\Massaction */ $blockEmpty = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Widget\Grid\Massaction' ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php index 667b23307557c..38d311944ec8e 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php @@ -37,7 +37,7 @@ class GridTest extends \PHPUnit_Framework_TestCase protected $_block; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_layoutMock; @@ -48,7 +48,7 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->_columnSetMock = $this->_getColumnSetMock(); $returnValueMap = array( @@ -81,7 +81,7 @@ protected function setUp() )->will( $this->returnValue( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Widget\Button' ) @@ -101,7 +101,7 @@ protected function setUp() $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Backend\Block\Widget\Grid' ); @@ -126,7 +126,7 @@ protected function _getColumnSetMock() array(), array( $objectManager->create( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array( 'filesystem' => $objectManager->create( '\Magento\Framework\App\Filesystem', @@ -160,11 +160,13 @@ public function testGetMainButtonsHtmlReturnsEmptyStringIfFiltersArentVisible() public function testGetMassactionBlock() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\Widget\Grid */ $block = $layout->createBlock('Magento\Backend\Block\Widget\Grid\Extended', 'block'); - $child = $layout->addBlock('Magento\View\Element\Template', 'massaction', 'block'); + $child = $layout->addBlock('Magento\Framework\View\Element\Template', 'massaction', 'block'); $this->assertSame($child, $block->getMassactionBlock()); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/TabsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/TabsTest.php index ecf4b98ca790c..5cea588a9acc9 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/TabsTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/TabsTest.php @@ -42,10 +42,12 @@ public function testAddTab() ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_widget_instance', $widgetInstance); + $objectManager->get('Magento\Framework\Registry')->register('current_widget_instance', $widgetInstance); - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Backend\Block\Widget\Tabs */ $block = $layout->createBlock('Magento\Backend\Block\Widget\Tabs', 'block'); $layout->addBlock('Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main', 'child_tab', 'block'); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php index 3bc3894e43429..04e2b1ff4f9b5 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php @@ -39,7 +39,7 @@ class WidgetTest extends \PHPUnit_Framework_TestCase public function testGetButtonHtml() { $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); $layout->getUpdate()->load(); @@ -61,7 +61,7 @@ public function testGetButtonHtml() public function testGetButtonHtmlForTwoButtonsInOneBlock() { $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); $layout->getUpdate()->load(); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php index f2c8f7edaa79e..a9c11391e8580 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/backend_theme.php @@ -24,7 +24,7 @@ /** @var $registration \Magento\Core\Model\Theme\Registration */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Core\Model\Theme\Registration'); $registration->register( diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/Magento_Backend/layout_test_grid_handle.xml b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/Magento_Backend/layout_test_grid_handle.xml index 391deb0a18252..c67bc68c26c06 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/Magento_Backend/layout_test_grid_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Backend/Block/_files/design/adminhtml/test_default/Magento_Backend/layout_test_grid_handle.xml @@ -29,7 +29,7 @@ - Magento\Data\Collection + Magento\Framework\Data\Collection diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php index 80f9db5ac02eb..8d84c121f5b6a 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php @@ -44,7 +44,7 @@ public function testFlushAllAction() $cachePool = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Framework\App\Cache\Frontend\Pool' ); - /** @var $cacheFrontend \Magento\Cache\FrontendInterface */ + /** @var $cacheFrontend \Magento\Framework\Cache\FrontendInterface */ foreach ($cachePool as $cacheFrontend) { $this->assertFalse($cacheFrontend->getBackend()->load('NON_APPLICATION_FIXTURE')); } @@ -66,7 +66,7 @@ public function testFlushSystemAction() $cachePool = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Framework\App\Cache\Frontend\Pool' ); - /** @var $cacheFrontend \Magento\Cache\FrontendInterface */ + /** @var $cacheFrontend \Magento\Framework\Cache\FrontendInterface */ foreach ($cachePool as $cacheFrontend) { $this->assertSame( 'non-application cache data', @@ -177,7 +177,7 @@ public function testMassActionsInvalidTypes($action) $this->dispatch('backend/admin/cache/' . $action); $this->assertSessionMessages( $this->contains("Specified cache type(s) don't exist: invalid_type_1, invalid_type_2"), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php index 6d81ff136dd72..430d918dd931b 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php @@ -76,7 +76,8 @@ public function testSaveAction() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->assertTrue( - $objectManager->get('Magento\Encryption\EncryptorInterface')->validateHash($password, $user->getPassword()) + $objectManager->get('Magento\Framework\Encryption\EncryptorInterface') + ->validateHash($password, $user->getPassword()) ); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/StoreTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/StoreTest.php index 37a4cb27fbaf5..3d1efc9fa3253 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/System/StoreTest.php @@ -45,8 +45,8 @@ public function testIndexAction() public function testSaveActionWithExistCode() { - /** @var $formKey \Magento\Data\Form\FormKey */ - $formKey = $this->_objectManager->get('Magento\Data\Form\FormKey'); + /** @var $formKey \Magento\Framework\Data\Form\FormKey */ + $formKey = $this->_objectManager->get('Magento\Framework\Data\Form\FormKey'); $post = array( 'form_key' => $formKey->getFormKey(), 'website' => array( @@ -65,8 +65,8 @@ public function testSaveActionWithExistCode() //Check that errors was generated and set to session $this->assertSessionMessages( $this->contains("Website with the same code already exists."), - \Magento\Message\MessageInterface::TYPE_ERROR, - 'Magento\Message\ManagerInterface' + \Magento\Framework\Message\MessageInterface::TYPE_ERROR, + 'Magento\Framework\Message\ManagerInterface' ); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php index 2add22c953d82..d4669ad60f201 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Helper/DataTest.php @@ -44,7 +44,7 @@ class DataTest extends \PHPUnit_Framework_TestCase protected function setUp() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -58,7 +58,7 @@ protected function tearDown() $this->_helper = null; $this->_auth = null; \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( null ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php index cc2816c5aa901..23762eee53408 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php @@ -45,7 +45,7 @@ protected function setUp() { parent::setUp(); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -62,7 +62,7 @@ protected function tearDown() { $this->_model = null; \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( null ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php index 7a445822d2f6f..37a321beee2ac 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/AuthTest.php @@ -102,7 +102,7 @@ public function testLogout() \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD ); $this->assertNotEmpty($this->_model->getAuthStorage()->getData()); - $cookie = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('\Magento\Stdlib\Cookie'); + $cookie = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('\Magento\Framework\Stdlib\Cookie'); $cookie->set($this->_model->getAuthStorage()->getName(), 'session_id'); $this->_model->logout(); $this->assertEmpty($this->_model->getAuthStorage()->getData()); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php index 7d16f19c1d7a7..3ce5b6354c2d0 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php @@ -37,7 +37,7 @@ class RobotsTest extends \PHPUnit_Framework_TestCase protected $model = null; /** - * @var \Magento\Filesystem\Directory\Read + * @var \Magento\Framework\Filesystem\Directory\Read */ protected $rootDirectory; diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php index fb00153330d17..458986b09bdb9 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php @@ -110,7 +110,7 @@ public function validationDataProvider() * @param string $path * @param string $value * @magentoDbIsolation enabled - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @dataProvider validationExceptionDataProvider */ public function testValidationException($path, $value) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Image/AdapterTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Image/AdapterTest.php index d395b6ef718a5..951e22ba5e73c 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Image/AdapterTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Image/AdapterTest.php @@ -42,7 +42,7 @@ protected function setUp() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * expectedExceptionMessage The specified image adapter cannot be used because of some missed dependencies. * @magentoDbIsolation enabled * @magentoAppIsolation enabled @@ -58,6 +58,6 @@ public function testExceptionSave() */ public function testCorrectSave() { - $this->_model->setValue(\Magento\Image\Adapter\AdapterInterface::ADAPTER_GD2)->save(); + $this->_model->setValue(\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2)->save(); } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php index fe424b4d58200..acc7dc894de62 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/ConfigTest.php @@ -40,7 +40,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase public function testSaveWithSingleStoreModeEnabled($groups) { Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -93,7 +93,7 @@ public function testSave($section, $groups, $expected) $_configData = $_configDataObject->setSection($group)->setWebsite('base')->load(); if (array_key_exists('payment/payflow_link/pwd', $_configData)) { $_configData['payment/payflow_link/pwd'] = $objectManager->get( - 'Magento\Encryption\EncryptorInterface' + 'Magento\Framework\Encryption\EncryptorInterface' )->decrypt( $_configData['payment/payflow_link/pwd'] ); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php index d3483b52c9d0d..35a3873b11f16 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Locale/ResolverTest.php @@ -32,7 +32,7 @@ class ResolverTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Locale\ResolverInterface + * @var \Magento\Framework\Locale\ResolverInterface */ protected $_model; @@ -45,19 +45,19 @@ protected function setUp() } /** - * @covers \Magento\Locale\ResolverInterface::setLocale + * @covers \Magento\Framework\Locale\ResolverInterface::setLocale */ public function testSetLocaleWithDefaultLocale() { - $this->_checkSetLocale(\Magento\Locale\ResolverInterface::DEFAULT_LOCALE); + $this->_checkSetLocale(\Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE); } /** - * @covers \Magento\Locale\ResolverInterface::setLocale + * @covers \Magento\Framework\Locale\ResolverInterface::setLocale */ public function testSetLocaleWithBaseInterfaceLocale() { - $user = new \Magento\Object(); + $user = new \Magento\Framework\Object(); $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Backend\Model\Auth\Session' ); @@ -71,7 +71,7 @@ public function testSetLocaleWithBaseInterfaceLocale() } /** - * @covers \Magento\Locale\ResolverInterface::setLocale + * @covers \Magento\Framework\Locale\ResolverInterface::setLocale */ public function testSetLocaleWithSessionLocale() { @@ -84,7 +84,7 @@ public function testSetLocaleWithSessionLocale() } /** - * @covers \Magento\Locale\ResolverInterface::setLocale + * @covers \Magento\Framework\Locale\ResolverInterface::setLocale */ public function testSetLocaleWithRequestLocale() { diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php index eb49b87ed3361..9b0198ab526f6 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/MenuTest.php @@ -45,7 +45,7 @@ protected function setUp() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Backend\Model\Auth'); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Config\ScopeInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\Config\ScopeInterface') ->setCurrentScope(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/ObserverTest.php index 038f13d2472a0..b24c02e4840e1 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/ObserverTest.php @@ -108,7 +108,7 @@ public function testActionPreDispatchAdminLoggedNoRedirect() /** * Builds a dummy observer for testing adminPreDispatch method * - * @return \Magento\Object + * @return \Magento\Framework\Object */ protected function _buildObserver() { @@ -122,9 +122,9 @@ protected function _buildObserver() ) ); - $controller = new \Magento\Object(array('request' => $request)); - $event = new \Magento\Object(array('controller_action' => $controller)); - $observer = new \Magento\Object(array('event' => $event)); + $controller = new \Magento\Framework\Object(array('request' => $request)); + $event = new \Magento\Framework\Object(array('controller_action' => $controller)); + $observer = new \Magento\Framework\Object(array('event' => $event)); return $observer; } } diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Session/QuoteTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Session/QuoteTest.php index 9f9253b68db00..fa16bb0e021f4 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Session/QuoteTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Session/QuoteTest.php @@ -43,7 +43,7 @@ public function testGetQuote() $backendQuoteSession->setCustomerId($fixtureCustomerId); /** @var \Magento\Backend\Model\Session\Quote $quoteSession */ $quoteSession = $objectManager->create('Magento\Backend\Model\Session\Quote'); - $quoteSession->setEntity(new \Magento\Object()); + $quoteSession->setEntity(new \Magento\Framework\Object()); /** SUT execution */ $quote = $quoteSession->getQuote(); diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php index be336cc2e9408..abe894413365e 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/SessionTest.php @@ -38,7 +38,7 @@ public function testContructor() if (array_key_exists('adminhtml', $_SESSION)) { unset($_SESSION['adminhtml']); } - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Backend\Model\Session', array($logger) diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Translate/InlineTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Translate/InlineTest.php index dfc59e49ecc38..f2cead6967387 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/Translate/InlineTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Translate/InlineTest.php @@ -32,26 +32,26 @@ class InlineTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Translate\InlineInterface + * @var \Magento\Framework\Translate\InlineInterface */ protected $_translateInline; protected function setUp() { $this->_translateInline = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Translate\InlineInterface' + 'Magento\Framework\Translate\InlineInterface' ); } /** * @magentoAdminConfigFixture dev/translate_inline/active_admin 1 - * @covers \Magento\Translate\Inline::getAjaxUrl + * @covers \Magento\Framework\Translate\Inline::getAjaxUrl */ public function testAjaxUrl() { $body = 'some body'; /** @var \Magento\Backend\Model\UrlInterface $url */ - $url = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\UrlInterface'); + $url = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\UrlInterface'); $url->getUrl(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE . '/ajax/translate'); $this->_translateInline->processResponseBody($body, true); $this->assertContains( diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php index 2a254d449732f..2ad3effd52457 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/UrlTest.php @@ -80,7 +80,7 @@ public function testGetSecretKey($routeName, $controller, $action, $expectedHash $this->_model->setRequest($request); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Session\SessionManagerInterface' + 'Magento\Framework\Session\SessionManagerInterface' )->setData( '_form_key', 'salt' @@ -95,8 +95,8 @@ public function getSecretKeyDataProvider() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $encryptor \Magento\Encryption\EncryptorInterface */ - $encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface'); + /** @var $encryptor \Magento\Framework\Encryption\EncryptorInterface */ + $encryptor = $objectManager->get('Magento\Framework\Encryption\EncryptorInterface'); return array( array( @@ -152,8 +152,8 @@ public function testGetSecretKeyForwarded() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $encryptor \Magento\Encryption\EncryptorInterface */ - $encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface'); + /** @var $encryptor \Magento\Framework\Encryption\EncryptorInterface */ + $encryptor = $objectManager->get('Magento\Framework\Encryption\EncryptorInterface'); /** @var $request \Magento\Framework\App\Request\Http */ $request = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() @@ -162,7 +162,7 @@ public function testGetSecretKeyForwarded() $request->initForward()->setControllerName(uniqid())->setActionName(uniqid()); $this->_model->setRequest($request); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Session\SessionManagerInterface' + 'Magento\Framework\Session\SessionManagerInterface' )->setData( '_form_key', 'salt' diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php index 20a269dd3c72b..97c52feaf1d0e 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Filesystem\Directory\Write $rootDirectory */ +/** @var \Magento\Framework\Filesystem\Directory\Write $rootDirectory */ $rootDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php index f33f8f2d36093..2445867985045 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var \Magento\Filesystem\Directory\Write $rootDirectory */ +/** @var \Magento\Framework\Filesystem\Directory\Write $rootDirectory */ $rootDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( diff --git a/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php b/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php index 6014d99921f45..73784d6e416e6 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php +++ b/dev/tests/integration/testsuite/Magento/Backend/Utility/Controller.php @@ -87,7 +87,7 @@ protected function tearDown() public function assertSessionMessages( \PHPUnit_Framework_Constraint $constraint, $messageType = null, - $messageManagerClass = 'Magento\Message\Manager' + $messageManagerClass = 'Magento\Framework\Message\Manager' ) { parent::assertSessionMessages($constraint, $messageType, $messageManagerClass); } diff --git a/dev/tests/integration/testsuite/Magento/Backend/controllers/_files/cache/non_application_cache.php b/dev/tests/integration/testsuite/Magento/Backend/controllers/_files/cache/non_application_cache.php index bf3812ab1bae3..3b22a7bc45977 100644 --- a/dev/tests/integration/testsuite/Magento/Backend/controllers/_files/cache/non_application_cache.php +++ b/dev/tests/integration/testsuite/Magento/Backend/controllers/_files/cache/non_application_cache.php @@ -25,7 +25,7 @@ /** @var $cachePool \Magento\Framework\App\Cache\Frontend\Pool */ $cachePool = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Framework\App\Cache\Frontend\Pool'); -/** @var $cacheFrontend \Magento\Cache\FrontendInterface */ +/** @var $cacheFrontend \Magento\Framework\Cache\FrontendInterface */ foreach ($cachePool as $cacheFrontend) { $cacheFrontend->getBackend()->save('non-application cache data', 'NON_APPLICATION_FIXTURE', array('SOME_TAG')); } diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php index ae54dc49f58e4..1d70861c3a375 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php @@ -35,9 +35,9 @@ public function testToHtmlHasOnClick() { \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); $block = $layout->createBlock( diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php index 0b7fe9e6d17cf..85d25b54352d8 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/SearchTest.php @@ -34,8 +34,8 @@ class SearchTest extends \PHPUnit_Framework_TestCase */ public function testToHtmlHasIndex() { - /** @var $layout \Magento\View\LayoutInterface */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Layout'); + /** @var $layout \Magento\Framework\View\LayoutInterface */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Framework\View\Layout'); $block = $layout->createBlock( 'Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Search', 'block2' diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Controller/ProductTest.php b/dev/tests/integration/testsuite/Magento/Bundle/Controller/ProductTest.php index 0b10821d45821..53b18537b5e37 100644 --- a/dev/tests/integration/testsuite/Magento/Bundle/Controller/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Bundle/Controller/ProductTest.php @@ -41,7 +41,7 @@ public function testViewAction() $this->assertContains( 'catalog_product_view_type_bundle', \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->getUpdate()->getHandles() ); $responseBody = $this->getResponse()->getBody(); diff --git a/dev/tests/integration/testsuite/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptchaTest.php b/dev/tests/integration/testsuite/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptchaTest.php index b5e73cb8ff529..4e946e8e97fd0 100644 --- a/dev/tests/integration/testsuite/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptchaTest.php +++ b/dev/tests/integration/testsuite/Magento/Captcha/Block/Adminhtml/Captcha/DefaultCaptchaTest.php @@ -36,7 +36,7 @@ class DefaultCaptchaTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Captcha\Block\Adminhtml\Captcha\DefaultCaptcha' ); diff --git a/dev/tests/integration/testsuite/Magento/Captcha/Block/Captcha/DefaultTest.php b/dev/tests/integration/testsuite/Magento/Captcha/Block/Captcha/DefaultTest.php index 4077a2406dbeb..948c996cc79f3 100644 --- a/dev/tests/integration/testsuite/Magento/Captcha/Block/Captcha/DefaultTest.php +++ b/dev/tests/integration/testsuite/Magento/Captcha/Block/Captcha/DefaultTest.php @@ -36,7 +36,7 @@ class DefaultTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Captcha\Block\Captcha\DefaultCaptcha' ); diff --git a/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php index 644528b32e3da..1e5877c102d67 100644 --- a/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Captcha/Model/ObserverTest.php @@ -121,7 +121,7 @@ public function testCheckUnsuccessfulMessageWhenCaptchaFailed() $this->dispatch('backend/admin/auth/forgotpassword'); $this->assertSessionMessages( $this->equalTo(array('Incorrect CAPTCHA')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php index 1f0688324d2b6..073479945a29f 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/AddTest.php @@ -33,14 +33,16 @@ class AddTest extends \PHPUnit_Framework_TestCase { public function testToHtmlFormId() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $block = $layout->addBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Toolbar\Add', 'block'); $block->setArea('adminhtml')->unsetChild('setForm'); - $childBlock = $layout->addBlock('Magento\View\Element\Template', 'setForm', 'block'); - $form = new \Magento\Object(); + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Template', 'setForm', 'block'); + $form = new \Magento\Framework\Object(); $childBlock->setForm($form); $expectedId = '12121212'; diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/OptionTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/OptionTest.php index b57ea8b8b83a3..e80790ed049c2 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/OptionTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/OptionTest.php @@ -34,7 +34,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase public function testGetOptionValuesCaching() { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Option' ); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php index b58ba0dcf1f61..c7fdd02672a5e 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php @@ -33,8 +33,10 @@ class SelectTest extends \PHPUnit_Framework_TestCase { public function testToHtmlFormId() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Select */ $block = $layout->createBlock( 'Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Select', diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php index 358eb3c2583bd..1eabca589b6ae 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/TabsTest.php @@ -40,17 +40,17 @@ public function testPrepareLayout() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State') ->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - $objectManager->get('Magento\View\DesignInterface')->setDefaultDesignTheme(); + $objectManager->get('Magento\Framework\View\DesignInterface')->setDefaultDesignTheme(); /** @var $product \Magento\Catalog\Model\Product */ $product = $objectManager->create('Magento\Catalog\Model\Product'); $product->load(1); // fixture - $objectManager->get('Magento\Registry')->register('product', $product); + $objectManager->get('Magento\Framework\Registry')->register('product', $product); $objectManager->get('Magento\Framework\App\State')->setAreaCode('nonexisting'); - /** @var $layout \Magento\View\Layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); - $layout->addBlock('Magento\View\Element\Text', 'head'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); + $layout->addBlock('Magento\Framework\View\Element\Text', 'head'); /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs */ $block = $layout->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs'); $this->assertArrayHasKey(0, $block->getTabsIds()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/EditTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/EditTest.php index d25d3ac52ccde..8fee0a18fe651 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/EditTest.php @@ -51,9 +51,9 @@ protected function setUp() $product->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Adminhtml\Product\Edit' ); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php index 87f5e4a2f9b18..9d7dd4bb68179 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/CategoryTest.php @@ -32,7 +32,7 @@ public function testGetAfterElementHtml() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); @@ -41,8 +41,8 @@ public function testGetAfterElementHtml() array('layout' => $layout) ); - /** @var $formFactory \Magento\Data\FormFactory */ - $formFactory = $objectManager->get('Magento\Data\FormFactory'); + /** @var $formFactory \Magento\Framework\Data\FormFactory */ + $formFactory = $objectManager->get('Magento\Framework\Data\FormFactory'); $form = $formFactory->create(); $block->setForm($form); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/ContentTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/ContentTest.php index d3ccb999b3611..1ae9d1bdd3e0a 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/ContentTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/ContentTest.php @@ -33,8 +33,10 @@ class ContentTest extends \PHPUnit_Framework_TestCase { public function testGetUploader() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content */ $block = $layout->createBlock('Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content', 'block'); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php index 7c8bb921b50dc..571a64f1ec5fb 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php @@ -29,19 +29,19 @@ class WeightTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @var \Magento\Data\FormFactory + * @var \Magento\Framework\Data\FormFactory */ protected $_formFactory; protected function setUp() { $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_formFactory = $this->_objectManager->create('Magento\Data\FormFactory'); + $this->_formFactory = $this->_objectManager->create('Magento\Framework\Data\FormFactory'); } /** diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Options/AjaxTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Options/AjaxTest.php index 04ef9d7d8bddd..1c936076e5064 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Options/AjaxTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Options/AjaxTest.php @@ -40,7 +40,7 @@ protected function setUp() { parent::setUp(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Adminhtml\Product\Options\Ajax' ); @@ -58,7 +58,7 @@ public function testToHtml() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('import_option_products', array(1)); + $objectManager->get('Magento\Framework\Registry')->register('import_option_products', array(1)); $result = json_decode($this->_block->toHtml(), true); $this->assertEquals('test_option_code_1', $result[0]['title']); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php index 3b40616284d91..0dadb0ecb5288 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php @@ -71,10 +71,10 @@ protected function setUp() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( self::STUB_CLASS ); @@ -133,7 +133,7 @@ public function testGetMinimalQty() public function testGetPriceHtml() { $this->_block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); $this->assertContains('10', $this->_block->getPriceHtml($this->_product)); } @@ -141,7 +141,7 @@ public function testGetPriceHtml() public function testGetReviewsSummaryHtml() { $this->_block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); $html = $this->_block->getReviewsSummaryHtml($this->_product, false, true); $this->assertNotEmpty($html); @@ -163,7 +163,7 @@ public function testGetTierPriceTemplate() public function testGetTierPriceHtml() { $this->_block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); $html = $this->_block->getTierPriceHtml(); $this->assertNotEmpty($html); @@ -205,7 +205,7 @@ public function testHasProductUrl() public function testLayoutDependColumnCount() { $this->_block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); $this->assertEquals(3, $this->_block->getColumnCount()); /* default column count */ diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php index 34e07e383d9b6..3bb25a0857351 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ListTest.php @@ -43,7 +43,7 @@ protected function setUp() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Product\ListProduct' ); @@ -97,7 +97,7 @@ public function testGetAdditionalHtml() /** @var $parent \Magento\Catalog\Block\Product\ListProduct */ $parent = $layout->createBlock('Magento\Catalog\Block\Product\ListProduct'); $childBlock = $layout->createBlock( - 'Magento\View\Element\Text', + 'Magento\Framework\View\Element\Text', 'test', array('data' => array('text' => 'test')) ); @@ -131,6 +131,8 @@ public function testPrepareSortableFieldsByCategory() protected function _getLayout() { - return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php index 5769624772125..b038c89fc918d 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/NewTest.php @@ -40,16 +40,16 @@ class NewTest extends \PHPUnit_Framework_TestCase protected function setUp() { - \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Http\Context' )->setValue( \Magento\Customer\Helper\Data::CONTEXT_GROUP, - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID, - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID, + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID ); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Product\NewProduct' ); @@ -76,7 +76,7 @@ public function testGetCacheKeyInfo() $this->assertSame(2, array_shift($keys)); $themeModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->getDesignTheme(); $this->assertEquals($themeModel->getId() ?: null, $info[2]); @@ -116,7 +116,7 @@ public function testToHtml() $this->_block->setProductsCount(5); $this->_block->setTemplate('product/widget/new/content/new_list.phtml'); $this->_block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); $html = $this->_block->toHtml(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php index 663b8090b624c..cc6d3343683b6 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php @@ -36,21 +36,21 @@ class CrosssellTest extends \PHPUnit_Framework_TestCase public function testAll() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Product'); $product->load(2); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('product', $product); + $objectManager->get('Magento\Framework\Registry')->register('product', $product); /** @var $block \Magento\Catalog\Block\Product\ProductList\Crosssell */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Product\ProductList\Crosssell' ); $block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); $block->setTemplate('Magento_Catalog::product/list/items.phtml'); $block->setType('crosssell'); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php index 03634ace170ba..8955cd3babd48 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php @@ -36,21 +36,21 @@ class RelatedTest extends \PHPUnit_Framework_TestCase public function testAll() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Product'); $product->load(2); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('product', $product); + $objectManager->get('Magento\Framework\Registry')->register('product', $product); /** @var $block \Magento\Catalog\Block\Product\ProductList\Related */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Product\ProductList\Related' ); $block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); $block->setTemplate('Magento_Catalog::product/list/items.phtml'); $block->setType('related'); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php index 91297158f9333..1165ae9c40353 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php @@ -30,12 +30,14 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase { public function testGetPagerHtml() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar */ $block = $layout->createBlock('Magento\Catalog\Block\Product\ProductList\Toolbar', 'block'); - /** @var $childBlock \Magento\View\Element\Text */ - $childBlock = $layout->addBlock('Magento\View\Element\Text', 'product_list_toolbar_pager', 'block'); + /** @var $childBlock \Magento\Framework\View\Element\Text */ + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Text', 'product_list_toolbar_pager', 'block'); $expectedHtml = 'Any text there'; $this->assertNotEquals($expectedHtml, $block->getPagerHtml()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/SendTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/SendTest.php index c8c7d9d2ebd85..9873035fc0b2d 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/SendTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/SendTest.php @@ -44,7 +44,7 @@ protected function setUp() $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); $this->customerSession = $objectManager->get('Magento\Customer\Model\Session'); - $this->block = $objectManager->get('Magento\View\LayoutInterface') + $this->block = $objectManager->get('Magento\Framework\View\LayoutInterface') ->createBlock( 'Magento\Catalog\Block\Product\Send', '', diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php index ee6917215e646..da97149327de0 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/AdditionalTest.php @@ -30,18 +30,20 @@ class AdditionalTest extends \PHPUnit_Framework_TestCase { public function testGetChildHtmlList() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Catalog\Block\Product\View\Additional */ $block = $layout->createBlock('Magento\Catalog\Block\Product\View\Additional', 'block'); - /** @var $childFirst \Magento\View\Element\Text */ - $childFirst = $layout->addBlock('Magento\View\Element\Text', 'child1', 'block'); + /** @var $childFirst \Magento\Framework\View\Element\Text */ + $childFirst = $layout->addBlock('Magento\Framework\View\Element\Text', 'child1', 'block'); $htmlFirst = 'Any html of child1'; $childFirst->setText($htmlFirst); - /** @var $childSecond \Magento\View\Element\Text */ - $childSecond = $layout->addBlock('Magento\View\Element\Text', 'child2', 'block'); + /** @var $childSecond \Magento\Framework\View\Element\Text */ + $childSecond = $layout->addBlock('Magento\Framework\View\Element\Text', 'child2', 'block'); $htmlSecond = 'Any html of child2'; $childSecond->setText($htmlSecond); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php index ff20d755cbc75..686742842d782 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php @@ -51,10 +51,10 @@ protected function setUp() $this->_product->load(1); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('current_product'); - $objectManager->get('Magento\Registry')->register('current_product', $this->_product); + $objectManager->get('Magento\Framework\Registry')->unregister('current_product'); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $this->_product); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Catalog\Block\Product\View\Options' ); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php index 264a2c29c5983..12321b1745840 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ViewTest.php @@ -49,15 +49,17 @@ protected function setUp() $this->_block = $objectManager->create('Magento\Catalog\Block\Product\View'); $this->_product = $objectManager->create('Magento\Catalog\Model\Product'); $this->_product->load(1); - $objectManager->get('Magento\Registry')->unregister('product'); - $objectManager->get('Magento\Registry')->register('product', $this->_product); + $objectManager->get('Magento\Framework\Registry')->unregister('product'); + $objectManager->get('Magento\Framework\Registry')->register('product', $this->_product); } public function testSetLayout() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $headBlock = $layout->createBlock('Magento\View\Element\Template', 'head'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); + $headBlock = $layout->createBlock('Magento\Framework\View\Element\Template', 'head'); $layout->addBlock($this->_block); $this->assertNotEmpty($headBlock->getTitle()); @@ -73,7 +75,7 @@ public function testGetProduct() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('product'); + $objectManager->get('Magento\Framework\Registry')->unregister('product'); $this->_block->setProductId(1); $this->assertEquals($this->_product->getId(), $this->_block->getProduct()->getId()); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php index af6ad5ba3e26d..47b672951646c 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php @@ -54,7 +54,7 @@ public function testSaveAction($inputData, $defaultAttributes, $attributesSaved $this->assertSessionMessages( $this->equalTo(array('You saved the category.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); /** @var $category \Magento\Catalog\Model\Category */ @@ -306,7 +306,7 @@ public function testSaveActionCategoryWithDangerRequest() $this->dispatch('backend/catalog/category/save'); $this->assertSessionMessages( $this->equalTo(array('Unable to save the category')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php index c16e8fef363c0..14eec76f113e6 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php @@ -48,7 +48,7 @@ public function testSaveActionRedirectsSuccessfully() $this->assertEquals(302, $this->getResponse()->getHttpResponseCode()); /** @var \Magento\Backend\Model\UrlInterface $urlBuilder */ - $urlBuilder = $objectManager->get('Magento\UrlInterface'); + $urlBuilder = $objectManager->get('Magento\Framework\UrlInterface'); /** @var \Magento\Catalog\Helper\Product\Edit\Action\Attribute $attributeHelper */ $attributeHelper = $objectManager->get('Magento\Catalog\Helper\Product\Edit\Action\Attribute'); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php index 05edd814f4426..6c4ecb2e15e7a 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/AttributeTest.php @@ -100,12 +100,12 @@ protected function _translate($string) { // emulate admin store and design \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDesignTheme( 1 ); - /** @var \Magento\TranslateInterface $translate */ - $translate = $this->_objectManager->get('Magento\TranslateInterface'); + /** @var \Magento\Framework\TranslateInterface $translate */ + $translate = $this->_objectManager->get('Magento\Framework\TranslateInterface'); $translate->loadData(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, true); return __($string); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php index 615d328cebf58..cff5e8cd1e4ee 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php @@ -37,7 +37,7 @@ public function testSaveActionWithDangerRequest() $this->dispatch('backend/catalog/product/save'); $this->assertSessionMessages( $this->equalTo(array('Unable to save product')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertRedirect($this->stringContains('/backend/catalog/product/edit')); } @@ -52,7 +52,7 @@ public function testSaveActionAndNew() $this->assertRedirect($this->stringStartsWith('http://localhost/index.php/backend/catalog/product/new/')); $this->assertSessionMessages( $this->contains('You saved the product.'), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } @@ -69,11 +69,11 @@ public function testSaveActionAndDuplicate() ); $this->assertSessionMessages( $this->contains('You saved the product.'), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertSessionMessages( $this->contains('You duplicated the product.'), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php index 47c5e00dbedcd..2c0638fa8964d 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php @@ -38,7 +38,7 @@ public function assert404NotFound() parent::assert404NotFound(); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->assertNull($objectManager->get('Magento\Registry')->registry('current_category')); + $this->assertNull($objectManager->get('Magento\Framework\Registry')->registry('current_category')); } public function getViewActionDataProvider() @@ -84,7 +84,7 @@ public function testViewAction($categoryId, array $expectedHandles, array $expec $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $currentCategory \Magento\Catalog\Model\Category */ - $currentCategory = $objectManager->get('Magento\Registry')->registry('current_category'); + $currentCategory = $objectManager->get('Magento\Framework\Registry')->registry('current_category'); $this->assertInstanceOf('Magento\Catalog\Model\Category', $currentCategory); $this->assertEquals($categoryId, $currentCategory->getId(), 'Category in registry.'); @@ -95,7 +95,7 @@ public function testViewAction($categoryId, array $expectedHandles, array $expec /* Layout updates */ $handles = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->getUpdate()->getHandles(); foreach ($expectedHandles as $expectedHandleName) { $this->assertContains($expectedHandleName, $handles); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php index d709a83cc9638..ef48874cac6f4 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/CompareTest.php @@ -35,14 +35,17 @@ public function testAddAction() { $this->_requireVisitorWithNoProducts(); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Data\Form\FormKey $formKey */ - $formKey = $objectManager->get('Magento\Data\Form\FormKey'); + /** @var \Magento\Framework\Data\Form\FormKey $formKey */ + $formKey = $objectManager->get('Magento\Framework\Data\Form\FormKey'); $this->dispatch('catalog/product_compare/add/product/1/form_key/' . $formKey->getFormKey() . '?nocookie=1'); - /** @var $messageManager \Magento\Message\Manager */ - $messageManager = $objectManager->get('Magento\Message\Manager'); - $this->assertInstanceOf('Magento\Message\Success', $messageManager->getMessages()->getLastAddedMessage()); + /** @var $messageManager \Magento\Framework\Message\Manager */ + $messageManager = $objectManager->get('Magento\Framework\Message\Manager'); + $this->assertInstanceOf( + 'Magento\Framework\Message\Success', + $messageManager->getMessages()->getLastAddedMessage() + ); $this->assertContains( 'Simple Product 1 Name', (string)$messageManager->getMessages()->getLastAddedMessage()->getText() @@ -70,9 +73,13 @@ public function testRemoveAction() $this->dispatch('catalog/product_compare/remove/product/2'); - /** @var $messageManager \Magento\Message\Manager */ - $messageManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Message\Manager'); - $this->assertInstanceOf('Magento\Message\Success', $messageManager->getMessages()->getLastAddedMessage()); + /** @var $messageManager \Magento\Framework\Message\Manager */ + $messageManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\Message\Manager'); + $this->assertInstanceOf( + 'Magento\Framework\Message\Success', + $messageManager->getMessages()->getLastAddedMessage() + ); $this->assertContains( 'Simple Product 2 Name', (string)$messageManager->getMessages()->getLastAddedMessage()->getText() @@ -89,9 +96,13 @@ public function testRemoveActionWithSession() $this->dispatch('catalog/product_compare/remove/product/1'); - /** @var $messageManager \Magento\Message\Manager */ - $messageManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Message\Manager'); - $this->assertInstanceOf('Magento\Message\Success', $messageManager->getMessages()->getLastAddedMessage()); + /** @var $messageManager \Magento\Framework\Message\Manager */ + $messageManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\Message\Manager'); + $this->assertInstanceOf( + 'Magento\Framework\Message\Success', + $messageManager->getMessages()->getLastAddedMessage() + ); $this->assertContains('Simple Product 1 Name', (string)$messageManager->getMessages()->getLastAddedMessage()->getText()); @@ -104,7 +115,7 @@ public function testIndexActionDisplay() { $this->_requireVisitorWithTwoProducts(); - $layout = $this->_objectManager->get('Magento\View\LayoutInterface'); + $layout = $this->_objectManager->get('Magento\Framework\View\LayoutInterface'); $layout->setIsCacheable(false); $this->dispatch('catalog/product_compare/index'); @@ -132,9 +143,13 @@ public function testClearAction() $this->dispatch('catalog/product_compare/clear'); - /** @var $messageManager \Magento\Message\Manager */ - $messageManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Message\Manager'); - $this->assertInstanceOf('Magento\Message\Success', $messageManager->getMessages()->getLastAddedMessage()); + /** @var $messageManager \Magento\Framework\Message\Manager */ + $messageManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\Message\Manager'); + $this->assertInstanceOf( + 'Magento\Framework\Message\Success', + $messageManager->getMessages()->getLastAddedMessage() + ); $this->assertRedirect(); @@ -149,7 +164,7 @@ public function testRemoveActionProductNameXss() $this->_prepareCompareListWithProductNameXss(); $this->dispatch('catalog/product_compare/remove/product/1?nocookie=1'); $messages = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Message\Manager' + 'Magento\Framework\Message\Manager' )->getMessages()->getItems(); $isProductNamePresent = false; foreach ($messages as $message) { @@ -165,8 +180,9 @@ protected function _prepareCompareListWithProductNameXss() { /** @var $visitor \Magento\Log\Model\Visitor */ $visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Log\Model\Visitor'); - /** @var \Magento\Stdlib\DateTime $dateTime */ - $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Stdlib\DateTime'); + /** @var \Magento\Framework\Stdlib\DateTime $dateTime */ + $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Stdlib\DateTime'); $visitor->setSessionId(md5(time()) . md5(microtime()))->setLastVisitAt($dateTime->now())->save(); /** @var $item \Magento\Catalog\Model\Product\Compare\Item */ $item = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( @@ -185,8 +201,9 @@ protected function _requireVisitorWithNoProducts() /** @var $visitor \Magento\Log\Model\Visitor */ $visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Log\Model\Visitor'); - /** @var \Magento\Stdlib\DateTime $dateTime */ - $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Stdlib\DateTime'); + /** @var \Magento\Framework\Stdlib\DateTime $dateTime */ + $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Stdlib\DateTime'); $visitor->setSessionId(md5(time()) . md5(microtime()))->setLastVisitAt($dateTime->now())->save(); @@ -203,8 +220,9 @@ protected function _requireVisitorWithTwoProducts() { /** @var $visitor \Magento\Log\Model\Visitor */ $visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Log\Model\Visitor'); - /** @var \Magento\Stdlib\DateTime $dateTime */ - $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Stdlib\DateTime'); + /** @var \Magento\Framework\Stdlib\DateTime $dateTime */ + $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Stdlib\DateTime'); $visitor->setSessionId(md5(time()) . md5(microtime()))->setLastVisitAt($dateTime->now())->save(); /** @var $item \Magento\Catalog\Model\Product\Compare\Item */ @@ -259,8 +277,9 @@ protected function _requireCustomerWithTwoProducts() /** @var $visitor \Magento\Log\Model\Visitor */ $visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Log\Model\Visitor'); - /** @var \Magento\Stdlib\DateTime $dateTime */ - $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Stdlib\DateTime'); + /** @var \Magento\Framework\Stdlib\DateTime $dateTime */ + $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Stdlib\DateTime'); $visitor->setSessionId(md5(time()) . md5(microtime())) ->setLastVisitAt($dateTime->now()) ->save(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php index b3c757fd396e2..8f13f694aa31a 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php @@ -37,7 +37,7 @@ public function assert404NotFound() parent::assert404NotFound(); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->assertNull($objectManager->get('Magento\Registry')->registry('current_product')); + $this->assertNull($objectManager->get('Magento\Framework\Registry')->registry('current_product')); } protected function _getProductImageFile() @@ -62,7 +62,7 @@ public function testViewAction() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $currentProduct \Magento\Catalog\Model\Product */ - $currentProduct = $objectManager->get('Magento\Registry')->registry('current_product'); + $currentProduct = $objectManager->get('Magento\Framework\Registry')->registry('current_product'); $this->assertInstanceOf('Magento\Catalog\Model\Product', $currentProduct); $this->assertEquals(1, $currentProduct->getId()); @@ -73,7 +73,7 @@ public function testViewAction() /* Layout updates */ $handles = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->getUpdate()->getHandles(); $this->assertContains('catalog_product_view_type_simple', $handles); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/CategoryTest.php index 74c879d66c091..84e880da2cde6 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/CategoryTest.php @@ -46,7 +46,7 @@ protected function tearDown() $helperClass = get_class($this->_helper); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('_helper/' . $helperClass); + $objectManager->get('Magento\Framework\Registry')->unregister('_helper/' . $helperClass); } $this->_helper = null; } @@ -57,7 +57,7 @@ protected function tearDown() public function testGetStoreCategories() { $categories = $this->_helper->getStoreCategories(); - $this->assertInstanceOf('Magento\Data\Tree\Node\Collection', $categories); + $this->assertInstanceOf('Magento\Framework\Data\Tree\Node\Collection', $categories); $index = 0; $expectedPaths = array( array(3, '1/2/3'), @@ -69,7 +69,7 @@ public function testGetStoreCategories() array(12, '1/2/12') ); foreach ($categories as $category) { - $this->assertInstanceOf('Magento\Data\Tree\Node', $category); + $this->assertInstanceOf('Magento\Framework\Data\Tree\Node', $category); $this->assertEquals($expectedPaths[$index][0], $category->getId()); $this->assertEquals($expectedPaths[$index][1], $category->getData('path')); $index++; @@ -85,7 +85,7 @@ public function testGetCategoryUrl() ); $this->assertEquals($url, $this->_helper->getCategoryUrl($category)); - $category = new \Magento\Object(array('url' => $url)); + $category = new \Magento\Framework\Object(array('url' => $url)); $this->assertEquals($url, $this->_helper->getCategoryUrl($category)); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/DataTest.php index df69c9f3c92f4..03448cd849088 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/DataTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/DataTest.php @@ -51,7 +51,7 @@ public function testGetBreadcrumbPath() $category->load(5); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_category', $category); + $objectManager->get('Magento\Framework\Registry')->register('current_category', $category); try { $path = $this->_helper->getBreadcrumbPath(); @@ -59,9 +59,9 @@ public function testGetBreadcrumbPath() $this->assertEquals(array('category3', 'category4', 'category5'), array_keys($path)); $this->assertArrayHasKey('label', $path['category3']); $this->assertArrayHasKey('link', $path['category3']); - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); throw $e; } } @@ -73,12 +73,12 @@ public function testGetCategory() ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_category', $category); + $objectManager->get('Magento\Framework\Registry')->register('current_category', $category); try { $this->assertSame($category, $this->_helper->getCategory()); - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); throw $e; } } @@ -90,12 +90,12 @@ public function testGetProduct() ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); try { $this->assertSame($product, $this->_helper->getProduct()); - $objectManager->get('Magento\Registry')->unregister('current_product'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_product'); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('current_product'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_product'); throw $e; } } @@ -111,12 +111,12 @@ public function testGetAttributeHiddenFields() $this->assertEquals(array(), $this->_helper->getAttributeHiddenFields()); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('attribute_type_hidden_fields', 'test'); + $objectManager->get('Magento\Framework\Registry')->register('attribute_type_hidden_fields', 'test'); try { $this->assertEquals('test', $this->_helper->getAttributeHiddenFields()); - $objectManager->get('Magento\Registry')->unregister('attribute_type_hidden_fields'); + $objectManager->get('Magento\Framework\Registry')->unregister('attribute_type_hidden_fields'); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('attribute_type_hidden_fields'); + $objectManager->get('Magento\Framework\Registry')->unregister('attribute_type_hidden_fields'); throw $e; } } @@ -205,6 +205,6 @@ public function testIsUrlDirectivesParsingAllowed() public function testGetPageTemplateProcessor() { - $this->assertInstanceOf('Magento\Filter\Template', $this->_helper->getPageTemplateProcessor()); + $this->assertInstanceOf('Magento\Framework\Filter\Template', $this->_helper->getPageTemplateProcessor()); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php index 1e78857b34a29..4267f26354a0d 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php @@ -47,7 +47,7 @@ public static function setUpBeforeClass() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config'); - /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $mediaDirectory = $objectManager->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( @@ -97,7 +97,7 @@ public static function tearDownAfterClass() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config'); - /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $mediaDirectory = $objectManager->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompositeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompositeTest.php index bf50deadd19bb..30a0a099d4004 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompositeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompositeTest.php @@ -25,7 +25,7 @@ namespace Magento\Catalog\Helper\Product; use Magento\Customer\Controller\RegistryConstants; -use Magento\Registry; +use Magento\Framework\Registry; use Magento\TestFramework\Helper\Bootstrap; /** @@ -46,7 +46,7 @@ class CompositeTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->helper = Bootstrap::getObjectManager()->get('Magento\Catalog\Helper\Product\Composite'); - $this->registry = Bootstrap::getObjectManager()->get('Magento\Registry'); + $this->registry = Bootstrap::getObjectManager()->get('Magento\Framework\Registry'); } protected function tearDown() @@ -64,7 +64,7 @@ protected function tearDown() */ public function testRenderConfigureResult() { - $configureResult = new \Magento\Object(); + $configureResult = new \Magento\Framework\Object(); $configureResult->setOk(true) ->setProductId(1) ->setCurrentCustomerId(1); @@ -79,7 +79,7 @@ public function testRenderConfigureResult() public function testRenderConfigureResultNotOK() { - $configureResult = new \Magento\Object(); + $configureResult = new \Magento\Framework\Object(); $configureResult->setError(true) ->setMessage('Test Message'); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php index 4672335099c67..fe90dec9c46bd 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/ViewTest.php @@ -42,7 +42,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase protected $_controller; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -52,7 +52,7 @@ protected function setUp() $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); $objectManager->get('Magento\Framework\App\Http\Context') ->setValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH, false, false); - $objectManager->get('Magento\View\DesignInterface') + $objectManager->get('Magento\Framework\View\DesignInterface') ->setDefaultDesignTheme(); $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Catalog\Helper\Product\View'); @@ -74,7 +74,7 @@ protected function setUp() ); $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); } @@ -104,7 +104,7 @@ public function testInitProductLayout() $product->setTypeId(\Magento\Catalog\Model\Product\Type::DEFAULT_TYPE)->setId(99)->setUrlKey($uniqid); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('product', $product); + $objectManager->get('Magento\Framework\Registry')->register('product', $product); $this->_helper->initProductLayout($product, $this->_controller); $rootBlock = $this->_layout->getBlock('root'); @@ -132,7 +132,7 @@ public function testPrepareAndRender() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @magentoAppIsolation enabled */ public function testPrepareAndRenderWrongController() @@ -144,7 +144,7 @@ public function testPrepareAndRenderWrongController() /** * @magentoAppIsolation enabled - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testPrepareAndRenderWrongProduct() { diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php index 57d3b6c28769e..523b7ac233c40 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ProductTest.php @@ -125,16 +125,16 @@ public function testGetEmailToFriendUrl() $category->setId(10); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_category', $category); + $objectManager->get('Magento\Framework\Registry')->register('current_category', $category); try { $this->assertStringEndsWith( 'sendfriend/product/send/id/100/cat_id/10/', $this->_helper->getEmailToFriendUrl($product) ); - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); throw $e; } } @@ -226,11 +226,11 @@ public function testInitProduct() $this->assertInstanceOf( 'Magento\Catalog\Model\Product', - $objectManager->get('Magento\Registry')->registry('current_product') + $objectManager->get('Magento\Framework\Registry')->registry('current_product') ); $this->assertInstanceOf( 'Magento\Catalog\Model\Category', - $objectManager->get('Magento\Registry')->registry('current_category') + $objectManager->get('Magento\Framework\Registry')->registry('current_category') ); } @@ -240,10 +240,10 @@ public function testPrepareProductOptions() $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Catalog\Model\Product' ); - $buyRequest = new \Magento\Object(array('qty' => 100, 'options' => array('option' => 'value'))); + $buyRequest = new \Magento\Framework\Object(array('qty' => 100, 'options' => array('option' => 'value'))); $this->_helper->prepareProductOptions($product, $buyRequest); $result = $product->getPreconfiguredValues(); - $this->assertInstanceOf('Magento\Object', $result); + $this->assertInstanceOf('Magento\Framework\Object', $result); $this->assertEquals(100, $result->getQty()); $this->assertEquals(array('option' => 'value'), $result->getOptions()); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php index 8f729e8374a1e..1c0dda67a5f27 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/CategoryImageTest.php @@ -97,7 +97,7 @@ protected function tearDown() } /** - * Test that there is no exception '$_FILES array is empty' in \Magento\File\Uploader::_setUploadFileId() + * Test that there is no exception '$_FILES array is empty' in \Magento\Framework\File\Uploader::_setUploadFileId() * if category image was not set * */ @@ -109,7 +109,8 @@ public function testSaveCategoryWithoutImage() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $category \Magento\Catalog\Model\Category */ - $category = $objectManager->get('Magento\Registry')->registry('_fixture/Magento\Catalog\Model\Category'); + $category = $objectManager->get('Magento\Framework\Registry') + ->registry('_fixture/Magento\Catalog\Model\Category'); $this->assertNotEmpty($category->getId()); foreach (StubZendLogWriterStreamTest::$exceptions as $exception) { diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/_files/category_without_image.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/_files/category_without_image.php index 74936e3ba00de..22cf6d8fb5f5d 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/_files/category_without_image.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/_files/category_without_image.php @@ -46,4 +46,4 @@ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$objectManager->get('Magento\Registry')->register('_fixture/Magento\Catalog\Model\Category', $category); +$objectManager->get('Magento\Framework\Registry')->register('_fixture/Magento\Catalog\Model\Category', $category); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php index 7abca867c7e8a..e2058f203f011 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTest.php @@ -75,7 +75,7 @@ protected function setUp() public function testGetUrlInstance() { $instance = $this->_model->getUrlInstance(); - $this->assertInstanceOf('Magento\Url', $instance); + $this->assertInstanceOf('Magento\Framework\Url', $instance); $this->assertSame($instance, $this->_model->getUrlInstance()); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTreeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTreeTest.php index 504b447c66761..4148cfc94b942 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTreeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTreeTest.php @@ -97,7 +97,7 @@ public function testMove() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testMoveWrongParent() { @@ -106,7 +106,7 @@ public function testMoveWrongParent() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testMoveWrongId() { diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/DesignTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/DesignTest.php index c53a2fc94dcde..553480695068e 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/DesignTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/DesignTest.php @@ -50,7 +50,9 @@ protected function setUp() public function testApplyCustomDesign($theme) { $this->_model->applyCustomDesign($theme); - $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface'); + $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\DesignInterface' + ); $this->assertEquals('package', $design->getDesignTheme()->getPackageCode()); $this->assertEquals('theme', $design->getDesignTheme()->getThemeCode()); } @@ -61,7 +63,7 @@ public function testApplyCustomDesign($theme) public function getThemeModel() { $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $theme->setData($this->_getThemeData()); return array(array($theme)); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/CategoryTest.php index 21694177f54e5..6900ad9ca5e3a 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/CategoryTest.php @@ -133,16 +133,16 @@ public function testGetSetCurrentCategory() /* Category in registry */ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_category', $existingCategory); + $objectManager->get('Magento\Framework\Registry')->register('current_category', $existingCategory); try { $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Catalog\Model\Layer\Category' ); $this->assertSame($existingCategory, $model->getCurrentCategory()); - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); $this->assertSame($existingCategory, $model->getCurrentCategory()); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); throw $e; } @@ -151,9 +151,9 @@ public function testGetSetCurrentCategory() $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Catalog\Model\Layer\Category' ); - $model->setCurrentCategory(new \Magento\Object()); + $model->setCurrentCategory(new \Magento\Framework\Object()); $this->fail('Assign category of invalid class.'); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { } try { @@ -164,7 +164,7 @@ public function testGetSetCurrentCategory() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Catalog\Model\Category') ); $this->fail('Assign category with invalid id.'); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php index fc5d2337e0e6e..eec1e5f26d5da 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/AttributeTest.php @@ -85,9 +85,9 @@ public function testApplyInvalid() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); @@ -104,9 +104,9 @@ public function testApply() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php index c468e329e3e16..92f4fdc124aa9 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php @@ -68,14 +68,14 @@ public function testApplyNothing() $this->_model->apply( $objectManager->get('Magento\TestFramework\Request'), \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->assertNull($objectManager->get('Magento\Registry')->registry('current_category_filter')); + $this->assertNull($objectManager->get('Magento\Framework\Registry')->registry('current_category_filter')); } public function testApply() @@ -86,14 +86,14 @@ public function testApply() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); /** @var $category \Magento\Catalog\Model\Category */ - $category = $objectManager->get('Magento\Registry')->registry('current_category_filter'); + $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category_filter'); $this->assertInstanceOf('Magento\Catalog\Model\Category', $category); $this->assertEquals(3, $category->getId()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php index c1ed44c7d4330..20648330ea179 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/DecimalTest.php @@ -74,9 +74,9 @@ public function testApplyNothing() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); @@ -94,9 +94,9 @@ public function testApplyInvalid() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); @@ -113,9 +113,9 @@ public function testApply() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php index b8d0a8c10aa56..2d891318c39ab 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/ItemTest.php @@ -59,7 +59,7 @@ public function testGetFilter() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testGetFilterException() { @@ -111,9 +111,9 @@ public function testGetRemoveUrl() $this->_model->getFilter()->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php index f7ba5ea5b523b..f7780ba3565d9 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmAdvancedTest.php @@ -64,14 +64,14 @@ protected function _prepareFilter($request = null) /** @var $filter \Magento\Catalog\Model\Layer\Filter\Price */ $filter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Layer\Filter\Price', array('layer' => $layer)); - $filter->setLayer($layer)->setAttributeModel(new \Magento\Object(array('attribute_code' => 'price'))); + $filter->setLayer($layer)->setAttributeModel(new \Magento\Framework\Object(array('attribute_code' => 'price'))); if (!is_null($request)) { $filter->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); $interval = $filter->getInterval(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmBaseTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmBaseTest.php index a8474cf75370e..3d011b22a3b91 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmBaseTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/Price/AlgorithmBaseTest.php @@ -62,7 +62,7 @@ protected function setUp() ->create('Magento\Catalog\Model\Layer\Category'); $this->_filter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Layer\Filter\Price', array('layer' => $this->_layer)); - $this->_filter->setAttributeModel(new \Magento\Object(array('attribute_code' => 'price'))); + $this->_filter->setAttributeModel(new \Magento\Framework\Object(array('attribute_code' => 'price'))); } /** diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php index 7c4995a0ce380..48700ce761142 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/PriceTest.php @@ -102,9 +102,9 @@ public function testApplyNothing() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); @@ -122,9 +122,9 @@ public function testApplyInvalid() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); @@ -144,9 +144,9 @@ public function testApplyManual() $this->_model->apply( $request, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ) ); @@ -155,7 +155,10 @@ public function testApplyManual() public function testGetSetCustomerGroupId() { - $this->assertEquals(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID, $this->_model->getCustomerGroupId()); + $this->assertEquals( + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID, + $this->_model->getCustomerGroupId() + ); $customerGroupId = 123; $this->_model->setCustomerGroupId($customerGroupId); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php index b924be887800c..db467278ddd93 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php @@ -50,7 +50,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase public static function setUpBeforeClass() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config'); $mediaDirectory = $objectManager->get( 'Magento\Framework\App\Filesystem' @@ -76,7 +76,7 @@ public static function tearDownAfterClass() /** @var \Magento\Catalog\Model\Product\Media\Config $config */ $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config'); - /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $mediaDirectory = $objectManager->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/TierpriceTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/TierpriceTest.php index 9837bf5fb8654..ac8cf522a0d44 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/TierpriceTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/TierpriceTest.php @@ -55,7 +55,7 @@ protected function setUp() public function testValidate() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $product->setTierPrice( array( array('website_id' => 0, 'cust_group' => 1, 'price_qty' => 2, 'price' => 8), @@ -66,11 +66,11 @@ public function testValidate() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testValidateDuplicate() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $product->setTierPrice( array( array('website_id' => 0, 'cust_group' => 1, 'price_qty' => 2, 'price' => 8), @@ -82,11 +82,11 @@ public function testValidateDuplicate() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testValidateDuplicateWebsite() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $product->setTierPrice( array( array('website_id' => 0, 'cust_group' => 1, 'price_qty' => 2, 'price' => 8), diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Compare/ListCompareTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Compare/ListCompareTest.php index b2190e5060251..c145e14830178 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Compare/ListCompareTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Compare/ListCompareTest.php @@ -50,8 +50,9 @@ protected function setUp() ->get('Magento\Customer\Model\Session'); $this->_visitor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Log\Model\Visitor'); - /** @var \Magento\Stdlib\DateTime $dateTime */ - $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Stdlib\DateTime'); + /** @var \Magento\Framework\Stdlib\DateTime $dateTime */ + $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Stdlib\DateTime'); $this->_visitor->setSessionId(md5(time()) . md5(microtime())) ->setLastVisitAt($dateTime->now()) ->save(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php index b2b4a9d3430a8..49f28f1cc5db6 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php @@ -52,7 +52,7 @@ public function testSetBaseFilePlaceholder() */ public function testSaveFilePlaceholder($model) { - $processor = $this->getMock('Magento\Image', array('save'), array(), '', false); + $processor = $this->getMock('Magento\Framework\Image', array('save'), array(), '', false); $processor->expects($this->exactly(0))->method('save'); $model->setImageProcessor($processor)->saveFile(); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php index 49a862dacf7df..f34962b2ce2aa 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php @@ -41,12 +41,18 @@ protected function setUp() ); $eavConfig = $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false); $catalogProductType = $this->getMock('Magento\Catalog\Model\Product\Type', array(), array(), '', false); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array('dispatch'), array(), '', false); + $eventManager = $this->getMock( + 'Magento\Framework\Event\ManagerInterface', + array('dispatch'), + array(), + '', + false + ); $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); $fileStorageDb = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false); $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $registry = $this->getMock('Magento\Registry', array(), array(), '', false); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $registry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->_model = $this->getMockForAbstractClass( 'Magento\Catalog\Model\Product\Type\AbstractType', array( @@ -67,7 +73,7 @@ protected function setUp() public function testGetRelationInfo() { $info = $this->_model->getRelationInfo(); - $this->assertInstanceOf('Magento\Object', $info); + $this->assertInstanceOf('Magento\Framework\Object', $info); $this->assertNotSame($info, $this->_model->getRelationInfo()); } @@ -102,9 +108,9 @@ public function testGetSetAttributes() public function testAttributesCompare() { - $attribute[1] = new \Magento\Object(array('group_sort_path' => 1, 'sort_path' => 10)); - $attribute[2] = new \Magento\Object(array('group_sort_path' => 1, 'sort_path' => 5)); - $attribute[3] = new \Magento\Object(array('group_sort_path' => 2, 'sort_path' => 10)); + $attribute[1] = new \Magento\Framework\Object(array('group_sort_path' => 1, 'sort_path' => 10)); + $attribute[2] = new \Magento\Framework\Object(array('group_sort_path' => 1, 'sort_path' => 5)); + $attribute[3] = new \Magento\Framework\Object(array('group_sort_path' => 2, 'sort_path' => 10)); $this->assertEquals(1, $this->_model->attributesCompare($attribute[1], $attribute[2])); $this->assertEquals(-1, $this->_model->attributesCompare($attribute[2], $attribute[1])); $this->assertEquals(-1, $this->_model->attributesCompare($attribute[1], $attribute[3])); @@ -201,11 +207,11 @@ public function testPrepareForCart() $this->assertEmpty($product->getCustomOption('info_buyRequest')); $requestData = array('qty' => 5); - $result = $this->_model->prepareForCart(new \Magento\Object($requestData), $product); + $result = $this->_model->prepareForCart(new \Magento\Framework\Object($requestData), $product); $this->assertArrayHasKey(0, $result); $this->assertSame($product, $result[0]); $buyRequest = $product->getCustomOption('info_buyRequest'); - $this->assertInstanceOf('Magento\Object', $buyRequest); + $this->assertInstanceOf('Magento\Framework\Object', $buyRequest); $this->assertEquals($product->getId(), $buyRequest->getProductId()); $this->assertSame($product, $buyRequest->getProduct()); $this->assertEquals(serialize($requestData), $buyRequest->getValue()); @@ -223,7 +229,7 @@ public function testPrepareForCartOptionsException() // fixture $this->assertEquals( 'Please specify the product\'s required option(s).', - $this->_model->prepareForCart(new \Magento\Object(), $product) + $this->_model->prepareForCart(new \Magento\Framework\Object(), $product) ); } @@ -247,7 +253,7 @@ public function testCheckProductBuyState() /** * @magentoDataFixture Magento/Catalog/_files/product_simple.php - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testCheckProductBuyStateException() { @@ -272,7 +278,7 @@ public function testGetOrderOptions() $product->load(1); // fixture - $product->addCustomOption('info_buyRequest', serialize(new \Magento\Object(array('qty' => 2)))); + $product->addCustomOption('info_buyRequest', serialize(new \Magento\Framework\Object(array('qty' => 2)))); foreach ($product->getOptions() as $id => $option) { if ('field' == $option->getType()) { $product->addCustomOption('option_ids', $id); @@ -358,7 +364,7 @@ public function testGetOptionSku() public function testGetWeight() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $this->assertEmpty($this->_model->getWeight($product)); $product->setWeight('value'); $this->assertEquals('value', $this->_model->getWeight($product)); @@ -368,19 +374,19 @@ public function testHasOptions() { $this->markTestIncomplete('Bug MAGE-2814'); - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $this->assertFalse($this->_model->hasOptions($product)); - $product = new \Magento\Object(array('has_options' => true)); + $product = new \Magento\Framework\Object(array('has_options' => true)); $this->assertTrue($this->_model->hasOptions($product)); - $product = new \Magento\Object(array('is_recurring' => 1)); + $product = new \Magento\Framework\Object(array('is_recurring' => 1)); $this->assertTrue($this->_model->hasOptions($product)); } public function testHasRequiredOptions() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $this->assertFalse($this->_model->hasRequiredOptions($product)); $product->setRequiredOptions(1); $this->assertTrue($this->_model->hasRequiredOptions($product)); @@ -388,7 +394,7 @@ public function testHasRequiredOptions() public function testGetSetStoreFilter() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $this->assertNull($this->_model->getStoreFilter($product)); $store = new \StdClass(); $this->_model->setStoreFilter($store, $product); @@ -417,12 +423,12 @@ public function testPrepareQuoteItemQty() public function testAssignProductToOption() { - $product = new \Magento\Object(); - $option = new \Magento\Object(); + $product = new \Magento\Framework\Object(); + $option = new \Magento\Framework\Object(); $this->_model->assignProductToOption($product, $option, $product); $this->assertSame($product, $option->getProduct()); - $option = new \Magento\Object(); + $option = new \Magento\Framework\Object(); $this->_model->assignProductToOption(null, $option, $product); $this->assertSame($product, $option->getProduct()); } @@ -487,7 +493,7 @@ public function testCheckProductConfiguration() $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Catalog\Model\Product' ); - $buyRequest = new \Magento\Object(array('qty' => 5)); + $buyRequest = new \Magento\Framework\Object(array('qty' => 5)); $this->_model->checkProductConfiguration($product, $buyRequest); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/PriceTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/PriceTest.php index b313a1fc8b691..2c0018243b75f 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/PriceTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/PriceTest.php @@ -45,7 +45,7 @@ protected function setUp() public function testGetPrice() { - $this->assertEquals('test', $this->_model->getPrice(new \Magento\Object(array('price' => 'test')))); + $this->assertEquals('test', $this->_model->getPrice(new \Magento\Framework\Object(array('price' => 'test')))); } public function testGetFinalPrice() diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php index 383cf43ea1f82..f495494b6b890 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php @@ -47,7 +47,7 @@ protected function setUp() */ public function testFactory($typeId, $expectedClass) { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); if ($typeId) { $product->setTypeId($typeId); } @@ -78,7 +78,7 @@ public function factoryDataProvider() */ public function testFactoryReturnsSingleton($typeId) { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); if ($typeId) { $product->setTypeId($typeId); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php index d8f37a05581a8..28d365ada0b58 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/UrlTest.php @@ -48,7 +48,7 @@ protected function setUp() public function testGetUrlInstance() { $instance = $this->_model->getUrlInstance(); - $this->assertInstanceOf('Magento\Url', $instance); + $this->assertInstanceOf('Magento\Framework\Url', $instance); $this->assertSame($instance, $this->_model->getUrlInstance()); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php index 4f63b151cdd2b..a52466244b7cd 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php @@ -70,15 +70,15 @@ public function testGetLinkInstance() public function testGetCategoryId() { $this->assertFalse($this->_model->getCategoryId()); - $category = new \Magento\Object(array('id' => 5)); + $category = new \Magento\Framework\Object(array('id' => 5)); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_category', $category); + $objectManager->get('Magento\Framework\Registry')->register('current_category', $category); try { $this->assertEquals(5, $this->_model->getCategoryId()); - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); throw $e; } } @@ -89,15 +89,16 @@ public function testGetCategory() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_category', new \Magento\Object(array('id' => 3))); + $objectManager->get('Magento\Framework\Registry') + ->register('current_category', new \Magento\Framework\Object(array('id' => 3))); // fixture try { $category = $this->_model->getCategory(); $this->assertInstanceOf('Magento\Catalog\Model\Category', $category); $this->assertEquals(3, $category->getId()); - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); } catch (\Exception $e) { - $objectManager->get('Magento\Registry')->unregister('current_category'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_category'); throw $e; } @@ -299,7 +300,7 @@ public function testCustomOptionsApi() $this->_model->setId(99); $this->_model->addCustomOption('one', 'value1'); $option = $this->_model->getCustomOption('one'); - $this->assertInstanceOf('Magento\Object', $option); + $this->assertInstanceOf('Magento\Framework\Object', $option); $this->assertEquals($this->_model->getId(), $option->getProductId()); $this->assertSame($option->getProduct(), $this->_model); $this->assertEquals('one', $option->getCode()); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php index 4983cec4b12b1..ecee894b0a355 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php @@ -184,9 +184,9 @@ public function testGetMediaGalleryImages() $this->_model->setMediaGallery(array('images' => array(array('file' => 'magento_image.jpg')))); $images = $this->_model->getMediaGalleryImages(); - $this->assertInstanceOf('Magento\Data\Collection', $images); + $this->assertInstanceOf('Magento\Framework\Data\Collection', $images); foreach ($images as $image) { - $this->assertInstanceOf('Magento\Object', $image); + $this->assertInstanceOf('Magento\Framework\Object', $image); $image = $image->getData(); $this->assertArrayHasKey('file', $image); $this->assertArrayHasKey('url', $image); @@ -260,7 +260,7 @@ public function testGetDefaultAttributeSetId() public function testGetPreconfiguredValues() { - $this->assertInstanceOf('Magento\Object', $this->_model->getPreconfiguredValues()); + $this->assertInstanceOf('Magento\Framework\Object', $this->_model->getPreconfiguredValues()); $this->_model->setPreconfiguredValues('test'); $this->assertEquals('test', $this->_model->getPreconfiguredValues()); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php index 3af8113004152..d710f681a8845 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php @@ -54,7 +54,7 @@ public static function tearDownAfterClass() /** @var \Magento\Catalog\Model\Product\Media\Config $config */ $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config'); - /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $mediaDirectory = $objectManager->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( @@ -155,7 +155,7 @@ protected function _copyFileToBaseTmpMediaPath($sourceFile) /** @var \Magento\Catalog\Model\Product\Media\Config $config */ $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config'); - /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $mediaDirectory = $objectManager->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( @@ -216,7 +216,7 @@ public function testDuplicateSkuGeneration() /** * Delete model * - * @param \Magento\Model\AbstractModel $duplicate + * @param \Magento\Framework\Model\AbstractModel $duplicate */ protected function _undo($duplicate) { @@ -378,7 +378,7 @@ public function testReset() /** * Check is model empty or not * - * @param \Magento\Model\AbstractModel $model + * @param \Magento\Framework\Model\AbstractModel $model */ protected function _assertEmpty($model) { @@ -400,9 +400,9 @@ public function testIsProductsHasSku() public function testProcessBuyRequest() { - $request = new \Magento\Object(); + $request = new \Magento\Framework\Object(); $result = $this->_model->processBuyRequest($request); - $this->assertInstanceOf('Magento\Object', $result); + $this->assertInstanceOf('Magento\Framework\Object', $result); $this->assertArrayHasKey('errors', $result->getData()); } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php index f1aea2936e6ea..87bf9867b4829 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/UrlTest.php @@ -83,7 +83,7 @@ public function testGetStoreRootCategory() { $root = $this->_model->getStoreRootCategory(1); $this->assertNotEmpty($root); - $this->assertInstanceOf('Magento\Object', $root); + $this->assertInstanceOf('Magento\Framework\Object', $root); $this->assertEquals(2, $root->getId()); $this->assertEquals(1, $root->getParentId()); } @@ -173,10 +173,10 @@ public function testGetCategoryUrlSuffix() public function testGetProductRequestPath() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $product->setName('test product')->setId(uniqid()); - $category = new \Magento\Object(); + $category = new \Magento\Framework\Object(); $category->setName('test category')->setId(uniqid())->setLevel(2)->setUrlPath('test/category'); $this->assertEquals( @@ -186,7 +186,7 @@ public function testGetProductRequestPath() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testGeneratePathDefault() { @@ -195,10 +195,10 @@ public function testGeneratePathDefault() public function generatePathDataProvider() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $product->setName('test product')->setId(111); - $category = new \Magento\Object(); + $category = new \Magento\Framework\Object(); $category->setName('test category')->setId(999)->setLevel(2)->setUrlPath('test/category')->setParentId(3); return array( diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php index 18463137199a3..e39c1be9a32f0 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php @@ -30,7 +30,7 @@ 'Magento\Catalog\Model\Product\Media\Config' ); -/** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ +/** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( diff --git a/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php b/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php index fb0c680c9edf9..39f7236656a16 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php @@ -30,7 +30,7 @@ $obectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var \Magento\Catalog\Model\Product\Media\Config $config */ $config = $obectManager->get('Magento\Catalog\Model\Product\Media\Config'); -/** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ +/** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $mediaDirectory = $obectManager->get('Magento\Framework\App\Filesystem') ->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); diff --git a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php index 2b962da6dd4b5..ef77a4ad12ad6 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php @@ -133,11 +133,11 @@ public function testSetGetEnableQtyIncrements() public function testSetGetProduct() { $this->assertNull($this->_model->getProduct()); - $productOne = new \Magento\Object(); + $productOne = new \Magento\Framework\Object(); $this->_model->setData('product', $productOne); $this->assertSame($productOne, $this->_model->getProduct()); - $productTwo = new \Magento\Object(); + $productTwo = new \Magento\Framework\Object(); $this->_model->setProduct($productTwo); $this->assertSame($productTwo, $this->_model->getProduct()); } diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/MainTest.php b/dev/tests/integration/testsuite/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/MainTest.php index c70947a84209a..df10f859cdaae 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/MainTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/MainTest.php @@ -41,15 +41,15 @@ public function testPrepareForm() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->setDefaultDesignTheme(); $rule = $objectManager->create('Magento\CatalogRule\Model\Rule'); - $objectManager->get('Magento\Registry')->register('current_promo_catalog_rule', $rule); + $objectManager->get('Magento\Framework\Registry')->register('current_promo_catalog_rule', $rule); $block = $objectManager->create('Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Main'); - $block->setLayout($objectManager->create('Magento\View\Layout')); + $block->setLayout($objectManager->create('Magento\Framework\View\Layout')); $prepareFormMethod = new \ReflectionMethod( 'Magento\CatalogRule\Block\Adminhtml\Promo\Catalog\Edit\Tab\Main', '_prepareForm' diff --git a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/catalog_rule_10_off_not_logged.php b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/catalog_rule_10_off_not_logged.php index f04996d321a85..15605cd20c425 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogRule/_files/catalog_rule_10_off_not_logged.php +++ b/dev/tests/integration/testsuite/Magento/CatalogRule/_files/catalog_rule_10_off_not_logged.php @@ -30,18 +30,13 @@ /** @var $banner \Magento\CatalogRule\Model\Rule */ $catalogRule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\CatalogRule\Model\Rule'); -$catalogRule->setIsActive( - 1 -)->setName( - 'Test Catalog Rule' -)->setCustomerGroupIds( - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID -)->setDiscountAmount( - 10 -)->setWebsiteIds( - array(0 => 1) -)->setSimpleAction( - 'by_percent' -)->save(); +$catalogRule + ->setIsActive(1) + ->setName('Test Catalog Rule') + ->setCustomerGroupIds(\Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID) + ->setDiscountAmount(10) + ->setWebsiteIds(array(0 => 1)) + ->setSimpleAction('by_percent') + ->save(); $catalogRule->applyAll(); diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php index a17d462c74379..32363aaa23280 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/Advanced/ResultTest.php @@ -29,7 +29,7 @@ class ResultTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -41,7 +41,7 @@ class ResultTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); $this->_block = $this->_layout->createBlock('Magento\CatalogSearch\Block\Advanced\Result', 'block'); } @@ -70,7 +70,7 @@ public function testSetListOrders() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Catalog\Model\Layer\Search') ->setCurrentCategory($category); - $childBlock = $this->_layout->addBlock('Magento\View\Element\Text', 'search_result_list', 'block'); + $childBlock = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'search_result_list', 'block'); $expectedOptions = array('option1' => 'Label Option 1', 'option3' => 'Label Option 2'); $this->assertNotEquals($expectedOptions, $childBlock->getAvailableOrders()); @@ -83,8 +83,8 @@ public function testSetListOrders() */ public function testSetListModes() { - /** @var $childBlock \Magento\View\Element\Text */ - $childBlock = $this->_layout->addBlock('Magento\View\Element\Text', 'search_result_list', 'block'); + /** @var $childBlock \Magento\Framework\View\Element\Text */ + $childBlock = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'search_result_list', 'block'); $this->assertEmpty($childBlock->getModes()); $this->_block->setListModes(); $this->assertNotEmpty($childBlock->getModes()); @@ -92,8 +92,8 @@ public function testSetListModes() public function testSetListCollection() { - /** @var $childBlock \Magento\View\Element\Text */ - $childBlock = $this->_layout->addBlock('Magento\View\Element\Text', 'search_result_list', 'block'); + /** @var $childBlock \Magento\Framework\View\Element\Text */ + $childBlock = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'search_result_list', 'block'); $this->assertEmpty($childBlock->getCollection()); $this->_block->setListCollection(); $this->assertInstanceOf( diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php index 3e52a9f525ff9..1918e253b830f 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/ResultTest.php @@ -30,13 +30,15 @@ class ResultTest extends \PHPUnit_Framework_TestCase { public function testSetListOrders() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $layout->addBlock('Magento\View\Element\Text', 'head'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); + $layout->addBlock('Magento\Framework\View\Element\Text', 'head'); // The tested block is using head block /** @var $block \Magento\CatalogSearch\Block\Result */ $block = $layout->addBlock('Magento\CatalogSearch\Block\Result', 'block'); - $childBlock = $layout->addBlock('Magento\View\Element\Text', 'search_result_list', 'block'); + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Text', 'search_result_list', 'block'); $this->assertSame($childBlock, $block->getListBlock()); } diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/TermTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/TermTest.php index 5e7e0c0184b27..2ca3863eca319 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/TermTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Block/TermTest.php @@ -36,7 +36,7 @@ class TermTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\CatalogSearch\Block\Term' ); @@ -45,7 +45,7 @@ protected function setUp() public function testGetSearchUrl() { $query = uniqid(); - $obj = new \Magento\Object(array('name' => $query)); + $obj = new \Magento\Framework\Object(array('name' => $query)); $this->assertStringEndsWith("/catalogsearch/result/?q={$query}", $this->_block->getSearchUrl($obj)); } } diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php index 0f0b55c924da8..84d210f44d1a3 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/ResultTest.php @@ -34,7 +34,7 @@ class ResultTest extends \Magento\TestFramework\TestCase\AbstractController public function testIndexActionTranslation() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Locale\ResolverInterface')->setLocale('de_DE'); + $objectManager->get('Magento\Framework\Locale\ResolverInterface')->setLocale('de_DE'); $this->getRequest()->setParam('q', 'query_text'); $this->dispatch('catalogsearch/result'); diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php index 4731a6702c497..a10ff0608eb8f 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Helper/DataTest.php @@ -73,11 +73,11 @@ public function testCheckNotesEscapesHtmlWhenQueryIsCut() array('getQueryText'), array( $objectManager->get('Magento\Framework\App\Helper\Context'), - $objectManager->get('Magento\Stdlib\String'), + $objectManager->get('Magento\Framework\Stdlib\String'), $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface'), $objectManager->get('Magento\CatalogSearch\Model\QueryFactory'), - $objectManager->get('Magento\Escaper'), - $objectManager->get('Magento\Filter\FilterManager') + $objectManager->get('Magento\Framework\Escaper'), + $objectManager->get('Magento\Framework\Filter\FilterManager') ) ); $catalogSearchHelper->expects( diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php index 76ea3b2ce3200..e3df54a5c14c7 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php @@ -39,9 +39,10 @@ class RendererTest extends \PHPUnit_Framework_TestCase protected function setUp() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); - $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Checkout\Block\Cart\Item\Renderer'); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); + $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + )->createBlock('Magento\Checkout\Block\Cart\Item\Renderer'); /** @var $item \Magento\Sales\Model\Quote\Item */ $item = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Sales\Model\Quote\Item'); $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php index 56e14a9fa646b..366d10ef14afc 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php @@ -35,11 +35,11 @@ protected function setUp() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Checkout\Block\Cart\Sidebar' ); - $this->_block->addChild('renderer.list', '\Magento\View\Element\RendererList'); + $this->_block->addChild('renderer.list', '\Magento\Framework\View\Element\RendererList'); $this->_block->getChildBlock( 'renderer.list' )->addChild( diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php index 0f971a2b538d3..bc3805862a151 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/CartTest.php @@ -34,16 +34,18 @@ class CartTest extends \PHPUnit_Framework_TestCase { public function testGetMethods() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $child = $layout->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' )->setChild( 'child1', - $layout->createBlock('Magento\View\Element\Text', 'method1') + $layout->createBlock('Magento\Framework\View\Element\Text', 'method1') )->setChild( 'child2', - $layout->createBlock('Magento\View\Element\Text', 'method2') + $layout->createBlock('Magento\Framework\View\Element\Text', 'method2') ); /** @var $block \Magento\Checkout\Block\Cart */ $block = $layout->createBlock('Magento\Checkout\Block\Cart')->setChild('child', $child); @@ -53,9 +55,11 @@ public function testGetMethods() public function testGetMethodsEmptyChild() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - $childEmpty = $layout->createBlock('Magento\View\Element\Text'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); + $childEmpty = $layout->createBlock('Magento\Framework\View\Element\Text'); /** @var $block \Magento\Checkout\Block\Cart */ $block = $layout->createBlock('Magento\Checkout\Block\Cart')->setChild('child', $childEmpty); $methods = $block->getMethods('child'); @@ -64,8 +68,10 @@ public function testGetMethodsEmptyChild() public function testGetMethodsNoChild() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Checkout\Block\Cart */ $block = $layout->createBlock('Magento\Checkout\Block\Cart'); $methods = $block->getMethods('child'); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/BillingTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/BillingTest.php index 7826fa172b450..f0580a2080b68 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/BillingTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/BillingTest.php @@ -83,7 +83,7 @@ protected function setUp() $objectManager->get('Magento\Framework\App\Http\Context') ->setValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH, true, false); - $this->_block = $objectManager->get('Magento\View\LayoutInterface') + $this->_block = $objectManager->get('Magento\Framework\View\LayoutInterface') ->createBlock( 'Magento\Checkout\Block\Onepage\Billing', '', diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php index 93e3e05a88aec..dd2ea5bb4170f 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Block/Onepage/Payment/MethodsTest.php @@ -41,7 +41,7 @@ protected function setUp() { parent::setUp(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Checkout\Block\Onepage\Payment\Methods' ); @@ -59,7 +59,7 @@ public function testGetMethodTitleAndMethodLabelAfterHtml() ); $block = $this->_block->getLayout()->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' )->setMethodTitle( $expectedTitle )->setMethodLabelAfterHtml( diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php index c4ad24f9415c9..2bc50a2b3d6ed 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php @@ -48,7 +48,7 @@ public function testConfigureActionWithSimpleProduct() $this->dispatch('checkout/cart/configure/id/' . $quoteItem->getId()); $response = $this->getResponse(); - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); $this->assertSelectCount( 'button[type="button"][title="Update Cart"]', @@ -74,7 +74,7 @@ public function testConfigureActionWithSimpleProductAndCustomOption() $this->dispatch('checkout/cart/configure/id/' . $quoteItem->getId()); $response = $this->getResponse(); - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); $this->assertSelectCount( 'button[type="button"][title="Update Cart"]', @@ -107,7 +107,7 @@ public function testConfigureActionWithBundleProduct() $this->dispatch('checkout/cart/configure/id/' . $quoteItem->getId()); $response = $this->getResponse(); - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); $this->assertSelectCount( 'button[type="button"][title="Update Cart"]', @@ -133,7 +133,7 @@ public function testConfigureActionWithDownloadableProduct() $this->dispatch('checkout/cart/configure/id/' . $quoteItem->getId()); $response = $this->getResponse(); - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); $this->assertSelectCount( 'button[type="button"][title="Update Cart"]', @@ -166,8 +166,8 @@ public function testUpdatePostAction() $checkoutSession = $this->_objectManager->create('Magento\Checkout\Model\Session'); $quoteItem = $this->_getQuoteItemIdByProductId($checkoutSession->getQuote(), $productId); - /** @var \Magento\Data\Form\FormKey $formKey */ - $formKey = $this->_objectManager->get('Magento\Data\Form\FormKey'); + /** @var \Magento\Framework\Data\Form\FormKey $formKey */ + $formKey = $this->_objectManager->get('Magento\Framework\Data\Form\FormKey'); $postData = array( 'cart' => array($quoteItem->getId() => array('qty' => $updatedQuantity)), 'update_cart_action' => 'update_qty', diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php index 38eb69f51b70d..d0c4f2a7790a2 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php @@ -103,7 +103,7 @@ public function testSaveOrderActionWithoutFormKey() public function testSaveOrderActionWithFormKey() { - $formKey = $this->_objectManager->get('\Magento\Data\Form\FormKey'); + $formKey = $this->_objectManager->get('\Magento\Framework\Data\Form\FormKey'); $this->getRequest()->setParam('form_key', $formKey->getFormKey()); $this->dispatch('checkout/onepage/saveOrder'); $html = $this->getResponse()->getBody(); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Model/Type/OnepageTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Model/Type/OnepageTest.php index 0e1099da583e8..d65471a62ce10 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/Model/Type/OnepageTest.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/Model/Type/OnepageTest.php @@ -562,7 +562,7 @@ protected function _getCustomerData() 'firstname' => 'John', 'lastname' => 'Smith', 'email' => 'John.Smith@example.com', - 'street' => array(0 => '6131 Monterey Rd, Apt 1', 1 => ''), + 'street' => ['6131 Monterey Rd, Apt 1', ''], 'city' => 'Los Angeles', 'postcode' => '90042', 'country_id' => 'US', diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/cart.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/cart.php index 8284a60d1247b..0aa9473c74034 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/cart.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/cart.php @@ -27,8 +27,8 @@ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$objectManager->get('Magento\Registry')->unregister('_singleton/Magento\Checkout\Model\Session'); -$objectManager->get('Magento\Registry')->unregister('_singleton/Magento_Checkout_Model_Cart'); +$objectManager->get('Magento\Framework\Registry')->unregister('_singleton/Magento\Checkout\Model\Session'); +$objectManager->get('Magento\Framework\Registry')->unregister('_singleton/Magento_Checkout_Model_Cart'); /** @var $cart \Magento\Checkout\Model\Cart */ $cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Checkout\Model\Cart'); @@ -36,6 +36,6 @@ $cart->save(); $quoteItemId = $cart->getQuote()->getItemByProduct($product)->getId(); -$objectManager->get('Magento\Registry')->register('product/quoteItemId', $quoteItemId); -$objectManager->get('Magento\Registry')->unregister('_singleton/Magento\Checkout\Model\Session'); -$objectManager->get('Magento\Registry')->unregister('_singleton/Magento_Checkout_Model_Cart'); +$objectManager->get('Magento\Framework\Registry')->register('product/quoteItemId', $quoteItemId); +$objectManager->get('Magento\Framework\Registry')->unregister('_singleton/Magento\Checkout\Model\Session'); +$objectManager->get('Magento\Framework\Registry')->unregister('_singleton/Magento_Checkout_Model_Cart'); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/discount_10percent.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/discount_10percent.php index c249f7796163e..35d69af53759a 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/discount_10percent.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/discount_10percent.php @@ -35,7 +35,7 @@ 'Magento\Store\Model\StoreManagerInterface' )->getStore()->getWebsiteId() ), - 'customer_group_ids' => array(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID), + 'customer_group_ids' => array(\Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID), 'coupon_type' => \Magento\SalesRule\Model\Rule::COUPON_TYPE_SPECIFIC, 'coupon_code' => uniqid(), 'simple_action' => \Magento\SalesRule\Model\Rule::BY_PERCENT_ACTION, diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/product_bundle.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/product_bundle.php index 2f37bad017241..d29d03ef95b10 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/product_bundle.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/product_bundle.php @@ -113,7 +113,7 @@ $bundleOptionsQty[$option->getId()] = 1; } -$requestInfo = new \Magento\Object( +$requestInfo = new \Magento\Framework\Object( array('qty' => 1, 'bundle_option' => $bundleOptions, 'bundle_option_qty' => $bundleOptionsQty) ); $product->setSkipCheckRequiredOption(true); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/product_with_custom_option.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/product_with_custom_option.php index e28915c4bdc10..f42676b10995d 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/product_with_custom_option.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/product_with_custom_option.php @@ -58,6 +58,6 @@ $product->load(1); $optionId = key($product->getOptions()); -$requestInfo = new \Magento\Object(array('qty' => 1, 'options' => array($optionId => 'test'))); +$requestInfo = new \Magento\Framework\Object(array('qty' => 1, 'options' => array($optionId => 'test'))); require __DIR__ . '/../../Checkout/_files/cart.php'; diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product.php index 5bec5c50bcdfa..07c6137cfc5f6 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product.php @@ -48,7 +48,7 @@ $bundleOptionsQty[$option->getId()] = 1; } -$requestInfo = new \Magento\Object( +$requestInfo = new \Magento\Framework\Object( array('qty' => 1, 'bundle_option' => $bundleOptions, 'bundle_option_qty' => $bundleOptionsQty) ); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_check_payment_rollback.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_check_payment_rollback.php index c9fa580f7f778..7b6ca6f4cffa7 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_check_payment_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_check_payment_rollback.php @@ -26,4 +26,4 @@ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$objectManager->get('Magento\Registry')->unregister('quote'); +$objectManager->get('Magento\Framework\Registry')->unregister('quote'); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_downloadable_product.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_downloadable_product.php index 19a43a5e41380..a97b286aa6c84 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_downloadable_product.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_downloadable_product.php @@ -45,7 +45,7 @@ /** @var $link \Magento\Downloadable\Model\Link */ $link = $linkCollection->getFirstItem(); -$requestInfo = new \Magento\Object(array('qty' => 1, 'links' => array($link->getId()))); +$requestInfo = new \Magento\Framework\Object(array('qty' => 1, 'links' => array($link->getId()))); /** @var $cart \Magento\Checkout\Model\Cart */ $cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Checkout\Model\Cart'); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product.php index 57d6ec7a0d6e5..95c779edde0f9 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product.php @@ -31,7 +31,7 @@ $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Catalog\Model\Product'); $product->load(1); -$requestInfo = new \Magento\Object(array('qty' => 1)); +$requestInfo = new \Magento\Framework\Object(array('qty' => 1)); /** @var $cart \Magento\Checkout\Model\Cart */ $cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Checkout\Model\Cart'); diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_and_custom_option.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_and_custom_option.php index 20b7ade6c3037..e510965d701c0 100644 --- a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_and_custom_option.php +++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_simple_product_and_custom_option.php @@ -49,7 +49,7 @@ $options[$option->getId()] = $value; } -$requestInfo = new \Magento\Object(array('qty' => 1, 'options' => $options)); +$requestInfo = new \Magento\Framework\Object(array('qty' => 1, 'options' => $options)); /** @var $cart \Magento\Checkout\Model\Cart */ $cart = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Checkout\Model\Cart'); diff --git a/dev/tests/integration/testsuite/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/DesignTest.php b/dev/tests/integration/testsuite/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/DesignTest.php index d34763adcc59c..937a384ffd989 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/DesignTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/DesignTest.php @@ -40,17 +40,17 @@ public function testPrepareForm() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->setDefaultDesignTheme(); $objectManager->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'cms_page', $objectManager->create('Magento\Cms\Model\Page') diff --git a/dev/tests/integration/testsuite/Magento/Cms/Block/BlockTest.php b/dev/tests/integration/testsuite/Magento/Cms/Block/BlockTest.php index e213f9dcffd88..a78b508a913e0 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Block/BlockTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Block/BlockTest.php @@ -40,7 +40,7 @@ public function testToHtml() $cmsBlock->load('fixture_block', 'identifier'); /** @var $block \Magento\Cms\Block\Block */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Cms\Block\Block' ); diff --git a/dev/tests/integration/testsuite/Magento/Cms/Block/Widget/BlockTest.php b/dev/tests/integration/testsuite/Magento/Cms/Block/Widget/BlockTest.php index 34f7c0c708ab4..9ad5eb06cdcd2 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Block/Widget/BlockTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Block/Widget/BlockTest.php @@ -40,7 +40,7 @@ public function testToHtml() $cmsBlock->load('fixture_block', 'identifier'); /** @var $block \Magento\Cms\Block\Widget\Block */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Cms\Block\Widget\Block' ); diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php index dc4013df630e8..f8654f9c243b2 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php @@ -38,13 +38,13 @@ protected function setUp() $this->markTestIncomplete('MAGETWO-3393'); $this->_model = new \Magento\Cms\Controller\Router( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\ActionFactory'), - new \Magento\Event\ManagerInterfaceStub( - $this->getMockForAbstractClass('Magento\Event\InvokerInterface'), - $this->getMock('Magento\Event\Config', array(), array(), '', false), - $this->getMock('Magento\EventFactory', array(), array(), '', false), - $this->getMock('Magento\Event\ObserverFactory', array(), array(), '', false) + new \Magento\Framework\Event\ManagerInterfaceStub( + $this->getMockForAbstractClass('Magento\Framework\Event\InvokerInterface'), + $this->getMock('Magento\Framework\Event\Config', array(), array(), '', false), + $this->getMock('Magento\Framework\EventFactory', array(), array(), '', false), + $this->getMock('Magento\Framework\Event\ObserverFactory', array(), array(), '', false) ), - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\UrlInterface'), + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\UrlInterface'), \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\StateInterface'), \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Cms\Model\PageFactory'), \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( @@ -73,7 +73,7 @@ public function testMatch() /** * Event manager stub */ -namespace Magento\Event; +namespace Magento\Framework\Event; class ManagerStub extends Manager { diff --git a/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php index a31f071cc0495..78ca77c60ebda 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Helper/PageTest.php @@ -63,7 +63,9 @@ public function testRenderPage() ), $page->getId() ); - $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface'); + $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\DesignInterface' + ); $this->assertEquals('Magento/blank', $design->getDesignTheme()->getThemePath()); $this->assertTrue($result); } diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php index 2a7d60c5729f4..cee72b9bf7285 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php @@ -39,7 +39,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -54,7 +54,7 @@ protected function setUp() public function testGetConfig() { $config = $this->_model->getConfig(); - $this->assertInstanceOf('Magento\Object', $config); + $this->assertInstanceOf('Magento\Framework\Object', $config); } /** diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php index ffdb299f4ba34..d3bc5cc752338 100644 --- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php +++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php @@ -49,7 +49,7 @@ public static function setUpBeforeClass() public static function tearDownAfterClass() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Filesystem\Driver\File' + 'Magento\Framework\Filesystem\Driver\File' )->deleteDirectory( self::$_baseDir ); @@ -63,14 +63,14 @@ public function testGetFilesCollection() \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\View\DesignInterface') + $objectManager->get('Magento\Framework\View\DesignInterface') ->setDesignTheme('Magento/backend'); /** @var $model \Magento\Cms\Model\Wysiwyg\Images\Storage */ $model = $objectManager->create('Magento\Cms\Model\Wysiwyg\Images\Storage'); $collection = $model->getFilesCollection(self::$_baseDir, 'media'); $this->assertInstanceOf('Magento\Cms\Model\Wysiwyg\Images\Storage\Collection', $collection); foreach ($collection as $item) { - $this->assertInstanceOf('Magento\Object', $item); + $this->assertInstanceOf('Magento\Framework\Object', $item); $this->assertStringEndsWith('/1.swf', $item->getUrl()); $this->assertStringMatchesFormat( 'http://%s/static/adminhtml/%s/%s/Magento_Cms/images/placeholder_thumbnail.jpg', @@ -89,8 +89,8 @@ public function testGetThumbsPath() $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $session = $objectManager->get('Magento\Backend\Model\Session'); $backendUrl = $objectManager->get('Magento\Backend\Model\UrlInterface'); - $imageFactory = $objectManager->get('Magento\Image\AdapterFactory'); - $viewUrl = $objectManager->get('Magento\View\Url'); + $imageFactory = $objectManager->get('Magento\Framework\Image\AdapterFactory'); + $viewUrl = $objectManager->get('Magento\Framework\View\Url'); $imageHelper = $objectManager->get('Magento\Cms\Helper\Wysiwyg\Images'); $coreFileStorageDb = $objectManager->get('Magento\Core\Helper\File\Storage\Database'); $storageCollectionFactory = $objectManager->get('Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory'); diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php index 456b8eec3b059..d894a169d9ae3 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php @@ -37,7 +37,7 @@ public function testGetVariations() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'current_product', \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( @@ -47,9 +47,9 @@ public function testGetVariations() ) ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text', + 'Magento\Framework\View\Element\Text', 'head' ); /** @var $usedAttribute \Magento\Catalog\Model\Entity\Attribute */ @@ -66,7 +66,7 @@ public function testGetVariations() $attributeOptions = $usedAttribute->getSource()->getAllOptions(false); /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config\Matrix */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( preg_replace('/Test$/', '', __CLASS__) ); diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php index fe38aa91db387..36363d90d4eb6 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/ConfigTest.php @@ -36,14 +36,14 @@ public function testGetSelectedAttributesForSimpleProductType() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'current_product', $objectManager->create('Magento\Catalog\Model\Product') ); /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config */ $block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config' ); @@ -59,12 +59,13 @@ public function testGetSelectedAttributesForConfigurableProductType() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'current_product', $objectManager->create('Magento\Catalog\Model\Product')->load(1) ); - $objectManager->get('Magento\View\LayoutInterface')->createBlock('Magento\View\Element\Text', 'head'); + $objectManager->get('Magento\Framework\View\LayoutInterface') + ->createBlock('Magento\Framework\View\Element\Text', 'head'); $usedAttribute = $objectManager->get( 'Magento\Catalog\Model\Entity\Attribute' )->loadByCode( @@ -77,7 +78,7 @@ public function testGetSelectedAttributesForConfigurableProductType() ); /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config */ $block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config' ); diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/SettingsTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/SettingsTest.php index bd655a197716a..28fe62d9c8bed 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/SettingsTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/SettingsTest.php @@ -59,11 +59,11 @@ public function testGetContinueUrl($productId, $expectedUrl) /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); $context = $objectManager->create('Magento\Backend\Block\Template\Context', array('urlBuilder' => $urlModel)); - /** @var $layout \Magento\View\Layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Settings */ $block = $layout->createBlock( 'Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Settings', diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSetTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSetTest.php index 917995050709c..0aac50ed93613 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSetTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AssociatedSelector/Backend/Grid/ColumnSetTest.php @@ -41,10 +41,12 @@ public function testPrepareSelect() // fixture /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block ColumnSet */ $block = $layout->createBlock( 'Magento\ConfigurableProduct\Block\Product\Configurable\AssociatedSelector\Backend\Grid\ColumnSet', diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/View/Type/ConfigurableTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/View/Type/ConfigurableTest.php index 2142b9c5bff94..e81e68cab0185 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/View/Type/ConfigurableTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Block/Product/View/Type/ConfigurableTest.php @@ -47,7 +47,7 @@ protected function setUp() ); $this->_product->load(1); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\ConfigurableProduct\Block\Product\View\Type\Configurable' ); diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/ProductTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/ProductTest.php index f07244801b241..11f1b7a6fd696 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/Adminhtml/ProductTest.php @@ -47,7 +47,7 @@ public function testSaveActionAssociatedProductIds() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $product \Magento\Catalog\Model\Product */ - $product = $objectManager->get('Magento\Registry')->registry('current_product'); + $product = $objectManager->get('Magento\Framework\Registry')->registry('current_product'); $this->assertEquals($associatedProductIds, $product->getAssociatedProductIds()); /** @see \Magento\Backend\Utility\Controller::assertPostConditions() */ diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/CartTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/CartTest.php index 1dbf43c9ae78d..c61664c75fe87 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/CartTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Controller/CartTest.php @@ -45,7 +45,7 @@ public function testConfigureActionWithConfigurableProduct() $this->dispatch('checkout/cart/configure/id/' . $quoteItem->getId()); $response = $this->getResponse(); - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); $this->assertSelectCount( 'button[type="button"][title="Update Cart"]', diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/Configurable/AttributeTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/Configurable/AttributeTest.php index cae244830fb31..d2810218c41eb 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/Configurable/AttributeTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/Configurable/AttributeTest.php @@ -47,13 +47,13 @@ public function testAddPrice() public function testGetLabel() { $this->assertEmpty($this->_model->getLabel()); - $this->_model->setProductAttribute(new \Magento\Object(array('store_label' => 'Store Label'))); + $this->_model->setProductAttribute(new \Magento\Framework\Object(array('store_label' => 'Store Label'))); $this->assertEquals('Store Label', $this->_model->getLabel()); $this->_model->setUseDefault( 1 )->setProductAttribute( - new \Magento\Object(array('store_label' => 'Other Label')) + new \Magento\Framework\Object(array('store_label' => 'Other Label')) ); $this->assertEquals('Other Label', $this->_model->getLabel()); } diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php index 0122bf9c7a1d6..b0add5539b38b 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php @@ -58,7 +58,7 @@ protected function setUp() public function testGetRelationInfo() { $info = $this->_model->getRelationInfo(); - $this->assertInstanceOf('Magento\Object', $info); + $this->assertInstanceOf('Magento\Framework\Object', $info); $this->assertEquals('catalog_product_super_link', $info->getTable()); $this->assertEquals('parent_id', $info->getParentFieldName()); $this->assertEquals('product_id', $info->getChildFieldName()); @@ -294,7 +294,7 @@ public function testPrepareForCart() $attribute = reset($attributes); $optionValueId = $attribute['values'][0]['value_index']; - $buyRequest = new \Magento\Object( + $buyRequest = new \Magento\Framework\Object( array('qty' => 5, 'super_attribute' => array($attribute['attribute_id'] => $optionValueId)) ); $result = $this->_model->prepareForCart($buyRequest, $this->_product); @@ -303,7 +303,7 @@ public function testPrepareForCart() foreach ($result as $product) { $this->assertInstanceOf('Magento\Catalog\Model\Product', $product); } - $this->assertInstanceOf('Magento\Object', $result[1]->getCustomOption('parent_product_id')); + $this->assertInstanceOf('Magento\Framework\Object', $result[1]->getCustomOption('parent_product_id')); } public function testGetSpecifyOptionMessage() @@ -359,7 +359,11 @@ public function testGetWeight() $this->_product->setCustomOptions( array( - 'simple_product' => new \Magento\Object(array('product' => new \Magento\Object(array('weight' => 2)))) + 'simple_product' => new \Magento\Framework\Object( + array( + 'product' => new \Magento\Framework\Object(array('weight' => 2)) + ) + ) ) ); $this->assertEquals(2, $this->_model->getWeight($this->_product)); @@ -367,7 +371,7 @@ public function testGetWeight() public function testAssignProductToOption() { - $option = new \Magento\Object(); + $option = new \Magento\Framework\Object(); $this->_model->assignProductToOption('test', $option, $this->_product); $this->assertEquals('test', $option->getProduct()); // other branch of logic depends on \Magento\Sales module @@ -394,7 +398,7 @@ public function testGetSku() public function testProcessBuyRequest() { - $buyRequest = new \Magento\Object(array('super_attribute' => array('10', 'string'))); + $buyRequest = new \Magento\Framework\Object(array('super_attribute' => array('10', 'string'))); $result = $this->_model->processBuyRequest($this->_product, $buyRequest); $this->assertEquals(array('super_attribute' => array(10)), $result); } @@ -554,7 +558,7 @@ protected function _prepareForCart() $attribute = reset($attributes); $optionValueId = $attribute['values'][0]['value_index']; - $buyRequest = new \Magento\Object( + $buyRequest = new \Magento\Framework\Object( array('qty' => 5, 'super_attribute' => array($attribute['attribute_id'] => $optionValueId)) ); $this->_model->prepareForCart($buyRequest, $this->_product); diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Resource/Product/Collection/AssociatedProductTest.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Resource/Product/Collection/AssociatedProductTest.php index c3f77fa2cff17..40942c66077e6 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Resource/Product/Collection/AssociatedProductTest.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Resource/Product/Collection/AssociatedProductTest.php @@ -39,7 +39,7 @@ public function testPrepareSelect() $product->setId(10); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\ConfigurableProduct\Model\Resource\Product\Collection\AssociatedProduct' ); @@ -65,7 +65,7 @@ public function testPrepareSelectForSameProduct() // fixture /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\ConfigurableProduct\Model\Resource\Product\Collection\AssociatedProduct' ); diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/quote_with_configurable_product.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/quote_with_configurable_product.php index cba339f055554..6cce2ca1cd62f 100644 --- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/quote_with_configurable_product.php +++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/quote_with_configurable_product.php @@ -35,7 +35,7 @@ ); $option = $options->setAttributeFilter($attribute->getId())->getFirstItem(); -$requestInfo = new \Magento\Object( +$requestInfo = new \Magento\Framework\Object( array('qty' => 1, 'super_attribute' => array($attribute->getId() => $option->getId())) ); diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php index c00cf351fb642..35c624d3fec92 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php @@ -44,12 +44,12 @@ public function testEnvironmentEmulation() \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\View\DesignInterface'); + ->get('Magento\Framework\View\DesignInterface'); $initialEnvInfo = $this->_model->startEnvironmentEmulation(1); $initialDesign = $initialEnvInfo->getInitialDesign(); $this->assertEquals(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, $initialDesign['area']); - $this->assertEquals(\Magento\Core\Model\App\Area::AREA_FRONTEND, $design->getDesignTheme()->getData('area')); + $this->assertEquals(\Magento\Framework\App\Area::AREA_FRONTEND, $design->getDesignTheme()->getData('area')); $this->_model->stopEnvironmentEmulation($initialEnvInfo); $this->assertEquals(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, $design->getArea()); diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataSource.php b/dev/tests/integration/testsuite/Magento/Core/Model/DataSource.php index b5fbd464069a6..b2ba4e4662157 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/DataSource.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/DataSource.php @@ -29,7 +29,7 @@ /** * Dummy layout argument data source object */ -class DataSource extends \Magento\Data\Collection +class DataSource extends \Magento\Framework\Data\Collection { /** * Property which stores all updater calls diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Design/Backend/ExceptionsTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Design/Backend/ExceptionsTest.php index 1a838c2a2d267..214d44f588c14 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Design/Backend/ExceptionsTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Design/Backend/ExceptionsTest.php @@ -120,7 +120,7 @@ public function saveExceptionDataProvider() /** * @var array $value - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @dataProvider saveWrongExceptionDataProvider * @magentoDbIsolation enabled */ diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php index 91ded17102c84..23de8783f5791 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/DesignTest.php @@ -53,10 +53,12 @@ public function testChangeDesign() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); - $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\DesignInterface'); + $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Framework\View\DesignInterface' + ); $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Store\Model\StoreManagerInterface' - )->getAnyStoreView()->getId(); + )->getDefaultStoreView()->getId(); // fixture design_change $designChange = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Core\Model\Design' @@ -88,7 +90,7 @@ public function testCRUD() $model->setId(null); $model->save(); $this->fail('A validation failure is expected.'); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { } $this->_model->delete(); @@ -117,12 +119,13 @@ public function testCollection() */ public function testLoadChangeCache() { - /** @var \Magento\Stdlib\DateTime $dateTime */ - $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Stdlib\DateTime'); + /** @var \Magento\Framework\Stdlib\DateTime $dateTime */ + $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Stdlib\DateTime'); $date = $dateTime->now(true); $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Store\Model\StoreManagerInterface' - )->getAnyStoreView()->getId(); + )->getDefaultStoreView()->getId(); // fixture design_change $cacheId = 'design_change_' . md5($storeId . $date); @@ -189,13 +192,13 @@ public function testLoadChangeTimezone($storeCode, $storeTimezone, $storeUtcOffs $storeCode ); $defaultTimeZonePath = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Stdlib\DateTime\TimezoneInterface' + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' )->getDefaultTimezonePath(); $store->setConfig($defaultTimeZonePath, $storeTimezone); $storeId = $store->getId(); - /** @var $locale \Magento\Stdlib\DateTime\TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject */ - $locale = $this->getMock('Magento\Stdlib\DateTime\TimezoneInterface'); + /** @var $locale \Magento\Framework\Stdlib\DateTime\TimezoneInterface */ + $locale = $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface'); $locale->expects( $this->once() )->method( diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php index 33b973b6444e5..2dc575cd7aff7 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php @@ -33,7 +33,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Event\Observer + * @var \Magento\Framework\Event\Observer */ protected $_eventObserver; @@ -80,18 +80,21 @@ public function testThemeRegistration() /** * Create event observer for theme registration * - * @return \Magento\Event\Observer + * @return \Magento\Framework\Event\Observer */ protected function _createEventObserverForThemeRegistration() { $response = $this->_objectManager->create( - 'Magento\Object', + 'Magento\Framework\Object', array('data' => array('additional_options' => array())) ); $event = $this->_objectManager->create( - 'Magento\Event', + 'Magento\Framework\Event', array('data' => array('response_object' => $response)) ); - return $this->_objectManager->create('Magento\Event\Observer', array('data' => array('event' => $event))); + return $this->_objectManager->create( + 'Magento\Framework\Event\Observer', + array('data' => array('event' => $event)) + ); } } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/HelperTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/HelperTest.php index 5bff480cc707c..ac2ca8d45a2d8 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/HelperTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/HelperTest.php @@ -29,19 +29,19 @@ class HelperTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\DB\Helper + * @var \Magento\Framework\DB\Helper */ protected $_model; /** - * @var \Magento\DB\Select + * @var \Magento\Framework\DB\Select */ protected $_select; protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\DB\Helper', + 'Magento\Framework\DB\Helper', array('modulePrefix' => 'core') ); $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Layout/UpdateTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Layout/UpdateTest.php index ca5e4a4fc9eae..39059b9f8ef3a 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Layout/UpdateTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Layout/UpdateTest.php @@ -45,9 +45,9 @@ protected function setUp() */ public function testFetchUpdatesByHandle() { - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $theme->load('Test Theme', 'theme_title'); $result = $this->_resourceModel->fetchUpdatesByHandle( diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php index 3fb4f5ef6bcf0..9d1d410a80f5d 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Resource/Theme/CollectionTest.php @@ -26,7 +26,7 @@ */ namespace Magento\Core\Model\Resource\Theme; -use Magento\View\Design\ThemeInterface; +use Magento\Framework\View\Design\ThemeInterface; class CollectionTest extends \PHPUnit_Framework_TestCase { @@ -75,7 +75,7 @@ public function testGetThemeByFullPath($fullPath, $shouldExist) { $themeCollection = self::_getThemesCollection(); $hasFound = false; - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { if ($theme->getFullPath() == $fullPath) { $hasFound = true; @@ -175,7 +175,7 @@ public function testFilterVisibleThemes() ); $themeCollection->addAreaFilter('test_area3')->filterVisibleThemes(); $this->assertCount(2, $themeCollection); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { $this->assertTrue( in_array($theme->getType(), array(ThemeInterface::TYPE_PHYSICAL, ThemeInterface::TYPE_VIRTUAL)) @@ -222,9 +222,9 @@ public static function setThemeFixture() $themeCollection = self::_getThemesCollection(); $themeCollection->load(); foreach (self::getThemeList() as $themeData) { - /** @var $themeModel \Magento\View\Design\ThemeInterface */ + /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */ $themeModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $themeModel->setData($themeData); $themeCollection->addItem($themeModel); @@ -240,9 +240,9 @@ public static function setInheritedThemeFixture() $fixture = self::getInheritedThemeList(); $idByPath = array(); foreach ($fixture as $themeData) { - /** @var $themeModel \Magento\View\Design\ThemeInterface */ + /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */ $themeModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $themeModel->setData($themeData); @@ -358,7 +358,7 @@ public static function getInheritedThemeList() 'preview_image' => 'test1_test3.jpg', 'is_featured' => '1', 'area' => 'area51', - 'type' => \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL ), array( 'parent_id' => 'area51/test1/test0', @@ -369,7 +369,7 @@ public static function getInheritedThemeList() 'preview_image' => 'test1_test4.jpg', 'is_featured' => '1', 'area' => 'area51', - 'type' => \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL ) ); } @@ -387,9 +387,9 @@ public function testFilterPhysicalThemesPerPage() $collection->count() ); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($collection as $theme) { - $this->assertEquals(\Magento\Core\Model\App\Area::AREA_FRONTEND, $theme->getArea()); + $this->assertEquals(\Magento\Framework\App\Area::AREA_FRONTEND, $theme->getArea()); $this->assertEquals(ThemeInterface::TYPE_PHYSICAL, $theme->getType()); } } @@ -403,9 +403,9 @@ public function testFilterPhysicalThemes() $this->assertGreaterThan(0, $collection->count()); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($collection as $theme) { - $this->assertEquals(\Magento\Core\Model\App\Area::AREA_FRONTEND, $theme->getArea()); + $this->assertEquals(\Magento\Framework\App\Area::AREA_FRONTEND, $theme->getArea()); $this->assertEquals(ThemeInterface::TYPE_PHYSICAL, $theme->getType()); } } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php index 60a76fa1a141e..b24fd4d2562f1 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/TemplateTest.php @@ -30,7 +30,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider setDesignConfigExceptionDataProvider - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testSetDesignConfigException($config) { diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php index bffc4f07805e7..4649b3011ac28 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php @@ -102,7 +102,7 @@ public function expectedThemeDataFromConfiguration() 'theme_path' => 'magento_default', 'code' => 'magento_default', 'preview_image' => null, - 'type' => \Magento\View\Design\ThemeInterface::TYPE_PHYSICAL + 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL ) ) ); @@ -117,9 +117,9 @@ public function expectedThemeDataFromConfiguration() */ public function testHasThemeInCollection() { - /** @var $themeModel \Magento\View\Design\ThemeInterface */ + /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */ $themeModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $themeModel->setData( array( @@ -130,7 +130,7 @@ public function testHasThemeInCollection() 'is_featured' => false, 'theme_path' => 'default_space', 'preview_image' => 'images/preview.png', - 'type' => \Magento\View\Design\ThemeInterface::TYPE_PHYSICAL + 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL ) ); diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php index 4f9a9081cacd3..3142d2b045ec9 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php @@ -26,7 +26,7 @@ */ namespace Magento\Core\Model\Theme\Domain; -use Magento\View\Design\ThemeInterface; +use Magento\Framework\View\Design\ThemeInterface; class VirtualTest extends \PHPUnit_Framework_TestCase { @@ -39,7 +39,7 @@ class VirtualTest extends \PHPUnit_Framework_TestCase 'theme_path' => 'test/test', 'theme_version' => '1.0.0.0', 'theme_title' => 'Test physical theme', - 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'type' => ThemeInterface::TYPE_PHYSICAL ), 'virtual' => array( @@ -47,7 +47,7 @@ class VirtualTest extends \PHPUnit_Framework_TestCase 'theme_path' => '', 'theme_version' => '1.0.0.0', 'theme_title' => 'Test virtual theme', - 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'type' => ThemeInterface::TYPE_VIRTUAL ), 'staging' => array( @@ -55,7 +55,7 @@ class VirtualTest extends \PHPUnit_Framework_TestCase 'theme_path' => '', 'theme_version' => '1.0.0.0', 'theme_title' => 'Test staging theme', - 'area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, + 'area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'type' => ThemeInterface::TYPE_STAGING ) ); @@ -77,22 +77,22 @@ public function testGetPhysicalTheme() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); //1. set up fixture - /** @var $physicalTheme \Magento\View\Design\ThemeInterface */ - $physicalTheme = $objectManager->create('Magento\View\Design\ThemeInterface'); + /** @var $physicalTheme \Magento\Framework\View\Design\ThemeInterface */ + $physicalTheme = $objectManager->create('Magento\Framework\View\Design\ThemeInterface'); $physicalTheme->setData($this->_themes['physical']); $physicalTheme->save(); $this->_themes['virtual']['parent_id'] = $physicalTheme->getId(); - /** @var $virtualTheme \Magento\View\Design\ThemeInterface */ - $virtualTheme = $objectManager->create('Magento\View\Design\ThemeInterface'); + /** @var $virtualTheme \Magento\Framework\View\Design\ThemeInterface */ + $virtualTheme = $objectManager->create('Magento\Framework\View\Design\ThemeInterface'); $virtualTheme->setData($this->_themes['virtual']); $virtualTheme->save(); $this->_themes['staging']['parent_id'] = $virtualTheme->getId(); - /** @var $stagingTheme \Magento\View\Design\ThemeInterface */ - $stagingTheme = $objectManager->create('Magento\View\Design\ThemeInterface'); + /** @var $stagingTheme \Magento\Framework\View\Design\ThemeInterface */ + $stagingTheme = $objectManager->create('Magento\Framework\View\Design\ThemeInterface'); $stagingTheme->setData($this->_themes['staging']); $stagingTheme->save(); @@ -100,14 +100,14 @@ public function testGetPhysicalTheme() $this->_virtualThemeId = $virtualTheme->getId(); //2. run test - /** @var $virtualTheme \Magento\View\Design\ThemeInterface */ - $virtualTheme = $objectManager->create('Magento\View\Design\ThemeInterface'); + /** @var $virtualTheme \Magento\Framework\View\Design\ThemeInterface */ + $virtualTheme = $objectManager->create('Magento\Framework\View\Design\ThemeInterface'); $virtualTheme->load($this->_virtualThemeId); $this->assertEquals( $this->_physicalThemeId, $virtualTheme->getDomainModel( - \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL )->getPhysicalTheme()->getId() ); } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/FileTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/FileTest.php index e75fdc59c5c23..c36e3c6ef13a2 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/FileTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/FileTest.php @@ -47,8 +47,8 @@ protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_model = $objectManager->create('Magento\Core\Model\Theme\File'); - /** @var $themeModel \Magento\View\Design\ThemeInterface */ - $themeModel = $objectManager->create('Magento\View\Design\ThemeInterface'); + /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */ + $themeModel = $objectManager->create('Magento\Framework\View\Design\ThemeInterface'); $this->_theme = $themeModel->getCollection()->getFirstItem(); $this->_data = array( 'file_path' => 'main.css', diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php index c83bb0566c042..2d6853cff6488 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php @@ -55,12 +55,12 @@ protected function setUp() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); $objectManager->get('Magento\Framework\App\State') ->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); $this->_theme = $objectManager - ->create('Magento\View\Design\ThemeInterface'); + ->create('Magento\Framework\View\Design\ThemeInterface'); $this->_model = $objectManager ->create('Magento\Core\Model\Theme\Registration'); } @@ -86,7 +86,7 @@ protected function registerThemes() protected function _getTestTheme() { $theme = $this->_theme->getCollection()->getThemeByFullPath( - implode(\Magento\View\Design\ThemeInterface::PATH_SEPARATOR, array('frontend', 'test_test_theme')) + implode(\Magento\Framework\View\Design\ThemeInterface::PATH_SEPARATOR, array('frontend', 'test_test_theme')) ); $this->assertNotEmpty($theme->getId()); return $theme; @@ -102,14 +102,14 @@ public function testVirtualByVirtualRelation() $virtualTheme = clone $this->_theme; $virtualTheme->setData($theme->getData())->setId(null); - $virtualTheme->setType(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL)->save(); + $virtualTheme->setType(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL)->save(); $subVirtualTheme = clone $this->_theme; $subVirtualTheme->setData($theme->getData())->setId(null); $subVirtualTheme->setParentId( $virtualTheme->getId() )->setType( - \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL )->save(); $this->registerThemes(); @@ -128,11 +128,14 @@ public function testPhysicalThemeElimination() $testTheme = clone $this->_theme; $testTheme->setData($theme->getData())->setThemePath('empty')->setId(null); - $testTheme->setType(\Magento\View\Design\ThemeInterface::TYPE_PHYSICAL)->save(); + $testTheme->setType(\Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL)->save(); $this->registerThemes(); $testTheme->load($testTheme->getId()); - $this->assertNotEquals((int)$testTheme->getType(), \Magento\View\Design\ThemeInterface::TYPE_PHYSICAL); + $this->assertNotEquals( + (int)$testTheme->getType(), + \Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL + ); } /** @@ -141,7 +144,10 @@ public function testPhysicalThemeElimination() public function testRegister() { $this->registerThemes(); - $themePath = implode(\Magento\View\Design\ThemeInterface::PATH_SEPARATOR, array('frontend', 'test_test_theme')); + $themePath = implode( + \Magento\Framework\View\Design\ThemeInterface::PATH_SEPARATOR, + array('frontend', 'test_test_theme') + ); $theme = $this->_model->getThemeFromDb($themePath); $this->assertEquals($themePath, $theme->getFullPath()); } diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/ThemeTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/ThemeTest.php index 5b25539c7e9b9..6f4948bb1f3d4 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/ThemeTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/ThemeTest.php @@ -31,7 +31,7 @@ /** * Theme Test * - * @package Magento\View + * @package Magento\Framework\View */ class ThemeTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml index d9d72a90b146a..12bbb5a26fa8b 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/a_d/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Theme D 0.0.0.1 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml index d9194c1b48c6c..cd7731171f02d 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/b_e/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Theme E 0.0.0.1 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml index 858023975e7b7..0e298b0afc31b 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_default/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 0.0.0.1 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml index 03f4e825a6e7b..e50f8bcd8f2d1 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/Source/_files/design/frontend/magento_g/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Theme G 0.0.0.1 magento_default diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/ThemeTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/ThemeTest.php index 88f09190a0929..59a586557bbcf 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/ThemeTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/ThemeTest.php @@ -35,9 +35,9 @@ class ThemeTest extends \PHPUnit_Framework_TestCase */ public function testCrud() { - /** @var $themeModel \Magento\View\Design\ThemeInterface */ + /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */ $themeModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $themeModel->setData($this->_getThemeValidData()); @@ -60,7 +60,7 @@ protected function _getThemeValidData() 'is_featured' => false, 'theme_path' => 'default/space', 'preview_image' => 'images/preview.png', - 'type' => \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL ); } @@ -69,12 +69,13 @@ protected function _getThemeValidData() */ public function testChildRelation() { - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); - $collection = $theme->getCollection()->addTypeFilter(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL); - /** @var $currentTheme \Magento\View\Design\ThemeInterface */ + $collection = $theme->getCollection() + ->addTypeFilter(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL); + /** @var $currentTheme \Magento\Framework\View\Design\ThemeInterface */ foreach ($collection as $currentTheme) { $parentTheme = $currentTheme->getParentTheme(); if (!empty($parentTheme)) { @@ -90,9 +91,9 @@ public function testChildRelation() */ public function testGetInheritedThemes() { - /** @var \Magento\View\Design\Theme\FlyweightFactory $themeFactory */ + /** @var \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory */ $themeFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\Design\Theme\FlyweightFactory' + 'Magento\Framework\View\Design\Theme\FlyweightFactory' ); $theme = $themeFactory->create('vendor_custom_theme'); $this->assertCount(2, $theme->getInheritedThemes()); diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Validator/FactoryTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Validator/FactoryTest.php index dd99636a1f587..f7db879a172ce 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/Validator/FactoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/Validator/FactoryTest.php @@ -37,10 +37,10 @@ public function testGetValidatorConfig() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var \Magento\Core\Model\Validator\Factory $factory */ $factory = $objectManager->get('Magento\Core\Model\Validator\Factory'); - $this->assertInstanceOf('Magento\Validator\Config', $factory->getValidatorConfig()); + $this->assertInstanceOf('Magento\Framework\Validator\Config', $factory->getValidatorConfig()); // Check that default translator was set - $translator = \Magento\Validator\AbstractValidator::getDefaultTranslator(); - $this->assertInstanceOf('Magento\Translate\AdapterInterface', $translator); + $translator = \Magento\Framework\Validator\AbstractValidator::getDefaultTranslator(); + $this->assertInstanceOf('Magento\Framework\Translate\AdapterInterface', $translator); $this->assertEquals('Message', __('Message')); $this->assertEquals('Message', $translator->translate('Message')); $this->assertEquals( diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php index 6f49ff28bcd47..9af0a8a498dd6 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php @@ -32,22 +32,22 @@ class DesignTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\DesignInterface + * @var \Magento\Framework\View\DesignInterface */ protected $_model; /** - * @var \Magento\View\FileSystem + * @var \Magento\Framework\View\FileSystem */ protected $_viewFileSystem; /** - * @var \Magento\View\ConfigInterface + * @var \Magento\Framework\View\ConfigInterface */ protected $_viewConfig; /** - * @var \Magento\View\Url + * @var \Magento\Framework\View\Url */ protected $_viewUrl; @@ -76,10 +76,10 @@ public static function tearDownAfterClass() protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_model = $objectManager->create('Magento\View\DesignInterface'); - $this->_viewFileSystem = $objectManager->create('Magento\View\FileSystem'); - $this->_viewConfig = $objectManager->create('Magento\View\ConfigInterface'); - $this->_viewUrl = $objectManager->create('Magento\View\Url'); + $this->_model = $objectManager->create('Magento\Framework\View\DesignInterface'); + $this->_viewFileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); + $this->_viewConfig = $objectManager->create('Magento\Framework\View\ConfigInterface'); + $this->_viewUrl = $objectManager->create('Magento\Framework\View\Url'); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); } @@ -101,16 +101,16 @@ protected function _emulateFixtureTheme($themePath = 'test_default') ); \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea('frontend'); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\View\DesignInterface')->setDesignTheme($themePath); + $objectManager->get('Magento\Framework\View\DesignInterface')->setDesignTheme($themePath); - $this->_viewFileSystem = $objectManager->create('Magento\View\FileSystem'); - $this->_viewConfig = $objectManager->create('Magento\View\ConfigInterface'); - $this->_viewUrl = $objectManager->create('Magento\View\Url'); + $this->_viewFileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); + $this->_viewConfig = $objectManager->create('Magento\Framework\View\ConfigInterface'); + $this->_viewUrl = $objectManager->create('Magento\Framework\View\Url'); } public function testSetGetArea() { - $this->assertEquals(\Magento\View\DesignInterface::DEFAULT_AREA, $this->_model->getArea()); + $this->assertEquals(\Magento\Framework\View\DesignInterface::DEFAULT_AREA, $this->_model->getArea()); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('test'); $this->assertEquals('test', $this->_model->getArea()); @@ -127,7 +127,7 @@ public function testSetDesignTheme() public function testGetDesignTheme() { - $this->assertInstanceOf('Magento\View\Design\ThemeInterface', $this->_model->getDesignTheme()); + $this->assertInstanceOf('Magento\Framework\View\Design\ThemeInterface', $this->_model->getDesignTheme()); } /** @@ -198,7 +198,7 @@ public function getFilenameDataProvider() /** * @param string $file - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @dataProvider extractScopeExceptionDataProvider */ public function testExtractScopeException($file) @@ -218,7 +218,7 @@ public function testGetViewConfig() { $this->_emulateFixtureTheme(); $config = $this->_viewConfig->getViewConfig(); - $this->assertInstanceOf('Magento\Config\View', $config); + $this->assertInstanceOf('Magento\Framework\Config\View', $config); $this->assertEquals(array('var1' => 'value1', 'var2' => 'value2'), $config->getVars('Namespace_Module')); } @@ -228,9 +228,9 @@ public function testGetViewConfig() public function testGetConfigCustomized() { $this->_emulateFixtureTheme(); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->getDesignTheme(); $customConfigFile = $theme->getCustomization()->getCustomViewConfigPath(); /** @var $filesystem \Magento\Framework\App\Filesystem */ @@ -246,7 +246,7 @@ public function testGetConfigCustomized() ); $config = $this->_viewConfig->getViewConfig(); - $this->assertInstanceOf('Magento\Config\View', $config); + $this->assertInstanceOf('Magento\Framework\Config\View', $config); $this->assertEquals(array('customVar' => 'custom value'), $config->getVars('Namespace_Module')); } catch (\Exception $e) { $directory->delete($relativePath); diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml index c5080bdc62502..28452b30853c7 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/adminhtml/vendor_test/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml index 379337441d27b..a3a7dd87caa6f 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/area_two/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Theme One 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml index 379337441d27b..a3a7dd87caa6f 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/design_area/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Theme One 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml index 0b71ccaec4af0..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml index d0008b53c35d8..9a6db9ca21e01 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/magento_default_iphone/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Iphone 2.0.0.0 magento_default diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml index e60a314463db7..5c58fcc1c1868 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml @@ -27,7 +27,7 @@ */ --> - + Text declared in the frontend/test/cache_test_theme diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml index ea9e592a083b3..f3fee5b15d137 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_cache_test_theme/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Cache Test Theme 2.0.0.0 test_default diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml index ae3f8af2c1f2e..c1aa70818fe43 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml @@ -38,7 +38,7 @@ - + diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml index 8a54998278417..1ca8fd37072ce 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml @@ -41,11 +41,11 @@ prototype/deprecation.js - + - - + + diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml index 0b71ccaec4af0..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/view.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/view.xml index 2fdf497cf4c73..bcf355bc51f0f 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/view.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_default/view.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Core Value1 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml index 0b71ccaec4af0..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_publication/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml index f7fc81207787a..aae5423d7d8c4 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/layout_test_handle.xml @@ -27,7 +27,7 @@ */ --> - + Text declared in the frontend/test/test_theme diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml index e59e8543246cb..ca15f18f7c149 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/test_test_theme/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Test Theme 2.0.0.0 test_default diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml index f497ebbbd0198..ae82624b4c5f8 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_custom_theme/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Custom Theme 2.0.0.0 vendor_default diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml index 0b71ccaec4af0..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/frontend/vendor_default/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php index d79c3b6e3d3a3..8ae2225fca5af 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php +++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php @@ -26,7 +26,7 @@ */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array( \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => realpath(__DIR__)), diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/design_change.php b/dev/tests/integration/testsuite/Magento/Core/_files/design_change.php index 7fa3b3129a772..a1ad0c34cbb4f 100644 --- a/dev/tests/integration/testsuite/Magento/Core/_files/design_change.php +++ b/dev/tests/integration/testsuite/Magento/Core/_files/design_change.php @@ -27,7 +27,7 @@ $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Store\Model\StoreManagerInterface' -)->getAnyStoreView()->getId(); +)->getDefaultStoreView()->getId(); /** @var $change \Magento\Core\Model\Design */ $change = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Core\Model\Design'); $change->setStoreId($storeId)->setDesign('Magento/plushe')->setDateFrom('2001-01-01 01:01:01')->save(); diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml b/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml index 8c5f7d1c1d348..88662378c056e 100644 --- a/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Core/_files/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php b/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php index 9a7e37056bcfc..54184bc388180 100644 --- a/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php +++ b/dev/tests/integration/testsuite/Magento/Core/_files/layout_update.php @@ -25,13 +25,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var $objectManager \Magento\ObjectManager */ +/** @var $objectManager \Magento\Framework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); -/** @var $theme \Magento\View\Design\ThemeInterface */ -$theme = $objectManager->create('Magento\View\Design\ThemeInterface'); + ->load(\Magento\Framework\App\Area::PART_CONFIG); +/** @var $theme \Magento\Framework\View\Design\ThemeInterface */ +$theme = $objectManager->create('Magento\Framework\View\Design\ThemeInterface'); $theme->setThemePath( 'test/test' )->setThemeVersion( @@ -41,7 +41,7 @@ )->setThemeTitle( 'Test Theme' )->setType( - \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL )->save(); /** @var $updateNotTemporary \Magento\Core\Model\Layout\Update */ diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php index c522ca942abde..2f4aead1335b6 100644 --- a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php +++ b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change.php @@ -26,7 +26,7 @@ */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); $designDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir() . '/media_for_change'; $themeDir = $designDir . '/frontend/test_default'; $sourcePath = dirname(__DIR__) . '/Model/_files/design/frontend/test_publication/'; diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php index dfbab00fd749a..2102455f602b0 100644 --- a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php +++ b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php @@ -35,9 +35,9 @@ ) ) ); -/** @var $objectManager \Magento\ObjectManager */ +/** @var $objectManager \Magento\Framework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -/** @var $directoryWrite \Magento\Filesystem\Directory\Write */ +/** @var $directoryWrite \Magento\Framework\Filesystem\Directory\Write */ $directoryWrite = $objectManager->create( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( diff --git a/dev/tests/integration/testsuite/Magento/Cron/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Cron/Model/ObserverTest.php index 58cc59034cd5a..cad07426c6fb6 100644 --- a/dev/tests/integration/testsuite/Magento/Cron/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Cron/Model/ObserverTest.php @@ -34,7 +34,7 @@ protected function setUp() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea('crontab') - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Cron\Model\Observer'); $this->_model->dispatch('this argument is not used'); diff --git a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/cache/lib/oyejorge.less b/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/cache/lib/oyejorge.less deleted file mode 100644 index d8544f2a2a4ab..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/cache/lib/oyejorge.less +++ /dev/null @@ -1 +0,0 @@ -@import "nested/import.less"; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/AddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/AddressTest.php index 103c77358bf0f..765151dc4b113 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/AddressTest.php @@ -38,7 +38,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase protected $_customerSession; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ protected $objectManager; @@ -46,7 +46,7 @@ protected function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_customerSession = $this->objectManager->get('Magento\Customer\Model\Session'); - $this->_block = $this->objectManager->get('Magento\View\LayoutInterface') + $this->_block = $this->objectManager->get('Magento\Framework\View\LayoutInterface') ->createBlock( 'Magento\Customer\Block\Account\Dashboard\Address', '', @@ -66,7 +66,7 @@ protected function tearDown() public function testGetCustomer() { $objectManager = Bootstrap::getObjectManager(); - $layout = $objectManager->get('Magento\View\LayoutInterface'); + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); $layout->setIsCacheable(false); /** @var CustomerAccountServiceInterface $customerAccountService */ $customerAccountService = $objectManager @@ -80,7 +80,7 @@ public function testGetCustomer() public function testGetCustomerMissingCustomer() { - $moduleManager = $this->objectManager->get('Magento\Module\Manager'); + $moduleManager = $this->objectManager->get('Magento\Framework\Module\Manager'); if ($moduleManager->isEnabled('Magento_PageCache')) { $customerDataBuilder = $this->objectManager->create('Magento\Customer\Service\V1\Data\CustomerBuilder'); $customerData = $customerDataBuilder->setGroupId($this->_customerSession->getCustomerGroupId())->create(); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/HelloTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/HelloTest.php index de5515f69081e..b40d064667bc5 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/HelloTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/HelloTest.php @@ -49,7 +49,7 @@ public function setUp() $this->customerSession = $objectManager->get('Magento\Customer\Model\Session'); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Account\Dashboard\Hello', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php index 8c0459f9dad07..2352968aa36af 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php @@ -36,7 +36,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Account\Dashboard\Info' ); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/NewsletterTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/NewsletterTest.php index c83ffc29269ae..ec61f1cc75ed2 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/NewsletterTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/Dashboard/NewsletterTest.php @@ -48,7 +48,7 @@ protected function setUp() $this->customerSession = $objectManager->get('Magento\Customer\Model\Session'); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Account\Dashboard\Newsletter', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/DashboardTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/DashboardTest.php index a165b7927cc15..4c48e727a8314 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Account/DashboardTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Account/DashboardTest.php @@ -48,7 +48,7 @@ public function setUp() ); $this->block = Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Account\Dashboard', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Address/BookTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Address/BookTest.php index 5fce18909b950..d89417ee03b98 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Address/BookTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Address/BookTest.php @@ -43,7 +43,7 @@ protected function setUp() { /** @var \PHPUnit_Framework_MockObject_MockObject $blockMock */ $blockMock = $this->getMockBuilder( - '\Magento\View\Element\BlockInterface' + '\Magento\Framework\View\Element\BlockInterface' )->disableOriginalConstructor()->setMethods( array('setTitle', 'toHtml') )->getMock(); @@ -51,8 +51,8 @@ protected function setUp() $this->currentCustomer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Customer\Service\V1\CustomerCurrentService'); - /** @var \Magento\View\LayoutInterface $layout */ - $layout = Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var \Magento\Framework\View\LayoutInterface $layout */ + $layout = Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface'); $layout->setBlock('head', $blockMock); $this->_block = $layout ->createBlock( diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Address/EditTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Address/EditTest.php index 8c4f6a07d62ed..47aeeb20f20ac 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Address/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Address/EditTest.php @@ -53,8 +53,8 @@ protected function setUp() $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - /** @var $layout \Magento\View\Layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); $customerCurrentService = $objectManager->create( 'Magento\Customer\Service\V1\CustomerCurrentServiceInterface', array('customerSession' => $this->_customerSession) diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/GroupTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/GroupTest.php index 1eaa52b4c6f6e..9028621344a2e 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/GroupTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Renderer/Attribute/GroupTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Block\Adminhtml\Edit\Renderer\Attribute; -use Magento\Data\Form\Element\AbstractElement; +use Magento\Framework\Data\Form\Element\AbstractElement; use Magento\TestFramework\Helper\Bootstrap; /** diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php index 5c298a5127570..bb40d7fa9ec84 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php @@ -36,10 +36,10 @@ class AccountTest extends \PHPUnit_Framework_TestCase /** @var Account */ protected $accountBlock; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $objectManager; - /** @var \Magento\Registry */ + /** @var \Magento\Framework\Registry */ protected $coreRegistry; /** @var \Magento\Backend\Model\Session */ @@ -54,7 +54,7 @@ class AccountTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->coreRegistry = $this->objectManager->get('Magento\Registry'); + $this->coreRegistry = $this->objectManager->get('Magento\Framework\Registry'); $this->coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, 1); $this->backendSession = $this->objectManager->get('Magento\Backend\Model\Session'); @@ -64,7 +64,7 @@ public function setUp() ); $this->accountBlock = $this->objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Account', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php index cb810c6ba2c15..58fafbe130648 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AddressesTest.php @@ -45,13 +45,13 @@ class AddressesTest extends \PHPUnit_Framework_TestCase /** @var CustomerAddressServiceInterface */ private $_addressService; - /** @var \Magento\Registry */ + /** @var \Magento\Framework\Registry */ private $_coreRegistry; /** @var \Magento\Backend\Model\Session */ private $_backendSession; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ private $_objectManager; /** @var array */ @@ -66,7 +66,7 @@ public function setUp() $this->_addressService = $this->_objectManager->get( 'Magento\Customer\Service\V1\CustomerAddressServiceInterface' ); - $this->_coreRegistry = $this->_objectManager->get('Magento\Registry'); + $this->_coreRegistry = $this->_objectManager->get('Magento\Framework\Registry'); $this->_backendSession = $this->_objectManager->get('Magento\Backend\Model\Session'); $this->_coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, 1); @@ -88,7 +88,7 @@ public function testInitFormEmpty() /** @var Addresses $block */ $block = $block->initForm(); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $block->getForm(); // Validate Country gets set @@ -102,27 +102,27 @@ public function testInitForm() /** @var Addresses $block */ $block = $block->initForm(); - /** @var \Magento\Data\Form $form */ + /** @var \Magento\Framework\Data\Form $form */ $form = $block->getForm(); - $this->assertInstanceOf('Magento\Data\Form\Element\Fieldset', $form->getElement('address_fieldset')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('prefix')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('firstname')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('middlename')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('lastname')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('suffix')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('company')); - $this->assertInstanceOf('Magento\Data\Form\Element\Multiline', $form->getElement('street')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Fieldset', $form->getElement('address_fieldset')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('prefix')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('firstname')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('middlename')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('lastname')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('suffix')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('company')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Multiline', $form->getElement('street')); $this->assertEquals(2, $form->getElement('street')->getLineCount()); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('city')); - $this->assertInstanceOf('Magento\Data\Form\Element\Select', $form->getElement('country_id')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('city')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Select', $form->getElement('country_id')); $this->assertEquals('US', $form->getElement('country_id')->getValue()); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('region')); - $this->assertInstanceOf('Magento\Data\Form\Element\Hidden', $form->getElement('region_id')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('postcode')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('telephone')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('fax')); - $this->assertInstanceOf('Magento\Data\Form\Element\Text', $form->getElement('vat_id')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('region')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Hidden', $form->getElement('region_id')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('postcode')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('telephone')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('fax')); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Text', $form->getElement('vat_id')); } public function testToHtml() @@ -130,7 +130,7 @@ public function testToHtml() $this->setupExistingCustomerData(); /** @var \Magento\Customer\Block\Adminhtml\Edit\Tab\Addresses $block */ $block = $this->_objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Addresses' ); @@ -167,7 +167,7 @@ protected function setupExistingCustomerData() $customer = $this->_customerAccountService->getCustomer(1); $this->_customerData = array( 'customer_id' => $customer->getId(), - 'account' => \Magento\Service\DataObjectConverter::toFlatArray($customer) + 'account' => \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customer) ); $this->_customerData['account']['id'] = $customer->getId(); /** @var Address[] $addresses */ diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartTest.php index 4eff0847c5fa7..b4733b969f928 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartTest.php @@ -37,7 +37,7 @@ class CartTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Backend\Block\Template\Context */ private $_context; - /** @var \Magento\Registry */ + /** @var \Magento\Framework\Registry */ private $_coreRegistry; /** @var \Magento\Store\Model\StoreManagerInterface */ @@ -46,7 +46,7 @@ class CartTest extends \PHPUnit_Framework_TestCase /** @var Cart */ private $_block; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ private $_objectManager; public function setUp() @@ -59,11 +59,11 @@ public function setUp() array('storeManager' => $this->_storeManager) ); - $this->_coreRegistry = $this->_objectManager->get('Magento\Registry'); + $this->_coreRegistry = $this->_objectManager->get('Magento\Framework\Registry'); $this->_coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, self::CUSTOMER_ID_VALUE); $this->_block = $this->_objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Cart', '', @@ -89,20 +89,22 @@ public function testGetGridUrl() public function testGetGridParentHtml() { $this->_block = $this->_objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Cart', '', array() ); - $mockCollection = $this->getMockBuilder('\Magento\Data\Collection')->disableOriginalConstructor()->getMock(); + $mockCollection = $this->getMockBuilder('\Magento\Framework\Data\Collection') + ->disableOriginalConstructor() + ->getMock(); $this->_block->setCollection($mockCollection); $this->assertContains("
", $this->_block->getGridParentHtml()); } public function testGetRowUrl() { - $row = new \Magento\Object(); + $row = new \Magento\Framework\Object(); $row->setProductId(1); $this->assertContains('/backend/catalog/product/edit/id/1', $this->_block->getRowUrl($row)); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php index 8cf36cb766f9d..41228d0b33020 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/CartsTest.php @@ -41,7 +41,7 @@ class CartsTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Backend\Block\Template\Context */ private $_context; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ private $_objectManager; public function setUp() @@ -67,7 +67,7 @@ public function testGetHtml() $this->_context->getBackendSession()->setCustomerData($data); $this->_block = $this->_objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Carts', '', @@ -87,7 +87,7 @@ public function testGetHtmlNoCustomer() $this->_context->getBackendSession()->setCustomerData($data); $this->_block = $this->_objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Carts', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/NewsletterTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/NewsletterTest.php index 46286e2e1ef21..b5f840a17c0e0 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/NewsletterTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/NewsletterTest.php @@ -41,7 +41,7 @@ class NewsletterTest extends \PHPUnit_Framework_TestCase /** * Core registry * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $coreRegistry; @@ -53,9 +53,9 @@ public function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('adminhtml'); - $this->coreRegistry = $objectManager->get('Magento\Registry'); + $this->coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Newsletter', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/OrdersTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/OrdersTest.php index f352126a8e11d..7f07eff7d45da 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/OrdersTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/OrdersTest.php @@ -43,7 +43,7 @@ class OrdersTest extends \PHPUnit_Framework_TestCase /** * Core registry. * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $coreRegistry; @@ -55,11 +55,11 @@ public function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('adminhtml'); - $this->coreRegistry = $objectManager->get('Magento\Registry'); + $this->coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, 1); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\Orders', '', @@ -82,7 +82,7 @@ public function tearDown() */ public function testGetRowUrl() { - $row = new \Magento\Object(array('id' => 1)); + $row = new \Magento\Framework\Object(array('id' => 1)); $this->assertContains('sales/order/view/order_id/1', $this->block->getRowUrl($row)); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/AccordionTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/AccordionTest.php index 32a6c3b78a43f..2c18a62f45237 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/AccordionTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/AccordionTest.php @@ -34,10 +34,10 @@ */ class AccordionTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\View\Layout */ + /** @var \Magento\Framework\View\Layout */ protected $layout; - /** @var \Magento\Registry */ + /** @var \Magento\Framework\Registry */ protected $registry; /** @var CustomerAccountServiceInterface */ @@ -51,13 +51,13 @@ protected function setUp() parent::setUp(); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->registry = $objectManager->get('Magento\Registry'); + $this->registry = $objectManager->get('Magento\Framework\Registry'); $this->customerAccountService = $objectManager->get( 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' ); $this->backendSession = $objectManager->get('Magento\Backend\Model\Session'); $this->layout = $objectManager->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/CartTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/CartTest.php index b954b5edbe001..4cc86a4f47d84 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/CartTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/CartTest.php @@ -43,7 +43,7 @@ class CartTest extends \PHPUnit_Framework_TestCase /** * Core registry. * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $coreRegistry; @@ -55,11 +55,11 @@ public function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('adminhtml'); - $this->coreRegistry = $objectManager->get('Magento\Registry'); + $this->coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, 1); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\View\Cart', '', @@ -81,7 +81,7 @@ public function tearDown() */ public function testGetRowUrl() { - $row = new \Magento\Object(array('product_id' => 1)); + $row = new \Magento\Framework\Object(array('product_id' => 1)); $this->assertContains('catalog/product/edit/id/1', $this->block->getRowUrl($row)); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/OrdersTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/OrdersTest.php index 20926c1348444..42b98472af256 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/OrdersTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/OrdersTest.php @@ -43,7 +43,7 @@ class OrdersTest extends \PHPUnit_Framework_TestCase /** * Core registry. * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $coreRegistry; @@ -55,11 +55,11 @@ public function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('adminhtml'); - $this->coreRegistry = $objectManager->get('Magento\Registry'); + $this->coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, 1); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\View\Orders', '', @@ -82,7 +82,7 @@ public function tearDown() */ public function testGetRowUrl() { - $row = new \Magento\Object(array('id' => 1)); + $row = new \Magento\Framework\Object(array('id' => 1)); $this->assertContains('sales/order/view/order_id/1', $this->block->getRowUrl($row)); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/SalesTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/SalesTest.php index 9dd260a33ba67..49679747d53de 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/SalesTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/SalesTest.php @@ -45,7 +45,7 @@ class SalesTest extends \PHPUnit_Framework_TestCase /** * Core registry. * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $coreRegistry; @@ -64,11 +64,11 @@ public function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('adminhtml'); - $this->coreRegistry = $objectManager->get('Magento\Registry'); + $this->coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, 1); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\View\Sales', 'sales_' . mt_rand(), diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/ViewTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/ViewTest.php index 96396fcb46d51..24b720e8e032f 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/ViewTest.php @@ -40,7 +40,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Backend\Block\Template\Context */ private $_context; - /** @var \Magento\Registry */ + /** @var \Magento\Framework\Registry */ private $_coreRegistry; /** @var CustomerBuilder */ @@ -55,7 +55,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Store\Model\StoreManagerInterface */ private $_storeManager; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ private $_objectManager; /** @var View */ @@ -72,14 +72,14 @@ public function setUp() ); $this->_customerBuilder = $this->_objectManager->get('Magento\Customer\Service\V1\Data\CustomerBuilder'); - $this->_coreRegistry = $this->_objectManager->get('Magento\Registry'); + $this->_coreRegistry = $this->_objectManager->get('Magento\Framework\Registry'); $this->_customerAccountService = $this->_objectManager->get( 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' ); $this->_groupService = $this->_objectManager->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); $this->_block = $this->_objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tab\View', '', @@ -131,7 +131,7 @@ public function testGetCreateDate() { $createdAt = $this->_block->formatDate( $this->_loadCustomer()->getCreatedAt(), - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true ); $this->assertEquals($createdAt, $this->_block->getCreateDate()); @@ -146,7 +146,7 @@ public function testGetStoreCreateDate() $date = $this->_context->getLocaleDate()->scopeDate($customer->getStoreId(), $customer->getCreatedAt(), true); $storeCreateDate = $this->_block->formatDate( $date, - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true ); $this->assertEquals($storeCreateDate, $this->_block->getStoreCreateDate()); @@ -158,9 +158,9 @@ public function testGetStoreCreateDate() public function testGetStoreCreateDateTimezone() { /** - * @var \Magento\Stdlib\DateTime\TimezoneInterface $defaultTimeZonePath + * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface $defaultTimeZonePath */ - $defaultTimeZonePath = $this->_objectManager->get('Magento\Stdlib\DateTime\TimezoneInterface') + $defaultTimeZonePath = $this->_objectManager->get('Magento\Framework\Stdlib\DateTime\TimezoneInterface') ->getDefaultTimezonePath(); $timezone = $this->_context->getScopeConfig()->getValue( $defaultTimeZonePath, diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/TabsTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/TabsTest.php index 295c19d9258f0..ac47582dc5e9b 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/TabsTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/TabsTest.php @@ -59,7 +59,7 @@ class TabsTest extends \PHPUnit_Framework_TestCase /** * Core Registry. * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $coreRegistry; @@ -76,11 +76,11 @@ public function setUp() 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' ); - $this->coreRegistry = $objectManager->get('Magento\Registry'); + $this->coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, 1); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit\Tabs', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/EditTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/EditTest.php index abb4233ff68bf..eccd5611af15b 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/EditTest.php @@ -44,7 +44,7 @@ class EditTest extends \PHPUnit_Framework_TestCase /** * Core Registry. * - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $coreRegistry; @@ -63,11 +63,11 @@ public function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('adminhtml'); - $this->coreRegistry = $objectManager->get('Magento\Registry'); + $this->coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID, self::$customerId); $this->block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Adminhtml\Edit', '', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php index abfe2f108427e..c08088f6cc346 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/Edit/FormTest.php @@ -27,8 +27,8 @@ use Magento\Backend\App\Area\FrontNameResolver; use Magento\Customer\Controller\RegistryConstants; use Magento\Customer\Service\V1\Data\CustomerGroup; -use Magento\Service\V1\Data\FilterBuilder; -use Magento\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; use Magento\TestFramework\Helper\Bootstrap; /** @@ -39,7 +39,7 @@ class FormTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ private $layout; @@ -49,7 +49,7 @@ class FormTest extends \PHPUnit_Framework_TestCase private $customerGroupService; /** - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $registry; @@ -60,11 +60,11 @@ public function setUp() { parent::setUp(); $this->layout = Bootstrap::getObjectManager()->create( - 'Magento\View\Layout' + 'Magento\Framework\View\Layout' ); $this->customerGroupService = Bootstrap::getObjectManager() ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $this->registry = Bootstrap::getObjectManager()->get('Magento\Registry'); + $this->registry = Bootstrap::getObjectManager()->get('Magento\Framework\Registry'); } /** @@ -106,9 +106,9 @@ public function testGetForm() */ public function testGetFormExistInCustomGroup() { - /** @var \Magento\Service\V1\Data\SearchCriteriaBuilder $searchCriteria */ + /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteria */ $searchCriteria = Bootstrap::getObjectManager() - ->create('Magento\Service\V1\Data\SearchCriteriaBuilder') + ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder') ->addFilter([(new FilterBuilder())->setField('code')->setValue('custom_group')->create()])->create(); /** @var CustomerGroup $customerGroup */ $customerGroup = $this->customerGroupService->searchGroups($searchCriteria)->getItems()[0]; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php index 392b0f104fbf9..41f7651b6d263 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Group/EditTest.php @@ -27,8 +27,8 @@ use Magento\Backend\App\Area\FrontNameResolver; use Magento\Customer\Controller\RegistryConstants; use Magento\Customer\Service\V1\Data\CustomerGroup; -use Magento\Service\V1\Data\FilterBuilder; -use Magento\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\AbstractController; @@ -40,7 +40,7 @@ class EditTest extends AbstractController { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ private $layout; @@ -50,7 +50,7 @@ class EditTest extends AbstractController private $customerGroupService; /** - * @var \Magento\Registry + * @var \Magento\Framework\Registry */ private $registry; @@ -61,11 +61,11 @@ public function setUp() { parent::setUp(); $this->layout = Bootstrap::getObjectManager()->create( - 'Magento\View\Layout' + 'Magento\Framework\View\Layout' ); $this->customerGroupService = Bootstrap::getObjectManager() ->create('Magento\Customer\Service\V1\CustomerGroupService'); - $this->registry = Bootstrap::getObjectManager()->get('Magento\Registry'); + $this->registry = Bootstrap::getObjectManager()->get('Magento\Framework\Registry'); } /** @@ -97,9 +97,9 @@ public function testDeleteButtonNotExistInDefaultGroup() */ public function testDeleteButtonExistInCustomGroup() { - /** @var \Magento\Service\V1\Data\SearchCriteriaBuilder $searchCriteria */ + /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchCriteria */ $searchCriteria = Bootstrap::getObjectManager() - ->create('Magento\Service\V1\Data\SearchCriteriaBuilder') + ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder') ->addFilter([(new FilterBuilder())->setField('code')->setValue('custom_group')->create()])->create(); /** @var CustomerGroup $customerGroup */ $customerGroup = $this->customerGroupService->searchGroups($searchCriteria)->getItems()[0]; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/OnlineTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/OnlineTest.php index 4a4040f4b0b00..c5b0ee7f19768 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/OnlineTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/OnlineTest.php @@ -36,9 +36,9 @@ class OnlineTest extends \PHPUnit_Framework_TestCase */ public function testGetFilterFormHtml() { - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) ); /** @var $block \Magento\Customer\Block\Adminhtml\Online */ diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/GenderTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/GenderTest.php index fb927f6e91577..a13b264a07b46 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/GenderTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/GenderTest.php @@ -42,7 +42,7 @@ protected function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); $this->_block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Widget\Gender' ); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php index 224d758f12a3b..3178011b94cd6 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Widget/NameTest.php @@ -38,7 +38,7 @@ protected function setUp() $objectManager = Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); $this->_block = $objectManager->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Customer\Block\Widget\Name' ); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php index fc8bb5111dc93..9c2518ce1a0ee 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php @@ -25,7 +25,7 @@ namespace Magento\Customer\Controller; -use Magento\Message\MessageInterface; +use Magento\Framework\Message\MessageInterface; use Magento\TestFramework\Helper\Bootstrap; class AccountTest extends \Magento\TestFramework\TestCase\AbstractController @@ -453,7 +453,7 @@ public function testEditPostAction() $this->getRequest() ->setServer(['REQUEST_METHOD' => 'POST']) ->setPost([ - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'firstname' => 'John', 'lastname' => 'Doe', 'email' => 'johndoe@email.com' @@ -494,7 +494,7 @@ public function testChangePasswordEditPostAction() $this->getRequest() ->setServer(['REQUEST_METHOD' => 'POST']) ->setPost([ - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'firstname' => 'John', 'lastname' => 'Doe', 'email' => 'johndoe@email.com', @@ -527,7 +527,7 @@ public function testMissingDataEditPostAction() $this->getRequest() ->setServer(['REQUEST_METHOD' => 'POST']) ->setPost([ - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'firstname' => 'John', 'lastname' => 'Doe', 'email' => 'bad-email' @@ -551,7 +551,7 @@ public function testWrongPasswordEditPostAction() $this->getRequest() ->setServer(['REQUEST_METHOD' => 'POST']) ->setPost([ - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'firstname' => 'John', 'lastname' => 'Doe', 'email' => 'johndoe@email.com', @@ -579,7 +579,7 @@ public function testWrongConfirmationEditPostAction() $this->getRequest() ->setServer(['REQUEST_METHOD' => 'POST']) ->setPost([ - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'firstname' => 'John', 'lastname' => 'Doe', 'email' => 'johndoe@email.com', diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/AddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/AddressTest.php index 7515c4ea85500..20dfcb292577a 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/AddressTest.php @@ -31,7 +31,7 @@ class AddressTest extends \Magento\TestFramework\TestCase\AbstractController protected function setUp() { parent::setUp(); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Customer\Model\Session', array($logger) @@ -83,7 +83,7 @@ public function testFormPostAction() array('REQUEST_METHOD' => 'POST') )->setPost( array( - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'firstname' => 'James', 'lastname' => 'Bond', 'company' => 'Ebay', @@ -104,7 +104,7 @@ public function testFormPostAction() $this->assertRedirect($this->stringContains('customer/address/index')); $this->assertSessionMessages( $this->equalTo(array('The address has been saved.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); /** @var \Magento\Customer\Service\V1\CustomerAddressService $addressService */ $addressService = Bootstrap::getObjectManager()->create('Magento\Customer\Service\V1\CustomerAddressService'); @@ -128,7 +128,7 @@ public function testFailedFormPostAction() array('REQUEST_METHOD' => 'POST') )->setPost( array( - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'firstname' => 'James', 'lastname' => 'Bond', 'company' => 'Ebay', @@ -148,8 +148,14 @@ public function testFailedFormPostAction() $this->assertRedirect($this->stringContains('customer/address/edit')); $this->assertSessionMessages( - $this->equalTo(array('street is a required field.', 'city is a required field.')), - \Magento\Message\MessageInterface::TYPE_ERROR + $this->equalTo( + array( + 'One or more input exceptions have occurred.', + 'street is a required field.', + 'city is a required field.' + ) + ), + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -166,7 +172,7 @@ public function testDeleteAction() $this->assertRedirect($this->stringContains('customer/address/index')); $this->assertSessionMessages( $this->equalTo(array('The address has been deleted.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } @@ -183,7 +189,7 @@ public function testWrongAddressDeleteAction() $this->assertRedirect($this->stringContains('customer/address/index')); $this->assertSessionMessages( $this->equalTo(array('An error occurred while deleting the address.')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php index ab276bdb7ef3d..6f9abb07c3c52 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/GroupTest.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Controller\Adminhtml; use Magento\Customer\Controller\RegistryConstants; -use Magento\Message\MessageInterface; +use Magento\Framework\Message\MessageInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\Customer\Service\V1\Data\CustomerGroupBuilder; use Magento\Customer\Service\V1\CustomerGroupServiceInterface; @@ -35,44 +35,59 @@ class GroupTest extends \Magento\Backend\Utility\Controller { const TAX_CLASS_ID = 3; - const CUSTOMER_GROUP_CODE = 'New Customer Group'; + const CUSTOMER_GROUP_CODE = 'custom_group'; const BASE_CONTROLLER_URL = 'http://localhost/index.php/backend/customer/group/'; + const CUSTOMER_GROUP_ID = 2; - protected static $_customerGroupId; + /** @var \Magento\Framework\Session\SessionManagerInterface */ + private $session; - public static function setUpBeforeClass() + public function setUp() { - /** @var CustomerGroupServiceInterface $groupService */ - $groupService = Bootstrap::getObjectManager() - ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); + parent::setUp(); + $this->session = Bootstrap::getObjectManager()->get('Magento\Framework\Session\SessionManagerInterface'); + } - /** @var CustomerGroupBuilder $groupBuilder */ - $groupBuilder = Bootstrap::getObjectManager() - ->get('Magento\Customer\Service\V1\Data\CustomerGroupBuilder'); - $group = $groupBuilder->populateWithArray([ - 'id' => null, - 'code' => self::CUSTOMER_GROUP_CODE, - 'tax_class_id' => self::TAX_CLASS_ID - ]) - ->create(); - self::$_customerGroupId = $groupService->saveGroup($group);; + public function tearDown() + { + parent::tearDown(); + $this->session->unsCustomerGroupData(); } - public static function tearDownAfterClass() + public function testNewActionNoCustomerGroupDataInSession() { - /** @var \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService */ - $groupService = Bootstrap::getObjectManager() - ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $groupService->deleteGroup(self::$_customerGroupId); + $this->dispatch('backend/customer/group/new'); + $responseBody = $this->getResponse()->getBody(); + $this->assertRegExp('/

\s*New Customer Group\s*<\/h1>/', $responseBody); + $expected = 'assertContains($expected, $responseBody); } - public function testNewAction() + public function testNewActionWithCustomerGroupDataInSession() { + $customerGroupBuilder = Bootstrap::getObjectManager() + ->get('Magento\Customer\Service\V1\Data\CustomerGroupBuilder'); + $customerGroupBuilder->setCode(self::CUSTOMER_GROUP_CODE); + $customerGroupBuilder->setTaxClassId(self::TAX_CLASS_ID); + $customerGroup = $customerGroupBuilder->create(); + $customerGroupData = $customerGroup->__toArray(); + if (array_key_exists('code', $customerGroupData)) { + $customerGroupData['customer_group_code'] = $customerGroupData['code']; + unset($customerGroupData['code']); + } + $this->session->setCustomerGroupData($customerGroupData); $this->dispatch('backend/customer/group/new'); $responseBody = $this->getResponse()->getBody(); $this->assertRegExp('/

\s*New Customer Group\s*<\/h1>/', $responseBody); + $expected = 'assertContains($expected, $responseBody); } + /** + * @magentoDataFixture Magento/Customer/_files/customer_group.php + */ public function testDeleteActionNoGroupId() { $this->dispatch('backend/customer/group/delete'); @@ -80,11 +95,12 @@ public function testDeleteActionNoGroupId() } /** - * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Customer/_files/customer_group.php */ public function testDeleteActionExistingGroup() { - $this->getRequest()->setParam('id', self::$_customerGroupId); + $groupId = $this->findGroupIdWithCode(self::CUSTOMER_GROUP_CODE); + $this->getRequest()->setParam('id', $groupId); $this->dispatch('backend/customer/group/delete'); /** @@ -97,6 +113,9 @@ public function testDeleteActionExistingGroup() $this->assertRedirect($this->stringStartsWith(self::BASE_CONTROLLER_URL . 'index')); } + /** + * @magentoDataFixture Magento/Customer/_files/customer_group.php + */ public function testDeleteActionNonExistingGroupId() { $this->getRequest()->setParam('id', 10000); @@ -113,12 +132,13 @@ public function testDeleteActionNonExistingGroupId() } /** - * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Customer/_files/customer_group.php */ public function testSaveActionExistingGroup() { + $groupId = $this->findGroupIdWithCode(self::CUSTOMER_GROUP_CODE); $this->getRequest()->setParam('tax_class', self::TAX_CLASS_ID); - $this->getRequest()->setParam('id', self::$_customerGroupId); + $this->getRequest()->setParam('id', $groupId); $this->getRequest()->setParam('code', self::CUSTOMER_GROUP_CODE); $this->dispatch('backend/customer/group/save'); @@ -134,15 +154,15 @@ public function testSaveActionExistingGroup() /** @var \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService */ $groupService = Bootstrap::getObjectManager() ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $customerGroupData = \Magento\Service\DataObjectConverter::toFlatArray( - $groupService->getGroup(self::$_customerGroupId) + $customerGroupData = \Magento\Framework\Service\DataObjectConverter::toFlatArray( + $groupService->getGroup($groupId) ); ksort($customerGroupData); $this->assertEquals( [ 'code' => self::CUSTOMER_GROUP_CODE, - 'id' => self::$_customerGroupId, + 'id' => $groupId, 'tax_class_id' => self::TAX_CLASS_ID ], $customerGroupData @@ -150,27 +170,28 @@ public function testSaveActionExistingGroup() } /** - * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Customer/_files/customer_group.php */ public function testSaveActionExistingGroupWithEmptyGroupCode() { /** @var \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService */ $groupService = Bootstrap::getObjectManager() ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - - $originalCode = $groupService->getGroup(self::$_customerGroupId)->getCode(); + $groupId = $this->findGroupIdWithCode(self::CUSTOMER_GROUP_CODE); + $originalCode = $groupService->getGroup($groupId)->getCode(); $this->getRequest()->setParam('tax_class', self::TAX_CLASS_ID); - $this->getRequest()->setParam('id', self::$_customerGroupId); + $this->getRequest()->setParam('id', $groupId); $this->getRequest()->setParam('code', ''); $this->dispatch('backend/customer/group/save'); - $this->assertSessionMessages($this->equalTo(["One or more input exceptions have occurred.\n" - . "{\n\tcode: INVALID_FIELD_VALUE\n\tcode: \n\tparams: []\n }\n"]), MessageInterface::TYPE_ERROR); + $this->assertSessionMessages( + $this->equalTo(['Invalid value of "" provided for the code field.']), + MessageInterface::TYPE_ERROR + ); $this->assertSessionMessages($this->isEmpty(), MessageInterface::TYPE_SUCCESS); - - $this->assertEquals($originalCode, $groupService->getGroup(self::$_customerGroupId)->getCode()); + $this->assertEquals($originalCode, $groupService->getGroup($groupId)->getCode()); } public function testSaveActionForwardNewCreateNewGroup() @@ -180,18 +201,17 @@ public function testSaveActionForwardNewCreateNewGroup() $this->assertRegExp('/

\s*New Customer Group\s*<\/h1>/', $responseBody); } + /** + * @magentoDataFixture Magento/Customer/_files/customer_group.php + */ public function testSaveActionForwardNewEditExistingGroup() { - $this->getRequest()->setParam('id', self::$_customerGroupId); + $groupId = $this->findGroupIdWithCode(self::CUSTOMER_GROUP_CODE); + $this->getRequest()->setParam('id', $groupId); $this->dispatch('backend/customer/group/save'); - /** @var \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService */ - $groupService = Bootstrap::getObjectManager() - ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $customerGroupCode = $groupService->getGroup(self::$_customerGroupId)->getCode(); - $responseBody = $this->getResponse()->getBody(); - $this->assertRegExp('/

\s*' . $customerGroupCode . '\s*<\/h1>/', $responseBody); + $this->assertRegExp('/

\s*' . self::CUSTOMER_GROUP_CODE . '\s*<\/h1>/', $responseBody); } public function testSaveActionNonExistingGroupId() @@ -207,11 +227,77 @@ public function testSaveActionNonExistingGroupId() $this->equalTo(['No such entity with groupId = 10000']), MessageInterface::TYPE_ERROR ); + $this->assertRedirect($this->stringStartsWith(self::BASE_CONTROLLER_URL . 'edit/')); + $this->assertEquals(null, $this->session->getCustomerGroupData()); + } - /** @var \MagentoRegistry $coreRegistry */ - $coreRegistry = Bootstrap::getObjectManager()->get('Magento\Registry'); - $this->assertNull($coreRegistry->registry(RegistryConstants::CURRENT_GROUP_ID)); + /** + * @magentoDataFixture Magento/Customer/_files/customer_group.php + */ + public function testSaveActionNewGroupWithExistingGroupCode() + { + /** @var \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService */ + $groupService = Bootstrap::getObjectManager() + ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); + + $groupId = $this->findGroupIdWithCode(self::CUSTOMER_GROUP_CODE); + $originalCode = $groupService->getGroup($groupId)->getCode(); + + $this->getRequest()->setParam('tax_class', self::TAX_CLASS_ID); + $this->getRequest()->setParam('code', self::CUSTOMER_GROUP_CODE); + + $this->dispatch('backend/customer/group/save'); + + $this->assertSessionMessages($this->equalTo(['Customer Group already exists.']), MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), MessageInterface::TYPE_SUCCESS); + $this->assertEquals($originalCode, $groupService->getGroup($groupId)->getCode()); + $this->assertRedirect($this->stringStartsWith(self::BASE_CONTROLLER_URL . 'edit/')); + $this->assertEquals(self::CUSTOMER_GROUP_CODE, $this->session->getCustomerGroupData()['customer_group_code']); + $this->assertEquals(self::TAX_CLASS_ID, $this->session->getCustomerGroupData()['tax_class_id']); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_group.php + */ + public function testSaveActionNewGroupWithoutGroupCode() + { + /** @var \Magento\Customer\Service\V1\CustomerGroupServiceInterface $groupService */ + $groupService = Bootstrap::getObjectManager() + ->get('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); + $groupId = $this->findGroupIdWithCode(self::CUSTOMER_GROUP_CODE); + $originalCode = $groupService->getGroup($groupId)->getCode(); + + $this->getRequest()->setParam('tax_class', self::TAX_CLASS_ID); + + $this->dispatch('backend/customer/group/save'); + + $this->assertSessionMessages( + $this->equalTo(['Invalid value of "" provided for the code field.']), + MessageInterface::TYPE_ERROR + ); + $this->assertSessionMessages($this->isEmpty(), MessageInterface::TYPE_SUCCESS); + $this->assertEquals($originalCode, $groupService->getGroup($groupId)->getCode()); + $this->assertRedirect($this->stringStartsWith(self::BASE_CONTROLLER_URL . 'edit/')); + $this->assertEquals('', $this->session->getCustomerGroupData()['customer_group_code']); + $this->assertEquals(self::TAX_CLASS_ID, $this->session->getCustomerGroupData()['tax_class_id']); + } - $this->assertRedirect($this->stringStartsWith(self::BASE_CONTROLLER_URL . 'edit/id/10000')); + /** + * Find the group with a given code. + * + * @param string $code + * @return int + */ + protected function findGroupIdWithCode($code) + { + $groupService = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Customer\Service\V1\CustomerGroupService'); + foreach ($groupService->getGroups() as $group) { + if ($group->getCode() === $code) { + return $group->getId(); + } + } + + return -1; } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php index 7c6ae72cd6809..52a2bae211337 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php @@ -95,7 +95,7 @@ public function testSaveActionWithInvalidFormData() */ $this->assertSessionMessages( $this->logicalNot($this->isEmpty()), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); /** * Check that customer data were set to session @@ -131,7 +131,7 @@ public function testSaveActionWithInvalidCustomerAddressData() */ $this->assertSessionMessages( $this->logicalNot($this->isEmpty()), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); /** * Check that customer data were set to session @@ -180,7 +180,7 @@ public function testSaveActionWithValidCustomerDataAndValidAddressData() /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); /** * Check that customer data were set to session @@ -192,13 +192,13 @@ public function testSaveActionWithValidCustomerDataAndValidAddressData() */ $this->assertSessionMessages( $this->logicalNot($this->isEmpty()), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); /** * Check that customer id set and addresses saved */ - $registry = $objectManager->get('Magento\Registry'); + $registry = $objectManager->get('Magento\Framework\Registry'); $customerId = $registry->registry(RegistryConstants::CURRENT_CUSTOMER_ID); $customer = $this->customerAccountService->getCustomer($customerId); $this->assertEquals('test firstname', $customer->getFirstname()); @@ -231,7 +231,7 @@ public function testSaveActionExistingCustomerAndExistingAddressData() 'website_id' => 1, 'firstname' => 'test firstname', 'lastname' => 'test lastname', - 'email' => 'example@domain.com', + 'email' => 'customer@example.com', 'default_shipping' => '_item1', 'new_password' => 'auto', 'sendemail_store_id' => '1', @@ -276,7 +276,7 @@ public function testSaveActionExistingCustomerAndExistingAddressData() */ $this->assertSessionMessages( $this->equalTo(array('You saved the customer.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ @@ -285,7 +285,7 @@ public function testSaveActionExistingCustomerAndExistingAddressData() /** * Check that customer id set and addresses saved */ - $registry = $objectManager->get('Magento\Registry'); + $registry = $objectManager->get('Magento\Framework\Registry'); $customerId = $registry->registry(RegistryConstants::CURRENT_CUSTOMER_ID); $customer = $this->customerAccountService->getCustomer($customerId); $this->assertEquals('test firstname', $customer->getFirstname()); @@ -349,7 +349,7 @@ public function testSaveActionExistingCustomerUnsubscribeNewsletter() */ $this->assertSessionMessages( $this->equalTo(array('You saved the customer.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); @@ -369,7 +369,7 @@ public function testSaveActionCoreException() 'website_id' => 1, 'firstname' => 'test firstname', 'lastname' => 'test lastname', - 'email' => 'example@domain.com', + 'email' => 'customer@example.com', 'password' => 'auto' ) ); @@ -380,7 +380,7 @@ public function testSaveActionCoreException() */ $this->assertSessionMessages( $this->equalTo(array('Customer with the same email already exists in associated website.')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertEquals( $post, @@ -402,7 +402,7 @@ public function testEditAction() 'website_id' => 1, 'firstname' => 'new firstname', 'lastname' => 'new lastname', - 'email' => 'example@domain.com', + 'email' => 'customer@example.com', 'default_shipping' => '_item1', 'new_password' => 'auto', 'sendemail_store_id' => '1', @@ -537,7 +537,7 @@ public function testDeleteAction() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('You deleted the customer.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } @@ -551,7 +551,7 @@ public function testNotExistingCustomerDeleteAction() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 2')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -565,7 +565,7 @@ public function testGridAction() $body = $this->getResponse()->getBody(); $this->assertContains('test firstname test lastname', $body); - $this->assertContains('example@domain.com', $body); + $this->assertContains('customer@example.com', $body); $this->assertContains('+7000000001', $body); $this->assertContains('United States', $body); } @@ -612,7 +612,7 @@ public function testMassSubscriberAction() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('A total of 2 record(s) were updated.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertEquals( Subscriber::STATUS_SUBSCRIBED, @@ -634,7 +634,7 @@ public function testMassSubscriberActionNoSelection() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('Please select customer(s).')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -650,7 +650,7 @@ public function testMassSubscriberActionInvalidId() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 4200')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -674,11 +674,11 @@ public function testMassSubscriberActionPartialUpdate() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('A total of 2 record(s) were updated.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 4200')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertEquals( Subscriber::STATUS_SUBSCRIBED, @@ -699,7 +699,7 @@ public function testMassDeleteAction() $this->dispatch('backend/customer/index/massDelete'); $this->assertSessionMessages( $this->equalTo(array('A total of 1 record(s) were deleted.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertRedirect($this->stringContains('customer/index')); } @@ -713,7 +713,7 @@ public function testInvalidIdMassDeleteAction() $this->dispatch('backend/customer/index/massDelete'); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 1')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -726,7 +726,7 @@ public function testMassDeleteActionNoCustomerIds() $this->dispatch('backend/customer/index/massDelete'); $this->assertSessionMessages( $this->equalTo(array('Please select customer(s).')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -739,11 +739,11 @@ public function testMassDeleteActionPartialUpdate() $this->dispatch('backend/customer/index/massDelete'); $this->assertSessionMessages( $this->equalTo(array('A total of 2 record(s) were deleted.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 999', 'No such entity with customerId = 9999')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -759,7 +759,7 @@ public function testMassAssignGroupAction() $this->dispatch('backend/customer/index/massAssignGroup'); $this->assertSessionMessages( $this->equalTo(array('A total of 1 record(s) were updated.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertRedirect($this->stringContains('customer/index')); @@ -777,7 +777,7 @@ public function testMassAssignGroupActionInvalidCustomerId() $this->dispatch('backend/customer/index/massAssignGroup'); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 1')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -791,7 +791,7 @@ public function testMassAssignGroupActionNoCustomerIds() $this->dispatch('backend/customer/index/massAssignGroup'); $this->assertSessionMessages( $this->equalTo(array('Please select customer(s).')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -807,11 +807,11 @@ public function testMassAssignGroupActionPartialUpdate() $this->dispatch('backend/customer/index/massAssignGroup'); $this->assertSessionMessages( $this->equalTo(array('A total of 2 record(s) were updated.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 4200')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertEquals(0, $this->customerAccountService->getCustomer(1)->getGroupId()); @@ -837,7 +837,7 @@ public function testMassUnsubscriberAction() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('A total of 2 record(s) were updated.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertEquals( Subscriber::STATUS_UNSUBSCRIBED, @@ -859,7 +859,7 @@ public function testMassUnsubscriberActionNoSelection() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('Please select customer(s).')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -875,7 +875,7 @@ public function testMassUnsubscriberActionInvalidId() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 4200')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -898,11 +898,11 @@ public function testMassUnsubscriberActionPartialUpdate() $this->assertRedirect($this->stringContains('customer/index')); $this->assertSessionMessages( $this->equalTo(array('A total of 2 record(s) were updated.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertSessionMessages( $this->equalTo(array('No such entity with customerId = 4200')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertEquals( Subscriber::STATUS_UNSUBSCRIBED, @@ -965,7 +965,7 @@ public function testValidateCustomerWithAddressSuccess() /** * Check that no errors were generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); $this->assertEquals('{"error":0}', $body); } @@ -1057,7 +1057,7 @@ public function testResetPasswordActionSuccess() $this->dispatch('backend/customer/index/resetPassword'); $this->assertSessionMessages( $this->equalTo(array('Customer will receive an email with a link to reset password.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertRedirect($this->stringStartsWith($this->_baseControllerUrl . 'edit')); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AddressRegistryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AddressRegistryTest.php index 50d70c67cd547..1643e9bdbbe47 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/AddressRegistryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AddressRegistryTest.php @@ -70,7 +70,7 @@ public function testRetrieveCached() } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRetrieveException() { @@ -81,7 +81,7 @@ public function testRetrieveException() /** * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Customer/_files/customer_address.php - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRemove() { diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php index f47669a95e3c3..58d4a02f7cc74 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/CustomerRegistryTest.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Model; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\TestFramework\Helper\Bootstrap; /** @@ -91,7 +91,7 @@ public function testRetrieveCached() } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage No such entity with customerId = 1 */ public function testRetrieveException() @@ -106,16 +106,18 @@ public function testRetrieveEmailException() $this->fail("NoSuchEntityException was not thrown as expected."); } catch (NoSuchEntityException $e) { $expectedParams = [ - 'email' => 'customer@example.com', - 'websiteId' => '1', + 'fieldName' => 'email', + 'fieldValue' => 'customer@example.com', + 'field2Name' => 'websiteId', + 'field2Value' => 1, ]; - $this->assertEquals($expectedParams, $e->getParams()); + $this->assertEquals($expectedParams, $e->getParameters()); } } /** * @magentoDataFixture Magento/Customer/_files/customer.php - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @magentoAppArea adminhtml */ public function testRemove() @@ -129,7 +131,7 @@ public function testRemove() /** * @magentoDataFixture Magento/Customer/_files/customer.php - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @magentoAppArea adminhtml */ public function testRemoveByEmail() diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/GroupRegistryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/GroupRegistryTest.php index 53f4967b05d3f..083332c174d4c 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/GroupRegistryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/GroupRegistryTest.php @@ -104,7 +104,7 @@ public function testRetrieveCached() } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRetrieveException() { @@ -114,7 +114,7 @@ public function testRetrieveException() /** * @magentoDataFixture Magento/Customer/_files/customer_group.php - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRemove() { diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Export/AddressTest.php similarity index 94% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Export/AddressTest.php index 9804d8c45d669..1a268106220f9 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Export/AddressTest.php @@ -18,19 +18,16 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ImportExport\Model\Export\Entity\Eav\Customer; -use \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address as ImportAddress; -use \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address; +namespace Magento\Customer\Model\ImportExport\Export; + +use Magento\Customer\Model\ImportExport\Import\Address as ImportAddress; /** * Test for customer address export model * - * @magentoDataFixture Magento/ImportExport/_files/customer_with_addresses.php + * @magentoDataFixture Magento/Customer/_files/import_export/customer_with_addresses.php */ class AddressTest extends \PHPUnit_Framework_TestCase { @@ -50,7 +47,7 @@ protected function setUp() { parent::setUp(); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address' + 'Magento\Customer\Model\ImportExport\Export\Address' ); $websites = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( @@ -109,7 +106,7 @@ public function testExport() // Get addresses /** @var $customers \Magento\Customer\Model\Customer[] */ $customers = $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->registry( '_fixture/Magento_ImportExport_Customers_Array' ); @@ -181,7 +178,7 @@ public function testExportWithFilter($genderFilterValue) // Get expected address count /** @var $customers \Magento\Customer\Model\Customer[] */ $customers = $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->registry( '_fixture/Magento_ImportExport_Customers_Array' ); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/CustomerTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Export/CustomerTest.php similarity index 94% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/CustomerTest.php rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Export/CustomerTest.php index 27e0cbe76c4f7..2d2332f77bf21 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/CustomerTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Export/CustomerTest.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,26 +25,26 @@ /** * Test for customer export model */ -namespace Magento\ImportExport\Model\Export\Entity\Eav; +namespace Magento\Customer\Model\ImportExport\Export; class CustomerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ImportExport\Model\Export\Entity\Eav\Customer + * @var \Magento\Customer\Model\ImportExport\Export\Customer */ protected $_model; protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\ImportExport\Model\Export\Entity\Eav\Customer' + 'Magento\Customer\Model\ImportExport\Export\Customer' ); } /** * Test export method * - * @magentoDataFixture Magento/ImportExport/_files/customers.php + * @magentoDataFixture Magento/Customer/_files/import_export/customers.php */ public function testExport() { @@ -84,7 +81,7 @@ public function testExport() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $customers \Magento\Customer\Model\Customer[] */ $customers = $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->registry( '_fixture/Magento_ImportExport_Customer_Collection' ); @@ -165,7 +162,7 @@ public function testFilterAttributeCollection() /** * Test for method filterEntityCollection() * - * @magentoDataFixture Magento/ImportExport/_files/customers.php + * @magentoDataFixture Magento/Customer/_files/import_export/customers.php */ public function testFilterEntityCollection() { @@ -178,7 +175,7 @@ public function testFilterEntityCollection() * Change created_at date of first customer for future filter test. */ $customers = $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->registry( '_fixture/Magento_ImportExport_Customer_Collection' ); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/AddressTest.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/AddressTest.php index 5b00195111f70..22c34b0820435 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/AddressTest.php @@ -18,17 +18,14 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Test class for \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address + * Test class for \Magento\Customer\Model\ImportExport\Import\Address */ -namespace Magento\ImportExport\Model\Import\Entity\Eav\Customer; +namespace Magento\Customer\Model\ImportExport\Import; class AddressTest extends \PHPUnit_Framework_TestCase { @@ -37,7 +34,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase * * @var string */ - protected $_testClassName = 'Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address'; + protected $_testClassName = 'Magento\Customer\Model\ImportExport\Import\Address'; /** * Fixture key from fixture @@ -49,7 +46,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase /** * Address entity adapter instance * - * @var \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address + * @var Address */ protected $_entityAdapter; @@ -106,7 +103,7 @@ protected function setUp() /** * Test constructor * - * @magentoDataFixture Magento/ImportExport/_files/customer_with_addresses.php + * @magentoDataFixture Magento/Customer/_files/import_export/customer_with_addresses.php */ public function testConstruct() { @@ -162,8 +159,7 @@ public function testConstruct() /** * Test _initAddresses * - * @magentoDataFixture Magento/ImportExport/_files/customer_with_addresses.php - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::_initAddresses + * @magentoDataFixture Magento/Customer/_files/import_export/customer_with_addresses.php */ public function testInitAddresses() { @@ -171,7 +167,7 @@ public function testInitAddresses() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); // get addressed from fixture - $customers = $objectManager->get('Magento\Registry')->registry($this->_fixtureKey); + $customers = $objectManager->get('Magento\Framework\Registry')->registry($this->_fixtureKey); $correctAddresses = array(); /** @var $customer \Magento\Customer\Model\Customer */ foreach ($customers as $customer) { @@ -219,8 +215,7 @@ public function testInitAddresses() /** * Test _saveAddressEntity * - * @magentoDataFixture Magento/ImportExport/_files/customer_with_addresses.php - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::_saveAddressEntities + * @magentoDataFixture Magento/Customer/_files/import_export/customer_with_addresses.php */ public function testSaveAddressEntities() { @@ -239,15 +234,15 @@ public function testSaveAddressEntities() /** * Add new test address for existing customer * - * @param \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address $entityAdapter + * @param Address $entityAdapter * @return array (customerID, addressID) */ - protected function _addTestAddress(\Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address $entityAdapter) + protected function _addTestAddress(Address $entityAdapter) { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $customers = $objectManager->get('Magento\Registry')->registry($this->_fixtureKey); + $customers = $objectManager->get('Magento\Framework\Registry')->registry($this->_fixtureKey); /** @var $customer \Magento\Customer\Model\Customer */ $customer = reset($customers); $customerId = $customer->getId(); @@ -260,8 +255,9 @@ protected function _addTestAddress(\Magento\ImportExport\Model\Import\Entity\Eav $addressId = $objectManager->get('Magento\ImportExport\Model\Resource\Helper') ->getNextAutoincrement($tableName); - /** @var \Magento\Stdlib\DateTime $dateTime */ - $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Stdlib\DateTime'); + /** @var \Magento\Framework\Stdlib\DateTime $dateTime */ + $dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Stdlib\DateTime'); $entityData = array( 'entity_id' => $addressId, @@ -282,8 +278,7 @@ protected function _addTestAddress(\Magento\ImportExport\Model\Import\Entity\Eav /** * Test _saveAddressAttributes * - * @magentoDataFixture Magento/ImportExport/_files/customer_with_addresses.php - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::_saveAddressAttributes + * @magentoDataFixture Magento/Customer/_files/import_export/customer_with_addresses.php */ public function testSaveAddressAttributes() { @@ -327,8 +322,7 @@ public function testSaveAddressAttributes() /** * Test _saveCustomerDefaults * - * @magentoDataFixture Magento/ImportExport/_files/customer_with_addresses.php - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::_saveCustomerDefaults + * @magentoDataFixture Magento/Customer/_files/import_export/customer_with_addresses.php */ public function testSaveCustomerDefaults() { @@ -336,7 +330,7 @@ public function testSaveCustomerDefaults() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); // get not default address - $customers = $objectManager->get('Magento\Registry')->registry($this->_fixtureKey); + $customers = $objectManager->get('Magento\Framework\Registry')->registry($this->_fixtureKey); /** @var $notDefaultAddress \Magento\Customer\Model\Address */ $notDefaultAddress = null; /** @var $addressCustomer \Magento\Customer\Model\Customer */ @@ -363,8 +357,7 @@ public function testSaveCustomerDefaults() // set customer defaults $defaults = array(); - foreach (\Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address:: - getDefaultAddressAttributeMapping() as $attributeCode) { + foreach (Address::getDefaultAddressAttributeMapping() as $attributeCode) { /** @var $attribute \Magento\Eav\Model\Entity\Attribute\AbstractAttribute */ $attribute = $addressCustomer->getAttribute($attributeCode); $attributeTable = $attribute->getBackend()->getTable(); @@ -401,8 +394,7 @@ public function testSaveCustomerDefaults() /** * Test import data method with add/update behaviour * - * @magentoDataFixture Magento/ImportExport/_files/customers_for_address_import.php - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::_importData + * @magentoDataFixture Magento/Customer/_files/import_export/customers_for_address_import.php */ public function testImportDataAddUpdate() { @@ -412,7 +404,7 @@ public function testImportDataAddUpdate() ); // set fixture CSV file - $sourceFile = __DIR__ . '/../_files/address_import_update.csv'; + $sourceFile = __DIR__ . '/_files/address_import_update.csv'; /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -500,8 +492,7 @@ public function testImportDataAddUpdate() /** * Test import data method with delete behaviour * - * @magentoDataFixture Magento/ImportExport/_files/customers_for_address_import.php - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::_importData + * @magentoDataFixture Magento/Customer/_files/import_export/customers_for_address_import.php */ public function testImportDataDelete() { @@ -509,7 +500,7 @@ public function testImportDataDelete() $this->_entityAdapter->setParameters(array('behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE)); // set fixture CSV file - $sourceFile = __DIR__ . '/../_files/address_import_delete.csv'; + $sourceFile = __DIR__ . '/_files/address_import_delete.csv'; /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerCompositeTest.php similarity index 93% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerCompositeTest.php index 7138639415a4a..30db707aa671a 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerCompositeTest.php @@ -18,13 +18,10 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ImportExport\Model\Import\Entity; +namespace Magento\Customer\Model\ImportExport\Import; class CustomerCompositeTest extends \PHPUnit_Framework_TestCase { @@ -56,7 +53,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase /** * Composite customer entity adapter instance * - * @var \Magento\ImportExport\Model\Import\Entity\CustomerComposite + * @var CustomerComposite */ protected $_entityAdapter; @@ -101,7 +98,7 @@ protected function setUp() { $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_entityAdapter = $this->_objectManager->create( - 'Magento\ImportExport\Model\Import\Entity\CustomerComposite' + 'Magento\Customer\Model\ImportExport\Import\CustomerComposite' ); } @@ -149,16 +146,15 @@ protected function _assertCustomerData(array $expectedData) * @param array $dataAfter * @param array $errors * - * @magentoDataFixture Magento/ImportExport/_files/customers_for_address_import.php + * @magentoDataFixture Magento/Customer/_files/import_export/customers_for_address_import.php * @magentoAppIsolation enabled * * @dataProvider importDataDataProvider - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_importData */ public function testImportData($behavior, $sourceFile, array $dataBefore, array $dataAfter, array $errors = array()) { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); // set entity adapter parameters $this->_entityAdapter->setParameters(array('behavior' => $behavior)); /** @var \Magento\Framework\App\Filesystem $filesystem */ diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php new file mode 100644 index 0000000000000..89e83aee6f500 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php @@ -0,0 +1,288 @@ +_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Customer\Model\ImportExport\Import\Customer'); + $this->_model->setParameters(['behavior' => Import::BEHAVIOR_ADD_UPDATE]); + + $propertyAccessor = new \ReflectionProperty($this->_model, '_messageTemplates'); + $propertyAccessor->setAccessible(true); + $propertyAccessor->setValue($this->_model, array()); + + $this->_customerData = [ + 'firstname' => 'Firstname', + 'lastname' => 'Lastname', + 'group_id' => 1, + Customer::COLUMN_EMAIL => 'customer@example.com', + Customer::COLUMN_WEBSITE => 'base', + Customer::COLUMN_STORE => 'default', + 'store_id' => 1, + 'website_id' => 1, + 'password' => 'password' + ]; + + $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\App\Filesystem'); + $this->directoryWrite = $filesystem + ->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); + } + + /** + * Test importData() method + * + * @magentoDataFixture Magento/Customer/_files/import_export/customer.php + */ + public function testImportData() + { + // 3 customers will be imported. + // 1 of this customers is already exist, but its first and last name were changed in file + $expectAddedCustomers = 5; + + $source = new \Magento\ImportExport\Model\Import\Source\Csv( + __DIR__ . '/_files/customers_to_import.csv', + $this->directoryWrite + ); + + /** @var $customersCollection \Magento\Customer\Model\Resource\Customer\Collection */ + $customersCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Model\Resource\Customer\Collection' + ); + $customersCollection->addAttributeToSelect('firstname', 'inner')->addAttributeToSelect('lastname', 'inner'); + + $existCustomersCount = count($customersCollection->load()); + + $customersCollection->resetData(); + $customersCollection->clear(); + + $this->_model + ->setParameters(['behavior' => Import::BEHAVIOR_ADD_UPDATE]) + ->setSource($source) + ->isDataValid(); + + $this->_model->importData(); + + $customers = $customersCollection->getItems(); + + $addedCustomers = count($customers) - $existCustomersCount; + + $this->assertEquals($expectAddedCustomers, $addedCustomers, 'Added unexpected amount of customers'); + + /** @var $objectManager \Magento\TestFramework\ObjectManager */ + $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + + $existingCustomer = $objectManager->get( + 'Magento\Framework\Registry' + )->registry( + '_fixture/Magento_ImportExport_Customer' + ); + + $updatedCustomer = $customers[$existingCustomer->getId()]; + + $this->assertNotEquals( + $existingCustomer->getFirstname(), + $updatedCustomer->getFirstname(), + 'Firstname must be changed' + ); + + $this->assertNotEquals( + $existingCustomer->getLastname(), + $updatedCustomer->getLastname(), + 'Lastname must be changed' + ); + + $this->assertNotEquals( + $existingCustomer->getCreatedAt(), + $updatedCustomer->getCreatedAt(), + 'Creation date must be changed' + ); + } + + /** + * Test importData() method (delete behavior) + * + * @magentoDataFixture Magento/Customer/_files/import_export/customers.php + */ + public function testDeleteData() + { + \Magento\TestFramework\Helper\Bootstrap::getInstance() + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); + $source = new \Magento\ImportExport\Model\Import\Source\Csv( + __DIR__ . '/_files/customers_to_import.csv', + $this->directoryWrite + ); + + /** @var $customerCollection \Magento\Customer\Model\Resource\Customer\Collection */ + $customerCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Model\Resource\Customer\Collection' + ); + $this->assertEquals(3, $customerCollection->count(), 'Count of existing customers are invalid'); + + + $this->_model->setParameters( + array('behavior' => Import::BEHAVIOR_DELETE) + )->setSource( + $source + )->isDataValid(); + + $this->_model->importData(); + + $customerCollection->resetData(); + $customerCollection->clear(); + $this->assertEmpty($customerCollection->count(), 'Customers were not imported'); + } + + public function testGetEntityTypeCode() + { + $this->assertEquals('customer', $this->_model->getEntityTypeCode()); + } + + public function testValidateRowDuplicateEmail() + { + $this->_model->validateRow($this->_customerData, 0); + $this->assertEquals(0, $this->_model->getErrorsCount()); + + $this->_customerData[Customer::COLUMN_EMAIL] = strtoupper( + $this->_customerData[Customer::COLUMN_EMAIL] + ); + $this->_model->validateRow($this->_customerData, 1); + $this->assertEquals(1, $this->_model->getErrorsCount()); + $this->assertArrayHasKey( + Customer::ERROR_DUPLICATE_EMAIL_SITE, + $this->_model->getErrorMessages() + ); + } + + public function testValidateRowInvalidEmail() + { + $this->_customerData[Customer::COLUMN_EMAIL] = 'wrong_email@format'; + $this->_model->validateRow($this->_customerData, 0); + $this->assertEquals(1, $this->_model->getErrorsCount()); + $this->assertArrayHasKey( + Customer::ERROR_INVALID_EMAIL, + $this->_model->getErrorMessages() + ); + } + + public function testValidateRowInvalidWebsite() + { + $this->_customerData[Customer::COLUMN_WEBSITE] = 'not_existing_web_site'; + $this->_model->validateRow($this->_customerData, 0); + $this->assertEquals(1, $this->_model->getErrorsCount()); + $this->assertArrayHasKey( + Customer::ERROR_INVALID_WEBSITE, + $this->_model->getErrorMessages() + ); + } + + public function testValidateRowInvalidStore() + { + $this->_customerData[Customer::COLUMN_STORE] = 'not_existing_web_store'; + $this->_model->validateRow($this->_customerData, 0); + $this->assertEquals(1, $this->_model->getErrorsCount()); + $this->assertArrayHasKey( + Customer::ERROR_INVALID_STORE, + $this->_model->getErrorMessages() + ); + } + + public function testValidateRowPasswordLengthIncorrect() + { + $this->_customerData['password'] = '12345'; + $this->_model->validateRow($this->_customerData, 0); + $this->assertEquals(1, $this->_model->getErrorsCount()); + $this->assertArrayHasKey( + Customer::ERROR_PASSWORD_LENGTH, $this->_model->getErrorMessages() + ); + } + + public function testValidateRowPasswordLengthCorrect() + { + $this->_customerData['password'] = '1234567890'; + $this->_model->validateRow($this->_customerData, 0); + $this->assertEquals(0, $this->_model->getErrorsCount()); + } + + /** + * @magentoDataFixture Magento/Customer/_files/import_export/customers.php + */ + public function testValidateRowAttributeRequired() + { + unset($this->_customerData['firstname']); + unset($this->_customerData['lastname']); + unset($this->_customerData['group_id']); + + $this->_model->validateRow($this->_customerData, 0); + $this->assertEquals(0, $this->_model->getErrorsCount()); + + $this->_customerData[Customer::COLUMN_EMAIL] = 'new.customer@example.com'; + $this->_model->validateRow($this->_customerData, 1); + $this->assertGreaterThan(0, $this->_model->getErrorsCount()); + $this->assertArrayHasKey(Customer::ERROR_VALUE_IS_REQUIRED, $this->_model->getErrorMessages()); + } + + public function testValidateEmailForDeleteBehavior() + { + $this->_customerData[Customer::COLUMN_EMAIL] = 'new.customer@example.com'; + $this->_model->setParameters(array('behavior' => Import::BEHAVIOR_DELETE)); + $this->_model->validateRow($this->_customerData, 0); + $this->assertGreaterThan(0, $this->_model->getErrorsCount()); + $this->assertArrayHasKey( + Customer::ERROR_CUSTOMER_NOT_FOUND, $this->_model->getErrorMessages() + ); + } +} diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/address_import_delete.csv b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/address_import_delete.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/address_import_delete.csv rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/address_import_delete.csv diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/address_import_update.csv b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/address_import_update.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/address_import_update.csv rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/address_import_update.csv diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customer_composite_delete.csv b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customer_composite_delete.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customer_composite_delete.csv rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customer_composite_delete.csv diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customer_composite_update.csv b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customer_composite_update.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customer_composite_update.csv rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customer_composite_update.csv diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/customers_to_import.csv b/dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customers_to_import.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/customers_to_import.csv rename to dev/tests/integration/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customers_to_import.csv diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php index 5b9a82456d4d4..695b3b9ce0f2d 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php @@ -39,7 +39,7 @@ public function setUp() public function testSetOrder() { - $this->collection->setOrder('code', \Magento\Data\Collection::SORT_ORDER_ASC); + $this->collection->setOrder('code', \Magento\Framework\Data\Collection::SORT_ORDER_ASC); $this->collection->loadData(); $items = $this->collection->getItems(); $this->assertEquals(4, count($items)); @@ -114,7 +114,7 @@ public function testSingleLikeFilter() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage When passing in a field array there must be a matching condition array. */ public function testAddToFilterException() diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php index 31de9aebdee95..efc37113916b6 100755 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php @@ -1,17 +1,5 @@ _customerAccountService->activateCustomer($customerModel->getId(), $key . $key); $this->fail('Expected exception was not thrown'); } catch (InputException $ie) { - $expectedParams = [ - [ - 'code' => StateException::INPUT_MISMATCH, - 'fieldName' => 'confirmation', - 'value' => $key . $key, - ] - ]; - $this->assertEquals($expectedParams, $ie->getParams()); + $this->assertEquals('', $ie->getMessage()); } } @@ -244,20 +237,15 @@ public function testActivateCustomerWrongAccount() try { $this->_customerAccountService->activateCustomer('1234' . $customerModel->getId(), $key); $this->fail('Expected exception not thrown.'); - } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'customerId' => '12341', - ]; - $this->assertEquals($expectedParams, $e->getParams()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = 12341', $nsee->getMessage()); } } /** * @magentoDataFixture Magento/Customer/_files/inactive_customer.php * @magentoAppArea frontend - * - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::INVALID_STATE + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException */ public function testActivateCustomerAlreadyActive() { @@ -282,9 +270,7 @@ public function testValidateResetPasswordLinkToken() /** * @magentoDataFixture Magento/Customer/_files/customer.php - * - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::EXPIRED + * @expectedException \Magento\Framework\Exception\State\ExpiredException */ public function testValidateResetPasswordLinkTokenExpired() { @@ -305,14 +291,10 @@ public function testValidateResetPasswordLinkTokenInvalid() $this->_customerAccountService->validateResetPasswordLinkToken(1, $invalidToken); $this->fail('Expected exception not thrown.'); } catch (InputException $ie) { - $expectedParams = [ - [ - 'value' => $invalidToken, - 'fieldName' => 'resetPasswordLinkToken', - 'code' => InputException::INVALID_FIELD_VALUE, - ] - ]; - $this->assertEquals($expectedParams, $ie->getParams()); + $this->assertEquals(InputException::REQUIRED_FIELD, $ie->getRawMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getLogMessage()); + $this->assertEmpty($ie->getErrors()); } } @@ -327,11 +309,8 @@ public function testValidateResetPasswordLinkTokenWrongUser() try { $this->_customerAccountService->validateResetPasswordLinkToken(4200, $resetToken); $this->fail('Expected exception not thrown.'); - } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'customerId' => '4200', - ]; - $this->assertEquals($expectedParams, $e->getParams()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = 4200', $nsee->getMessage()); } } @@ -345,14 +324,10 @@ public function testValidateResetPasswordLinkTokenNull() $this->_customerAccountService->validateResetPasswordLinkToken(1, null); $this->fail('Expected exception not thrown.'); } catch (InputException $ie) { - $expectedParams = [ - [ - 'value' => null, - 'fieldName' => 'resetPasswordLinkToken', - 'code' => InputException::INVALID_FIELD_VALUE, - ] - ]; - $this->assertEquals($expectedParams, $ie->getParams()); + $this->assertEquals(InputException::REQUIRED_FIELD, $ie->getRawMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getLogMessage()); + $this->assertEmpty($ie->getErrors()); } } @@ -395,16 +370,17 @@ public function testSendPasswordResetLinkBadEmailOrWebsite() $this->fail('Expected exception not thrown.'); } catch (NoSuchEntityException $e) { $expectedParams = [ - 'email' => $email, - 'websiteId' => 0, + 'fieldName' => 'email', + 'fieldValue' => $email, + 'field2Name' => 'websiteId', + 'field2Value' => 0, ]; - $this->assertEquals($expectedParams, $e->getParams()); + $this->assertEquals($expectedParams, $e->getParameters()); } } /** * @magentoDataFixture Magento/Customer/_files/customer.php - * */ public function testSendPasswordResetLinkBadEmailDefaultWebsite() { @@ -417,8 +393,8 @@ public function testSendPasswordResetLinkBadEmailDefaultWebsite() ); $this->fail('Expected exception not thrown.'); } catch (NoSuchEntityException $nsee) { - $expectedParams = array('email' => $email, 'websiteId' => 1); - $this->assertEquals($expectedParams, $nsee->getParams()); + // App area is frontend, so we expect websiteId of 1. + $this->assertEquals('No such entity with email = foo@example.com, websiteId = 1', $nsee->getMessage()); } } @@ -439,9 +415,7 @@ public function testResetPassword() /** * @magentoDataFixture Magento/Customer/_files/customer.php - * - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::EXPIRED + * @expectedException \Magento\Framework\Exception\State\ExpiredException */ public function testResetPasswordTokenExpired() { @@ -467,14 +441,10 @@ public function testResetPasswordTokenInvalid() $this->_customerAccountService->resetPassword(1, $invalidToken, $password); $this->fail('Expected exception not thrown.'); } catch (InputException $ie) { - $expectedParams = [ - [ - 'value' => $invalidToken, - 'fieldName' => 'resetPasswordLinkToken', - 'code' => InputException::INVALID_FIELD_VALUE, - ] - ]; - $this->assertEquals($expectedParams, $ie->getParams()); + $this->assertEquals(InputException::REQUIRED_FIELD, $ie->getRawMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $ie->getLogMessage()); + $this->assertEmpty($ie->getErrors()); } } @@ -489,11 +459,8 @@ public function testResetPasswordTokenWrongUser() try { $this->_customerAccountService->resetPassword(4200, $resetToken, $password); $this->fail('Expected exception not thrown.'); - } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'customerId' => '4200', - ]; - $this->assertEquals($expectedParams, $e->getParams()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = 4200', $nsee->getMessage()); } } @@ -511,14 +478,8 @@ public function testResetPasswordTokenInvalidUserId() $this->_customerAccountService->resetPassword(0, $resetToken, $password); $this->fail('Expected exception not thrown.'); } catch (InputException $ie) { - $expectedParams = [ - [ - 'value' => 0, - 'fieldName' => 'customerId', - 'code' => InputException::INVALID_FIELD_VALUE, - ] - ]; - $this->assertEquals($expectedParams, $ie->getParams()); + $this->assertEquals('Invalid value of "0" provided for the customerId field.', $ie->getMessage()); + $this->assertEmpty($ie->getErrors()); } } @@ -543,12 +504,11 @@ public function testResendConfirmationBadWebsiteId() { try { $this->_customerAccountService->resendConfirmation('customer@needAconfirmation.com', 'notAWebsiteId'); - } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'email' => 'customer@needAconfirmation.com', - 'websiteId' => 'notAWebsiteId', - ]; - $this->assertEquals($expectedParams, $e->getParams()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals( + 'No such entity with email = customer@needAconfirmation.com, websiteId = notAWebsiteId', + $nsee->getMessage() + ); } } @@ -560,20 +520,17 @@ public function testResendConfirmationNoEmail() try { $this->_customerAccountService->resendConfirmation('wrongemail@example.com', 1); $this->fail('Expected exception not thrown.'); - } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'email' => 'wrongemail@example.com', - 'websiteId' => '1', - ]; - $this->assertEquals($expectedParams, $e->getParams()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals( + 'No such entity with email = wrongemail@example.com, websiteId = 1', + $nsee->getMessage() + ); } } /** * @magentoDataFixture Magento/Customer/_files/customer.php - * - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::INVALID_STATE + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException */ public function testResendConfirmationNotNeeded() { @@ -626,8 +583,9 @@ public function testUpdateCustomerAddress() $newAddress = array_merge($addresses[0]->__toArray(), ['city' => $city]); $this->_addressBuilder->populateWithArray($newAddress); - $this->_customerDetailsBuilder->setCustomer($customerDetails->getCustomer()) - ->setAddresses(array($this->_addressBuilder->create(), $addresses[1])); + $this->_customerDetailsBuilder + ->setCustomer($customerDetails->getCustomer()) + ->setAddresses([$this->_addressBuilder->create(), $addresses[1]]); $this->_customerAccountService->updateCustomer($this->_customerDetailsBuilder->create()); $newCustomerDetails = $this->_customerAccountService->getCustomerDetails($customerId); @@ -652,8 +610,8 @@ public function testUpdateCustomerDeleteOneAddress() $addresses = $customerDetails->getAddresses(); $addressIdToRetain = $addresses[1]->getId(); - $this->_customerDetailsBuilder->setCustomer($customerDetails->getCustomer()) - ->setAddresses([$addresses[1]]); + $this->_customerDetailsBuilder + ->setCustomer($customerDetails->getCustomer())->setAddresses([$addresses[1]]); $this->_customerAccountService->updateCustomer($this->_customerDetailsBuilder->create()); @@ -693,14 +651,14 @@ public function testUpdateCustomer() $customerBefore = $this->_customerAccountService->getCustomer($existingCustId); - $customerData = array_merge($customerBefore->__toArray(), array( + $customerData = array_merge($customerBefore->__toArray(), [ 'id' => 1, 'email' => $email, 'firstname' => $firstName, 'lastname' => $lastname, 'created_in' => 'Admin', 'password' => 'notsaved' - )); + ]); $this->_customerBuilder->populateWithArray($customerData); $modifiedCustomer = $this->_customerBuilder->create(); $customerDetails = $this->_customerDetailsBuilder->setCustomer($modifiedCustomer)->create(); @@ -712,18 +670,18 @@ public function testUpdateCustomer() $this->assertEquals('Admin', $customerAfter->getCreatedIn()); $passwordFromFixture = 'password'; $this->_customerAccountService->authenticate($customerAfter->getEmail(), $passwordFromFixture); - $attributesBefore = \Magento\Service\DataObjectConverter::toFlatArray($customerBefore); - $attributesAfter = \Magento\Service\DataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customerBefore); + $attributesAfter = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); $inBeforeOnly = array_diff_assoc($attributesBefore, $attributesAfter); $inAfterOnly = array_diff_assoc($attributesAfter, $attributesBefore); - $expectedInBefore = array( + $expectedInBefore = [ 'firstname', 'lastname', 'email', - ); + ]; foreach ($expectedInBefore as $key) { $this->assertContains($key, array_keys($inBeforeOnly)); } @@ -747,7 +705,8 @@ public function testUpdateCustomerWithoutChangingPassword() $lastName = 'Lastsave'; $customerBefore = $this->_customerAccountService->getCustomer($existingCustId); - $customerData = array_merge($customerBefore->__toArray(), + $customerData = array_merge( + $customerBefore->__toArray(), [ 'id' => 1, 'email' => $email, @@ -771,28 +730,28 @@ public function testUpdateCustomerWithoutChangingPassword() 'password', true ); - $attributesBefore = \Magento\Service\DataObjectConverter::toFlatArray($customerBefore); - $attributesAfter = \Magento\Service\DataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customerBefore); + $attributesAfter = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); $inBeforeOnly = array_diff_assoc($attributesBefore, $attributesAfter); $inAfterOnly = array_diff_assoc($attributesAfter, $attributesBefore); - $expectedInBefore = array( + $expectedInBefore = [ 'firstname', 'lastname', 'email', - ); + ]; sort($expectedInBefore); $actualInBeforeOnly = array_keys($inBeforeOnly); sort($actualInBeforeOnly); $this->assertEquals($expectedInBefore, $actualInBeforeOnly); - $expectedInAfter = array( + $expectedInAfter = [ 'firstname', 'lastname', 'email', 'created_in', - ); + ]; sort($expectedInAfter); $actualInAfterOnly = array_keys($inAfterOnly); sort($actualInAfterOnly); @@ -812,7 +771,8 @@ public function testUpdateCustomerPasswordCannotSetThroughAttributeSetting() $lastName = 'Lastsave'; $customerBefore = $this->_customerAccountService->getCustomer($existingCustId); - $customerData = array_merge($customerBefore->__toArray(), + $customerData = array_merge( + $customerBefore->__toArray(), [ 'id' => 1, 'email' => $email, @@ -836,28 +796,28 @@ public function testUpdateCustomerPasswordCannotSetThroughAttributeSetting() 'password', true ); - $attributesBefore = \Magento\Service\DataObjectConverter::toFlatArray($customerBefore); - $attributesAfter = \Magento\Service\DataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customerBefore); + $attributesAfter = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); $inBeforeOnly = array_diff_assoc($attributesBefore, $attributesAfter); $inAfterOnly = array_diff_assoc($attributesAfter, $attributesBefore); - $expectedInBefore = array( + $expectedInBefore = [ 'firstname', 'lastname', 'email', - ); + ]; sort($expectedInBefore); $actualInBeforeOnly = array_keys($inBeforeOnly); sort($actualInBeforeOnly); $this->assertEquals($expectedInBefore, $actualInBeforeOnly); - $expectedInAfter = array( + $expectedInAfter = [ 'firstname', 'lastname', 'email', 'created_in', - ); + ]; sort($expectedInAfter); $actualInAfterOnly = array_keys($inAfterOnly); sort($actualInAfterOnly); @@ -876,24 +836,12 @@ public function testCreateCustomerException() $this->_customerAccountService->createCustomer($customerDetails); $this->fail('Expected exception not thrown'); } catch (InputException $ie) { - $expectedParams = [ - [ - 'fieldName' => 'firstname', - 'value' => '', - 'code' => InputException::REQUIRED_FIELD, - ], - [ - 'fieldName' => 'lastname', - 'value' => '', - 'code' => InputException::REQUIRED_FIELD, - ], - [ - 'fieldName' => 'email', - 'value' => '', - 'code' => InputException::INVALID_FIELD_VALUE, - ], - ]; - $this->assertEquals($expectedParams, $ie->getParams()); + $this->assertEquals(InputException::DEFAULT_MESSAGE, $ie->getMessage()); + $errors = $ie->getErrors(); + $this->assertCount(3, $errors); + $this->assertEquals('firstname is a required field.', $errors[0]->getLogMessage()); + $this->assertEquals('lastname is a required field.', $errors[1]->getLogMessage()); + $this->assertEquals('Invalid value of "" provided for the email field.', $errors[2]->getLogMessage()); } } @@ -910,7 +858,8 @@ public function testCreateNonexistingCustomer() $email = 'savecustomer@example.com'; $firstName = 'Firstsave'; $lastName = 'Lastsave'; - $customerData = array_merge($existingCustomer->__toArray(), + $customerData = array_merge( + $existingCustomer->__toArray(), [ 'email' => $email, 'firstname' => $firstName, @@ -934,30 +883,30 @@ public function testCreateNonexistingCustomer() 'aPassword', true ); - $attributesBefore = \Magento\Service\DataObjectConverter::toFlatArray($existingCustomer); - $attributesAfter = \Magento\Service\DataObjectConverter::toFlatArray($customerAfter); + $attributesBefore = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($existingCustomer); + $attributesAfter = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customerAfter); // ignore 'updated_at' unset($attributesBefore['updated_at']); unset($attributesAfter['updated_at']); $inBeforeOnly = array_diff_assoc($attributesBefore, $attributesAfter); $inAfterOnly = array_diff_assoc($attributesAfter, $attributesBefore); - $expectedInBefore = array( + $expectedInBefore = [ 'email', 'firstname', 'id', 'lastname' - ); + ]; sort($expectedInBefore); $actualInBeforeOnly = array_keys($inBeforeOnly); sort($actualInBeforeOnly); $this->assertEquals($expectedInBefore, $actualInBeforeOnly); - $expectedInAfter = array( + $expectedInAfter = [ 'created_in', 'email', 'firstname', 'id', 'lastname', - ); + ]; sort($expectedInAfter); $actualInAfterOnly = array_keys($inAfterOnly); sort($actualInAfterOnly); @@ -977,8 +926,7 @@ public function testCreateCustomerInServiceVsInModel() $password = 'aPassword'; /** @var \Magento\Customer\Model\Customer $customerModel */ - $customerModel = $this->_objectManager->create('Magento\Customer\Model\CustomerFactory') - ->create(); + $customerModel = $this->_objectManager->create('Magento\Customer\Model\CustomerFactory')->create(); $customerModel->setEmail($email) ->setFirstname($firstname) ->setLastname($lastname) @@ -986,12 +934,14 @@ public function testCreateCustomerInServiceVsInModel() ->setPassword($password); $customerModel->save(); /** @var \Magento\Customer\Model\Customer $customerModel */ - $savedModel = $this->_objectManager->create('Magento\Customer\Model\CustomerFactory') + $savedModel = $this->_objectManager + ->create('Magento\Customer\Model\CustomerFactory') ->create() ->load($customerModel->getId()); $dataInModel = $savedModel->getData(); - $this->_customerBuilder->setEmail($email2) + $this->_customerBuilder + ->setEmail($email2) ->setFirstname($firstname) ->setLastname($lastname) ->setGroupId($groupId); @@ -1000,16 +950,27 @@ public function testCreateCustomerInServiceVsInModel() $customerData = $this->_customerAccountService->createCustomer($customerDetails, $password); $this->assertNotNull($customerData->getId()); $savedCustomer = $this->_customerAccountService->getCustomer($customerData->getId()); - $dataInService = \Magento\Service\DataObjectConverter::toFlatArray($savedCustomer); - $expectedDifferences = ['created_at', 'updated_at', 'email', 'is_active', 'entity_id', 'entity_type_id', - 'password_hash', 'attribute_set_id', 'disable_auto_group_change', 'confirmation', - 'reward_update_notification', 'reward_warning_notification']; + $dataInService = \Magento\Framework\Service\DataObjectConverter::toFlatArray($savedCustomer); + $expectedDifferences = [ + 'created_at', + 'updated_at', + 'email', + 'is_active', + 'entity_id', + 'entity_type_id', + 'password_hash', + 'attribute_set_id', + 'disable_auto_group_change', + 'confirmation', + 'reward_update_notification', + 'reward_warning_notification' + ]; foreach ($dataInModel as $key => $value) { if (!in_array($key, $expectedDifferences)) { if (is_null($value)) { $this->assertArrayNotHasKey($key, $dataInService); } else { - $this->assertEquals($value, $dataInService[$key], 'Failed asserting value for '. $key); + $this->assertEquals($value, $dataInService[$key], 'Failed asserting value for ' . $key); } } } @@ -1030,7 +991,8 @@ public function testCreateNewCustomer() $lastname = 'McTest'; $groupId = 1; - $this->_customerBuilder->setStoreId($storeId) + $this->_customerBuilder + ->setStoreId($storeId) ->setEmail($email) ->setFirstname($firstname) ->setLastname($lastname) @@ -1047,6 +1009,48 @@ public function testCreateNewCustomer() $this->assertTrue(!$savedCustomer->getSuffix()); } + /** + * @magentoDbIsolation enabled + */ + public function testCreateNewCustomerWithPasswordHash() + { + $email = 'email@example.com'; + $storeId = 1; + $firstname = 'Tester'; + $lastname = 'McTest'; + $groupId = 1; + + $this->_customerBuilder->setStoreId($storeId) + ->setEmail($email) + ->setFirstname($firstname) + ->setLastname($lastname) + ->setGroupId($groupId); + $newCustomerEntity = $this->_customerBuilder->create(); + $customerDetails = $this->_customerDetailsBuilder->setCustomer($newCustomerEntity)->create(); + /** @var \Magento\Framework\Math\Random $mathRandom */ + $password = $this->_objectManager->get('Magento\Framework\Math\Random')->getRandomString( + CustomerAccountServiceInterface::DEFAULT_PASSWORD_LENGTH + ); + /** @var \Magento\Framework\Encryption\EncryptorInterface $encryptor */ + $encryptor = $this->_objectManager->get('Magento\Framework\Encryption\EncryptorInterface'); + $passwordHash = $encryptor->getHash($password); + $savedCustomer = $this->_customerAccountService->createCustomerWithPasswordHash( + $customerDetails, + $passwordHash + ); + $this->assertNotNull($savedCustomer->getId()); + $this->assertEquals($email, $savedCustomer->getEmail()); + $this->assertEquals($storeId, $savedCustomer->getStoreId()); + $this->assertEquals($firstname, $savedCustomer->getFirstname()); + $this->assertEquals($lastname, $savedCustomer->getLastname()); + $this->assertEquals($groupId, $savedCustomer->getGroupId()); + $this->assertTrue(!$savedCustomer->getSuffix()); + $this->assertEquals( + $savedCustomer->getId(), + $this->_customerAccountService->authenticate($email, $password)->getId() + ); + } + /** * @magentoAppArea frontend * @magentoDataFixture Magento/Customer/_files/customer.php @@ -1059,7 +1063,8 @@ public function testCreateNewCustomerFromClone() $existingCustId = 1; $existingCustomer = $this->_customerAccountService->getCustomer($existingCustId); - $customerData = array_merge($existingCustomer->__toArray(), + $customerData = array_merge( + $existingCustomer->__toArray(), [ 'email' => $email, 'firstname' => $firstName, @@ -1096,7 +1101,8 @@ public function testCreateCustomerNewThenUpdateFirstName() $lastname = 'McTest'; $groupId = 1; - $this->_customerBuilder->setStoreId($storeId) + $this->_customerBuilder + ->setStoreId($storeId) ->setEmail($email) ->setFirstname($firstname) ->setLastname($lastname) @@ -1139,19 +1145,15 @@ public function testGetCustomerNotExist() // No fixture, so customer with id 1 shouldn't exist, exception should be thrown $this->_customerAccountService->getCustomer(1); $this->fail('Did not throw expected exception.'); - } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'customerId' => '1', - ]; - $this->assertEquals($expectedParams, $e->getParams()); - $this->assertEquals('No such entity with customerId = 1', $e->getMessage()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = 1', $nsee->getMessage()); } } /** * @param mixed $custId * @dataProvider invalidCustomerIdsDataProvider - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage No such entity with customerId = */ public function testGetCustomerInvalidIds($custId) @@ -1161,20 +1163,20 @@ public function testGetCustomerInvalidIds($custId) public function invalidCustomerIdsDataProvider() { - return array( - array('ab'), - array(' '), - array(-1), - array(0), - array(' 1234'), - array('-1'), - array('0'), - ); + return [ + ['ab'], + [' '], + [-1], + [0], + [' 1234'], + ['-1'], + ['0'], + ]; } /** - * @param \Magento\Service\V1\Data\Filter[] $filters - * @param \Magento\Service\V1\Data\Filter[] $filterGroup + * @param \Magento\Framework\Service\V1\Data\Filter[] $filters + * @param \Magento\Framework\Service\V1\Data\Filter[] $filterGroup * @param array $expectedResult array of expected results indexed by ID * * @dataProvider searchCustomersDataProvider @@ -1184,9 +1186,9 @@ public function invalidCustomerIdsDataProvider() */ public function testSearchCustomers($filters, $filterGroup, $expectedResult) { - /** @var \Magento\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager()->create( - 'Magento\Service\V1\Data\SearchCriteriaBuilder' + 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder' ); foreach ($filters as $filter) { $searchBuilder->addFilter([$filter]); @@ -1234,18 +1236,20 @@ public function searchCustomersDataProvider() ], [ 1 => ['email' => 'customer@search.example.com', 'firstname' => 'Firstname'], - 2 => ['email' => 'customer2@search.example.com', 'firstname' => 'Firstname2'], + 2 => ['email' => 'customer2@search.example.com', 'firstname' => 'Firstname2'] ] ], 'Customers created since' => [ - [(new FilterBuilder()) - ->setField('created_at')->setValue('2011-02-28 15:52:26')->setConditionType('gt')->create()], + [ + (new FilterBuilder())->setField('created_at')->setValue('2011-02-28 15:52:26') + ->setConditionType('gt')->create() + ], [], [ 1 => ['email' => 'customer@search.example.com', 'firstname' => 'Firstname'], - 3 => ['email' => 'customer3@search.example.com', 'firstname' => 'Firstname3'], - ], - ], + 3 => ['email' => 'customer3@search.example.com', 'firstname' => 'Firstname3'] + ] + ] ]; } @@ -1257,14 +1261,16 @@ public function searchCustomersDataProvider() */ public function testSearchCustomersOrder() { - /** @var \Magento\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager() - ->create('Magento\Service\V1\Data\SearchCriteriaBuilder'); + ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder'); // Filter for 'firstname' like 'First' $filterBuilder = new FilterBuilder(); - $firstnameFilter = $filterBuilder-> - setField('firstname')->setConditionType('like')->setValue('First%')->create(); + $firstnameFilter = $filterBuilder->setField('firstname') + ->setConditionType('like') + ->setValue('First%') + ->create(); $searchBuilder->addFilter([$firstnameFilter]); // Search ascending order @@ -1294,7 +1300,7 @@ public function testGetCustomerDetails() $customer = $customerDetails->getCustomer(); // All these expected values come from _files/customer.php fixture $this->assertEquals(1, $customer->getId()); - $this->assertEquals('example@domain.com', $customer->getEmail()); + $this->assertEquals('customer@example.com', $customer->getEmail()); $this->assertEquals('test firstname', $customer->getFirstname()); $this->assertEquals('test lastname', $customer->getLastname()); $this->assertEquals(3, count($customerDetails->getAddresses())); @@ -1303,7 +1309,7 @@ public function testGetCustomerDetails() /** * @magentoDataFixture Magento/Customer/_files/customer_sample.php * @magentoAppIsolation enabled - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testGetCustomerDetailsWithException() { @@ -1316,13 +1322,16 @@ public function testGetCustomerDetailsWithException() * @magentoAppArea adminhtml * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoAppIsolation enabled - * @expectedException \Magento\Exception\NoSuchEntityException - * @expectedExceptionMessage No such entity with customerId = 1 */ public function testDeleteCustomer() { // _files/customer.php sets the customer id to 1 $this->_customerAccountService->deleteCustomer(1); + //Verify if the customer is deleted + $this->setExpectedException( + 'Magento\Framework\Exception\NoSuchEntityException', + 'No such entity with customerId = 1' + ); $this->_customerAccountService->getCustomer(1); } @@ -1330,7 +1339,7 @@ public function testDeleteCustomer() * * @magentoDataFixture Magento/Customer/_files/customer.php * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage No such entity with customerId = 1 */ public function testDeleteCustomerWithAddress() @@ -1394,6 +1403,210 @@ public function testIsEmailAvailableNonExistentEmail() $this->assertTrue($this->_customerAccountService->isEmailAvailable('nonexistent@example.com', 1)); } + /** + * @param $email + * @param $websiteId + * @magentoDataFixture Magento/Customer/_files/customer.php + * @dataProvider getValidEmailDataProvider + */ + public function testGetCustomerByEmail($email, $websiteId) + { + /** @var \Magento\Customer\Service\V1\Data\Customer $customer */ + $customer = $this->_customerAccountService->getCustomerByEmail($email, $websiteId); + + // All these expected values come from _files/customer.php fixture + $this->assertEquals(1, $customer->getId()); + $this->assertEquals('customer@example.com', $customer->getEmail()); + $this->assertEquals('Firstname', $customer->getFirstname()); + $this->assertEquals('Lastname', $customer->getLastname()); + } + + /** + * @param $email + * @param $websiteId + * @expectedException \Magento\Framework\Exception\NoSuchEntityException + * @dataProvider getInvalidEmailDataProvider + */ + public function testGetCustomerByEmailWithException($email, $websiteId) + { + $this->_customerAccountService->getCustomerByEmail($email, $websiteId); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_non_default_website_id.php + */ + public function testGetCustomerByEmailWithNonDefaultWebsiteId() + { + $email = 'customer2@example.com'; + /** @var \Magento\Store\Model\Website $website */ + $website = Bootstrap::getObjectManager()->get('Magento\Store\Model\Website'); + $websiteId = $website->load('newwebsite')->getId(); + /** @var \Magento\Customer\Service\V1\Data\Customer $customer */ + $customer = $this->_customerAccountService->getCustomerByEmail($email, $websiteId); + + // All these expected values come from _files/customer.php fixture + $this->assertEquals(1, $customer->getId()); + $this->assertEquals($email, $customer->getEmail()); + $this->assertEquals('Firstname', $customer->getFirstname()); + $this->assertEquals('Lastname', $customer->getLastname()); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_sample.php + * @magentoAppIsolation enabled + * @dataProvider getValidEmailDataProvider + */ + public function testGetCustomerDetailsByEmail($email, $websiteId) + { + $customerDetails = $this->_customerAccountService->getCustomerDetailsByEmail($email, $websiteId); + $customer = $customerDetails->getCustomer(); + + $this->assertEquals(1, $customer->getId()); + $this->assertEquals('customer@example.com', $customer->getEmail()); + $this->assertEquals('test firstname', $customer->getFirstname()); + $this->assertEquals('test lastname', $customer->getLastname()); + $this->assertEquals(3, count($customerDetails->getAddresses())); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer_non_default_website_id.php + */ + public function testGetCustomerDetailsByEmailWithNonDefaultWebsiteId() + { + /** @var \Magento\Customer\Service\V1\Data\Customer $customer */ + $email = 'customer2@example.com'; + /** @var \Magento\Store\Model\Website $website */ + $website = Bootstrap::getObjectManager()->get('Magento\Store\Model\Website'); + $websiteId = $website->load('newwebsite')->getId(); + $customerDetails = $this->_customerAccountService->getCustomerDetailsByEmail($email, $websiteId); + $customer = $customerDetails->getCustomer(); + + $this->assertEquals(1, $customer->getId()); + $this->assertEquals($email, $customer->getEmail()); + $this->assertEquals('Firstname', $customer->getFirstname()); + $this->assertEquals('Lastname', $customer->getLastname()); + $this->assertEquals(3, count($customerDetails->getAddresses())); + } + + /** + * @return array + * + */ + public function getValidEmailDataProvider() + { + /** @var \Magento\Store\Model\StoreManagerInterface $storeManager */ + $storeManager = Bootstrap::getObjectManager()->get('Magento\Store\Model\StoreManagerInterface'); + $defaultWebsiteId = $storeManager->getStore()->getWebsiteId(); + return [ + 'valid email' => ['customer@example.com', null], + 'default websiteId' => ['customer@example.com', $defaultWebsiteId], + ]; + } + + /** + * @return array + * + */ + public function getInvalidEmailDataProvider() + { + return [ + 'invalid email' => ['nonexistent@example.com', null], + 'invalid websiteId' => ['customer@example.com', 123456], + ]; + } + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer_non_default_website_id.php + */ + public function testUpdateCustomerDetailsByEmail() + { + $customerId = 1; + $firstName = 'Firstsave'; + $lastName = 'Lastsave'; + $newEmail = 'newcustomeremail@example.com'; + $city = 'San Jose'; + + $customerDetails = $this->_customerAccountService->getCustomerDetails($customerId); + $website = Bootstrap::getObjectManager()->get('Magento\Store\Model\Website'); + $websiteId = $website->load('newwebsite')->getId(); + $email = $customerDetails->getCustomer()->getEmail(); + $customerData = array_merge( + $customerDetails->getCustomer()->__toArray(), + [ + 'firstname' => $firstName, + 'lastname' => $lastName, + 'email' => $newEmail, + 'id' => null + ] + ); + $addresses = $customerDetails->getAddresses(); + $addressId = $addresses[0]->getId(); + $newAddress = array_merge($addresses[0]->__toArray(), ['city' => $city]); + $this->_customerBuilder->populateWithArray($customerData); + $this->_addressBuilder->populateWithArray($newAddress); + $this->_customerDetailsBuilder->setCustomer(($this->_customerBuilder->create())) + ->setAddresses([$this->_addressBuilder->create(), $addresses[1]]); + + $this->_customerAccountService->updateCustomerDetailsByEmail( + $email, + $this->_customerDetailsBuilder->create(), + $websiteId + ); + + $updatedCustomerDetails = $this->_customerAccountService->getCustomerDetails($customerId); + $updateCustomerData = $updatedCustomerDetails->getCustomer(); + $this->assertEquals($firstName, $updateCustomerData->getFirstname()); + $this->assertEquals($lastName, $updateCustomerData->getLastname()); + $this->assertEquals($newEmail, $updateCustomerData->getEmail()); + $this->assertEquals(2, count($updatedCustomerDetails->getAddresses())); + + foreach ($updatedCustomerDetails->getAddresses() as $newAddress) { + if ($newAddress->getId() == $addressId) { + $this->assertEquals($city, $newAddress->getCity()); + } + } + } + + /** + * @magentoAppArea frontend + * @magentoDataFixture Magento/Customer/_files/customer.php + * @expectedException \Magento\Framework\Exception\StateException + */ + public function testUpdateCustomerDetailsByEmailWithException() + { + $customerId = 1; + $customerDetails = $this->_customerAccountService->getCustomerDetails($customerId); + $email = $customerDetails->getCustomer()->getEmail(); + $customerData = array_merge( + $customerDetails->getCustomer()->__toArray(), + [ + 'firstname' => 'fname', + 'id' => 1234567 + ] + ); + $this->_customerBuilder->populateWithArray($customerData); + $this->_customerDetailsBuilder->setCustomer(($this->_customerBuilder->create()))->setAddresses([]); + $this->_customerAccountService->updateCustomerDetailsByEmail($email, $this->_customerDetailsBuilder->create()); + + } + + /** + * @magentoAppArea adminhtml + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoAppIsolation enabled + */ + public function testDeleteCustomerByEmail() + { + // _files/customer.php sets the customer email to customer@example.com + $this->_customerAccountService->deleteCustomerByEmail('customer@example.com'); + //Verify if the customer is deleted + $this->setExpectedException( + 'Magento\Framework\Exception\NoSuchEntityException', + 'No such entity with email = customer@example.com' + ); + $this->_customerAccountService->getCustomerByEmail('customer@example.com'); + } /** * Set Rp data to Customer in fixture diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php index 92483a5b09fc3..ec65c59b472e1 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php @@ -24,8 +24,8 @@ namespace Magento\Customer\Service\V1; -use Magento\Exception\InputException; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1; use Magento\Customer\Service\V1\Data\AddressConverter; @@ -40,7 +40,7 @@ class CustomerAddressServiceTest extends \PHPUnit_Framework_TestCase /** @var CustomerAddressServiceInterface */ private $_service; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ private $_objectManager; /** @var \Magento\Customer\Service\V1\Data\Address[] */ @@ -213,8 +213,7 @@ public function testGetAddressByIdBadAddrId() $this->_service->getAddress(12345); $this->fail("Expected NoSuchEntityException not caught"); } catch (NoSuchEntityException $exception) { - $this->assertSame($exception->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame($exception->getParams(), array('addressId' => 12345)); + $this->assertEquals('No such entity with addressId = 12345', $exception->getMessage()); } } @@ -302,14 +301,11 @@ public function testSaveNewInvalidAddresses() $this->_service->saveAddresses($customerId, array($firstAddress, $secondAddress)); $this->fail("Expected NoSuchEntityException not caught"); } catch (InputException $exception) { - $this->assertSame($exception->getCode(), \Magento\Exception\InputException::INPUT_EXCEPTION); - $this->assertSame( - $exception->getParams(), - array( - array('index' => 0, 'fieldName' => 'firstname', 'code' => 'REQUIRED_FIELD', 'value' => null), - array('index' => 1, 'fieldName' => 'lastname', 'code' => 'REQUIRED_FIELD', 'value' => null) - ) - ); + $this->assertEquals(InputException::DEFAULT_MESSAGE, $exception->getMessage()); + $errors = $exception->getErrors(); + $this->assertCount(2, $errors); + $this->assertEquals('firstname is a required field.', $errors[0]->getLogMessage()); + $this->assertEquals('lastname is a required field.', $errors[1]->getLogMessage()); } } @@ -473,12 +469,8 @@ public function testSaveAddressesCustomerIdNotExist() try { $this->_service->saveAddresses(4200, array($proposedAddress)); $this->fail('Expected exception not thrown'); - } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'customerId' => '4200', - ]; - $this->assertEquals($expectedParams, $e->getParams()); - $this->assertEquals('No such entity with customerId = 4200', $e->getMessage()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = 4200', $nsee->getMessage()); } } @@ -488,10 +480,8 @@ public function testSaveAddressesCustomerIdInvalid() try { $this->_service->saveAddresses('this_is_not_a_valid_id', array($proposedAddress)); $this->fail('Expected exception not thrown'); - } catch (NoSuchEntityException $e) { - $expectedParams = array('customerId' => 'this_is_not_a_valid_id'); - $this->assertEquals($expectedParams, $e->getParams()); - $this->assertEquals('No such entity with customerId = this_is_not_a_valid_id', $e->getMessage()); + } catch (NoSuchEntityException $nsee) { + $this->assertEquals('No such entity with customerId = this_is_not_a_valid_id', $nsee->getMessage()); } } @@ -514,8 +504,7 @@ public function testDeleteAddressFromCustomer() $addressDataObject = $this->_service->getAddress($addressId); $this->fail("Expected NoSuchEntityException not caught"); } catch (NoSuchEntityException $exception) { - $this->assertSame($exception->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame($exception->getParams(), array('addressId' => $addressId)); + $this->assertEquals('No such entity with addressId = 1', $exception->getMessage()); } } @@ -529,8 +518,7 @@ public function testDeleteAddressFromCustomerBadAddrId() $this->_service->deleteAddress(12345); $this->fail("Expected NoSuchEntityException not caught"); } catch (NoSuchEntityException $exception) { - $this->assertSame($exception->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame($exception->getParams(), array('addressId' => 12345)); + $this->assertEquals('No such entity with addressId = 12345', $exception->getMessage()); } } @@ -548,13 +536,13 @@ public function testValidateAddressesOneInvalid() $this->fail("InputException was expected but not thrown"); } catch (InputException $actualException) { $expectedException = new InputException(); - $expectedException->addError('REQUIRED_FIELD', 'firstname', '', array('index' => 0)); - $expectedException->addError('REQUIRED_FIELD', 'lastname', '', array('index' => 0)); - $expectedException->addError('REQUIRED_FIELD', 'street', '', array('index' => 0)); - $expectedException->addError('REQUIRED_FIELD', 'telephone', '', array('index' => 0)); - $expectedException->addError('REQUIRED_FIELD', 'postcode', '', array('index' => 0)); - $expectedException->addError('REQUIRED_FIELD', 'countryId', '', array('index' => 0)); - $this->assertEquals($expectedException->getErrors(), $actualException->getErrors()); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'firstname', 'index'=> 0]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'lastname', 'index'=> 0]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'street', 'index'=> 0]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'telephone', 'index'=> 0]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'postcode', 'index'=> 0]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'countryId', 'index'=> 0]); + $this->assertEquals($expectedException, $actualException); } } @@ -569,12 +557,24 @@ public function testValidateAddressesOneInvalidNonNumericKeys() $this->fail("InputException was expected but not thrown"); } catch (InputException $actualException) { $expectedException = new InputException(); - $expectedException->addError('REQUIRED_FIELD', 'street', '', array('index' => 'addr_3')); - $expectedException->addError('REQUIRED_FIELD', 'city', '', array('index' => 'addr_3')); - $expectedException->addError('REQUIRED_FIELD', 'telephone', '', array('index' => 'addr_3')); - $expectedException->addError('REQUIRED_FIELD', 'postcode', '', array('index' => 'addr_3')); - $expectedException->addError('REQUIRED_FIELD', 'countryId', '', array('index' => 'addr_3')); - $this->assertEquals($expectedException->getErrors(), $actualException->getErrors()); + $expectedException->addError( + InputException::REQUIRED_FIELD, + ['fieldName' => 'street', 'index' => 'addr_3'] + ); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'city', 'index' => 'addr_3']); + $expectedException->addError( + InputException::REQUIRED_FIELD, + ['fieldName' => 'telephone', 'index' => 'addr_3'] + ); + $expectedException->addError( + InputException::REQUIRED_FIELD, + ['fieldName' => 'postcode', 'index' => 'addr_3'] + ); + $expectedException->addError( + InputException::REQUIRED_FIELD, + ['fieldName' => 'countryId', 'index' => 'addr_3'] + ); + $this->assertEquals($expectedException, $actualException); } } @@ -586,12 +586,12 @@ public function testValidateAddressesOneInvalidNoKeys() $this->fail("InputException was expected but not thrown"); } catch (InputException $actualException) { $expectedException = new InputException(); - $expectedException->addError('REQUIRED_FIELD', 'street', '', array('index' => 2)); - $expectedException->addError('REQUIRED_FIELD', 'city', '', array('index' => 2)); - $expectedException->addError('REQUIRED_FIELD', 'telephone', '', array('index' => 2)); - $expectedException->addError('REQUIRED_FIELD', 'postcode', '', array('index' => 2)); - $expectedException->addError('REQUIRED_FIELD', 'countryId', '', array('index' => 2)); - $this->assertEquals($expectedException->getErrors(), $actualException->getErrors()); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'street', 'index' => 2]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'city', 'index' => 2]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'telephone', 'index' => 2]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'postcode', 'index' => 2]); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'countryId', 'index' => 2]); + $this->assertEquals($expectedException, $actualException); } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php index 3fad12043f2f8..38b6d90703496 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerGroupServiceTest.php @@ -26,16 +26,16 @@ namespace Magento\Customer\Service\V1; use Magento\Customer\Service\V1\Data\CustomerGroup; -use Magento\Service\V1\Data\FilterBuilder; +use Magento\Framework\Service\V1\Data\FilterBuilder; use Magento\Store\Model\ScopeInterface; use Magento\TestFramework\Helper\Bootstrap; -use Magento\Service\V1\Data\Filter; +use Magento\Framework\Service\V1\Data\Filter; use Magento\Customer\Model\Group; class CustomerGroupServiceTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; @@ -217,7 +217,7 @@ public function testGetDefaultGroupWithNonDefaultStoreId() } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testGetDefaultGroupWithInvalidStoreId() { @@ -234,9 +234,9 @@ public function testGetDefaultGroupWithInvalidStoreId() */ public function testSearchGroups($filters, $filterGroup, $expectedResult) { - /** @var \Magento\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ $searchBuilder = Bootstrap::getObjectManager() - ->create('Magento\Service\V1\Data\SearchCriteriaBuilder'); + ->create('Magento\Framework\Service\V1\Data\SearchCriteriaBuilder'); foreach ($filters as $filter) { $searchBuilder->addFilter([$filter]); } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php index 807736dfa6b92..00a949f77295a 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php @@ -25,7 +25,7 @@ */ namespace Magento\Customer\Service\V1; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; class CustomerMetadataServiceTest extends \PHPUnit_Framework_TestCase { @@ -50,8 +50,10 @@ public function testGetAttributeMetadataNoSuchEntity() $this->_service->getAttributeMetadata('customer_address', '1'); $this->fail('Expected exception not thrown.'); } catch (NoSuchEntityException $e) { - $this->assertEquals(NoSuchEntityException::NO_SUCH_ENTITY, $e->getCode()); - $this->assertEquals(array('entityType' => 'customer_address', 'attributeCode' => '1'), $e->getParams()); + $this->assertEquals( + 'No such entity with entityType = customer_address, attributeCode = 1', + $e->getMessage() + ); } } @@ -80,7 +82,7 @@ public function testGetCustomerAttributeMetadata() $customer = $this->_customerAccountService->getCustomer(1); $this->assertNotNull($customer); - $attributes = \Magento\Service\DataObjectConverter::toFlatArray($customer); + $attributes = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customer); $this->assertNotEmpty($attributes); foreach ($attributes as $attributeCode => $attributeValue) { @@ -111,8 +113,7 @@ public function testGetCustomerAttributeMetadataNoSuchEntity() $this->_service->getCustomerAttributeMetadata('20'); $this->fail('Expected exception not thrown.'); } catch (NoSuchEntityException $e) { - $this->assertEquals(NoSuchEntityException::NO_SUCH_ENTITY, $e->getCode()); - $this->assertEquals(array('entityType' => 'customer', 'attributeCode' => '20'), $e->getParams()); + $this->assertEquals('No such entity with entityType = customer, attributeCode = 20', $e->getMessage()); } } @@ -132,8 +133,10 @@ public function testGetAddressAttributeMetadataNoSuchEntity() $this->_service->getAddressAttributeMetadata('1'); $this->fail('Expected exception not thrown.'); } catch (NoSuchEntityException $e) { - $this->assertEquals(NoSuchEntityException::NO_SUCH_ENTITY, $e->getCode()); - $this->assertEquals(array('entityType' => 'customer_address', 'attributeCode' => '1'), $e->getParams()); + $this->assertEquals( + 'No such entity with entityType = customer_address, attributeCode = 1', + $e->getMessage() + ); } } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/AddressBuilderTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/AddressBuilderTest.php index 8d1b89a195dfc..2447c5df747de 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/AddressBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/AddressBuilderTest.php @@ -50,7 +50,7 @@ public function testGetCustomAttributesCodes() { $userDefinedAttributeCode = 'address_user_attribute'; $attributeCodes = $this->_addressBuilder->getCustomAttributesCodes(); - $expectedAttributes = array($userDefinedAttributeCode, 'prefix', 'middlename', 'suffix'); + $expectedAttributes = [$userDefinedAttributeCode]; $this->assertEquals($expectedAttributes, $attributeCodes, 'Custom attribute codes list is invalid.'); } } diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php index b65423bc5e015..3114ead3d2011 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php @@ -52,13 +52,6 @@ public function testGetCustomAttributesCodes() $attributeCodes = $this->_customerBuilder->getCustomAttributesCodes(); $expectedAttributes = array( 'disable_auto_group_change', - 'prefix', - 'middlename', - 'suffix', - 'created_at', - 'dob', - 'taxvat', - 'gender', $userDefinedAttributeCode ); $this->assertEquals($expectedAttributes, $attributeCodes, 'Custom attribute codes list is invalid.'); diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerDetailsBuilderTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerDetailsBuilderTest.php index 59129b8d2dd79..4a984761e94bd 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerDetailsBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/CustomerDetailsBuilderTest.php @@ -31,7 +31,7 @@ class CustomerDetailsBuilderTest extends \PHPUnit_Framework_TestCase /** * Object Manager * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ private $_objectManager; diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilderTest.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilderTest.php index 6d6de032c341e..a1f2bc2c4ad82 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilderTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/Data/Eav/AttributeMetadataBuilderTest.php @@ -31,7 +31,7 @@ class AttributeMetadataBuilderTest extends \PHPUnit_Framework_TestCase /** * Object Manager * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ private $_objectManager; diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php new file mode 100644 index 0000000000000..4a38acf0d1d4b --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_non_default_website_id.php @@ -0,0 +1,107 @@ +create('Magento\Store\Model\Website'); +$website->setName('new Website')->setCode('newwebsite')->save(); + +$websiteId = $website->getId(); + + +$customer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Customer\Model\Customer'); +/** @var Magento\Customer\Model\Customer $customer */ +$customer->setWebsiteId( + $websiteId +)->setId( + 1 + )->setEntityTypeId( + 1 + )->setAttributeSetId( + 1 + )->setEmail( + 'customer2@example.com' + )->setPassword( + 'password' + )->setGroupId( + 1 + )->setStoreId( + 1 + )->setIsActive( + 1 + )->setFirstname( + 'Firstname' + )->setLastname( + 'Lastname' + )->setDefaultBilling( + 1 + )->setDefaultShipping( + 1 + ); +$customer->isObjectNew(true); + +/** @var \Magento\Customer\Model\Address $addressOne */ +$addressOne = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Customer\Model\Address'); +$addressOneData = array( + 'firstname' => 'Firstname', + 'lastname' => 'LastName', + 'street' => array('test street'), + 'city' => 'test city', + 'country_id' => 'US', + 'postcode' => '01001', + 'telephone' => '+7000000001', + 'entity_id' => 1 +); +$addressOne->setData($addressOneData); +$customer->addAddress($addressOne); + +/** @var \Magento\Customer\Model\Address $addressTwo */ +$addressTwo = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Customer\Model\Address'); +$addressTwoData = array( + 'firstname' => 'test firstname', + 'lastname' => 'test lastname', + 'street' => array('test street'), + 'city' => 'test city', + 'country_id' => 'US', + 'postcode' => '01001', + 'telephone' => '+7000000001', + 'entity_id' => 2 +); +$addressTwo->setData($addressTwoData); +$customer->addAddress($addressTwo); + +/** @var \Magento\Customer\Model\Address $addressThree */ +$addressThree = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Customer\Model\Address'); +$addressThreeData = array( + 'firstname' => 'removed firstname', + 'lastname' => 'removed lastname', + 'street' => array('removed street'), + 'city' => 'removed city', + 'country_id' => 'US', + 'postcode' => '01001', + 'telephone' => '+7000000001', + 'entity_id' => 3 +); +$addressThree->setData($addressThreeData); +$customer->addAddress($addressThree); +$customer->save(); diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_sample.php b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_sample.php index 0b14d530bf1b8..2b8b94f397992 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_sample.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_sample.php @@ -32,7 +32,7 @@ 'website_id' => 1, 'firstname' => 'test firstname', 'lastname' => 'test lastname', - 'email' => 'example@domain.com', + 'email' => 'customer@example.com', 'default_billing' => 1, 'password' => '123123q', 'attribute_set_id' => 1 diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_two_addresses.php b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_two_addresses.php index d3785e8ff9fac..19502d6be66e1 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/_files/customer_two_addresses.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/customer_two_addresses.php @@ -38,7 +38,7 @@ 'postcode' => 47676, 'country_id' => 'US', 'city' => 'CityX', - 'street' => 'Black str, 48', + 'street' => ['Black str, 48'], 'lastname' => 'Smith', 'firstname' => 'John', 'parent_id' => 1, diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customer.php b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customer.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/ImportExport/_files/customer.php rename to dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customer.php index 9629a2e8f4c07..9af3f8104d36f 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customer.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customer.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -82,5 +79,5 @@ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$objectManager->get('Magento\Registry')->unregister('_fixture/Magento_ImportExport_Customer'); -$objectManager->get('Magento\Registry')->register('_fixture/Magento_ImportExport_Customer', $customer); +$objectManager->get('Magento\Framework\Registry')->unregister('_fixture/Magento_ImportExport_Customer'); +$objectManager->get('Magento\Framework\Registry')->register('_fixture/Magento_ImportExport_Customer', $customer); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customer_with_addresses.php b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customer_with_addresses.php similarity index 94% rename from dev/tests/integration/testsuite/Magento/ImportExport/_files/customer_with_addresses.php rename to dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customer_with_addresses.php index 94353ae422eb7..64cd32de7a77c 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customer_with_addresses.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customer_with_addresses.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -208,5 +205,7 @@ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$objectManager->get('Magento\Registry')->unregister('_fixture/Magento_ImportExport_Customers_Array'); -$objectManager->get('Magento\Registry')->register('_fixture/Magento_ImportExport_Customers_Array', $customers); +$objectManager->get('Magento\Framework\Registry') + ->unregister('_fixture/Magento_ImportExport_Customers_Array'); +$objectManager->get('Magento\Framework\Registry') + ->register('_fixture/Magento_ImportExport_Customers_Array', $customers); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customers.php b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customers.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/ImportExport/_files/customers.php rename to dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customers.php index 81bab6abe07be..6e8139990db3d 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customers.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customers.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -125,5 +122,7 @@ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$objectManager->get('Magento\Registry')->unregister('_fixture/Magento_ImportExport_Customer_Collection'); -$objectManager->get('Magento\Registry')->register('_fixture/Magento_ImportExport_Customer_Collection', $customers); +$objectManager->get('Magento\Framework\Registry') + ->unregister('_fixture/Magento_ImportExport_Customer_Collection'); +$objectManager->get('Magento\Framework\Registry') + ->register('_fixture/Magento_ImportExport_Customer_Collection', $customers); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customers_for_address_import.php b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customers_for_address_import.php similarity index 96% rename from dev/tests/integration/testsuite/Magento/ImportExport/_files/customers_for_address_import.php rename to dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customers_for_address_import.php index 19bb345d8afb9..858cbce917b81 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/_files/customers_for_address_import.php +++ b/dev/tests/integration/testsuite/Magento/Customer/_files/import_export/customers_for_address_import.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php index 70357f8812d7f..fc68a85c85728 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php @@ -58,7 +58,7 @@ public function testLaunchActionSingleStoreWrongThemeId() $this->dispatch('backend/admin/system_design_editor/launch'); $this->assertSessionMessages( $this->equalTo(array('We can\'t find theme "' . $wrongThemeId . '".')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $expected = 'http://localhost/index.php/backend/admin/system_design_editor/index/'; $this->assertRedirect($this->stringStartsWith($expected)); diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php index afbee750b8d2f..fdbc7c9af8567 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php @@ -34,12 +34,12 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\View\DesignInterface + * @var \Magento\Framework\View\DesignInterface */ protected $_design; /** - * @var \Magento\View\FileSystem + * @var \Magento\Framework\View\FileSystem */ protected $_viewFileSystem; @@ -53,10 +53,11 @@ protected function setUp() $directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList'); $path = str_replace($directoryList->getRoot(), '', str_replace('\\', '/', __DIR__) . '/../_files/design'); $directoryList->addDirectory(\Magento\Framework\App\Filesystem::THEMES_DIR, array('path' => ltrim($path, '/'))); - $this->_design = $objectManager->get('Magento\View\DesignInterface'); - $objectManager->get('Magento\Framework\App\State')->setAreaCode(\Magento\View\DesignInterface::DEFAULT_AREA); + $this->_design = $objectManager->get('Magento\Framework\View\DesignInterface'); + $objectManager->get('Magento\Framework\App\State') + ->setAreaCode(\Magento\Framework\View\DesignInterface::DEFAULT_AREA); $this->_design->setDesignTheme('vendor_test'); - $this->_viewFileSystem = $objectManager->get('Magento\View\FileSystem'); + $this->_viewFileSystem = $objectManager->get('Magento\Framework\View\FileSystem'); $quickStylesPath = $this->_viewFileSystem->getFilename('Magento_DesignEditor::controls/quick_styles.xml'); $this->assertFileExists($quickStylesPath); $this->_model = $objectManager->create( diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php index d7dffa237a9c5..21eaed174ad0c 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php @@ -34,7 +34,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase protected $_configFactory; /** - * @var \Magento\View\DesignInterface + * @var \Magento\Framework\View\DesignInterface */ protected $_design; @@ -44,8 +44,9 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Framework\App\State')->setAreaCode(\Magento\View\DesignInterface::DEFAULT_AREA); - $this->_design = $objectManager->get('Magento\View\DesignInterface'); + $objectManager->get('Magento\Framework\App\State') + ->setAreaCode(\Magento\Framework\View\DesignInterface::DEFAULT_AREA); + $this->_design = $objectManager->get('Magento\Framework\View\DesignInterface'); $this->_design->setDesignTheme('vendor_test_child'); $this->_configFactory = $objectManager->create('Magento\DesignEditor\Model\Editor\Tools\Controls\Factory'); } @@ -73,7 +74,7 @@ public function testLoadConfigurations($type, $controlName, $controlData) $directoryList->addDirectory(\Magento\Framework\App\Filesystem::ROOT_DIR, array('path' => $relativePath)); $directoryList->addDirectory(\Magento\Framework\App\Filesystem::THEMES_DIR, array('path' => $relativePath)); $designTheme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->getDesignTheme(); $configuration = $this->_configFactory->create($type, $designTheme); $this->assertEquals($controlData, $configuration->getControlData($controlName)); @@ -155,7 +156,7 @@ public function testSaveConfiguration($saveData, $xpathData) { $type = \Magento\DesignEditor\Model\Editor\Tools\Controls\Factory::TYPE_QUICK_STYLES; $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->getDesignTheme(); $configuration = $this->_configFactory->create($type, $theme); $configuration->saveData($saveData); diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php index 7ddd3be7235a7..9cd1187dd2979 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/ObserverTest.php @@ -39,27 +39,37 @@ class ObserverTest extends \PHPUnit_Framework_TestCase */ public function testCleanJs($area, $designMode, $expectedAssets) { - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $headBlock \Magento\Theme\Block\Html\Head */ $headBlock = $layout->createBlock('Magento\Theme\Block\Html\Head', 'head'); $headBlock->setData('vde_design_mode', $designMode); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $pageAssets \Magento\View\Asset\GroupedCollection */ - $pageAssets = $objectManager->get('Magento\View\Asset\GroupedCollection'); + /** @var $pageAssets \Magento\Framework\View\Asset\GroupedCollection */ + $pageAssets = $objectManager->get('Magento\Framework\View\Asset\GroupedCollection'); $fixtureAssets = array( - array('name' => 'test_css', 'type' => \Magento\View\Publisher::CONTENT_TYPE_CSS, 'params' => array()), + array( + 'name' => 'test_css', + 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, + 'params' => array() + ), array( 'name' => 'test_css_vde', - 'type' => \Magento\View\Publisher::CONTENT_TYPE_CSS, + 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_CSS, 'params' => array('flag_name' => 'vde_design_mode') ), - array('name' => 'test_js', 'type' => \Magento\View\Publisher::CONTENT_TYPE_JS, 'params' => array()), + array( + 'name' => 'test_js', + 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, + 'params' => array() + ), array( 'name' => 'test_js_vde', - 'type' => \Magento\View\Publisher::CONTENT_TYPE_JS, + 'type' => \Magento\Framework\View\Publisher::CONTENT_TYPE_JS, 'params' => array('flag_name' => 'vde_design_mode') ) ); @@ -68,7 +78,7 @@ public function testCleanJs($area, $designMode, $expectedAssets) $pageAssets->add( $asset['name'], $objectManager->create( - 'Magento\View\Asset\ViewFile', + 'Magento\Framework\View\Asset\ViewFile', array('file' => 'some_file', 'contentType' => $asset['type']) ), $asset['params'] @@ -76,12 +86,12 @@ public function testCleanJs($area, $designMode, $expectedAssets) } - /** @var \Magento\Config\Scope $configScope */ - $configScope = $objectManager->get('Magento\Config\ScopeInterface'); + /** @var \Magento\Framework\Config\Scope $configScope */ + $configScope = $objectManager->get('Magento\Framework\Config\ScopeInterface'); $configScope->setCurrentScope($area); - /** @var $eventManager \Magento\Event\ManagerInterface */ - $eventManager = $objectManager->get('Magento\Event\ManagerInterface'); + /** @var $eventManager \Magento\Framework\Event\ManagerInterface */ + $eventManager = $objectManager->get('Magento\Framework\Event\ManagerInterface'); $eventManager->dispatch('controller_action_layout_generate_blocks_after', array('layout' => $layout)); $actualAssets = array_keys($pageAssets->getAll()); diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Theme/ChangeTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Theme/ChangeTest.php index d832c777693d9..d306de175f211 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Theme/ChangeTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Theme/ChangeTest.php @@ -53,10 +53,10 @@ public function testCrud() */ protected function _getChangeValidData() { - /** @var $theme \Magento\View\Design\ThemeInterface */ - /** @var $themeModel \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ + /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */ $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $themeModel = $theme->getCollection()->getFirstItem(); diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineTest.php index e07c09f8c0b48..a62aeb620ec40 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineTest.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Translate/InlineTest.php @@ -48,7 +48,7 @@ public static function setUpBeforeClass() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDesignTheme( 'Magento/blank' ); diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml index bb37f54a87059..b9c9c8a2372a4 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/view.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/view.xml index 038a9fd4f6959..fa8ac9fd73cf8 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/view.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test/view.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + test_value1 test_value2 diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml index 4e0afdb057587..49b30d849768a 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default Child 2.0.0.0 vendor_test diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/view.xml b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/view.xml index 6c19ae80e0d60..5d3c735923064 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/view.xml +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/frontend/vendor_test_child/view.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + test_child_value1 test_child_value2 diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php index 131b0beb3c253..3da1c8642c1c3 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php @@ -34,11 +34,11 @@ ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Framework\App\State') - ->setAreaCode(\Magento\View\DesignInterface::DEFAULT_AREA); + ->setAreaCode(\Magento\Framework\View\DesignInterface::DEFAULT_AREA); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); /** @var $registration \Magento\Core\Model\Theme\Registration */ $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php b/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php index 79fb89147b367..997e7484b2444 100644 --- a/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php +++ b/dev/tests/integration/testsuite/Magento/DesignEditor/_files/design_editor_active.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); @@ -36,8 +36,10 @@ $auth->login(\Magento\TestFramework\Bootstrap::ADMIN_NAME, \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD); $session->activateDesignEditor(); -/** @var $theme \Magento\View\Design\ThemeInterface */ -$theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Design\ThemeInterface'); +/** @var $theme \Magento\Framework\View\Design\ThemeInterface */ +$theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Framework\View\Design\ThemeInterface' +); $theme->setData( array( 'theme_code' => 'blank', diff --git a/dev/tests/integration/testsuite/Magento/Dhl/Block/Adminhtml/UnitofmeasureTest.php b/dev/tests/integration/testsuite/Magento/Dhl/Block/Adminhtml/UnitofmeasureTest.php index 4b41657dab21f..eeab798150804 100644 --- a/dev/tests/integration/testsuite/Magento/Dhl/Block/Adminhtml/UnitofmeasureTest.php +++ b/dev/tests/integration/testsuite/Magento/Dhl/Block/Adminhtml/UnitofmeasureTest.php @@ -33,8 +33,10 @@ class UnitofmeasureTest extends \PHPUnit_Framework_TestCase */ public function testToHtml() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Dhl\Block\Adminhtml\Unitofmeasure */ $block = $layout->createBlock('Magento\Dhl\Block\Adminhtml\Unitofmeasure'); $this->assertNotEmpty($block->toHtml()); diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php index 1678a3eb9797d..507daf6a04e93 100644 --- a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php +++ b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php @@ -34,7 +34,7 @@ class LinksTest extends \PHPUnit_Framework_TestCase public function testGetUploadButtonsHtml() { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Links' ); @@ -44,18 +44,18 @@ public function testGetUploadButtonsHtml() /** * Reuse code for testing getUploadButtonHtml() * - * @param \Magento\View\Element\AbstractBlock $block + * @param \Magento\Framework\View\Element\AbstractBlock $block */ - public static function performUploadButtonTest(\Magento\View\Element\AbstractBlock $block) + public static function performUploadButtonTest(\Magento\Framework\View\Element\AbstractBlock $block) { - /** @var $layout \Magento\View\LayoutInterface */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Layout'); + /** @var $layout \Magento\Framework\View\LayoutInterface */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Framework\View\Layout'); $layout->addBlock($block, 'links'); $expected = uniqid(); $text = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text', + 'Magento\Framework\View\Element\Text', '', array('data' => array('text' => $expected)) ); @@ -73,13 +73,13 @@ public function testGetLinkData() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'product', - new \Magento\Object(array('type_id' => 'simple')) + new \Magento\Framework\Object(array('type_id' => 'simple')) ); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Links' ); @@ -103,13 +103,13 @@ public function testGetLinksTitle($productType, $linksTitle, $expectedResult) /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'product', - new \Magento\Object(array('type_id' => $productType, 'id' => '1', 'links_title' => $linksTitle)) + new \Magento\Framework\Object(array('type_id' => $productType, 'id' => '1', 'links_title' => $linksTitle)) ); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Links' ); diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php index 34d7fdbb52ac5..126febd7a8992 100644 --- a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php +++ b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php @@ -31,7 +31,7 @@ class SamplesTest extends \PHPUnit_Framework_TestCase public function testGetUploadButtonsHtml() { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Samples' ); @@ -48,13 +48,13 @@ public function testGetSampleData() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'current_product', - new \Magento\Object(array('type_id' => 'simple')) + new \Magento\Framework\Object(array('type_id' => 'simple')) ); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Samples' ); @@ -77,13 +77,19 @@ public function testGetSamplesTitle($productType, $samplesTitle, $expectedResult /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'current_product', - new \Magento\Object(array('type_id' => $productType, 'id' => '1', 'samples_title' => $samplesTitle)) + new \Magento\Framework\Object( + array( + 'type_id' => $productType, + 'id' => '1', + 'samples_title' => $samplesTitle + ) + ) ); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Downloadable\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable\Samples' ); diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php index a7c0bad0e1414..2059af715fdb5 100644 --- a/dev/tests/integration/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php +++ b/dev/tests/integration/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php @@ -38,7 +38,7 @@ class LinksTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Tax\Model\Calculation */ private $taxCalculationModel; - /** @var \Magento\Registry */ + /** @var \Magento\Framework\Registry */ private $registry; /** @var \Magento\Downloadable\Block\Catalog\Product\Links */ @@ -47,10 +47,10 @@ class LinksTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->registry = $this->objectManager->get('Magento\Registry'); + $this->registry = $this->objectManager->get('Magento\Framework\Registry'); $this->taxCalculationModel = $this->objectManager->create('Magento\Tax\Model\Calculation'); - $this->linksBlock = $this->objectManager->get('Magento\View\LayoutInterface') + $this->linksBlock = $this->objectManager->get('Magento\Framework\View\LayoutInterface') ->createBlock('Magento\Downloadable\Block\Catalog\Product\Links'); } diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Controller/ProductTest.php b/dev/tests/integration/testsuite/Magento/Downloadable/Controller/ProductTest.php index 4cb40665c7718..2196e7d32a40a 100644 --- a/dev/tests/integration/testsuite/Magento/Downloadable/Controller/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/Downloadable/Controller/ProductTest.php @@ -41,7 +41,7 @@ public function testViewAction() $this->assertContains( 'catalog_product_view_type_downloadable', \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->getUpdate()->getHandles() ); $responseBody = $this->getResponse()->getBody(); diff --git a/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php index 871c12b51cde5..9690c076df9d8 100644 --- a/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php @@ -42,27 +42,27 @@ public function testPrepareForm() \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - $objectManager->get('Magento\View\DesignInterface') + $objectManager->get('Magento\Framework\View\DesignInterface') ->setDefaultDesignTheme(); $entityType = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Eav\Model\Config') ->getEntityType('customer'); $model = $objectManager->create('Magento\Customer\Model\Attribute'); $model->setEntityTypeId($entityType->getId()); - $objectManager->get('Magento\Registry')->register('entity_attribute', $model); + $objectManager->get('Magento\Framework\Registry')->register('entity_attribute', $model); $block = $this->getMockForAbstractClass( 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Main\AbstractMain', array( $objectManager->get('Magento\Backend\Block\Template\Context'), - $objectManager->get('Magento\Registry'), - $objectManager->get('Magento\Data\FormFactory'), + $objectManager->get('Magento\Framework\Registry'), + $objectManager->get('Magento\Framework\Data\FormFactory'), $objectManager->get('Magento\Eav\Helper\Data'), $objectManager->get('Magento\Backend\Model\Config\Source\YesnoFactory'), $objectManager->get('Magento\Eav\Model\Adminhtml\System\Config\Source\InputtypeFactory'), $objectManager->get('Magento\Eav\Model\Entity\Attribute\Config') ) )->setLayout( - $objectManager->create('Magento\View\Layout') + $objectManager->create('Magento\Framework\View\Layout') ); $method = new \ReflectionMethod( diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php index 60219fe2f6f23..dd4e283c96ce2 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php @@ -131,15 +131,15 @@ public function testLayoutDirective($area, $directiveParams, $expectedOutput) $objectManager->get( 'Magento\Framework\App\Config\MutableScopeConfigInterface' )->setValue( - \Magento\View\DesignInterface::XML_PATH_THEME_ID, + \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID, $themeId, \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); - /** @var $layout \Magento\View\LayoutInterface */ - $layout = $objectManager->create('Magento\View\Layout'); - $objectManager->addSharedInstance($layout, 'Magento\View\Layout'); - $objectManager->get('Magento\View\DesignInterface')->setDesignTheme('test_default'); + /** @var $layout \Magento\Framework\View\LayoutInterface */ + $layout = $objectManager->create('Magento\Framework\View\Layout'); + $objectManager->addSharedInstance($layout, 'Magento\Framework\View\Layout'); + $objectManager->get('Magento\Framework\View\DesignInterface')->setDesignTheme('test_default'); $actualOutput = $this->_model->layoutDirective( array('{{layout ' . $directiveParams . '}}', 'layout', ' ' . $directiveParams) diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php index cca3b679a9111..7151d1919b530 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php @@ -52,14 +52,14 @@ protected function setUp() array('_getMail') )->setConstructorArgs( array( - $objectManager->get('Magento\Model\Context'), - $objectManager->get('Magento\View\DesignInterface'), - $objectManager->get('Magento\Registry'), + $objectManager->get('Magento\Framework\Model\Context'), + $objectManager->get('Magento\Framework\View\DesignInterface'), + $objectManager->get('Magento\Framework\Registry'), $objectManager->get('Magento\Core\Model\App\Emulation'), $objectManager->get('Magento\Store\Model\StoreManager'), $objectManager->create('Magento\Framework\App\Filesystem'), - $objectManager->create('Magento\View\Url'), - $objectManager->create('Magento\View\FileSystem'), + $objectManager->create('Magento\Framework\View\Url'), + $objectManager->create('Magento\Framework\View\FileSystem'), $objectManager->create('Magento\Framework\App\Config\ScopeConfigInterface'), $objectManager->get('Magento\Email\Model\Template\FilterFactory'), $objectManager->get('Magento\Email\Model\Template\Config') @@ -117,7 +117,7 @@ public function testGetProcessedTemplate() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\AreaList' )->getArea( - \Magento\Core\Model\App\Area::AREA_FRONTEND + \Magento\Framework\App\Area::AREA_FRONTEND )->load(); $this->_setNotDefaultThemeForFixtureStore(); $expectedViewUrl = 'static/frontend/Magento/plushe/en_US/Magento_Theme/favicon.ico'; @@ -143,13 +143,13 @@ public function testGetProcessedTemplate() protected function _setNotDefaultThemeForFixtureStore() { $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); $theme->load('Magento/plushe', 'theme_path'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Config\MutableScopeConfigInterface' )->setValue( - \Magento\View\DesignInterface::XML_PATH_THEME_ID, + \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID, $theme->getId(), \Magento\Store\Model\ScopeInterface::SCOPE_STORE, 'fixturestore' @@ -165,7 +165,7 @@ public function testGetProcessedTemplateDesignChange() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\AreaList' )->getArea( - \Magento\Core\Model\App\Area::AREA_FRONTEND + \Magento\Framework\App\Area::AREA_FRONTEND )->load(); $this->_model->setTemplateText('{{view url="Magento_Theme::favicon.ico"}}'); $this->assertStringEndsWith( @@ -183,7 +183,7 @@ public function testGetProcessedTemplateSubject() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\AreaList' )->getArea( - \Magento\Core\Model\App\Area::AREA_FRONTEND + \Magento\Framework\App\Area::AREA_FRONTEND )->load(); $this->_setNotDefaultThemeForFixtureStore(); $expectedViewUrl = 'static/frontend/Magento/plushe/en_US/Magento_Theme/favicon.ico'; @@ -210,7 +210,7 @@ public function testGetDefaultEmailLogo() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\AreaList' )->getArea( - \Magento\Core\Model\App\Area::AREA_FRONTEND + \Magento\Framework\App\Area::AREA_FRONTEND )->load(); $this->assertStringEndsWith( 'static/frontend/Magento/blank/en_US/Magento_Email/logo_email.gif', diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml index 9b8b6f0829e62..5a50603168399 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/adminhtml/test_default/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml index 6a394a699a568..458f90185b692 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/Magento_Core/layout/email_template_test_handle.xml @@ -27,8 +27,8 @@ */ --> - - + + Ignored e-mail content, only the first block is used diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml index 9b8b6f0829e62..5a50603168399 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/design/frontend/test_default/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php index 78b8a6e13d319..35df4c7d3c4fa 100644 --- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php +++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php @@ -31,7 +31,7 @@ $objectManger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManger->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); $objectManger->configure(array( 'preferences' => array( diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/App/AreaTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/AreaTest.php similarity index 85% rename from dev/tests/integration/testsuite/Magento/Core/Model/App/AreaTest.php rename to dev/tests/integration/testsuite/Magento/Framework/App/AreaTest.php index 41b2e0cc23179..2bcbdcfba0bea 100644 --- a/dev/tests/integration/testsuite/Magento/Core/Model/App/AreaTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/AreaTest.php @@ -18,18 +18,16 @@ * 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_Core * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Core\Model\App; +namespace Magento\Framework\App; class AreaTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Core\Model\App\Area + * @var \Magento\Framework\App\Area */ protected $_model; @@ -43,9 +41,9 @@ protected function setUp() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); - /** @var $_model \Magento\Core\Model\App\Area */ + /** @var $_model \Magento\Framework\App\Area */ $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Core\Model\App\Area', + 'Magento\Framework\App\Area', array('areaCode' => 'frontend') ); } @@ -56,23 +54,23 @@ protected function setUp() public function testInitDesign() { $defaultTheme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme()->getDesignTheme(); - $this->_model->load(\Magento\Core\Model\App\Area::PART_DESIGN); + $this->_model->load(\Magento\Framework\App\Area::PART_DESIGN); $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme(); $this->assertEquals($defaultTheme->getThemePath(), $design->getDesignTheme()->getThemePath()); $this->assertEquals('frontend', $design->getArea()); // try second time and make sure it won't load second time - $this->_model->load(\Magento\Core\Model\App\Area::PART_DESIGN); + $this->_model->load(\Magento\Framework\App\Area::PART_DESIGN); $designArea = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->getArea(); $sameDesign = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( $designArea ); @@ -94,7 +92,9 @@ public function testDetectDesignUserAgent() $request = $objectManager->create('Magento\TestFramework\Request'); $request->setServer(array('HTTP_USER_AGENT' => 'Mozilla Firefox')); $this->_model->detectDesign($request); - $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface'); + $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\DesignInterface' + ); $this->assertEquals('Magento/blank', $design->getDesignTheme()->getThemePath()); } @@ -109,7 +109,9 @@ public function testDetectDesignUserAgent() public function testDetectDesignDesignChange() { $this->_model->detectDesign(); - $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface'); + $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\DesignInterface' + ); $this->assertEquals('Magento/plushe', $design->getDesignTheme()->getThemePath()); } @@ -125,12 +127,12 @@ public function testDetectDesignDesignChange() public function testDetectDesignNonFrontend() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $model = $objectManager->create('Magento\Core\Model\App\Area', array('areaCode' => 'install')); + $model = $objectManager->create('Magento\Framework\App\Area', array('areaCode' => 'install')); /** @var $request \Magento\TestFramework\Request */ $request = $objectManager->create('Magento\TestFramework\Request'); $request->setServer(array('HTTP_USER_AGENT' => 'Mozilla Firefox')); $model->detectDesign($request); - $design = $objectManager->get('Magento\View\DesignInterface'); + $design = $objectManager->get('Magento\Framework\View\DesignInterface'); $this->assertNotEquals('Magento/blank', $design->getDesignTheme()->getThemePath()); } } diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/Cache/State/OptionsTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/Cache/State/OptionsTest.php index 9806ce72cca8c..c6450a3cdf196 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/Cache/State/OptionsTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/Cache/State/OptionsTest.php @@ -69,7 +69,7 @@ public function testUniqueFields() public function testHasDataChanged() { - $object = new \Magento\Object(array('code' => 'value1', 'value' => 'value2')); + $object = new \Magento\Framework\Object(array('code' => 'value1', 'value' => 'value2')); $this->assertTrue($this->_model->hasDataChanged($object)); $object->setOrigData(); diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/FrontController/Plugin/InstallTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/FrontController/Plugin/InstallTest.php index 97e2bba0c5d2e..d060656055f10 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/FrontController/Plugin/InstallTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/FrontController/Plugin/InstallTest.php @@ -26,12 +26,12 @@ class InstallTest extends \Magento\TestFramework\TestCase\AbstractController { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @var \Magento\Module\Setup + * @var \Magento\Framework\Module\Setup */ protected $_model; @@ -39,7 +39,7 @@ protected function setUp() { $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Module\Setup', + 'Magento\Framework\Module\Setup', array('resourceName' => 'default_setup', 'moduleName' => 'Magento_Core') ); } @@ -48,13 +48,13 @@ public function testApplyAllDataUpdates() { /*reset versions*/ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Module\ResourceInterface' + 'Magento\Framework\Module\ResourceInterface' )->setDbVersion( 'adminnotification_setup', false ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Module\ResourceInterface' + 'Magento\Framework\Module\ResourceInterface' )->setDataVersion( 'adminnotification_setup', false @@ -62,7 +62,7 @@ public function testApplyAllDataUpdates() $this->_model->deleteTableRow('core_resource', 'code', 'adminnotification_setup'); $this->_model->getConnection()->dropTable($this->_model->getTable('adminnotification_inbox')); $this->_model->getConnection()->dropTable($this->_model->getTable('admin_system_messages')); - /** @var \Magento\Cache\FrontendInterface $cache */ + /** @var \Magento\Framework\Cache\FrontendInterface $cache */ $cache = $this->_objectManager->get('Magento\Framework\App\Cache\Type\Config'); $cache->clean(); diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/FrontControllerTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/FrontControllerTest.php index 2ee3484f28dde..21144d8d479e0 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/App/FrontControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/App/FrontControllerTest.php @@ -32,7 +32,7 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; diff --git a/dev/tests/integration/testsuite/Magento/Cache/Backend/MongoDbTest.php b/dev/tests/integration/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php similarity index 97% rename from dev/tests/integration/testsuite/Magento/Cache/Backend/MongoDbTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php index 8d6e15482bf0c..4b708190eb9e5 100644 --- a/dev/tests/integration/testsuite/Magento/Cache/Backend/MongoDbTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache\Backend; +namespace Magento\Framework\Cache\Backend; class MongoDbTest extends \PHPUnit_Framework_TestCase { @@ -30,7 +30,7 @@ class MongoDbTest extends \PHPUnit_Framework_TestCase protected $_dbName = 'magento_integration_test'; /** - * @var \Magento\Cache\Backend\MongoDb|null + * @var \Magento\Framework\Cache\Backend\MongoDb|null */ protected $_model = null; @@ -47,7 +47,7 @@ protected function setUp() if (defined('MONGODB_DATABASE_NAME')) { $this->_dbName = MONGODB_DATABASE_NAME; } - $this->_model = new \Magento\Cache\Backend\MongoDb( + $this->_model = new \Magento\Framework\Cache\Backend\MongoDb( array('connection_string' => $this->_connectionString, 'db' => $this->_dbName) ); } @@ -67,7 +67,7 @@ protected function tearDown() */ public function testConstructorException() { - new \Magento\Cache\Backend\MongoDb(); + new \Magento\Framework\Cache\Backend\MongoDb(); } public function testGetIds() diff --git a/dev/tests/integration/testsuite/Magento/Cache/CoreTest.php b/dev/tests/integration/testsuite/Magento/Framework/Cache/CoreTest.php similarity index 81% rename from dev/tests/integration/testsuite/Magento/Cache/CoreTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Cache/CoreTest.php index 8393f5803285f..408eb44e38cda 100644 --- a/dev/tests/integration/testsuite/Magento/Cache/CoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Cache/CoreTest.php @@ -23,9 +23,9 @@ */ /** - * \Magento\Cache\Core test case + * \Magento\Framework\Cache\Core test case */ -namespace Magento\Cache; +namespace Magento\Framework\Cache; class CoreTest extends \PHPUnit_Framework_TestCase { @@ -35,16 +35,16 @@ public function testSetBackendSuccess() $config = array( 'backend_decorators' => array( 'test_decorator' => array( - 'class' => 'Magento\Cache\Backend\Decorator\Compression', + 'class' => 'Magento\Framework\Cache\Backend\Decorator\Compression', 'options' => array('compression_threshold' => '100') ) ) ); - $core = new \Magento\Cache\Core($config); + $core = new \Magento\Framework\Cache\Core($config); $core->setBackend($mockBackend); - $this->assertInstanceOf('Magento\Cache\Backend\Decorator\AbstractDecorator', $core->getBackend()); + $this->assertInstanceOf('Magento\Framework\Cache\Backend\Decorator\AbstractDecorator', $core->getBackend()); } /** @@ -55,7 +55,7 @@ public function testSetBackendException() $mockBackend = $this->getMock('Zend_Cache_Backend_File'); $config = array('backend_decorators' => array('test_decorator' => array('class' => 'Zend_Cache_Backend'))); - $core = new \Magento\Cache\Core($config); + $core = new \Magento\Framework\Cache\Core($config); $core->setBackend($mockBackend); } } diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php similarity index 75% rename from dev/tests/integration/testsuite/Magento/Code/GeneratorTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php index 1ab38ef5c17ce..992a1c3cda21b 100644 --- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php @@ -24,10 +24,10 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code; +namespace Magento\Framework\Code; -use Magento\ObjectManager\Code\Generator as DIGenerator; -use Magento\Interception\Code\Generator as InterceptionGenerator; +use Magento\Framework\ObjectManager\Code\Generator as DIGenerator; +use Magento\Framework\Interception\Code\Generator as InterceptionGenerator; require_once __DIR__ . '/GeneratorTest/SourceClassWithNamespace.php'; require_once __DIR__ . '/GeneratorTest/ParentClassWithNamespace.php'; @@ -36,11 +36,11 @@ */ class GeneratorTest extends \PHPUnit_Framework_TestCase { - const CLASS_NAME_WITHOUT_NAMESPACE = 'Magento\Code\GeneratorTest\SourceClassWithoutNamespace'; + const CLASS_NAME_WITHOUT_NAMESPACE = 'Magento\Framework\Code\GeneratorTest\SourceClassWithoutNamespace'; - const CLASS_NAME_WITH_NAMESPACE = 'Magento\Code\GeneratorTest\SourceClassWithNamespace'; + const CLASS_NAME_WITH_NAMESPACE = 'Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace'; - const INTERFACE_NAME_WITHOUT_NAMESPACE = 'Magento\Code\GeneratorTest\SourceInterfaceWithoutNamespace'; + const INTERFACE_NAME_WITHOUT_NAMESPACE = 'Magento\Framework\Code\GeneratorTest\SourceInterfaceWithoutNamespace'; /** * @var string @@ -48,17 +48,17 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase protected $_includePath; /** - * @var \Magento\Code\Generator + * @var \Magento\Framework\Code\Generator */ protected $_generator; /** - * @var \Magento\Code\Generator\Io + * @var \Magento\Framework\Code\Generator\Io */ protected $_ioObject; /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected $varDirectory; @@ -73,21 +73,22 @@ protected function setUp() ); $generationDirectory = $this->varDirectory->getAbsolutePath('generation'); - \Magento\Autoload\IncludePath::addIncludePath($generationDirectory); + \Magento\Framework\Autoload\IncludePath::addIncludePath($generationDirectory); - $this->_ioObject = new \Magento\Code\Generator\Io( - new \Magento\Filesystem\Driver\File(), - new \Magento\Autoload\IncludePath(), + $this->_ioObject = new \Magento\Framework\Code\Generator\Io( + new \Magento\Framework\Filesystem\Driver\File(), + new \Magento\Framework\Autoload\IncludePath(), $generationDirectory ); $this->_generator = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Code\Generator', + 'Magento\Framework\Code\Generator', array( 'ioObject' => $this->_ioObject, 'generatedEntities' => array( - DIGenerator\Factory::ENTITY_TYPE => '\Magento\ObjectManager\Code\Generator\Factory', - DIGenerator\Proxy::ENTITY_TYPE => '\Magento\ObjectManager\Code\Generator\Proxy', - InterceptionGenerator\Interceptor::ENTITY_TYPE => '\Magento\Interception\Code\Generator\Interceptor' + DIGenerator\Factory::ENTITY_TYPE => '\Magento\Framework\ObjectManager\Code\Generator\Factory', + DIGenerator\Proxy::ENTITY_TYPE => '\Magento\Framework\ObjectManager\Code\Generator\Proxy', + InterceptionGenerator\Interceptor::ENTITY_TYPE => + '\Magento\Framework\Interception\Code\Generator\Interceptor' ) ) ); @@ -110,19 +111,19 @@ public function testGenerateClassFactoryWithNamespace() $factoryClassName = self::CLASS_NAME_WITH_NAMESPACE . 'Factory'; $result = false; $generatorResult = $this->_generator->generateClass($factoryClassName); - if (\Magento\Code\Generator::GENERATION_SUCCESS == $generatorResult) { + if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { $result = true; } $this->assertTrue($result); - /** @var $factory \Magento\ObjectManager\Factory */ + /** @var $factory \Magento\Framework\ObjectManager\Factory */ $factory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($factoryClassName); $object = $factory->create(); $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE, $object); // This test is only valid if the factory created the object if Autoloader did not pick it up automatically - if (\Magento\Code\Generator::GENERATION_SUCCESS == $generatorResult) { + if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { $content = $this->_clearDocBlock( file_get_contents($this->_ioObject->getResultFileName(self::CLASS_NAME_WITH_NAMESPACE . 'Factory')) ); @@ -138,7 +139,7 @@ public function testGenerateClassProxyWithNamespace() $proxyClassName = self::CLASS_NAME_WITH_NAMESPACE . '\Proxy'; $result = false; $generatorResult = $this->_generator->generateClass($proxyClassName); - if (\Magento\Code\Generator::GENERATION_SUCCESS == $generatorResult) { + if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { $result = true; } $this->assertTrue($result); @@ -147,7 +148,7 @@ public function testGenerateClassProxyWithNamespace() $this->assertInstanceOf(self::CLASS_NAME_WITH_NAMESPACE, $proxy); // This test is only valid if the factory created the object if Autoloader did not pick it up automatically - if (\Magento\Code\Generator::GENERATION_SUCCESS == $generatorResult) { + if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { $content = $this->_clearDocBlock( file_get_contents($this->_ioObject->getResultFileName(self::CLASS_NAME_WITH_NAMESPACE . '\Proxy')) ); @@ -163,12 +164,12 @@ public function testGenerateClassInterceptorWithNamespace() $interceptorClassName = self::CLASS_NAME_WITH_NAMESPACE . '\Interceptor'; $result = false; $generatorResult = $this->_generator->generateClass($interceptorClassName); - if (\Magento\Code\Generator::GENERATION_SUCCESS == $generatorResult) { + if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { $result = true; } $this->assertTrue($result); - if (\Magento\Code\Generator::GENERATION_SUCCESS == $generatorResult) { + if (\Magento\Framework\Code\Generator::GENERATION_SUCCESS == $generatorResult) { $content = $this->_clearDocBlock( file_get_contents( $this->_ioObject->getResultFileName(self::CLASS_NAME_WITH_NAMESPACE . '\Interceptor') diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/ParentClassWithNamespace.php b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest/ParentClassWithNamespace.php similarity index 98% rename from dev/tests/integration/testsuite/Magento/Code/GeneratorTest/ParentClassWithNamespace.php rename to dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest/ParentClassWithNamespace.php index 69d8477cb148b..e4dabfa60bd4e 100644 --- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/ParentClassWithNamespace.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest/ParentClassWithNamespace.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\GeneratorTest; +namespace Magento\Framework\Code\GeneratorTest; use Zend\Code\Generator\DocBlockGenerator; diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespace.php b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest/SourceClassWithNamespace.php similarity index 98% rename from dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespace.php rename to dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest/SourceClassWithNamespace.php index 5c1ef8d997baa..d5d5bd3124e82 100644 --- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest/SourceClassWithNamespace.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest/SourceClassWithNamespace.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\GeneratorTest; +namespace Magento\Framework\Code\GeneratorTest; use Zend\Code\Generator\ClassGenerator; diff --git a/dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceFactory.php b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceFactory.php similarity index 76% rename from dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceFactory.php rename to dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceFactory.php index 6a27493dcef21..33715140c646b 100644 --- a/dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceFactory.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceFactory.php @@ -1,8 +1,8 @@ _objectManager = $objectManager; $this->_instanceName = $instanceName; @@ -57,7 +57,7 @@ public function __construct(\Magento\ObjectManager $objectManager, $instanceName * Create class instance with specified parameters * * @param array $data - * @return \Magento\Code\GeneratorTest\SourceClassWithNamespace + * @return \Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace */ public function create(array $data = array()) { diff --git a/dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceInterceptor.php b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceInterceptor.php similarity index 81% rename from dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceInterceptor.php rename to dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceInterceptor.php index 92d7813fc4f40..b02a75c925be0 100644 --- a/dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceInterceptor.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceInterceptor.php @@ -1,5 +1,5 @@ pluginLocator = $pluginLocator; $this->pluginList = $pluginList; @@ -79,8 +79,8 @@ public function __sleep() public function __wakeup() { $this->pluginLocator = \Magento\Framework\App\ObjectManager::getInstance(); - $this->pluginList = $this->pluginLocator->get('Magento\Interception\PluginList'); - $this->chain = $this->pluginLocator->get('Magento\Interception\Chain'); + $this->pluginList = $this->pluginLocator->get('Magento\Framework\Interception\PluginList'); + $this->chain = $this->pluginLocator->get('Magento\Framework\Interception\Chain'); $this->subjectType = get_parent_class($this); } @@ -88,8 +88,8 @@ protected function ___call($method, array $arguments, array $pluginInfo) { $capMethod = ucfirst($method); $result = null; - if (isset($pluginInfo[\Magento\Interception\Definition::LISTENER_BEFORE])) { - foreach ($pluginInfo[\Magento\Interception\Definition::LISTENER_BEFORE] as $code) { + if (isset($pluginInfo[\Magento\Framework\Interception\Definition::LISTENER_BEFORE])) { + foreach ($pluginInfo[\Magento\Framework\Interception\Definition::LISTENER_BEFORE] as $code) { $beforeResult = call_user_func_array( array($this->pluginList->getPlugin($this->subjectType, $code), 'before'. $capMethod), array_merge(array($this), $arguments) ); @@ -98,11 +98,11 @@ protected function ___call($method, array $arguments, array $pluginInfo) } } } - if (isset($pluginInfo[\Magento\Interception\Definition::LISTENER_AROUND])) { + if (isset($pluginInfo[\Magento\Framework\Interception\Definition::LISTENER_AROUND])) { $chain = $this->chain; $type = $this->subjectType; $subject = $this; - $code = $pluginInfo[\Magento\Interception\Definition::LISTENER_AROUND]; + $code = $pluginInfo[\Magento\Framework\Interception\Definition::LISTENER_AROUND]; $next = function () use ($chain, $type, $method, $subject, $code) { return $chain->invokeNext($type, $method, $subject, func_get_args(), $code); }; @@ -113,8 +113,8 @@ protected function ___call($method, array $arguments, array $pluginInfo) } else { $result = call_user_func_array(array('parent', $method), $arguments); } - if (isset($pluginInfo[\Magento\Interception\Definition::LISTENER_AFTER])) { - foreach ($pluginInfo[\Magento\Interception\Definition::LISTENER_AFTER] as $code) { + if (isset($pluginInfo[\Magento\Framework\Interception\Definition::LISTENER_AFTER])) { + foreach ($pluginInfo[\Magento\Framework\Interception\Definition::LISTENER_AFTER] as $code) { $result = $this->pluginList->getPlugin($this->subjectType, $code) ->{'after' . $capMethod}($this, $result); } diff --git a/dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceProxy.php b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php similarity index 84% rename from dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceProxy.php rename to dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php index e872ce6a927a9..10975b1d17550 100644 --- a/dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceProxy.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php @@ -1,8 +1,8 @@ _objectManager = $objectManager; $this->_instanceName = $instanceName; @@ -96,7 +96,7 @@ public function __clone() /** * Get proxied instance * - * @return \Magento\Code\GeneratorTest\SourceClassWithNamespace + * @return \Magento\Framework\Code\GeneratorTest\SourceClassWithNamespace */ protected function _getSubject() { diff --git a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/Adapter/OyejorgeTest.php b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/OyejorgeTest.php similarity index 90% rename from dev/tests/integration/testsuite/Magento/Css/PreProcessor/Adapter/OyejorgeTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/OyejorgeTest.php index cd53632236f3d..06a22fd11853a 100644 --- a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/Adapter/OyejorgeTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/Adapter/OyejorgeTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Css\PreProcessor\Adapter; +namespace Magento\Framework\Css\PreProcessor\Adapter; /** * Oyejorge adapter model @@ -36,7 +36,7 @@ class OyejorgeTest extends \PHPUnit_Framework_TestCase public function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->model = $objectManager->create('Magento\Css\PreProcessor\Adapter\Oyejorge'); + $this->model = $objectManager->create('Magento\Framework\Css\PreProcessor\Adapter\Oyejorge'); } public function testProcess() diff --git a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/CacheTest.php b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/CacheTest.php similarity index 77% rename from dev/tests/integration/testsuite/Magento/Css/PreProcessor/CacheTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/CacheTest.php index d8aa3bad4c709..6c3e5d25c31d3 100644 --- a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/CacheTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/CacheTest.php @@ -21,33 +21,33 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Css\PreProcessor; +namespace Magento\Framework\Css\PreProcessor; -use Magento\Css\PreProcessor\Cache\Import\Cache; -use Magento\Css\PreProcessor\Cache\Import\Map\Storage; +use Magento\Framework\Css\PreProcessor\Cache\Import\Cache; +use Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage; class CacheTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; /** - * @var \Magento\Css\PreProcessor\Less + * @var \Magento\Framework\Css\PreProcessor\Less */ protected $preProcessorLess; /** - * @var \Magento\Filesystem + * @var \Magento\Framework\Filesystem */ protected $filesystem; public function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->preProcessorLess = $this->objectManager->create('Magento\Css\PreProcessor\Less'); - $this->filesystem = $this->objectManager->get('Magento\Filesystem'); + $this->preProcessorLess = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Less'); + $this->filesystem = $this->objectManager->get('Magento\Framework\Filesystem'); \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize( array( @@ -68,7 +68,7 @@ protected function tearDown() public function testLessCache() { $file = $this->objectManager->create( - 'Magento\View\Publisher\CssFile', + 'Magento\Framework\View\Publisher\CssFile', array('filePath' => 'oyejorge.css', 'allowDuplication' => false, 'viewParams' => $this->getDesignParams()) ); @@ -77,9 +77,9 @@ public function testLessCache() /** * cache was not initialize yet and return empty value * - * @var \Magento\Css\PreProcessor\Cache\CacheManager $cacheManagerEmpty + * @var \Magento\Framework\Css\PreProcessor\Cache\CacheManager $cacheManagerEmpty */ - $emptyCache = $this->objectManager->create('Magento\Css\PreProcessor\Cache\CacheManager'); + $emptyCache = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Cache\CacheManager'); $emptyCache->initializeCacheByType(Cache::IMPORT_CACHE, $file); $this->assertEmpty($emptyCache->getCachedFile(Cache::IMPORT_CACHE)); @@ -88,9 +88,9 @@ public function testLessCache() /** * cache initialized and return cached file * - * @var \Magento\Css\PreProcessor\Cache\CacheManager $cacheManagerGenerated + * @var \Magento\Framework\Css\PreProcessor\Cache\CacheManager $cacheManagerGenerated */ - $generatedCache = $this->objectManager->create('Magento\Css\PreProcessor\Cache\CacheManager'); + $generatedCache = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Cache\CacheManager'); $generatedCache->initializeCacheByType(Cache::IMPORT_CACHE, $file); $this->assertNotEmpty($generatedCache->getCachedFile(Cache::IMPORT_CACHE)); } @@ -101,7 +101,7 @@ public function testLessCache() protected function getDesignParams() { $designParams = array('area' => 'frontend'); - $viewService = $this->objectManager->get('Magento\View\Service'); + $viewService = $this->objectManager->get('Magento\Framework\View\Service'); $viewService->updateDesignParams($designParams); return $designParams; @@ -112,7 +112,7 @@ protected function getDesignParams() */ protected function clearCache() { - /** @var \Magento\Filesystem\Directory\WriteInterface $mapsDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mapsDirectory */ $mapsDirectory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); if ($mapsDirectory->isDirectory(Storage::MAPS_DIR)) { diff --git a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/cache/lib/nested/import.less b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/cache/lib/nested/import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/cache/lib/nested/import.less rename to dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/cache/lib/nested/import.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/cache/lib/oyejorge.less b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/cache/lib/oyejorge.less new file mode 100644 index 0000000000000..1a09579713c57 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/cache/lib/oyejorge.less @@ -0,0 +1 @@ +@import "nested/import"; diff --git a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/nested/import.less b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/nested/import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/nested/import.less rename to dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/nested/import.less diff --git a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/oyejorge.css b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/oyejorge.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/oyejorge.css rename to dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/oyejorge.css diff --git a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/oyejorge.less b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/oyejorge.less similarity index 96% rename from dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/oyejorge.less rename to dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/oyejorge.less index 447915d0cfaa5..febf31ee5af5b 100644 --- a/dev/tests/integration/testsuite/Magento/Css/PreProcessor/_files/oyejorge.less +++ b/dev/tests/integration/testsuite/Magento/Framework/Css/PreProcessor/_files/oyejorge.less @@ -62,7 +62,7 @@ h2 { border-color: desaturate(@red, 10%); } -@import "nested/import.less"; +@import "nested/import"; body { background-image: @body-bg-img; diff --git a/dev/tests/integration/testsuite/Magento/DB/Adapter/InterfaceTest.php b/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/InterfaceTest.php similarity index 96% rename from dev/tests/integration/testsuite/Magento/DB/Adapter/InterfaceTest.php rename to dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/InterfaceTest.php index 25157f9ac0f92..cecd2c41d9dff 100644 --- a/dev/tests/integration/testsuite/Magento/DB/Adapter/InterfaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/InterfaceTest.php @@ -26,14 +26,14 @@ */ /** - * Test for an environment-dependent DB adapter that implements \Magento\DB\Adapter\AdapterInterface + * Test for an environment-dependent DB adapter that implements \Magento\Framework\DB\Adapter\AdapterInterface */ -namespace Magento\DB\Adapter; +namespace Magento\Framework\DB\Adapter; class InterfaceTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\DB\Adapter\AdapterInterface + * @var \Magento\Framework\DB\Adapter\AdapterInterface */ protected $_connection; @@ -55,7 +55,7 @@ class InterfaceTest extends \PHPUnit_Framework_TestCase protected function setUp() { $installer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Module\Setup', + 'Magento\Framework\Module\Setup', array( 'resourceName' => 'core_setup', 'moduleName' => 'Magento_Core' @@ -70,16 +70,16 @@ protected function setUp() $this->_tableName )->addColumn( 'id', - \Magento\DB\Ddl\Table::TYPE_INTEGER, + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, null, array('identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true), 'Id' )->addColumn( 'column1', - \Magento\DB\Ddl\Table::TYPE_INTEGER + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER )->addColumn( 'column2', - \Magento\DB\Ddl\Table::TYPE_INTEGER + \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER )->addIndex( $this->_oneColumnIdxName, array('column1') diff --git a/dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php b/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php similarity index 90% rename from dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php rename to dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php index 832b76dae910a..8d0352cb339df 100644 --- a/dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php @@ -28,14 +28,14 @@ /** * Test for an PDO MySQL adapter */ -namespace Magento\DB\Adapter\Pdo; +namespace Magento\Framework\DB\Adapter\Pdo; class MysqlTest extends \PHPUnit_Framework_TestCase { /** * Database adapter instance * - * @var \Magento\DB\Adapter\Pdo\Mysql + * @var \Magento\Framework\DB\Adapter\Pdo\Mysql */ protected $_dbAdapter = null; @@ -46,8 +46,8 @@ class MysqlTest extends \PHPUnit_Framework_TestCase */ public function testWaitTimeout() { - if (!$this->_getDbAdapter() instanceof \Magento\DB\Adapter\Pdo\Mysql) { - $this->markTestSkipped('This test is for \Magento\DB\Adapter\Pdo\Mysql'); + if (!$this->_getDbAdapter() instanceof \Magento\Framework\DB\Adapter\Pdo\Mysql) { + $this->markTestSkipped('This test is for \Magento\Framework\DB\Adapter\Pdo\Mysql'); } try { $defaultWaitTimeout = $this->_getWaitTimeout(); @@ -58,7 +58,7 @@ public function testWaitTimeout() // Sleep for time greater than wait_timeout and try to perform query sleep($minWaitTimeout + 1); $result = $this->_executeQuery('SELECT 1'); - $this->assertInstanceOf('Magento\DB\Statement\Pdo\Mysql', $result); + $this->assertInstanceOf('Magento\Framework\DB\Statement\Pdo\Mysql', $result); // Restore wait_timeout $this->_setWaitTimeout($defaultWaitTimeout); $this->assertEquals( @@ -127,7 +127,7 @@ protected function _executeQuery($sql) /** * Retrieve database adapter instance * - * @return \Magento\DB\Adapter\Pdo\Mysql + * @return \Magento\Framework\DB\Adapter\Pdo\Mysql */ protected function _getDbAdapter() { diff --git a/dev/tests/integration/testsuite/Magento/DB/TransactionTest.php b/dev/tests/integration/testsuite/Magento/Framework/DB/TransactionTest.php similarity index 93% rename from dev/tests/integration/testsuite/Magento/DB/TransactionTest.php rename to dev/tests/integration/testsuite/Magento/Framework/DB/TransactionTest.php index cd0cbdb8144d7..00145af61da12 100644 --- a/dev/tests/integration/testsuite/Magento/DB/TransactionTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/DB/TransactionTest.php @@ -23,18 +23,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\DB; +namespace Magento\Framework\DB; class TransactionTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\DB\Transaction + * @var \Magento\Framework\DB\Transaction */ protected $_model; protected function setUp() { - $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\DB\Transaction'); + $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\DB\Transaction'); } /** diff --git a/dev/tests/integration/testsuite/Magento/Data/Argument/Interpreter/StringTest.php b/dev/tests/integration/testsuite/Magento/Framework/Data/Argument/Interpreter/StringTest.php similarity index 90% rename from dev/tests/integration/testsuite/Magento/Data/Argument/Interpreter/StringTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Data/Argument/Interpreter/StringTest.php index a199ee0364991..8cc7d28c3b965 100644 --- a/dev/tests/integration/testsuite/Magento/Data/Argument/Interpreter/StringTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Data/Argument/Interpreter/StringTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument\Interpreter; +namespace Magento\Framework\Data\Argument\Interpreter; class StringTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Argument\Interpreter\String + * @var \Magento\Framework\Data\Argument\Interpreter\String */ protected $_model; @@ -37,7 +37,7 @@ class StringTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_booleanUtils = $this->getMock('\Magento\Stdlib\BooleanUtils'); + $this->_booleanUtils = $this->getMock('\Magento\Framework\Stdlib\BooleanUtils'); $this->_booleanUtils->expects( $this->any() )->method( @@ -46,7 +46,7 @@ protected function setUp() $this->returnValueMap(array(array('true', true), array('false', false))) ); $this->_model = new String($this->_booleanUtils); - $translateRenderer = $this->getMockForAbstractClass('Magento\Phrase\RendererInterface'); + $translateRenderer = $this->getMockForAbstractClass('Magento\Framework\Phrase\RendererInterface'); $translateRenderer->expects($this->any())->method('render')->will( $this->returnCallback( function ($input) { @@ -54,7 +54,7 @@ function ($input) { } ) ); - \Magento\Phrase::setRenderer($translateRenderer); + \Magento\Framework\Phrase::setRenderer($translateRenderer); } /** diff --git a/dev/tests/integration/testsuite/Magento/Data/Form/Element/FieldsetTest.php b/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php similarity index 94% rename from dev/tests/integration/testsuite/Magento/Data/Form/Element/FieldsetTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php index 65e561938cf26..4f5f086526770 100644 --- a/dev/tests/integration/testsuite/Magento/Data/Form/Element/FieldsetTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php @@ -26,23 +26,23 @@ */ /** - * Tests for \Magento\Data\Form\Element\Fieldset + * Tests for \Magento\Framework\Data\Form\Element\Fieldset */ -namespace Magento\Data\Form\Element; +namespace Magento\Framework\Data\Form\Element; class FieldsetTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Form\Element\Fieldset + * @var \Magento\Framework\Data\Form\Element\Fieldset */ protected $_fieldset; protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var $elementFactory \Magento\Data\Form\ElementFactory */ - $elementFactory = $objectManager->create('Magento\Data\Form\ElementFactory'); - $this->_fieldset = $elementFactory->create('Magento\Data\Form\Element\Fieldset', array()); + /** @var $elementFactory \Magento\Framework\Data\Form\ElementFactory */ + $elementFactory = $objectManager->create('Magento\Framework\Data\Form\ElementFactory'); + $this->_fieldset = $elementFactory->create('Magento\Framework\Data\Form\Element\Fieldset', array()); } /** diff --git a/dev/tests/integration/testsuite/Magento/Encryption/ModelTest.php b/dev/tests/integration/testsuite/Magento/Framework/Encryption/ModelTest.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/Encryption/ModelTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Encryption/ModelTest.php index b23dfdce8db85..3ef2cbdd73720 100644 --- a/dev/tests/integration/testsuite/Magento/Encryption/ModelTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Encryption/ModelTest.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Encryption; +namespace Magento\Framework\Encryption; class ModelTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Encryption\Encryptor + * @var \Magento\Framework\Encryption\Encryptor */ protected $_model; protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Encryption\Encryptor' + 'Magento\Framework\Encryption\Encryptor' ); } @@ -61,7 +61,7 @@ public function testEncryptDecrypt2() public function testValidateKey() { $validKey = md5(uniqid()); - $this->assertInstanceOf('Magento\Encryption\Crypt', $this->_model->validateKey($validKey)); + $this->assertInstanceOf('Magento\Framework\Encryption\Crypt', $this->_model->validateKey($validKey)); } public function testGetValidateHash() diff --git a/dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php b/dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php new file mode 100644 index 0000000000000..96b8b14c42904 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Exception/NoSuchEntityExceptionTest.php @@ -0,0 +1,60 @@ +assertEquals('No such entity.', $exception->getRawMessage()); + $this->assertEquals('No such entity.', $exception->getMessage()); + $this->assertEquals('No such entity.', $exception->getLogMessage()); + + $exception = new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ); + $this->assertEquals('No such entity with field = value', $exception->getMessage()); + $this->assertEquals(NoSuchEntityException::MESSAGE_SINGLE_FIELD, $exception->getRawMessage()); + $this->assertEquals('No such entity with field = value', $exception->getLogMessage()); + + $exception = new NoSuchEntityException( + NoSuchEntityException::MESSAGE_DOUBLE_FIELDS, + [ + 'fieldName' => 'field1', + 'fieldValue' => 'value1', + 'field2Name' => 'field2', + 'field2Value' => 'value2' + ] + ); + $this->assertEquals( + NoSuchEntityException::MESSAGE_DOUBLE_FIELDS, + $exception->getRawMessage() + ); + $this->assertEquals('No such entity with field1 = value1, field2 = value2', $exception->getMessage()); + $this->assertEquals('No such entity with field1 = value1, field2 = value2', $exception->getLogMessage()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/File/SizeTest.php b/dev/tests/integration/testsuite/Magento/Framework/File/SizeTest.php similarity index 93% rename from dev/tests/integration/testsuite/Magento/File/SizeTest.php rename to dev/tests/integration/testsuite/Magento/Framework/File/SizeTest.php index 5333d92523abc..f99dae18c3b20 100644 --- a/dev/tests/integration/testsuite/Magento/File/SizeTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/File/SizeTest.php @@ -28,18 +28,19 @@ /** * Magento file size test */ -namespace Magento\File; +namespace Magento\Framework\File; class SizeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\File\Size + * @var \Magento\Framework\File\Size */ protected $_fileSize; protected function setUp() { - $this->_fileSize = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\File\Size'); + $this->_fileSize = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\File\Size'); } /** diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/ReadTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php similarity index 93% rename from dev/tests/integration/testsuite/Magento/Filesystem/Directory/ReadTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php index e05a1feeaa630..bbffa9079050f 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/ReadTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php @@ -1,6 +1,6 @@ getDirectoryInstance('foo')->openFile('file_three.txt'); $file->close(); - $this->assertTrue($file instanceof \Magento\Filesystem\File\ReadInterface); + $this->assertTrue($file instanceof \Magento\Framework\Filesystem\File\ReadInterface); } /** @@ -303,10 +303,12 @@ private function getDirectoryInstance($path) $fullPath = __DIR__ . '/../_files/' . $path; $config = array('path' => $fullPath); $objectManager = Bootstrap::getObjectManager(); - $directoryFactory = $objectManager->create('Magento\Filesystem\Directory\ReadFactory'); + $directoryFactory = $objectManager->create('Magento\Framework\Filesystem\Directory\ReadFactory'); return $directoryFactory->create( $config, - new \Magento\Filesystem\DriverFactory($objectManager->get('Magento\Framework\App\Filesystem\DirectoryList')) + new \Magento\Framework\Filesystem\DriverFactory( + $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList') + ) ); } diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/WriteTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/Filesystem/Directory/WriteTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php index f33befb138df5..2f7c0667cfbac 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/WriteTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php @@ -1,6 +1,6 @@ getDirectoryInstance($basePath, $permissions); $file = $directory->openFile($path, $mode); - $this->assertTrue($file instanceof \Magento\Filesystem\File\WriteInterface); + $this->assertTrue($file instanceof \Magento\Framework\Filesystem\File\WriteInterface); $file->close(); } @@ -390,10 +390,12 @@ private function getDirectoryInstance($path, $permissions) $fullPath = __DIR__ . '/../_files/' . $path; $config = array('path' => $fullPath, 'permissions' => $permissions, 'allow_create_dirs' => true); $objectManager = Bootstrap::getObjectManager(); - $directoryFactory = $objectManager->create('Magento\Filesystem\Directory\WriteFactory'); + $directoryFactory = $objectManager->create('Magento\Framework\Filesystem\Directory\WriteFactory'); $directory = $directoryFactory->create( $config, - new \Magento\Filesystem\DriverFactory($objectManager->get('Magento\Framework\App\Filesystem\DirectoryList')) + new \Magento\Framework\Filesystem\DriverFactory( + $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList') + ) ); $this->testDirectories[] = $directory; return $directory; diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Driver/FileTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php similarity index 87% rename from dev/tests/integration/testsuite/Magento/Filesystem/Driver/FileTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php index a5d28892e62f4..4c84a48f4a08e 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/Driver/FileTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Driver/FileTest.php @@ -1,6 +1,6 @@ driver = new \Magento\Filesystem\Driver\File(); + $this->driver = new \Magento\Framework\Filesystem\Driver\File(); $this->absolutePath = dirname(__DIR__) . '/_files/'; } @@ -78,7 +78,7 @@ public function testReadDirectoryRecursively() /** * test exception * - * @expectedException \Magento\Filesystem\FilesystemException + * @expectedException \Magento\Framework\Filesystem\FilesystemException */ public function testReadDirectoryRecursivelyFailure() { diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/File/ReadTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/ReadTest.php similarity index 96% rename from dev/tests/integration/testsuite/Magento/Filesystem/File/ReadTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/ReadTest.php index 97ca63ac098a3..ac23dc9233483 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/File/ReadTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/ReadTest.php @@ -1,6 +1,6 @@ create( - 'Magento\Filesystem\File\Read', - array('path' => $fullPath, 'driver' => new \Magento\Filesystem\Driver\File()) + 'Magento\Framework\Filesystem\File\Read', + array('path' => $fullPath, 'driver' => new \Magento\Framework\Filesystem\Driver\File()) ); } } diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/File/WriteTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/WriteTest.php similarity index 93% rename from dev/tests/integration/testsuite/Magento/Filesystem/File/WriteTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/WriteTest.php index af371a26d6023..bb8409611e7d6 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/File/WriteTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/WriteTest.php @@ -1,6 +1,6 @@ currentFilePath = __DIR__ . '/../_files/' . $path; return Bootstrap::getObjectManager()->create( - 'Magento\Filesystem\File\Write', - array('path' => $this->currentFilePath, 'driver' => new \Magento\Filesystem\Driver\File(), 'mode' => $mode) + 'Magento\Framework\Filesystem\File\Write', + array( + 'path' => $this->currentFilePath, + 'driver' => new \Magento\Framework\Filesystem\Driver\File(), + 'mode' => $mode + ) ); } } diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/FilesystemTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/FilesystemTest.php similarity index 85% rename from dev/tests/integration/testsuite/Magento/Filesystem/FilesystemTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/FilesystemTest.php index 84408088c287d..439d4192f21cc 100644 --- a/dev/tests/integration/testsuite/Magento/Filesystem/FilesystemTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/FilesystemTest.php @@ -1,6 +1,6 @@ filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::VAR_DIR); - $this->assertInstanceOf('\Magento\Filesystem\Directory\Read', $dir); + $this->assertInstanceOf('\Magento\Framework\Filesystem\Directory\Read', $dir); } /** @@ -60,13 +60,13 @@ public function testGetDirectoryReadInstance() public function testGetDirectoryWriteInstance() { $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); - $this->assertInstanceOf('\Magento\Filesystem\Directory\Write', $dir); + $this->assertInstanceOf('\Magento\Framework\Filesystem\Directory\Write', $dir); } /** * Test getDirectoryWrite throws exception on trying to get directory with write access * - * @expectedException \Magento\Filesystem\FilesystemException + * @expectedException \Magento\Framework\Filesystem\FilesystemException */ public function testGetDirectoryWriteException() { diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/data.csv b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/data.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/Filesystem/_files/data.csv rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/data.csv diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/baz/file_one.txt b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/foo/bar/baz/file_one.txt similarity index 100% rename from dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/baz/file_one.txt rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/foo/bar/baz/file_one.txt diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/file_two.txt b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/foo/bar/file_two.txt similarity index 100% rename from dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/bar/file_two.txt rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/foo/bar/file_two.txt diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/file_three.txt b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/foo/file_three.txt similarity index 100% rename from dev/tests/integration/testsuite/Magento/Filesystem/_files/foo/file_three.txt rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/foo/file_three.txt diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/popup.csv b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/popup.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/Filesystem/_files/popup.csv rename to dev/tests/integration/testsuite/Magento/Framework/Filesystem/_files/popup.csv diff --git a/dev/tests/integration/testsuite/Magento/Gdata/Gshopping/ContentTest.php b/dev/tests/integration/testsuite/Magento/Framework/Gdata/Gshopping/ContentTest.php similarity index 80% rename from dev/tests/integration/testsuite/Magento/Gdata/Gshopping/ContentTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Gdata/Gshopping/ContentTest.php index 1efad959eddff..f0ec2b9d6c605 100644 --- a/dev/tests/integration/testsuite/Magento/Gdata/Gshopping/ContentTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Gdata/Gshopping/ContentTest.php @@ -21,17 +21,17 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Gdata\Gshopping; +namespace Magento\Framework\Gdata\Gshopping; class ContentTest extends \PHPUnit_Framework_TestCase { public function testNewEntry() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Gdata\Gshopping\Content $context */ - $context = $objectManager->create('Magento\Gdata\Gshopping\Content'); + /** @var \Magento\Framework\Gdata\Gshopping\Content $context */ + $context = $objectManager->create('Magento\Framework\Gdata\Gshopping\Content'); $entry = $context->newEntry(); - $this->assertInstanceOf('Magento\Gdata\Gshopping\Entry', $entry); + $this->assertInstanceOf('Magento\Framework\Gdata\Gshopping\Entry', $entry); $this->assertEquals($context, $entry->getService()); } } diff --git a/dev/tests/integration/testsuite/Magento/HTTP/HeaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/HTTP/HeaderTest.php similarity index 92% rename from dev/tests/integration/testsuite/Magento/HTTP/HeaderTest.php rename to dev/tests/integration/testsuite/Magento/Framework/HTTP/HeaderTest.php index db2e1540d5288..1bc9d8342cea7 100644 --- a/dev/tests/integration/testsuite/Magento/HTTP/HeaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/HTTP/HeaderTest.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\HTTP; +namespace Magento\Framework\HTTP; class HeaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\HTTP\Header + * @var \Magento\Framework\HTTP\Header */ protected $_header; protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_header = $objectManager->get('Magento\HTTP\Header'); + $this->_header = $objectManager->get('Magento\Framework\HTTP\Header'); /** @var \Magento\TestFramework\Request $request */ $request = $objectManager->get('Magento\TestFramework\Request'); diff --git a/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/RemoteAddressTest.php b/dev/tests/integration/testsuite/Magento/Framework/HTTP/PhpEnvironment/RemoteAddressTest.php similarity index 86% rename from dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/RemoteAddressTest.php rename to dev/tests/integration/testsuite/Magento/Framework/HTTP/PhpEnvironment/RemoteAddressTest.php index 33557b0fb0dd8..a62bfdfda356c 100644 --- a/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/RemoteAddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/HTTP/PhpEnvironment/RemoteAddressTest.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\HTTP\PhpEnvironment; +namespace Magento\Framework\HTTP\PhpEnvironment; class RemoteAddressTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\HTTP\PhpEnvironment\RemoteAddress + * @var \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress */ protected $_helper; protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_helper = $objectManager->get('Magento\HTTP\PhpEnvironment\RemoteAddress'); + $this->_helper = $objectManager->get('Magento\Framework\HTTP\PhpEnvironment\RemoteAddress'); } public function testGetRemoteAddress() diff --git a/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/ServerAddressTest.php b/dev/tests/integration/testsuite/Magento/Framework/HTTP/PhpEnvironment/ServerAddressTest.php similarity index 86% rename from dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/ServerAddressTest.php rename to dev/tests/integration/testsuite/Magento/Framework/HTTP/PhpEnvironment/ServerAddressTest.php index 7ad213839cd4d..10c56f96d3a93 100644 --- a/dev/tests/integration/testsuite/Magento/HTTP/PhpEnvironment/ServerAddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/HTTP/PhpEnvironment/ServerAddressTest.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\HTTP\PhpEnvironment; +namespace Magento\Framework\HTTP\PhpEnvironment; class ServerAddressTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\HTTP\PhpEnvironment\ServerAddress + * @var \Magento\Framework\HTTP\PhpEnvironment\ServerAddress */ protected $_helper; protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_helper = $objectManager->get('Magento\HTTP\PhpEnvironment\ServerAddress'); + $this->_helper = $objectManager->get('Magento\Framework\HTTP\PhpEnvironment\ServerAddress'); } public function testGetServerAddress() diff --git a/dev/tests/integration/testsuite/Magento/Image/Adapter/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/ConfigTest.php similarity index 82% rename from dev/tests/integration/testsuite/Magento/Image/Adapter/ConfigTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/ConfigTest.php index 943cd5aa7cd8e..9b883c9d9b229 100644 --- a/dev/tests/integration/testsuite/Magento/Image/Adapter/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/ConfigTest.php @@ -21,14 +21,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Image\Adapter; +namespace Magento\Framework\Image\Adapter; class ConfigTest extends \PHPUnit_Framework_TestCase { public function testGetAdapterName() { /** @var Config $config */ - $config = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Image\Adapter\Config'); - $this->assertEquals(\Magento\Image\Adapter\AdapterInterface::ADAPTER_GD2, $config->getAdapterAlias()); + $config = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Image\Adapter\Config'); + $this->assertEquals(\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2, $config->getAdapterAlias()); } } diff --git a/dev/tests/integration/testsuite/Magento/Image/Adapter/InterfaceTest.php b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/Image/Adapter/InterfaceTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php index 132a1021a9720..9c5495db538f8 100644 --- a/dev/tests/integration/testsuite/Magento/Image/Adapter/InterfaceTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Image\Adapter; +namespace Magento\Framework\Image\Adapter; class InterfaceTest extends \PHPUnit_Framework_TestCase { @@ -34,8 +34,8 @@ class InterfaceTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_adapters = array( - \Magento\Image\Adapter\AdapterInterface::ADAPTER_GD2, - \Magento\Image\Adapter\AdapterInterface::ADAPTER_IM + \Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2, + \Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_IM ); /** @@ -111,7 +111,7 @@ protected function _getFixture($pattern) * Check is format supported. * * @param string $image - * @param \Magento\Image\Adapter\AbstractAdapter $adapter + * @param \Magento\Framework\Image\Adapter\AbstractAdapter $adapter * @return bool */ protected function _isFormatSupported($image, $adapter) @@ -131,7 +131,7 @@ protected function _getAdapter($adapterType) { try { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $adapter = $objectManager->get('Magento\Image\AdapterFactory')->create($adapterType); + $adapter = $objectManager->get('Magento\Framework\Image\AdapterFactory')->create($adapterType); return $adapter; } catch (\Exception $e) { $this->markTestSkipped($e->getMessage()); @@ -152,8 +152,8 @@ public function testCheckDependencies($adapterType) public function adaptersDataProvider() { return array( - array(\Magento\Image\Adapter\AdapterInterface::ADAPTER_GD2), - array(\Magento\Image\Adapter\AdapterInterface::ADAPTER_IM) + array(\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2), + array(\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_IM) ); } @@ -414,7 +414,7 @@ public function imageWatermarkDataProvider() 50, 50, 100, - \Magento\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT, + \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT, 10, 10 ), @@ -424,7 +424,7 @@ public function imageWatermarkDataProvider() 100, 70, 100, - \Magento\Image\Adapter\AbstractAdapter::POSITION_TOP_LEFT, + \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_TOP_LEFT, 10, 10 ), @@ -434,7 +434,7 @@ public function imageWatermarkDataProvider() 100, 70, 100, - \Magento\Image\Adapter\AbstractAdapter::POSITION_TILE, + \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_TILE, 10, 10 ), @@ -444,7 +444,7 @@ public function imageWatermarkDataProvider() 100, 100, 100, - \Magento\Image\Adapter\AbstractAdapter::POSITION_STRETCH, + \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_STRETCH, 10, 10 ), @@ -454,7 +454,7 @@ public function imageWatermarkDataProvider() 50, 50, 100, - \Magento\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT, + \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT, 10, 10 ), @@ -464,7 +464,7 @@ public function imageWatermarkDataProvider() 50, 50, 100, - \Magento\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT, + \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT, 10, 10 ) @@ -477,34 +477,34 @@ public function imageWatermarkDataProvider() * * @param array $pixel ('x' => ..., 'y' => ...) * @param string $position - * @param \Magento\Image\Adapter\AbstractAdapter $adapter + * @param \Magento\Framework\Image\Adapter\AbstractAdapter $adapter * @return array */ protected function _prepareColor($pixel, $position, $adapter) { switch ($position) { - case \Magento\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT: + case \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_RIGHT: $pixel['x'] = $adapter->getOriginalWidth() - 1; $pixel['y'] = $adapter->getOriginalHeight() - 1; break; - case \Magento\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_LEFT: + case \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_BOTTOM_LEFT: $pixel['x'] = 1; $pixel['y'] = $adapter->getOriginalHeight() - 1; break; - case \Magento\Image\Adapter\AbstractAdapter::POSITION_TOP_LEFT: + case \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_TOP_LEFT: $pixel['x'] = 1; $pixel['y'] = 1; break; - case \Magento\Image\Adapter\AbstractAdapter::POSITION_TOP_RIGHT: + case \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_TOP_RIGHT: $pixel['x'] = $adapter->getOriginalWidth() - 1; $pixel['y'] = 1; break; - case \Magento\Image\Adapter\AbstractAdapter::POSITION_CENTER: + case \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_CENTER: $pixel['x'] = $adapter->getOriginalWidth() / 2; $pixel['y'] = $adapter->getOriginalHeight() / 2; break; - case \Magento\Image\Adapter\AbstractAdapter::POSITION_STRETCH: - case \Magento\Image\Adapter\AbstractAdapter::POSITION_TILE: + case \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_STRETCH: + case \Magento\Framework\Image\Adapter\AbstractAdapter::POSITION_TILE: $pixel['x'] = round($adapter->getOriginalWidth() / 3); $pixel['y'] = round($adapter->getOriginalHeight() / 3); break; @@ -591,28 +591,28 @@ public function createPngFromStringDataProvider() 'expectedColor1' => array('red' => 0, 'green' => 0, 'blue' => 0, 'alpha' => 0), array('x' => 0, 'y' => 15), 'expectedColor2' => array('red' => 255, 'green' => 255, 'blue' => 255, 'alpha' => 127), - \Magento\Image\Adapter\AdapterInterface::ADAPTER_GD2 + \Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2 ), array( array('x' => 4, 'y' => 7), 'expectedColor1' => array('red' => 0, 'green' => 0, 'blue' => 0, 'alpha' => 0), array('x' => 0, 'y' => 15), 'expectedColor2' => array('red' => 255, 'green' => 255, 'blue' => 255, 'alpha' => 127), - \Magento\Image\Adapter\AdapterInterface::ADAPTER_IM + \Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_IM ), array( array('x' => 1, 'y' => 14), 'expectedColor1' => array('red' => 255, 'green' => 255, 'blue' => 255, 'alpha' => 127), array('x' => 5, 'y' => 12), 'expectedColor2' => array('red' => 0, 'green' => 0, 'blue' => 0, 'alpha' => 0), - \Magento\Image\Adapter\AdapterInterface::ADAPTER_GD2 + \Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2 ), array( array('x' => 1, 'y' => 14), 'expectedColor1' => array('red' => 255, 'green' => 255, 'blue' => 255, 'alpha' => 127), array('x' => 4, 'y' => 10), 'expectedColor2' => array('red' => 0, 'green' => 0, 'blue' => 0, 'alpha' => 0), - \Magento\Image\Adapter\AdapterInterface::ADAPTER_IM + \Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_IM ) ); } @@ -620,7 +620,7 @@ public function createPngFromStringDataProvider() public function testValidateUploadFile() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $imageAdapter = $objectManager->get('Magento\Image\AdapterFactory')->create(); + $imageAdapter = $objectManager->get('Magento\Framework\Image\AdapterFactory')->create(); $this->assertTrue($imageAdapter->validateUploadFile($this->_getFixture('magento_thumbnail.jpg'))); } @@ -630,7 +630,7 @@ public function testValidateUploadFile() public function testValidateUploadFileException() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $imageAdapter = $objectManager->get('Magento\Image\AdapterFactory')->create(); + $imageAdapter = $objectManager->get('Magento\Framework\Image\AdapterFactory')->create(); $imageAdapter->validateUploadFile(__FILE__); } } diff --git a/dev/tests/integration/testsuite/Magento/Image/_files/image_adapters_test.png b/dev/tests/integration/testsuite/Magento/Framework/Image/_files/image_adapters_test.png similarity index 100% rename from dev/tests/integration/testsuite/Magento/Image/_files/image_adapters_test.png rename to dev/tests/integration/testsuite/Magento/Framework/Image/_files/image_adapters_test.png diff --git a/dev/tests/integration/testsuite/Magento/Image/_files/magento_thumbnail.jpg b/dev/tests/integration/testsuite/Magento/Framework/Image/_files/magento_thumbnail.jpg similarity index 100% rename from dev/tests/integration/testsuite/Magento/Image/_files/magento_thumbnail.jpg rename to dev/tests/integration/testsuite/Magento/Framework/Image/_files/magento_thumbnail.jpg diff --git a/dev/tests/integration/testsuite/Magento/Image/_files/watermark.gif b/dev/tests/integration/testsuite/Magento/Framework/Image/_files/watermark.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/Image/_files/watermark.gif rename to dev/tests/integration/testsuite/Magento/Framework/Image/_files/watermark.gif diff --git a/dev/tests/integration/testsuite/Magento/Image/_files/watermark.jpg b/dev/tests/integration/testsuite/Magento/Framework/Image/_files/watermark.jpg similarity index 100% rename from dev/tests/integration/testsuite/Magento/Image/_files/watermark.jpg rename to dev/tests/integration/testsuite/Magento/Framework/Image/_files/watermark.jpg diff --git a/dev/tests/integration/testsuite/Magento/Image/_files/watermark.png b/dev/tests/integration/testsuite/Magento/Framework/Image/_files/watermark.png similarity index 100% rename from dev/tests/integration/testsuite/Magento/Image/_files/watermark.png rename to dev/tests/integration/testsuite/Magento/Framework/Image/_files/watermark.png diff --git a/dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php similarity index 97% rename from dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted.php rename to dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php index 26d80b4a5e722..92ce9ddb50f63 100644 --- a/dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php @@ -22,7 +22,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Fixture; +namespace Magento\Framework\Interception\Fixture; class Intercepted extends InterceptedParent implements InterceptedInterface { diff --git a/dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted/InterfacePlugin.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php similarity index 93% rename from dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted/InterfacePlugin.php rename to dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php index 3eb5bae16b1aa..e35553f1289d3 100644 --- a/dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted/InterfacePlugin.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/InterfacePlugin.php @@ -22,9 +22,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Fixture\Intercepted; +namespace Magento\Framework\Interception\Fixture\Intercepted; -use Magento\Interception\Fixture\InterceptedInterface; +use Magento\Framework\Interception\Fixture\InterceptedInterface; class InterfacePlugin { diff --git a/dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted/Plugin.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php similarity index 94% rename from dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted/Plugin.php rename to dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php index 917e5b3d5c8fa..d20b486395b15 100644 --- a/dev/tests/integration/testsuite/Magento/Interception/Fixture/Intercepted/Plugin.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted/Plugin.php @@ -22,9 +22,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Fixture\Intercepted; +namespace Magento\Framework\Interception\Fixture\Intercepted; -use Magento\Interception\Fixture\Intercepted; +use Magento\Framework\Interception\Fixture\Intercepted; class Plugin { diff --git a/dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedInterface.php rename to dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php index c7f1d7726e17a..14ce8a191f8b8 100644 --- a/dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php @@ -22,7 +22,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Fixture; +namespace Magento\Framework\Interception\Fixture; interface InterceptedInterface { diff --git a/dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedParent.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedParent.php rename to dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php index cea30400a482e..b7a35c443c4fb 100644 --- a/dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedParent.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php @@ -22,7 +22,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Fixture; +namespace Magento\Framework\Interception\Fixture; class InterceptedParent implements InterceptedParentInterface { diff --git a/dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedParentInterface.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedParentInterface.php rename to dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php index a2457d13dbea0..99396c6535082 100644 --- a/dev/tests/integration/testsuite/Magento/Interception/Fixture/InterceptedParentInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php @@ -22,7 +22,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Fixture; +namespace Magento\Framework\Interception\Fixture; interface InterceptedParentInterface { diff --git a/dev/tests/integration/testsuite/Magento/Interception/GeneralTest.php b/dev/tests/integration/testsuite/Magento/Framework/Interception/GeneralTest.php similarity index 61% rename from dev/tests/integration/testsuite/Magento/Interception/GeneralTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Interception/GeneralTest.php index 36adc2fa957a6..b41c9995890a2 100644 --- a/dev/tests/integration/testsuite/Magento/Interception/GeneralTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Interception/GeneralTest.php @@ -22,11 +22,11 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception; +namespace Magento\Framework\Interception; /** * Class GeneralTest - * @package Magento\Interception + * @package Magento\Framework\Interception * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class GeneralTest extends \PHPUnit_Framework_TestCase @@ -37,23 +37,23 @@ class GeneralTest extends \PHPUnit_Framework_TestCase protected $_configReader; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; public function setUp() { - $classReader = new \Magento\Code\Reader\ClassReader(); - $relations = new \Magento\ObjectManager\Relations\Runtime($classReader); - $definitions = new \Magento\ObjectManager\Definition\Runtime($classReader); - $config = new \Magento\Interception\ObjectManager\Config($relations, $definitions); - $factory = new \Magento\ObjectManager\Factory\Factory( + $classReader = new \Magento\Framework\Code\Reader\ClassReader(); + $relations = new \Magento\Framework\ObjectManager\Relations\Runtime($classReader); + $definitions = new \Magento\Framework\ObjectManager\Definition\Runtime($classReader); + $config = new \Magento\Framework\Interception\ObjectManager\Config($relations, $definitions); + $factory = new \Magento\Framework\ObjectManager\Factory\Factory( $config, null, $definitions ); - $this->_configReader = $this->getMock('Magento\Config\ReaderInterface'); + $this->_configReader = $this->getMock('Magento\Framework\Config\ReaderInterface'); $this->_configReader->expects( $this->any() )->method( @@ -61,18 +61,18 @@ public function setUp() )->will( $this->returnValue( array( - 'Magento\Interception\Fixture\InterceptedInterface' => array( + 'Magento\Framework\Interception\Fixture\InterceptedInterface' => array( 'plugins' => array( 'first' => array( - 'instance' => 'Magento\Interception\Fixture\Intercepted\InterfacePlugin', + 'instance' => 'Magento\Framework\Interception\Fixture\Intercepted\InterfacePlugin', 'sortOrder' => 10 ) ) ), - 'Magento\Interception\Fixture\Intercepted' => array( + 'Magento\Framework\Interception\Fixture\Intercepted' => array( 'plugins' => array( 'second' => array( - 'instance' => 'Magento\Interception\Fixture\Intercepted\Plugin', + 'instance' => 'Magento\Framework\Interception\Fixture\Intercepted\Plugin', 'sortOrder' => 20 ) ) @@ -83,10 +83,10 @@ public function setUp() $areaList = $this->getMock('Magento\Framework\App\AreaList', array(), array(), '', false); $areaList->expects($this->any())->method('getCodes')->will($this->returnValue(array())); - $configScope = new \Magento\Config\Scope($areaList, 'global'); - $cache = $this->getMock('Magento\Config\CacheInterface'); + $configScope = new \Magento\Framework\Config\Scope($areaList, 'global'); + $cache = $this->getMock('Magento\Framework\Config\CacheInterface'); $cache->expects($this->any())->method('load')->will($this->returnValue(false)); - $definitions = new \Magento\ObjectManager\Definition\Runtime(); + $definitions = new \Magento\Framework\ObjectManager\Definition\Runtime(); $interceptionConfig = new Config\Config( $this->_configReader, $configScope, @@ -96,17 +96,17 @@ public function setUp() $definitions ); $interceptionDefinitions = new Definition\Runtime(); - $this->_objectManager = new \Magento\ObjectManager\ObjectManager( + $this->_objectManager = new \Magento\Framework\ObjectManager\ObjectManager( $factory, $config, array( - 'Magento\Config\CacheInterface' => $cache, - 'Magento\Config\ScopeInterface' => $configScope, - 'Magento\Config\ReaderInterface' => $this->_configReader, - 'Magento\ObjectManager\Relations' => $relations, - 'Magento\ObjectManager\Config' => $config, - 'Magento\ObjectManager\Definition' => $definitions, - 'Magento\Interception\Definition' => $interceptionDefinitions + 'Magento\Framework\Config\CacheInterface' => $cache, + 'Magento\Framework\Config\ScopeInterface' => $configScope, + 'Magento\Framework\Config\ReaderInterface' => $this->_configReader, + 'Magento\Framework\ObjectManager\Relations' => $relations, + 'Magento\Framework\ObjectManager\Config' => $config, + 'Magento\Framework\ObjectManager\Definition' => $definitions, + 'Magento\Framework\Interception\Definition' => $interceptionDefinitions ) ); $factory->setObjectManager($this->_objectManager); @@ -114,8 +114,9 @@ public function setUp() $config->extend( array( 'preferences' => array( - 'Magento\Interception\PluginList' => 'Magento\Interception\PluginList\PluginList', - 'Magento\Interception\Chain' => 'Magento\Interception\Chain\Chain' + 'Magento\Framework\Interception\PluginList' => + 'Magento\Framework\Interception\PluginList\PluginList', + 'Magento\Framework\Interception\Chain' => 'Magento\Framework\Interception\Chain\Chain' ) ) ); @@ -123,13 +124,13 @@ public function setUp() public function testMethodCanBePluginized() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals('1: test', $subject->D('test')); } public function testPluginCanCallOnlyNextMethodOnNext() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals( 'test', $subject->G('test') @@ -138,7 +139,7 @@ public function testPluginCanCallOnlyNextMethodOnNext() public function testBeforeAndAfterPluginsAreExecuted() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals( '1: prefix_test' . '', $subject->A('prefix_')->F('test') @@ -147,7 +148,7 @@ public function testBeforeAndAfterPluginsAreExecuted() public function testPluginCallsOtherMethodsOnSubject() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals( '1: prefix_test' . '', @@ -157,25 +158,25 @@ public function testPluginCallsOtherMethodsOnSubject() public function testInterfacePluginsAreInherited() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals('test', $subject->C('test')); } public function testInternalMethodCallsAreIntercepted() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals('121', $subject->B('1', '2')); } public function testChainedMethodsAreIntercepted() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals('1: prefix_test', $subject->A('prefix_')->D('test')); } public function testFinalMethodWorks() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals('1: prefix_test', $subject->A('prefix_')->D('test')); $this->assertEquals('prefix_final', $subject->E('final')); $this->assertEquals('2: prefix_test', $subject->D('test')); @@ -183,7 +184,7 @@ public function testFinalMethodWorks() public function testObjectKeepsStateBetweenInvocations() { - $subject = $this->_objectManager->create('Magento\Interception\Fixture\Intercepted'); + $subject = $this->_objectManager->create('Magento\Framework\Interception\Fixture\Intercepted'); $this->assertEquals('1: test', $subject->D('test')); $this->assertEquals('2: test', $subject->D('test')); } diff --git a/dev/tests/integration/testsuite/Magento/Less/File/Source/AggregatedTest.php b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Source/AggregatedTest.php similarity index 87% rename from dev/tests/integration/testsuite/Magento/Less/File/Source/AggregatedTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Less/File/Source/AggregatedTest.php index e121f951f57fd..90487e1ad10b7 100644 --- a/dev/tests/integration/testsuite/Magento/Less/File/Source/AggregatedTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Source/AggregatedTest.php @@ -21,17 +21,17 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Less\File\Source; +namespace Magento\Framework\Less\File\Source; class AggregatedTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Less\File\Source\Aggregated + * @var \Magento\Framework\Less\File\Source\Aggregated */ protected $model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; @@ -52,12 +52,12 @@ protected function setUp() $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - /** @var \Magento\Filesystem $filesystem */ + /** @var \Magento\Framework\Filesystem $filesystem */ $filesystem = $this->objectManager->create( 'Magento\Framework\App\Filesystem', array( 'directoryList' => $this->objectManager->create( - 'Magento\Filesystem\DirectoryList', + 'Magento\Framework\Filesystem\DirectoryList', array( 'root' => BP, 'directories' => array( @@ -70,19 +70,19 @@ protected function setUp() ) ); - /** @var \Magento\Less\File\Source\Base $sourceBase */ + /** @var \Magento\Framework\Less\File\Source\Base $sourceBase */ $sourceBase = $this->objectManager->create( - 'Magento\Less\File\Source\Base', + 'Magento\Framework\Less\File\Source\Base', array('filesystem' => $filesystem) ); $this->model = $this->objectManager->create( - 'Magento\Less\File\Source\Aggregated', + 'Magento\Framework\Less\File\Source\Aggregated', array('baseFiles' => $sourceBase) ); } /** - * @magentoDataFixture Magento/Less/_files/themes.php + * @magentoDataFixture Magento/Framework/Less/_files/themes.php * @magentoAppIsolation enabled * @magentoAppArea frontend * @param string $path @@ -92,8 +92,8 @@ protected function setUp() */ public function testGetFiles($path, $themeName, $expectedFiles) { - /** @var \Magento\View\Design\Theme\FlyweightFactory $themeFactory */ - $themeFactory = $this->objectManager->get('Magento\View\Design\Theme\FlyweightFactory'); + /** @var \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory */ + $themeFactory = $this->objectManager->get('Magento\Framework\View\Design\Theme\FlyweightFactory'); $theme = $themeFactory->create($themeName); if (!count($expectedFiles)) { $this->setExpectedException('LogicException', 'magento_import returns empty result by path doesNotExist'); @@ -101,7 +101,7 @@ public function testGetFiles($path, $themeName, $expectedFiles) $files = $this->model->getFiles($theme, $path); $this->assertCount(count($expectedFiles), $files, 'Files number doesn\'t match'); - /** @var $file \Magento\View\Layout\File */ + /** @var $file \Magento\Framework\View\Layout\File */ foreach ($files as $file) { if (!in_array($file->getFilename(), $expectedFiles)) { $this->fail(sprintf('File "%s" is not expected but found', $file->getFilename())); diff --git a/dev/tests/integration/testsuite/Magento/Less/PreProcessorTest.php b/dev/tests/integration/testsuite/Magento/Framework/Less/PreProcessorTest.php similarity index 73% rename from dev/tests/integration/testsuite/Magento/Less/PreProcessorTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Less/PreProcessorTest.php index 4e7a9736f3306..8ff787bd77ec6 100644 --- a/dev/tests/integration/testsuite/Magento/Less/PreProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/PreProcessorTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Less; +namespace Magento\Framework\Less; class PreProcessorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; @@ -45,29 +45,29 @@ protected function setUp() } /** - * @magentoDataFixture Magento/Less/_files/themes.php + * @magentoDataFixture Magento/Framework/Less/_files/themes.php * @magentoAppIsolation enabled * @magentoAppArea frontend */ public function testProcess() { - /** @var $lessPreProcessor \Magento\Css\PreProcessor\Less */ - $lessPreProcessor = $this->objectManager->create('Magento\Css\PreProcessor\Less'); - /** @var $filesystem \Magento\Filesystem */ - $filesystem = $this->objectManager->get('Magento\Filesystem'); + /** @var $lessPreProcessor \Magento\Framework\Css\PreProcessor\Less */ + $lessPreProcessor = $this->objectManager->create('Magento\Framework\Css\PreProcessor\Less'); + /** @var $filesystem \Magento\Framework\Filesystem */ + $filesystem = $this->objectManager->get('Magento\Framework\Filesystem'); $targetDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::TMP_DIR); $designParams = array('area' => 'frontend', 'theme' => 'test_pre_process'); - /** @var \Magento\View\Service $viewService */ - $viewService = $this->objectManager->get('Magento\View\Service'); + /** @var \Magento\Framework\View\Service $viewService */ + $viewService = $this->objectManager->get('Magento\Framework\View\Service'); $viewService->updateDesignParams($designParams); - /** @var $file \Magento\View\Publisher\CssFile */ + /** @var $file \Magento\Framework\View\Publisher\CssFile */ $cssFile = $this->objectManager->create( - 'Magento\View\Publisher\CssFile', + 'Magento\Framework\View\Publisher\CssFile', array('filePath' => 'source/source.css', 'allowDuplication' => true, 'viewParams' => $designParams) ); $cssTargetFile = $lessPreProcessor->process($cssFile, $targetDirectory); - /** @var $viewFilesystem \Magento\View\FileSystem */ - $viewFilesystem = $this->objectManager->get('Magento\View\FileSystem'); + /** @var $viewFilesystem \Magento\Framework\View\FileSystem */ + $viewFilesystem = $this->objectManager->get('Magento\Framework\View\FileSystem'); $this->assertFileEquals( $viewFilesystem->getViewFile('source.css', $designParams), $cssTargetFile->getSourcePath() @@ -75,21 +75,21 @@ public function testProcess() } /** - * @magentoDataFixture Magento/Less/_files/themes.php + * @magentoDataFixture Magento/Framework/Less/_files/themes.php * @magentoAppIsolation enabled * @magentoAppArea frontend */ public function testCircularDependency() { $designParams = array('area' => 'frontend', 'theme' => 'test_pre_process'); - /** @var \Magento\View\Service $viewService */ - $viewService = $this->objectManager->get('Magento\View\Service'); + /** @var \Magento\Framework\View\Service $viewService */ + $viewService = $this->objectManager->get('Magento\Framework\View\Service'); $viewService->updateDesignParams($designParams); - /** @var $preProcessor \Magento\Less\PreProcessor */ - $preProcessor = $this->objectManager->create('Magento\Less\PreProcessor'); + /** @var $preProcessor \Magento\Framework\Less\PreProcessor */ + $preProcessor = $this->objectManager->create('Magento\Framework\Less\PreProcessor'); $fileList = $preProcessor->processLessInstructions('circular_dependency/import1.less', $designParams); $files = array(); - /** @var $lessFile \Magento\Less\PreProcessor\File\Less */ + /** @var $lessFile \Magento\Framework\Less\PreProcessor\File\Less */ foreach ($fileList as $lessFile) { $this->assertFileExists($lessFile->getPublicationPath()); $files[] = $lessFile; diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/code/Magento/Other/view/frontend/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Other/view/frontend/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/code/Magento/Other/view/frontend/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Other/view/frontend/3.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/code/Magento/Third/view/frontend/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Third/view/frontend/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/code/Magento/Third/view/frontend/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/code/Magento/Third/view/frontend/3.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/1.file diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/Magento_Module/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Module/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/Magento_Module/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Module/1.file diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/Magento_Third/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Third/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/Magento_Third/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/Magento_Third/3.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/theme.xml index cf9ff9c81ac81..6c2c2dd47851f 100644 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_default/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Test Default 2.0.0.0 test_parent diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_parent/Magento_Module/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Module/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_parent/Magento_Module/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Module/1.file diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_parent/Magento_Second/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Second/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_parent/Magento_Second/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/Magento_Second/1.file diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_parent/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_parent/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/theme.xml index ae863629640e1..641c462e84395 100644 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_parent/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_parent/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Test Parent 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/import_dir/import_in_magento_import.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less new file mode 100644 index 0000000000000..0dd781fb1fdd2 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less @@ -0,0 +1,4 @@ +@import "import_dir/import_in_magento_import"; +div.test { + color: white; +} diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test2/some_dir/magento_import.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/Magento_Test3/import.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less new file mode 100644 index 0000000000000..165a45a6cd81e --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less @@ -0,0 +1 @@ +@import 'import2'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less new file mode 100644 index 0000000000000..d4f067f7669ca --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less @@ -0,0 +1 @@ +@import 'import3'; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less new file mode 100644 index 0000000000000..629d39cdb9c01 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less @@ -0,0 +1 @@ +@import 'import1'; diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1.less similarity index 60% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1.less index f85590c0f54ff..819a64f26dbe3 100644 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1.less +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1.less @@ -1,4 +1,4 @@ -@import "import1/source/import1-1.less"; +@import "import1/source/import1-1"; .class { font-size: @importedSize; // use imported variable } diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/import1-1.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less new file mode 100644 index 0000000000000..29199434e7fd8 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less @@ -0,0 +1 @@ +@import "../import1-1"; diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import2.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import2.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import2.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/less/import2.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/some_dir/import_dir/import_in_magento_import.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/source.css b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/source.css rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source.css diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/source/source.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source/source.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/source/source.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/source/source.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/theme.xml similarity index 63% rename from dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/theme.xml index d5759da221c6b..30b727b759f4f 100644 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/design/frontend/test_pre_process/theme.xml @@ -1,5 +1,5 @@ - + Test Pre-Processor 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/lib/1.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/1.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/lib/1.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/1.file diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/lib/2.file b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/2.file similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/lib/2.file rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/2.file diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/lib/3.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/3.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/lib/3.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/3.less diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/lib/some_dir/import_dir/import_in_magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/import_dir/import_in_magento_import.less similarity index 100% rename from dev/tests/integration/testsuite/Magento/Less/_files/lib/some_dir/import_dir/import_in_magento_import.less rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/import_dir/import_in_magento_import.less diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/magento_import.less new file mode 100644 index 0000000000000..afcd1989ec7df --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/lib/some_dir/magento_import.less @@ -0,0 +1,4 @@ +@import "import_dir/import_in_magento_import"; +div.magento_import_lib { + color: green; +} diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/themes.php b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/themes.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/Less/_files/themes.php rename to dev/tests/integration/testsuite/Magento/Framework/Less/_files/themes.php index ae4f6c0cad2a6..c46b987ee8a20 100644 --- a/dev/tests/integration/testsuite/Magento/Less/_files/themes.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/themes.php @@ -30,7 +30,7 @@ ); $objectManger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManger->get('Magento\Framework\App\State') - ->setAreaCode(\Magento\View\DesignInterface::DEFAULT_AREA); + ->setAreaCode(\Magento\Framework\View\DesignInterface::DEFAULT_AREA); /** @var $registration \Magento\Core\Model\Theme\Registration */ $registration = $objectManger->create('Magento\Core\Model\Theme\Registration'); diff --git a/dev/tests/integration/testsuite/Magento/Locale/ResolverTest.php b/dev/tests/integration/testsuite/Magento/Framework/Locale/ResolverTest.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/Locale/ResolverTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Locale/ResolverTest.php index b1de2cce32cee..963aed54f07fd 100644 --- a/dev/tests/integration/testsuite/Magento/Locale/ResolverTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Locale/ResolverTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Locale; +namespace Magento\Framework\Locale; class ResolverTest extends \PHPUnit_Framework_TestCase { @@ -30,7 +30,7 @@ public function testGetLocale() $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); \Zend_Locale_Data::removeCache(); $this->assertNull(\Zend_Locale_Data::getCache()); - $model = $objectManager->create('Magento\Locale\ResolverInterface', array('locale' => 'some_locale')); + $model = $objectManager->create('Magento\Framework\Locale\ResolverInterface', array('locale' => 'some_locale')); $this->assertInstanceOf('Zend_Locale', $model->getLocale()); $this->assertInstanceOf('Zend_Cache_Core', \Zend_Locale_Data::getCache()); } diff --git a/dev/tests/integration/testsuite/Magento/Message/CollectionFactoryTest.php b/dev/tests/integration/testsuite/Magento/Framework/Message/CollectionFactoryTest.php similarity index 77% rename from dev/tests/integration/testsuite/Magento/Message/CollectionFactoryTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Message/CollectionFactoryTest.php index 5146688acf439..f014fff2b3f01 100644 --- a/dev/tests/integration/testsuite/Magento/Message/CollectionFactoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Message/CollectionFactoryTest.php @@ -21,32 +21,32 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\CollectionFactory test case + * \Magento\Framework\Message\CollectionFactory test case */ class CollectionFactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\CollectionFactory + * @var \Magento\Framework\Message\CollectionFactory */ protected $model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; public function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->model = $this->objectManager->create('Magento\Message\CollectionFactory'); + $this->model = $this->objectManager->create('Magento\Framework\Message\CollectionFactory'); } public function testCreate() { $message = $this->model->create(); - $this->assertInstanceOf('\Magento\Message\Collection', $message); + $this->assertInstanceOf('\Magento\Framework\Message\Collection', $message); } } diff --git a/dev/tests/integration/testsuite/Magento/Message/FactoryTest.php b/dev/tests/integration/testsuite/Magento/Framework/Message/FactoryTest.php similarity index 84% rename from dev/tests/integration/testsuite/Magento/Message/FactoryTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Message/FactoryTest.php index 38fcc2fb89415..4043e96b4e268 100644 --- a/dev/tests/integration/testsuite/Magento/Message/FactoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Message/FactoryTest.php @@ -21,27 +21,27 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Factory test case + * \Magento\Framework\Message\Factory test case */ class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Factory + * @var \Magento\Framework\Message\Factory */ protected $model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; public function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->model = $this->objectManager->create('Magento\Message\Factory'); + $this->model = $this->objectManager->create('Magento\Framework\Message\Factory'); } /** @@ -50,7 +50,7 @@ public function setUp() public function testCreate($messageType) { $message = $this->model->create($messageType, 'some text'); - $this->assertInstanceOf('\Magento\Message\MessageInterface', $message); + $this->assertInstanceOf('\Magento\Framework\Message\MessageInterface', $message); } public function createProvider() diff --git a/dev/tests/integration/testsuite/Magento/Message/ManagerTest.php b/dev/tests/integration/testsuite/Magento/Framework/Message/ManagerTest.php similarity index 78% rename from dev/tests/integration/testsuite/Magento/Message/ManagerTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Message/ManagerTest.php index eaad6548c90cc..4f8a87b280b37 100644 --- a/dev/tests/integration/testsuite/Magento/Message/ManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Message/ManagerTest.php @@ -21,27 +21,27 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Manager test case + * \Magento\Framework\Message\Manager test case */ class ManagerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Manager + * @var \Magento\Framework\Message\Manager */ protected $model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; public function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->model = $this->objectManager->create('Magento\Message\Manager'); + $this->model = $this->objectManager->create('Magento\Framework\Message\Manager'); } /** @@ -49,12 +49,12 @@ public function setUp() */ public function testAddMessage() { - $errorMessage = $this->objectManager->create('Magento\Message\Error', array('text' => 'some text')); + $errorMessage = $this->objectManager->create('Magento\Framework\Message\Error', array('text' => 'some text')); $this->model->addMessage($errorMessage); $customGroup = 'custom-group'; $errorMessageCustom = $this->objectManager->create( - 'Magento\Message\Error', + 'Magento\Framework\Message\Error', array('text' => 'some custom group') ); $this->model->addMessage($errorMessageCustom, $customGroup); @@ -77,10 +77,10 @@ public function testAddMessages() { $customGroup = 'custom-group'; $messages = array( - $this->objectManager->create('Magento\Message\Error', array('text' => 'some text 1')), - $this->objectManager->create('Magento\Message\Error', array('text' => 'some text 2')), - $this->objectManager->create('Magento\Message\Error', array('text' => 'some text 3')), - $this->objectManager->create('Magento\Message\Error', array('text' => 'some text 4')) + $this->objectManager->create('Magento\Framework\Message\Error', array('text' => 'some text 1')), + $this->objectManager->create('Magento\Framework\Message\Error', array('text' => 'some text 2')), + $this->objectManager->create('Magento\Framework\Message\Error', array('text' => 'some text 3')), + $this->objectManager->create('Magento\Framework\Message\Error', array('text' => 'some text 4')) ); $this->model->addMessages($messages); @@ -95,8 +95,10 @@ public function testAddMessages() */ public function testAddUniqueMessages() { - $errorMessageFirst = $this->objectManager->create('Magento\Message\Error', array('text' => 'some text')); - $errorMessageSecond = $this->objectManager->create('Magento\Message\Error', array('text' => 'some text')); + $errorMessageFirst = $this->objectManager + ->create('Magento\Framework\Message\Error', array('text' => 'some text')); + $errorMessageSecond = $this->objectManager + ->create('Magento\Framework\Message\Error', array('text' => 'some text')); $this->model->addUniqueMessages($errorMessageFirst); $this->model->addUniqueMessages($errorMessageSecond); diff --git a/dev/tests/integration/testsuite/Magento/Model/Resource/Db/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/AbstractTest.php similarity index 92% rename from dev/tests/integration/testsuite/Magento/Model/Resource/Db/AbstractTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/AbstractTest.php index e3abb0c910f4a..cf343e016a067 100644 --- a/dev/tests/integration/testsuite/Magento/Model/Resource/Db/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/AbstractTest.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Model\Resource\Db; +namespace Magento\Framework\Model\Resource\Db; class AbstractTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Model\Resource\Db\AbstractDb + * @var \Magento\Framework\Model\Resource\Db\AbstractDb */ protected $_model; protected function setUp() { $resource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\Resource'); - $this->_model = $this->getMockForAbstractClass('Magento\Model\Resource\Db\AbstractDb', + $this->_model = $this->getMockForAbstractClass('Magento\Framework\Model\Resource\Db\AbstractDb', array('resource' => $resource) ); } @@ -73,7 +73,7 @@ public function testGetTableName() array('tablePrefix' => 'prefix_') ); - $model = $this->getMockForAbstractClass('Magento\Model\Resource\Db\AbstractDb', + $model = $this->getMockForAbstractClass('Magento\Framework\Model\Resource\Db\AbstractDb', array('resource' => $resource) ); diff --git a/dev/tests/integration/testsuite/Magento/Model/Resource/Db/Collection/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/Collection/AbstractTest.php similarity index 85% rename from dev/tests/integration/testsuite/Magento/Model/Resource/Db/Collection/AbstractTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/Collection/AbstractTest.php index 5d7d9e458e2de..ebe5ae08f9d2d 100644 --- a/dev/tests/integration/testsuite/Magento/Model/Resource/Db/Collection/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/Collection/AbstractTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Model\Resource\Db\Collection; +namespace Magento\Framework\Model\Resource\Db\Collection; class AbstractTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Model\Resource\Db\Collection\AbstractCollection + * @var \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection */ protected $_model = null; @@ -35,7 +35,7 @@ protected function setUp() $resourceModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->get('Magento\Framework\App\Resource'); $resource = $this->getMockForAbstractClass( - 'Magento\Model\Resource\Db\AbstractDb', + 'Magento\Framework\Model\Resource\Db\AbstractDb', array($resourceModel), '', true, @@ -53,19 +53,19 @@ protected function setUp() ); $resource->expects($this->any())->method('getIdFieldName')->will($this->returnValue('website_id')); - $fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface'); + $fetchStrategy = $this->getMockForAbstractClass('Magento\Framework\Data\Collection\Db\FetchStrategyInterface'); $eventManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Event\ManagerInterface' + 'Magento\Framework\Event\ManagerInterface' ); $entityFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Core\Model\EntityFactory' ); - $logger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Logger'); + $logger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\Logger'); $this->_model = $this->getMockForAbstractClass( - 'Magento\Model\Resource\Db\Collection\AbstractCollection', + 'Magento\Framework\Model\Resource\Db\Collection\AbstractCollection', array($entityFactory, $logger, $fetchStrategy, $eventManager, null, $resource) ); } diff --git a/dev/tests/integration/testsuite/Magento/Model/Resource/Db/ProfilerTest.php b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/ProfilerTest.php similarity index 81% rename from dev/tests/integration/testsuite/Magento/Model/Resource/Db/ProfilerTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/ProfilerTest.php index 744a6fb311259..c10f70cdc6e2b 100644 --- a/dev/tests/integration/testsuite/Magento/Model/Resource/Db/ProfilerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Db/ProfilerTest.php @@ -1,6 +1,6 @@ get('Magento\Framework\App\Arguments'); $connectionConfig = $localConfig->getConnection('default'); $connectionConfig['profiler'] = array( - 'class' => 'Magento\Model\Resource\Db\Profiler', + 'class' => 'Magento\Framework\Model\Resource\Db\Profiler', 'enabled' => 'true' ); $connectionConfig['dbname'] = $connectionConfig['dbName']; @@ -93,9 +93,9 @@ public function testProfilerInit($selectQuery, $queryType) $result->fetchAll(); } - /** @var \Magento\Model\Resource\Db\Profiler $profiler */ + /** @var \Magento\Framework\Model\Resource\Db\Profiler $profiler */ $profiler = $connection->getProfiler(); - $this->assertInstanceOf('Magento\Model\Resource\Db\Profiler', $profiler); + $this->assertInstanceOf('Magento\Framework\Model\Resource\Db\Profiler', $profiler); $queryProfiles = $profiler->getQueryProfiles($queryType); $this->assertCount(1, $queryProfiles); @@ -113,19 +113,22 @@ public function testProfilerInit($selectQuery, $queryType) public function profileQueryDataProvider() { return array( - array("SELECT * FROM %s", \Magento\DB\Profiler::SELECT), + array("SELECT * FROM %s", \Magento\Framework\DB\Profiler::SELECT), array( "INSERT INTO %s (code, version, data_version) " . "VALUES ('" . self::$_testResourceName . "', '1.1', '1.1')", - \Magento\DB\Profiler::INSERT + \Magento\Framework\DB\Profiler::INSERT ), array( "UPDATE %s SET version = '1.2' WHERE code = '" . self::$_testResourceName . "'", - \Magento\DB\Profiler::UPDATE + \Magento\Framework\DB\Profiler::UPDATE ), - array("DELETE FROM %s WHERE code = '" . self::$_testResourceName . "'", \Magento\DB\Profiler::DELETE) + array( + "DELETE FROM %s WHERE code = '" . self::$_testResourceName . "'", + \Magento\Framework\DB\Profiler::DELETE + ) ); } @@ -151,11 +154,11 @@ public function testProfilerDuringSqlException() $testTableName = $resource->getTableName('core_resource'); $connection->query('SELECT * FROM ' . $testTableName); - /** @var \Magento\Model\Resource\Db\Profiler $profiler */ + /** @var \Magento\Framework\Model\Resource\Db\Profiler $profiler */ $profiler = $connection->getProfiler(); - $this->assertInstanceOf('Magento\Model\Resource\Db\Profiler', $profiler); + $this->assertInstanceOf('Magento\Framework\Model\Resource\Db\Profiler', $profiler); - $queryProfiles = $profiler->getQueryProfiles(\Magento\DB\Profiler::SELECT); + $queryProfiles = $profiler->getQueryProfiles(\Magento\Framework\DB\Profiler::SELECT); $this->assertCount(2, $queryProfiles); } } diff --git a/dev/tests/integration/testsuite/Magento/Model/Resource/Entity/TableTest.php b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Entity/TableTest.php similarity index 82% rename from dev/tests/integration/testsuite/Magento/Model/Resource/Entity/TableTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Entity/TableTest.php index 8b3b9f60d5675..226a8ced778d7 100644 --- a/dev/tests/integration/testsuite/Magento/Model/Resource/Entity/TableTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/Entity/TableTest.php @@ -24,25 +24,25 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Model\Resource\Entity; +namespace Magento\Framework\Model\Resource\Entity; class TableTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Model\Resource\Entity\Table + * @var \Magento\Framework\Model\Resource\Entity\Table */ protected $_model; protected function setUp() { // @codingStandardsIgnoreStart - $config = new \Magento\Simplexml\Config(); + $config = new \Magento\Framework\Simplexml\Config(); $config->table = 'test_table'; $config->test_key = 'test'; // @codingStandardsIgnoreEnd $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Model\Resource\Entity\Table', array('config' => $config)); + ->create('Magento\Framework\Model\Resource\Entity\Table', array('config' => $config)); } public function testGetTable() @@ -52,7 +52,7 @@ public function testGetTable() public function testGetConfig() { - $this->assertInstanceOf('Magento\Simplexml\Config', $this->_model->getConfig()); + $this->assertInstanceOf('Magento\Framework\Simplexml\Config', $this->_model->getConfig()); $this->assertEquals('test', $this->_model->getConfig('test_key')); $this->assertFalse($this->_model->getConfig('some_key')); } diff --git a/dev/tests/integration/testsuite/Magento/Model/Resource/IteratorTest.php b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/IteratorTest.php similarity index 90% rename from dev/tests/integration/testsuite/Magento/Model/Resource/IteratorTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Model/Resource/IteratorTest.php index 04b0228d6ad57..c5584045482f1 100644 --- a/dev/tests/integration/testsuite/Magento/Model/Resource/IteratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Model/Resource/IteratorTest.php @@ -24,12 +24,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Model\Resource; +namespace Magento\Framework\Model\Resource; class IteratorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Model\Resource\Iterator + * @var \Magento\Framework\Model\Resource\Iterator */ protected $_model; @@ -43,7 +43,7 @@ class IteratorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Model\Resource\Iterator' + 'Magento\Framework\Model\Resource\Iterator' ); } @@ -69,7 +69,7 @@ public function walkCallback($data) } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testWalkException() { diff --git a/dev/tests/integration/testsuite/Magento/Model/ResourceTest.php b/dev/tests/integration/testsuite/Magento/Framework/Model/ResourceTest.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/Model/ResourceTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Model/ResourceTest.php index b40ed92c0f6d5..24dffc35d664d 100644 --- a/dev/tests/integration/testsuite/Magento/Model/ResourceTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Model/ResourceTest.php @@ -1,6 +1,6 @@ array( 'profiler' => array( - 'class' => 'Magento\Model\Resource\Db\Profiler', + 'class' => 'Magento\Framework\Model\Resource\Db\Profiler', 'enabled' => 'true' ), 'username' => 'username', @@ -80,10 +80,10 @@ public function testProfilerInit() ) ); - /** @var \Magento\Model\Resource\Db\Profiler $profiler */ + /** @var \Magento\Framework\Model\Resource\Db\Profiler $profiler */ $profiler = $connection->getProfiler(); - $this->assertInstanceOf('Magento\Model\Resource\Db\Profiler', $profiler); + $this->assertInstanceOf('Magento\Framework\Model\Resource\Db\Profiler', $profiler); $this->assertTrue($profiler->getEnabled()); } } diff --git a/dev/tests/integration/testsuite/Magento/Module/SetupTest.php b/dev/tests/integration/testsuite/Magento/Framework/Module/SetupTest.php similarity index 91% rename from dev/tests/integration/testsuite/Magento/Module/SetupTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Module/SetupTest.php index 99bdbb8c096ff..15322a3e1a471 100644 --- a/dev/tests/integration/testsuite/Magento/Module/SetupTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Module/SetupTest.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module; +namespace Magento\Framework\Module; class SetupTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\Setup + * @var \Magento\Framework\Module\Setup */ protected $_model; protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Module\Setup', + 'Magento\Framework\Module\Setup', array('resourceName' => 'default_setup', 'moduleName' => 'Magento_Core') ); } @@ -51,13 +51,13 @@ public function testApplyAllDataUpdates() { /*reset versions*/ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - '\Magento\Module\ResourceInterface' + '\Magento\Framework\Module\ResourceInterface' )->setDbVersion( 'adminnotification_setup', false ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - '\Magento\Module\ResourceInterface' + '\Magento\Framework\Module\ResourceInterface' )->setDataVersion( 'adminnotification_setup', false @@ -65,8 +65,8 @@ public function testApplyAllDataUpdates() $this->_model->deleteTableRow('core_resource', 'code', 'adminnotification_setup'); $this->_model->getConnection()->dropTable($this->_model->getTable('adminnotification_inbox')); $this->_model->getConnection()->dropTable($this->_model->getTable('admin_system_messages')); - /** @var $updater \Magento\Module\Updater */ - $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Module\Updater'); + /** @var $updater \Magento\Framework\Module\Updater */ + $updater = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\Module\Updater'); try { $updater->updateScheme(); $updater->updateData(); @@ -110,7 +110,7 @@ public function testDeleteTableRow() } /** - * @covers \Magento\Module\Setup::updateTableRow + * @covers \Magento\Framework\Module\Setup::updateTableRow * @expectedException \Zend_Db_Statement_Exception */ public function testUpdateTableRowNameConversion() diff --git a/dev/tests/integration/testsuite/Magento/Mview/View/ChangelogTest.php b/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php similarity index 87% rename from dev/tests/integration/testsuite/Magento/Mview/View/ChangelogTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php index 2e48ec0c2f314..f4fe74e39d8fe 100644 --- a/dev/tests/integration/testsuite/Magento/Mview/View/ChangelogTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php @@ -22,15 +22,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\View; +namespace Magento\Framework\Mview\View; /** - * Test Class for \Magento\Mview\View\Changelog + * Test Class for \Magento\Framework\Mview\View\Changelog */ class ChangelogTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $objectManager; @@ -42,12 +42,12 @@ class ChangelogTest extends \PHPUnit_Framework_TestCase /** * Write connection adapter * - * @var \Magento\DB\Adapter\AdapterInterface + * @var \Magento\Framework\DB\Adapter\AdapterInterface */ protected $connection; /** - * @var \Magento\Mview\View\Changelog + * @var \Magento\Framework\Mview\View\Changelog */ protected $model; @@ -58,7 +58,7 @@ public function setUp() $this->connection = $this->resource->getConnection('core_write'); $this->model = $this->objectManager->create( - 'Magento\Mview\View\Changelog', + 'Magento\Framework\Mview\View\Changelog', array('resource' => $this->resource) ); $this->model->setViewId('test_view_id_1'); @@ -75,8 +75,11 @@ public function tearDown() */ public function testCreateAndDrop() { - /** @var \Magento\Mview\View\Changelog $model */ - $model = $this->objectManager->create('Magento\Mview\View\Changelog', array('resource' => $this->resource)); + /** @var \Magento\Framework\Mview\View\Changelog $model */ + $model = $this->objectManager->create( + 'Magento\Framework\Mview\View\Changelog', + array('resource' => $this->resource) + ); $model->setViewId('test_view_id_2'); $changelogName = $this->resource->getTableName($model->getName()); $this->assertFalse($this->connection->isTableExists($changelogName)); @@ -91,7 +94,10 @@ public function testCreateAndDrop() */ public function testGetVersion() { - $model = $this->objectManager->create('Magento\Mview\View\Changelog', array('resource' => $this->resource)); + $model = $this->objectManager->create( + 'Magento\Framework\Mview\View\Changelog', + array('resource' => $this->resource) + ); $model->setViewId('test_view_id_2'); $model->create(); $this->assertEquals(0, $model->getVersion()); diff --git a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/ReaderTest.php similarity index 80% rename from dev/tests/integration/testsuite/Magento/Object/Copy/Config/ReaderTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/ReaderTest.php index 4b9ed28b77b1e..3882e6e8553e3 100644 --- a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/ReaderTest.php @@ -1,6 +1,6 @@ create( - 'Magento\Module\Declaration\FileResolver', + 'Magento\Framework\Module\Declaration\FileResolver', array('filesystem' => $filesystem) ); - /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */ + /** @var \Magento\Framework\Module\Declaration\Reader\Filesystem $filesystemReader */ $filesystemReader = $objectManager->create( - 'Magento\Module\Declaration\Reader\Filesystem', + 'Magento\Framework\Module\Declaration\Reader\Filesystem', array('fileResolver' => $modulesDeclarations) ); - /** @var \Magento\Module\ModuleList $modulesList */ - $modulesList = $objectManager->create('Magento\Module\ModuleList', array('reader' => $filesystemReader)); + /** @var \Magento\Framework\Module\ModuleList $modulesList */ + $modulesList = $objectManager + ->create('Magento\Framework\Module\ModuleList', array('reader' => $filesystemReader)); - /** @var \Magento\Module\Dir\Reader $moduleReader */ + /** @var \Magento\Framework\Module\Dir\Reader $moduleReader */ $moduleReader = $objectManager->create( - 'Magento\Module\Dir\Reader', + 'Magento\Framework\Module\Dir\Reader', array('moduleList' => $modulesList, 'filesystem' => $filesystem) ); $moduleReader->setModuleDir('Magento_Test', 'etc', __DIR__ . '/_files/Magento/Test/etc'); @@ -85,7 +86,7 @@ public function setUp() ); $this->_model = $objectManager->create( - 'Magento\Object\Copy\Config\Reader', + 'Magento\Framework\Object\Copy\Config\Reader', array('fileResolver' => $fileResolver) ); } @@ -104,7 +105,7 @@ public function testMergeCompleteAndPartial() file_get_contents(__DIR__ . '/_files/partialFieldsetSecond.xml') ); $fileResolverMock = $this->getMockBuilder( - 'Magento\Config\FileResolverInterface' + 'Magento\Framework\Config\FileResolverInterface' )->setMethods( array('get') )->disableOriginalConstructor()->getMock(); @@ -119,9 +120,9 @@ public function testMergeCompleteAndPartial() $this->returnValue($fileList) ); - /** @var \Magento\Object\Copy\Config\Reader $model */ + /** @var \Magento\Framework\Object\Copy\Config\Reader $model */ $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Object\Copy\Config\Reader', + 'Magento\Framework\Object\Copy\Config\Reader', array('fileResolver' => $fileResolverMock) ); $expected = array( diff --git a/dev/tests/unit/testsuite/Magento/Object/Copy/Config/_files/fieldset.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml similarity index 96% rename from dev/tests/unit/testsuite/Magento/Object/Copy/Config/_files/fieldset.xml rename to dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml index fc33ac1aba448..003827ec81b5d 100644 --- a/dev/tests/unit/testsuite/Magento/Object/Copy/Config/_files/fieldset.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd">
diff --git a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/module.xml similarity index 95% rename from dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/Magento/Test/etc/module.xml rename to dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/module.xml index 8570756521e97..5c66db22206b6 100644 --- a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/Magento/Test/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/Magento/Test/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/expectedArray.php b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/expectedArray.php similarity index 100% rename from dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/expectedArray.php rename to dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/expectedArray.php diff --git a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/partialFieldsetFirst.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetFirst.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/partialFieldsetFirst.xml rename to dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetFirst.xml index 1498e297da9d4..168a185d80e42 100644 --- a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/partialFieldsetFirst.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetFirst.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd">
diff --git a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/partialFieldsetSecond.xml b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetSecond.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/partialFieldsetSecond.xml rename to dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetSecond.xml index 4c547f1dee6a0..c358d32c54d5c 100644 --- a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/partialFieldsetSecond.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/_files/partialFieldsetSecond.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset_file.xsd">
diff --git a/dev/tests/integration/testsuite/Magento/Object/CopyTest.php b/dev/tests/integration/testsuite/Magento/Framework/Object/CopyTest.php similarity index 87% rename from dev/tests/integration/testsuite/Magento/Object/CopyTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Object/CopyTest.php index 11e69430cd6ce..1caea99274944 100644 --- a/dev/tests/integration/testsuite/Magento/Object/CopyTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Object/CopyTest.php @@ -24,18 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Object; +namespace Magento\Framework\Object; class CopyTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Object\Copy + * @var \Magento\Framework\Object\Copy */ protected $_service; protected function setUp() { - $this->_service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Object\Copy'); + $this->_service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\Object\Copy'); } public function testCopyFieldset() @@ -43,9 +44,9 @@ public function testCopyFieldset() $fieldset = 'sales_copy_order'; $aspect = 'to_edit'; $data = array('customer_email' => 'admin@example.com', 'customer_group_id' => '1'); - $source = new \Magento\Object($data); - $target = new \Magento\Object(); - $expectedTarget = new \Magento\Object($data); + $source = new \Magento\Framework\Object($data); + $target = new \Magento\Framework\Object(); + $expectedTarget = new \Magento\Framework\Object($data); $expectedTarget->setDataChanges(true); // hack for assertion @@ -64,7 +65,7 @@ public function testCopyFieldsetArrayTarget() $fieldset = 'sales_copy_order'; $aspect = 'to_edit'; $data = array('customer_email' => 'admin@example.com', 'customer_group_id' => '1'); - $source = new \Magento\Object($data); + $source = new \Magento\Framework\Object($data); $target = array(); $expectedTarget = $data; diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php similarity index 85% rename from dev/tests/integration/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php index cabbdf82da2e3..8ae7914d28d6f 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Config\Reader; +namespace Magento\Framework\ObjectManager\Config\Reader; class DomTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager\Config\Reader\Dom + * @var \Magento\Framework\ObjectManager\Config\Reader\Dom */ protected $_model; @@ -51,12 +51,12 @@ class DomTest extends \PHPUnit_Framework_TestCase protected $_validationState; /** - * @var \Magento\ObjectManager\Config\SchemaLocator + * @var \Magento\Framework\ObjectManager\Config\SchemaLocator */ protected $_schemaLocator; /** - * @var \Magento\ObjectManager\Config\Mapper\Dom + * @var \Magento\Framework\ObjectManager\Config\Mapper\Dom */ protected $_mapper; @@ -77,12 +77,12 @@ protected function setUp() ); $this->_fileResolverMock->expects($this->once())->method('get')->will($this->returnValue($this->_fileList)); $this->_mapper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\ObjectManager\Config\Mapper\Dom' + 'Magento\Framework\ObjectManager\Config\Mapper\Dom' ); $this->_validationState = new \Magento\Framework\App\Arguments\ValidationState( \Magento\Framework\App\State::MODE_DEFAULT ); - $this->_schemaLocator = new \Magento\ObjectManager\Config\SchemaLocator(); + $this->_schemaLocator = new \Magento\Framework\ObjectManager\Config\SchemaLocator(); $this->_mergedConfig = new \DOMDocument(); $this->_mergedConfig->load($fixturePath . 'config_merged.xml'); @@ -90,7 +90,7 @@ protected function setUp() public function testRead() { - $model = new \Magento\ObjectManager\Config\Reader\Dom( + $model = new \Magento\Framework\ObjectManager\Config\Reader\Dom( $this->_fileResolverMock, $this->_mapper, $this->_schemaLocator, diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/ObjectManagerTest.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php similarity index 69% rename from dev/tests/integration/testsuite/Magento/ObjectManager/ObjectManagerTest.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php index c23172c4f3600..8d3d3903ebcae 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/ObjectManagerTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php @@ -24,32 +24,32 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager; +namespace Magento\Framework\ObjectManager; class ObjectManagerTest extends \PHPUnit_Framework_TestCase { /**#@+ * Test classes for basic instantiation */ - const TEST_CLASS = 'Magento\ObjectManager\TestAsset\Basic'; + const TEST_CLASS = 'Magento\Framework\ObjectManager\TestAsset\Basic'; - const TEST_CLASS_INJECTION = 'Magento\ObjectManager\TestAsset\BasicInjection'; + const TEST_CLASS_INJECTION = 'Magento\Framework\ObjectManager\TestAsset\BasicInjection'; /**#@-*/ /**#@+ * Test classes and interface to test preferences */ - const TEST_INTERFACE = 'Magento\ObjectManager\TestAsset\TestAssetInterface'; + const TEST_INTERFACE = 'Magento\Framework\ObjectManager\TestAsset\TestAssetInterface'; - const TEST_INTERFACE_IMPLEMENTATION = 'Magento\ObjectManager\TestAsset\InterfaceImplementation'; + const TEST_INTERFACE_IMPLEMENTATION = 'Magento\Framework\ObjectManager\TestAsset\InterfaceImplementation'; - const TEST_CLASS_WITH_INTERFACE = 'Magento\ObjectManager\TestAsset\InterfaceInjection'; + const TEST_CLASS_WITH_INTERFACE = 'Magento\Framework\ObjectManager\TestAsset\InterfaceInjection'; /**#@-*/ /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected static $_objectManager; @@ -59,17 +59,17 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_numerableClasses = array( - 0 => 'Magento\ObjectManager\TestAsset\ConstructorNoArguments', - 1 => 'Magento\ObjectManager\TestAsset\ConstructorOneArgument', - 2 => 'Magento\ObjectManager\TestAsset\ConstructorTwoArguments', - 3 => 'Magento\ObjectManager\TestAsset\ConstructorThreeArguments', - 4 => 'Magento\ObjectManager\TestAsset\ConstructorFourArguments', - 5 => 'Magento\ObjectManager\TestAsset\ConstructorFiveArguments', - 6 => 'Magento\ObjectManager\TestAsset\ConstructorSixArguments', - 7 => 'Magento\ObjectManager\TestAsset\ConstructorSevenArguments', - 8 => 'Magento\ObjectManager\TestAsset\ConstructorEightArguments', - 9 => 'Magento\ObjectManager\TestAsset\ConstructorNineArguments', - 10 => 'Magento\ObjectManager\TestAsset\ConstructorTenArguments' + 0 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorNoArguments', + 1 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorOneArgument', + 2 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorTwoArguments', + 3 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorThreeArguments', + 4 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorFourArguments', + 5 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorFiveArguments', + 6 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorSixArguments', + 7 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorSevenArguments', + 8 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorEightArguments', + 9 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorNineArguments', + 10 => 'Magento\Framework\ObjectManager\TestAsset\ConstructorTenArguments' ); /** @@ -92,10 +92,10 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase public static function setUpBeforeClass() { - $config = new \Magento\ObjectManager\Config\Config(); - $factory = new \Magento\ObjectManager\Factory\Factory($config); + $config = new \Magento\Framework\ObjectManager\Config\Config(); + $factory = new \Magento\Framework\ObjectManager\Factory\Factory($config); - self::$_objectManager = new \Magento\ObjectManager\ObjectManager($factory, $config); + self::$_objectManager = new \Magento\Framework\ObjectManager\ObjectManager($factory, $config); self::$_objectManager->configure( array('preferences' => array(self::TEST_INTERFACE => self::TEST_INTERFACE_IMPLEMENTATION)) ); diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/Basic.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/Basic.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/Basic.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/Basic.php index 9ad65785e1fe2..a2c9cb17e492a 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/Basic.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/Basic.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; class Basic { diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/BasicAlias.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/BasicAlias.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/BasicAlias.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/BasicAlias.php index 9cfca8383b520..bdacf4307842c 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/BasicAlias.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/BasicAlias.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; class BasicAlias { diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/BasicInjection.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/BasicInjection.php similarity index 80% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/BasicInjection.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/BasicInjection.php index d59bb00a3d51f..3785bf6c04467 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/BasicInjection.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/BasicInjection.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; class BasicInjection { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_object; /** - * @param \Magento\ObjectManager\TestAsset\Basic $object + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $object */ - public function __construct(\Magento\ObjectManager\TestAsset\Basic $object) + public function __construct(\Magento\Framework\ObjectManager\TestAsset\Basic $object) { $this->_object = $object; } diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorEightArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorEightArguments.php similarity index 50% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorEightArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorEightArguments.php index 126b9c7da0730..22e0901651363 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorEightArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorEightArguments.php @@ -24,39 +24,39 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; /** * @SuppressWarnings(PHPMD.DepthOfInheritance) */ -class ConstructorEightArguments extends \Magento\ObjectManager\TestAsset\ConstructorSevenArguments +class ConstructorEightArguments extends \Magento\Framework\ObjectManager\TestAsset\ConstructorSevenArguments { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_eight; /** * Eight arguments * - * @param \Magento\ObjectManager\TestAsset\Basic $one - * @param \Magento\ObjectManager\TestAsset\Basic $two - * @param \Magento\ObjectManager\TestAsset\Basic $three - * @param \Magento\ObjectManager\TestAsset\Basic $four - * @param \Magento\ObjectManager\TestAsset\Basic $five - * @param \Magento\ObjectManager\TestAsset\Basic $six - * @param \Magento\ObjectManager\TestAsset\Basic $seven - * @param \Magento\ObjectManager\TestAsset\Basic $eight + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $two + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $three + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $four + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $five + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $six + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $seven + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $eight */ public function __construct( - \Magento\ObjectManager\TestAsset\Basic $one, - \Magento\ObjectManager\TestAsset\Basic $two, - \Magento\ObjectManager\TestAsset\Basic $three, - \Magento\ObjectManager\TestAsset\Basic $four, - \Magento\ObjectManager\TestAsset\Basic $five, - \Magento\ObjectManager\TestAsset\Basic $six, - \Magento\ObjectManager\TestAsset\Basic $seven, - \Magento\ObjectManager\TestAsset\Basic $eight + \Magento\Framework\ObjectManager\TestAsset\Basic $one, + \Magento\Framework\ObjectManager\TestAsset\Basic $two, + \Magento\Framework\ObjectManager\TestAsset\Basic $three, + \Magento\Framework\ObjectManager\TestAsset\Basic $four, + \Magento\Framework\ObjectManager\TestAsset\Basic $five, + \Magento\Framework\ObjectManager\TestAsset\Basic $six, + \Magento\Framework\ObjectManager\TestAsset\Basic $seven, + \Magento\Framework\ObjectManager\TestAsset\Basic $eight ) { parent::__construct($one, $two, $three, $four, $five, $six, $seven); $this->_eight = $eight; diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorFiveArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorFiveArguments.php similarity index 58% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorFiveArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorFiveArguments.php index f54564e382cb9..64b8638fdd8a0 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorFiveArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorFiveArguments.php @@ -24,30 +24,30 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; -class ConstructorFiveArguments extends \Magento\ObjectManager\TestAsset\ConstructorFourArguments +class ConstructorFiveArguments extends \Magento\Framework\ObjectManager\TestAsset\ConstructorFourArguments { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_five; /** * Five arguments * - * @param \Magento\ObjectManager\TestAsset\Basic $one - * @param \Magento\ObjectManager\TestAsset\Basic $two - * @param \Magento\ObjectManager\TestAsset\Basic $three - * @param \Magento\ObjectManager\TestAsset\Basic $four - * @param \Magento\ObjectManager\TestAsset\Basic $five + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $two + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $three + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $four + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $five */ public function __construct( - \Magento\ObjectManager\TestAsset\Basic $one, - \Magento\ObjectManager\TestAsset\Basic $two, - \Magento\ObjectManager\TestAsset\Basic $three, - \Magento\ObjectManager\TestAsset\Basic $four, - \Magento\ObjectManager\TestAsset\Basic $five + \Magento\Framework\ObjectManager\TestAsset\Basic $one, + \Magento\Framework\ObjectManager\TestAsset\Basic $two, + \Magento\Framework\ObjectManager\TestAsset\Basic $three, + \Magento\Framework\ObjectManager\TestAsset\Basic $four, + \Magento\Framework\ObjectManager\TestAsset\Basic $five ) { parent::__construct($one, $two, $three, $four); $this->_five = $five; diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorFourArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorFourArguments.php similarity index 62% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorFourArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorFourArguments.php index 179d2b78944a0..729ee0fa42b2c 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorFourArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorFourArguments.php @@ -24,28 +24,28 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; -class ConstructorFourArguments extends \Magento\ObjectManager\TestAsset\ConstructorThreeArguments +class ConstructorFourArguments extends \Magento\Framework\ObjectManager\TestAsset\ConstructorThreeArguments { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_four; /** * Four arguments * - * @param \Magento\ObjectManager\TestAsset\Basic $one - * @param \Magento\ObjectManager\TestAsset\Basic $two - * @param \Magento\ObjectManager\TestAsset\Basic $three - * @param \Magento\ObjectManager\TestAsset\Basic $four + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $two + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $three + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $four */ public function __construct( - \Magento\ObjectManager\TestAsset\Basic $one, - \Magento\ObjectManager\TestAsset\Basic $two, - \Magento\ObjectManager\TestAsset\Basic $three, - \Magento\ObjectManager\TestAsset\Basic $four + \Magento\Framework\ObjectManager\TestAsset\Basic $one, + \Magento\Framework\ObjectManager\TestAsset\Basic $two, + \Magento\Framework\ObjectManager\TestAsset\Basic $three, + \Magento\Framework\ObjectManager\TestAsset\Basic $four ) { parent::__construct($one, $two, $three); $this->_four = $four; diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorNineArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorNineArguments.php new file mode 100644 index 0000000000000..cf13991730646 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorNineArguments.php @@ -0,0 +1,66 @@ +_nine = $nine; + } +} diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorNoArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorNoArguments.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorNoArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorNoArguments.php index 7d0b28ea63cd7..b7eb4215d341c 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorNoArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorNoArguments.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; class ConstructorNoArguments { diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorOneArgument.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorOneArgument.php similarity index 81% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorOneArgument.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorOneArgument.php index 0a8a2da8930e1..b37c05da8e7d2 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorOneArgument.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorOneArgument.php @@ -24,12 +24,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; class ConstructorOneArgument { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_one; @@ -40,9 +40,9 @@ class ConstructorOneArgument /** * One argument * - * @param \Magento\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one */ - public function __construct(\Magento\ObjectManager\TestAsset\Basic $one) + public function __construct(\Magento\Framework\ObjectManager\TestAsset\Basic $one) { $this->_one = $one; } diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorSevenArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorSevenArguments.php similarity index 53% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorSevenArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorSevenArguments.php index ca9c1befdc281..ff03e2871bdb0 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorSevenArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorSevenArguments.php @@ -24,37 +24,37 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; /** * @SuppressWarnings(PHPMD.DepthOfInheritance) */ -class ConstructorSevenArguments extends \Magento\ObjectManager\TestAsset\ConstructorSixArguments +class ConstructorSevenArguments extends \Magento\Framework\ObjectManager\TestAsset\ConstructorSixArguments { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_seven; /** * Seven arguments * - * @param \Magento\ObjectManager\TestAsset\Basic $one - * @param \Magento\ObjectManager\TestAsset\Basic $two - * @param \Magento\ObjectManager\TestAsset\Basic $three - * @param \Magento\ObjectManager\TestAsset\Basic $four - * @param \Magento\ObjectManager\TestAsset\Basic $five - * @param \Magento\ObjectManager\TestAsset\Basic $six - * @param \Magento\ObjectManager\TestAsset\Basic $seven + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $two + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $three + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $four + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $five + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $six + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $seven */ public function __construct( - \Magento\ObjectManager\TestAsset\Basic $one, - \Magento\ObjectManager\TestAsset\Basic $two, - \Magento\ObjectManager\TestAsset\Basic $three, - \Magento\ObjectManager\TestAsset\Basic $four, - \Magento\ObjectManager\TestAsset\Basic $five, - \Magento\ObjectManager\TestAsset\Basic $six, - \Magento\ObjectManager\TestAsset\Basic $seven + \Magento\Framework\ObjectManager\TestAsset\Basic $one, + \Magento\Framework\ObjectManager\TestAsset\Basic $two, + \Magento\Framework\ObjectManager\TestAsset\Basic $three, + \Magento\Framework\ObjectManager\TestAsset\Basic $four, + \Magento\Framework\ObjectManager\TestAsset\Basic $five, + \Magento\Framework\ObjectManager\TestAsset\Basic $six, + \Magento\Framework\ObjectManager\TestAsset\Basic $seven ) { parent::__construct($one, $two, $three, $four, $five, $six); $this->_seven = $seven; diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorSixArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorSixArguments.php similarity index 54% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorSixArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorSixArguments.php index 612cbf80412ac..b793bcc3cee84 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorSixArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorSixArguments.php @@ -24,32 +24,32 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; -class ConstructorSixArguments extends \Magento\ObjectManager\TestAsset\ConstructorFiveArguments +class ConstructorSixArguments extends \Magento\Framework\ObjectManager\TestAsset\ConstructorFiveArguments { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_six; /** * Six arguments * - * @param \Magento\ObjectManager\TestAsset\Basic $one - * @param \Magento\ObjectManager\TestAsset\Basic $two - * @param \Magento\ObjectManager\TestAsset\Basic $three - * @param \Magento\ObjectManager\TestAsset\Basic $four - * @param \Magento\ObjectManager\TestAsset\Basic $five - * @param \Magento\ObjectManager\TestAsset\Basic $six + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $two + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $three + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $four + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $five + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $six */ public function __construct( - \Magento\ObjectManager\TestAsset\Basic $one, - \Magento\ObjectManager\TestAsset\Basic $two, - \Magento\ObjectManager\TestAsset\Basic $three, - \Magento\ObjectManager\TestAsset\Basic $four, - \Magento\ObjectManager\TestAsset\Basic $five, - \Magento\ObjectManager\TestAsset\Basic $six + \Magento\Framework\ObjectManager\TestAsset\Basic $one, + \Magento\Framework\ObjectManager\TestAsset\Basic $two, + \Magento\Framework\ObjectManager\TestAsset\Basic $three, + \Magento\Framework\ObjectManager\TestAsset\Basic $four, + \Magento\Framework\ObjectManager\TestAsset\Basic $five, + \Magento\Framework\ObjectManager\TestAsset\Basic $six ) { parent::__construct($one, $two, $three, $four, $five); $this->_six = $six; diff --git a/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorTenArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorTenArguments.php new file mode 100644 index 0000000000000..ab23b563e9db4 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorTenArguments.php @@ -0,0 +1,70 @@ +_ten = $ten; + } +} diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorThreeArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorThreeArguments.php similarity index 66% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorThreeArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorThreeArguments.php index 9ecf0f019c641..d31056b0d6f73 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorThreeArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorThreeArguments.php @@ -24,26 +24,26 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; -class ConstructorThreeArguments extends \Magento\ObjectManager\TestAsset\ConstructorTwoArguments +class ConstructorThreeArguments extends \Magento\Framework\ObjectManager\TestAsset\ConstructorTwoArguments { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_three; /** * Three arguments * - * @param \Magento\ObjectManager\TestAsset\Basic $one - * @param \Magento\ObjectManager\TestAsset\Basic $two - * @param \Magento\ObjectManager\TestAsset\Basic $three + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $two + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $three */ public function __construct( - \Magento\ObjectManager\TestAsset\Basic $one, - \Magento\ObjectManager\TestAsset\Basic $two, - \Magento\ObjectManager\TestAsset\Basic $three + \Magento\Framework\ObjectManager\TestAsset\Basic $one, + \Magento\Framework\ObjectManager\TestAsset\Basic $two, + \Magento\Framework\ObjectManager\TestAsset\Basic $three ) { parent::__construct($one, $two); $this->_three = $three; diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorTwoArguments.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorTwoArguments.php similarity index 71% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorTwoArguments.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorTwoArguments.php index ccbd011a1766b..b8f7a7781bbea 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorTwoArguments.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/ConstructorTwoArguments.php @@ -24,24 +24,24 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; -class ConstructorTwoArguments extends \Magento\ObjectManager\TestAsset\ConstructorOneArgument +class ConstructorTwoArguments extends \Magento\Framework\ObjectManager\TestAsset\ConstructorOneArgument { /** - * @var \Magento\ObjectManager\TestAsset\Basic + * @var \Magento\Framework\ObjectManager\TestAsset\Basic */ protected $_two; /** * Two arguments * - * @param \Magento\ObjectManager\TestAsset\Basic $one - * @param \Magento\ObjectManager\TestAsset\Basic $two + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $one + * @param \Magento\Framework\ObjectManager\TestAsset\Basic $two */ public function __construct( - \Magento\ObjectManager\TestAsset\Basic $one, - \Magento\ObjectManager\TestAsset\Basic $two + \Magento\Framework\ObjectManager\TestAsset\Basic $one, + \Magento\Framework\ObjectManager\TestAsset\Basic $two ) { parent::__construct($one); $this->_two = $two; diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/InterfaceImplementation.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/InterfaceImplementation.php similarity index 86% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/InterfaceImplementation.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/InterfaceImplementation.php index 38ef5e3f5f718..e54f69a316594 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/InterfaceImplementation.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/InterfaceImplementation.php @@ -24,8 +24,8 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; -class InterfaceImplementation implements \Magento\ObjectManager\TestAsset\TestAssetInterface +class InterfaceImplementation implements \Magento\Framework\ObjectManager\TestAsset\TestAssetInterface { } diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/InterfaceInjection.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/InterfaceInjection.php similarity index 78% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/InterfaceInjection.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/InterfaceInjection.php index f2dd6fd400299..d7d726d2f8f57 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/InterfaceInjection.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/InterfaceInjection.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; class InterfaceInjection { /** - * @var \Magento\ObjectManager\TestAsset\TestAssetInterface + * @var \Magento\Framework\ObjectManager\TestAsset\TestAssetInterface */ protected $_object; /** - * @param \Magento\ObjectManager\TestAsset\TestAssetInterface $object + * @param \Magento\Framework\ObjectManager\TestAsset\TestAssetInterface $object */ - public function __construct(\Magento\ObjectManager\TestAsset\TestAssetInterface $object) + public function __construct(\Magento\Framework\ObjectManager\TestAsset\TestAssetInterface $object) { $this->_object = $object; } diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/TestAssetInterface.php b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/TestAssetInterface.php similarity index 95% rename from dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/TestAssetInterface.php rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/TestAssetInterface.php index 09d1126d91fd0..80869a3906927 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/TestAssetInterface.php +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/TestAsset/TestAssetInterface.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\TestAsset; +namespace Magento\Framework\ObjectManager\TestAsset; interface TestAssetInterface { diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_merged.xml b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_merged.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_merged.xml rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_merged.xml index 2fdc22ad55133..ea07a0a89edc0 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_merged.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_merged.xml @@ -23,9 +23,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - - + + + Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE @@ -56,7 +56,7 @@ - + 86400 diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_one.xml b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_one.xml similarity index 93% rename from dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_one.xml rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_one.xml index 89bb53553cfc7..b184a41c11da1 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_one.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_one.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE @@ -51,7 +51,7 @@ - + 86400 diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_two.xml b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_two.xml similarity index 88% rename from dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_two.xml rename to dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_two.xml index f71941fdd16db..4630c3432a9b2 100644 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/_files/config_two.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/ObjectManager/_files/config_two.xml @@ -23,9 +23,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - - + + + Magento\Framework\App\Arguments\Loader::PARAM_CUSTOM_FILE @@ -45,7 +45,7 @@ - + Magento\Store\Model\Website::CACHE_TAG diff --git a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/CsvfileTest.php similarity index 88% rename from dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/CsvfileTest.php index bf80511f4c20c..49e12731c4efc 100644 --- a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/CsvfileTest.php @@ -1,6 +1,6 @@ _output = new \Magento\Profiler\Driver\Standard\Output\Csvfile( + $this->_output = new \Magento\Framework\Profiler\Driver\Standard\Output\Csvfile( array('filePath' => $this->_outputFile, 'delimiter' => $delimiter, 'enclosure' => $enclosure) ); $stat = include $statFile; diff --git a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FirebugTest.php similarity index 92% rename from dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FirebugTest.php index 38b6497fc2203..9f3079c32e995 100644 --- a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FirebugTest.php @@ -1,6 +1,6 @@ returnValue('Mozilla/5.0 with FirePHP/1.6') ); - $this->_output = new \Magento\Profiler\Driver\Standard\Output\Firebug(); + $this->_output = new \Magento\Framework\Profiler\Driver\Standard\Output\Firebug(); $this->_output->setResponse($this->_response); $this->_output->setRequest($this->_request); } diff --git a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/HtmlTest.php b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/HtmlTest.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/HtmlTest.php rename to dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/HtmlTest.php index b2106fc962419..f7a796aee31c0 100644 --- a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/HtmlTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/HtmlTest.php @@ -1,6 +1,6 @@ _output = new \Magento\Profiler\Driver\Standard\Output\Html(); + $this->_output = new \Magento\Framework\Profiler\Driver\Standard\Output\Html(); } /** diff --git a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/_files/output.html b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/_files/output.html similarity index 96% rename from dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/_files/output.html rename to dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/_files/output.html index 59702a296aa89..bee83b2d5e1c1 100644 --- a/dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/_files/output.html +++ b/dev/tests/integration/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/_files/output.html @@ -1,6 +1,6 @@ - + @@ -47,12 +47,12 @@ prototype/deprecation.js - + - - + + @@ -65,7 +65,7 @@ - + diff --git a/dev/tests/integration/testsuite/Magento/View/LayoutArgumentObjectUpdater.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutArgumentObjectUpdater.php similarity index 83% rename from dev/tests/integration/testsuite/Magento/View/LayoutArgumentObjectUpdater.php rename to dev/tests/integration/testsuite/Magento/Framework/View/LayoutArgumentObjectUpdater.php index d5fbaa506fe9c..80ca6abcb0c86 100644 --- a/dev/tests/integration/testsuite/Magento/View/LayoutArgumentObjectUpdater.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutArgumentObjectUpdater.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\View; +namespace Magento\Framework\View; /** * Dummy layout argument updater model */ -class LayoutArgumentObjectUpdater implements \Magento\View\Layout\Argument\UpdaterInterface +class LayoutArgumentObjectUpdater implements \Magento\Framework\View\Layout\Argument\UpdaterInterface { /** * Update specified argument * - * @param \Magento\Data\Collection $argument - * @return \Magento\Data\Collection + * @param \Magento\Framework\Data\Collection $argument + * @return \Magento\Framework\Data\Collection */ public function update($argument) { diff --git a/dev/tests/integration/testsuite/Magento/View/LayoutArgumentSimpleUpdater.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutArgumentSimpleUpdater.php similarity index 89% rename from dev/tests/integration/testsuite/Magento/View/LayoutArgumentSimpleUpdater.php rename to dev/tests/integration/testsuite/Magento/Framework/View/LayoutArgumentSimpleUpdater.php index 634fc80332d53..21ac73c09aa9c 100644 --- a/dev/tests/integration/testsuite/Magento/View/LayoutArgumentSimpleUpdater.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutArgumentSimpleUpdater.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\View; +namespace Magento\Framework\View; /** * Dummy layout argument updater model */ -class LayoutArgumentSimpleUpdater implements \Magento\View\Layout\Argument\UpdaterInterface +class LayoutArgumentSimpleUpdater implements \Magento\Framework\View\Layout\Argument\UpdaterInterface { /** * Update specified argument diff --git a/dev/tests/integration/testsuite/Magento/View/LayoutDirectivesTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php similarity index 87% rename from dev/tests/integration/testsuite/Magento/View/LayoutDirectivesTest.php rename to dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php index be13f6f370ffd..9a2a6f7a389a5 100644 --- a/dev/tests/integration/testsuite/Magento/View/LayoutDirectivesTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\View; +namespace Magento\Framework\View; class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase { @@ -58,12 +58,12 @@ public function testRenderElement() public function testGetBlockUnscheduled() { $layout = $this->_getLayoutModel('get_block.xml'); - $this->assertInstanceOf('Magento\View\Element\Text', $layout->getBlock('block1')); - $this->assertInstanceOf('Magento\View\Element\Text', $layout->getBlock('block2')); + $this->assertInstanceOf('Magento\Framework\View\Element\Text', $layout->getBlock('block1')); + $this->assertInstanceOf('Magento\Framework\View\Element\Text', $layout->getBlock('block2')); } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testGetBlockUnscheduledException() { @@ -98,8 +98,14 @@ public function testLayoutArgumentsDirectiveIfComplexValues() public function testLayoutObjectArgumentsDirective() { $layout = $this->_getLayoutModel('arguments_object_type.xml'); - $this->assertInstanceOf('Magento\Data\Collection\Db', $layout->getBlock('block_with_object_args')->getOne()); - $this->assertInstanceOf('Magento\Data\Collection\Db', $layout->getBlock('block_with_object_args')->getTwo()); + $this->assertInstanceOf( + 'Magento\Framework\Data\Collection\Db', + $layout->getBlock('block_with_object_args')->getOne() + ); + $this->assertInstanceOf( + 'Magento\Framework\Data\Collection\Db', + $layout->getBlock('block_with_object_args')->getTwo() + ); $this->assertEquals(3, $layout->getBlock('block_with_object_args')->getThree()); } @@ -120,7 +126,7 @@ public function testLayoutObjectArgumentUpdatersDirective() $expectedSimpleData = 1; $dataSource = $layout->getBlock('block_with_object_updater_args')->getOne(); - $this->assertInstanceOf('Magento\Data\Collection', $dataSource); + $this->assertInstanceOf('Magento\Framework\Data\Collection', $dataSource); $this->assertEquals($expectedObjectData, $dataSource->getUpdaterCall()); $this->assertEquals($expectedSimpleData, $layout->getBlock('block_with_object_updater_args')->getTwo()); } @@ -187,7 +193,7 @@ public function testMove() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testMoveBroken() { @@ -195,7 +201,7 @@ public function testMoveBroken() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testMoveAliasBroken() { @@ -203,7 +209,7 @@ public function testMoveAliasBroken() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testRemoveBroken() { @@ -239,16 +245,18 @@ public function sortSpecialCasesDataProvider() * Prepare a layout model with pre-loaded fixture of an update XML * * @param string $fixtureFile - * @return \Magento\View\LayoutInterface + * @return \Magento\Framework\View\LayoutInterface */ protected function _getLayoutModel($fixtureFile) { - /** @var $layout \Magento\View\LayoutInterface */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); - /** @var $xml \Magento\View\Layout\Element */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); + /** @var $xml \Magento\Framework\View\Layout\Element */ $xml = simplexml_load_file( __DIR__ . "/_files/layout_directives_test/{$fixtureFile}", - 'Magento\View\Layout\Element' + 'Magento\Framework\View\Layout\Element' ); $layout->loadString($xml->asXml()); $layout->generateElements(); @@ -263,8 +271,8 @@ public function testIfConfigForBlock() { $layout = $this->_getLayoutModel('ifconfig.xml'); $this->assertFalse($layout->getBlock('block1')); - $this->assertInstanceOf('Magento\View\Element\BlockInterface', $layout->getBlock('block2')); - $this->assertInstanceOf('Magento\View\Element\BlockInterface', $layout->getBlock('block3')); + $this->assertInstanceOf('Magento\Framework\View\Element\BlockInterface', $layout->getBlock('block2')); + $this->assertInstanceOf('Magento\Framework\View\Element\BlockInterface', $layout->getBlock('block3')); $this->assertFalse($layout->getBlock('block4')); } diff --git a/dev/tests/integration/testsuite/Magento/View/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php similarity index 77% rename from dev/tests/integration/testsuite/Magento/View/LayoutTest.php rename to dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php index fc37bcb867c42..6df6fabd0ecc6 100644 --- a/dev/tests/integration/testsuite/Magento/View/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php @@ -28,31 +28,33 @@ /** * Layout integration tests * - * Note that some methods are not covered here, see the \Magento\View\LayoutDirectivesTest + * Note that some methods are not covered here, see the \Magento\Framework\View\LayoutDirectivesTest * * @see \Magento\Core\Model\LayoutDirectivesTest */ -namespace Magento\View; +namespace Magento\Framework\View; class LayoutTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\Layout + * @var \Magento\Framework\View\Layout */ protected $_layout; protected function setUp() { - $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\Layout'); + $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\Layout' + ); } public function testConstructorStructure() { - $structure = new \Magento\Data\Structure(); + $structure = new \Magento\Framework\Data\Structure(); $structure->createElement('test.container', array()); - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('structure' => $structure) ); $this->assertTrue($layout->hasElement('test.container')); @@ -64,7 +66,7 @@ public function testConstructorStructure() */ public function testDestructor() { - $this->_layout->addBlock('Magento\View\Element\Text', 'test'); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'test'); $this->assertNotEmpty($this->_layout->getAllBlocks()); $this->_layout->__destruct(); $this->assertEmpty($this->_layout->getAllBlocks()); @@ -72,15 +74,15 @@ public function testDestructor() public function testGetUpdate() { - $this->assertInstanceOf('Magento\View\Layout\ProcessorInterface', $this->_layout->getUpdate()); + $this->assertInstanceOf('Magento\Framework\View\Layout\ProcessorInterface', $this->_layout->getUpdate()); } public function testGenerateXml() { $layoutUtility = new Utility\Layout($this); - /** @var $layout \Magento\View\LayoutInterface */ + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = $this->getMock( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('getUpdate'), $layoutUtility->getLayoutDependencies() ); @@ -93,7 +95,7 @@ public function testGenerateXml() $this->returnValue( simplexml_load_string( '', - 'Magento\View\Layout\Element' + 'Magento\Framework\View\Layout\Element' ) ) ); @@ -106,7 +108,7 @@ public function testGenerateXml() /** * A smoke test for generating elements * - * See sophisticated tests at \Magento\View\LayoutDirectivesTest + * See sophisticated tests at \Magento\Framework\View\LayoutDirectivesTest * @see \Magento\Core\Model\LayoutDirectivesTest * @magentoAppIsolation enabled */ @@ -115,13 +117,13 @@ public function testGenerateGetAllBlocks() $this->_layout->setXml( simplexml_load_string( ' - - + + - - + + ', - 'Magento\View\Layout\Element' + 'Magento\Framework\View\Layout\Element' ) ); $this->assertEquals(array(), $this->_layout->getAllBlocks()); @@ -141,22 +143,22 @@ public function testGetElementProperty() $this->_layout->addContainer($name, 'Test', array('option1' => 1, 'option2' => 2)); $this->assertEquals( 'Test', - $this->_layout->getElementProperty($name, \Magento\View\Layout\Element::CONTAINER_OPT_LABEL) + $this->_layout->getElementProperty($name, \Magento\Framework\View\Layout\Element::CONTAINER_OPT_LABEL) ); $this->assertEquals( - \Magento\View\Layout\Element::TYPE_CONTAINER, + \Magento\Framework\View\Layout\Element::TYPE_CONTAINER, $this->_layout->getElementProperty($name, 'type') ); $this->assertSame(2, $this->_layout->getElementProperty($name, 'option2')); - $this->_layout->addBlock('Magento\View\Element\Text', 'text', $name); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'text', $name); $this->assertEquals( - \Magento\View\Layout\Element::TYPE_BLOCK, + \Magento\Framework\View\Layout\Element::TYPE_BLOCK, $this->_layout->getElementProperty('text', 'type') ); $this->assertSame( array('text' => 'text'), - $this->_layout->getElementProperty($name, \Magento\Data\Structure::CHILDREN) + $this->_layout->getElementProperty($name, \Magento\Framework\Data\Structure::CHILDREN) ); } @@ -168,7 +170,7 @@ public function testIsBlock() $this->assertFalse($this->_layout->isBlock('container')); $this->assertFalse($this->_layout->isBlock('block')); $this->_layout->addContainer('container', 'Container'); - $this->_layout->addBlock('Magento\View\Element\Text', 'block'); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'block'); $this->assertFalse($this->_layout->isBlock('container')); $this->assertTrue($this->_layout->isBlock('block')); } @@ -176,7 +178,7 @@ public function testIsBlock() public function testSetUnsetBlock() { $expectedBlockName = 'block_' . __METHOD__; - $expectedBlock = $this->_layout->createBlock('Magento\View\Element\Text'); + $expectedBlock = $this->_layout->createBlock('Magento\Framework\View\Element\Text'); $this->_layout->setBlock($expectedBlockName, $expectedBlock); $this->assertSame($expectedBlock, $this->_layout->getBlock($expectedBlockName)); @@ -203,15 +205,15 @@ public function createBlockDataProvider() { return array( 'named block' => array( - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', 'some_block_name_full_class', - array('type' => 'Magento\View\Element\Template', 'is_anonymous' => false), + array('type' => 'Magento\Framework\View\Element\Template', 'is_anonymous' => false), '/^some_block_name_full_class$/' ), 'no name block' => array( - 'Magento\View\Element\Text\ListText', + 'Magento\Framework\View\Element\Text\ListText', '', - array('type' => 'Magento\View\Element\Text\ListText', 'key1' => 'value1'), + array('type' => 'Magento\Framework\View\Element\Text\ListText', 'key1' => 'value1'), '/text\\\\list/' ) ); @@ -219,7 +221,7 @@ public function createBlockDataProvider() /** * @dataProvider blockNotExistsDataProvider - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testCreateBlockNotExists($name) { @@ -234,10 +236,12 @@ public function blockNotExistsDataProvider() public function testAddBlock() { $this->assertInstanceOf( - 'Magento\View\Element\Text', - $this->_layout->addBlock('Magento\View\Element\Text', 'block1') + 'Magento\Framework\View\Element\Text', + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'block1') + ); + $block2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Framework\View\Element\Text' ); - $block2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Element\Text'); $block2->setNameInLayout('block2'); $this->_layout->addBlock($block2, '', 'block1'); @@ -288,7 +292,7 @@ public function testAddContainerInvalidHtmlTag() $msg = 'Html tag "span" is forbidden for usage in containers. ' . 'Consider to use one of the allowed: dd, div, dl, fieldset, header, ' . 'footer, hgroup, ol, p, section, table, tfoot, ul.'; - $this->setExpectedException('Magento\Exception', $msg); + $this->setExpectedException('Magento\Framework\Exception', $msg); $this->_layout->addContainer('container', 'Container', array('htmlTag' => 'span')); } @@ -298,14 +302,14 @@ public function testAddContainerInvalidHtmlTag() public function testGetChildBlock() { $this->_layout->addContainer('parent', 'Parent'); - $block = $this->_layout->addBlock('Magento\View\Element\Text', 'block', 'parent', 'block_alias'); + $block = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'block', 'parent', 'block_alias'); $this->_layout->addContainer('container', 'Container', array(), 'parent', 'container_alias'); $this->assertSame($block, $this->_layout->getChildBlock('parent', 'block_alias')); $this->assertFalse($this->_layout->getChildBlock('parent', 'container_alias')); } /** - * @return \Magento\View\Layout + * @return \Magento\Framework\View\Layout */ public function testSetChild() { @@ -319,10 +323,10 @@ public function testSetChild() } /** - * @param \Magento\View\LayoutInterface $layout + * @param \Magento\Framework\View\LayoutInterface $layout * @depends testSetChild */ - public function testReorderChild(\Magento\View\LayoutInterface $layout) + public function testReorderChild(\Magento\Framework\View\LayoutInterface $layout) { $layout->addContainer('four', 'Four', array(), 'one'); @@ -357,14 +361,14 @@ public function testReorderChild(\Magento\View\LayoutInterface $layout) public function testGetChildBlocks() { $this->_layout->addContainer('parent', 'Parent'); - $block1 = $this->_layout->addBlock('Magento\View\Element\Text', 'block1', 'parent'); + $block1 = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'block1', 'parent'); $this->_layout->addContainer('container', 'Container', array(), 'parent'); - $block2 = $this->_layout->addBlock('Magento\View\Element\Template', 'block2', 'parent'); + $block2 = $this->_layout->addBlock('Magento\Framework\View\Element\Template', 'block2', 'parent'); $this->assertSame(array('block1' => $block1, 'block2' => $block2), $this->_layout->getChildBlocks('parent')); } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testAddBlockInvalidType() { @@ -378,7 +382,7 @@ public function testIsContainer() { $block = 'block'; $container = 'container'; - $this->_layout->addBlock('Magento\View\Element\Text', $block); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', $block); $this->_layout->addContainer($container, 'Container'); $this->assertFalse($this->_layout->isContainer($block)); $this->assertTrue($this->_layout->isContainer($container)); @@ -387,13 +391,13 @@ public function testIsContainer() public function testIsManipulationAllowed() { - $this->_layout->addBlock('Magento\View\Element\Text', 'block1'); - $this->_layout->addBlock('Magento\View\Element\Text', 'block2', 'block1'); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'block1'); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'block2', 'block1'); $this->assertFalse($this->_layout->isManipulationAllowed('block1')); $this->assertFalse($this->_layout->isManipulationAllowed('block2')); $this->_layout->addContainer('container1', 'Container 1'); - $this->_layout->addBlock('Magento\View\Element\Text', 'block3', 'container1'); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'block3', 'container1'); $this->_layout->addContainer('container2', 'Container 2', array(), 'container1'); $this->assertFalse($this->_layout->isManipulationAllowed('container1')); $this->assertTrue($this->_layout->isManipulationAllowed('block3')); @@ -406,7 +410,7 @@ public function testRenameElement() $expBlockName = 'block_renamed'; $containerName = 'container'; $expContainerName = 'container_renamed'; - $block = $this->_layout->createBlock('Magento\View\Element\Text', $blockName); + $block = $this->_layout->createBlock('Magento\Framework\View\Element\Text', $blockName); $this->_layout->addContainer($containerName, 'Container'); $this->assertEquals($block, $this->_layout->getBlock($blockName)); @@ -422,9 +426,9 @@ public function testGetBlock() { $this->assertFalse($this->_layout->getBlock('test')); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\Layout' + 'Magento\Framework\View\Layout' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ); $this->_layout->setBlock('test', $block); $this->assertSame($block, $this->_layout->getBlock('test')); @@ -450,16 +454,16 @@ public function testGetElementAlias() } /** - * @covers \Magento\View\Layout::addOutputElement - * @covers \Magento\View\Layout::getOutput - * @covers \Magento\View\Layout::removeOutputElement + * @covers \Magento\Framework\View\Layout::addOutputElement + * @covers \Magento\Framework\View\Layout::getOutput + * @covers \Magento\Framework\View\Layout::removeOutputElement */ public function testGetOutput() { $blockName = 'block_' . __METHOD__; $expectedText = "some_text_for_{$blockName}"; - $block = $this->_layout->addBlock('Magento\View\Element\Text', $blockName); + $block = $this->_layout->addBlock('Magento\Framework\View\Element\Text', $blockName); $block->setText($expectedText); $this->_layout->addOutputElement($blockName); @@ -473,20 +477,23 @@ public function testGetOutput() public function testGetMessagesBlock() { - $this->assertInstanceOf('Magento\View\Element\Messages', $this->_layout->getMessagesBlock()); + $this->assertInstanceOf('Magento\Framework\View\Element\Messages', $this->_layout->getMessagesBlock()); } public function testGetBlockSingleton() { - $block = $this->_layout->getBlockSingleton('Magento\View\Element\Text'); - $this->assertInstanceOf('Magento\View\Element\Text', $block); - $this->assertSame($block, $this->_layout->getBlockSingleton('Magento\View\Element\Text')); + $block = $this->_layout->getBlockSingleton('Magento\Framework\View\Element\Text'); + $this->assertInstanceOf('Magento\Framework\View\Element\Text', $block); + $this->assertSame($block, $this->_layout->getBlockSingleton('Magento\Framework\View\Element\Text')); } public function testUpdateContainerAttributes() { $this->_layout->setXml( - simplexml_load_file(__DIR__ . '/_files/layout/container_attributes.xml', 'Magento\View\Layout\Element') + simplexml_load_file( + __DIR__ . '/_files/layout/container_attributes.xml', + 'Magento\Framework\View\Layout\Element' + ) ); $this->_layout->generateElements(); $result = $this->_layout->renderElement('container1', false); @@ -498,7 +505,7 @@ public function testUpdateContainerAttributes() public function testIsCacheable() { $this->_layout->setXml( - simplexml_load_file(__DIR__ . '/_files/layout/cacheable.xml', 'Magento\View\Layout\Element') + simplexml_load_file(__DIR__ . '/_files/layout/cacheable.xml', 'Magento\Framework\View\Layout\Element') ); $this->_layout->generateElements(); $this->assertTrue($this->_layout->isCacheable()); @@ -507,7 +514,7 @@ public function testIsCacheable() public function testIsNonCacheable() { $this->_layout->setXml( - simplexml_load_file(__DIR__ . '/_files/layout/non_cacheable.xml', 'Magento\View\Layout\Element') + simplexml_load_file(__DIR__ . '/_files/layout/non_cacheable.xml', 'Magento\Framework\View\Layout\Element') ); $this->_layout->generateElements(); $this->assertFalse($this->_layout->isCacheable()); diff --git a/dev/tests/integration/testsuite/Magento/View/PublicationTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/PublicationTest.php similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/PublicationTest.php rename to dev/tests/integration/testsuite/Magento/Framework/View/PublicationTest.php index 85f1003cc65ab..4a1d30d5bc3ca 100644 --- a/dev/tests/integration/testsuite/Magento/View/PublicationTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/PublicationTest.php @@ -22,27 +22,27 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\View; +namespace Magento\Framework\View; class PublicationTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\DesignInterface + * @var \Magento\Framework\View\DesignInterface */ protected $model; /** - * @var \Magento\View\Service + * @var \Magento\Framework\View\Service */ protected $viewService; /** - * @var \Magento\View\FileSystem + * @var \Magento\Framework\View\FileSystem */ protected $fileSystem; /** - * @var \Magento\View\Url + * @var \Magento\Framework\View\Url */ protected $viewUrl; @@ -50,10 +50,10 @@ protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - $this->viewService = $objectManager->create('Magento\View\Service'); - $this->fileSystem = $objectManager->create('Magento\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\View\Url'); - $this->model = $objectManager->get('Magento\View\DesignInterface'); + $this->viewService = $objectManager->create('Magento\Framework\View\Service'); + $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); + $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); + $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); } protected function tearDown() @@ -92,7 +92,7 @@ protected function _testGetViewUrl($file, $expectedUrl, $locale = null, $allowDu $this->_initTestTheme($allowDuplication); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Locale\ResolverInterface' + 'Magento\Framework\Locale\ResolverInterface' )->setLocale( $locale ); @@ -151,7 +151,7 @@ public function testGetViewUrlNoFilesDuplicationDataProvider() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @dataProvider getViewUrlExceptionDataProvider */ public function testGetViewUrlException($file) @@ -173,7 +173,7 @@ public function getViewUrlExceptionDataProvider() /** * Test on vulnerability for protected files * - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage because it does not reside in a public directory * @magentoDataFixture Magento/Core/Model/_files/design/themes.php * @magentoAppIsolation enabled @@ -348,10 +348,10 @@ public function testPublishCssFileFromModule( $objectManager->configure( array( - 'Magento\View\Design\Fallback\Factory' => array( + 'Magento\Framework\View\Design\Fallback\Factory' => array( 'arguments' => array( 'filesystem' => array( - 'instance' => 'Magento\View\MockedFilesystem', + 'instance' => 'Magento\Framework\View\MockedFilesystem', ) ) ) @@ -359,7 +359,7 @@ public function testPublishCssFileFromModule( ); \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $this->viewUrl->getViewFileUrl($cssViewFile, $designParams); @@ -368,7 +368,7 @@ public function testPublishCssFileFromModule( $actualCssContent = file_get_contents($expectedCssFile); $this->assertNotRegExp( - '/url\(.*?' . \Magento\View\Service::SCOPE_SEPARATOR . '.*?\)/', + '/url\(.*?' . \Magento\Framework\View\Service::SCOPE_SEPARATOR . '.*?\)/', $actualCssContent, 'Published CSS file must not contain scope separators in URLs.' ); @@ -460,12 +460,12 @@ protected function _testPublishResourcesAndCssWhenChangedCss($expectedPublished) $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - $this->model = $objectManager->get('Magento\View\DesignInterface'); + $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); $this->model->setDesignTheme('test_default'); - $this->viewService = $objectManager->create('Magento\View\Service'); - $this->fileSystem = $objectManager->create('Magento\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\View\Url'); + $this->viewService = $objectManager->create('Magento\Framework\View\Service'); + $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); + $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); $themePath = $this->model->getDesignTheme()->getFullPath(); @@ -552,12 +552,12 @@ protected function _testPublishChangedResourcesWhenUnchangedCss($expectedPublish $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get('Magento\Framework\App\State')->setAreaCode('frontend'); - $this->model = $objectManager->get('Magento\View\DesignInterface'); + $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); $this->model->setDesignTheme('test_default'); - $this->viewService = $objectManager->create('Magento\View\Service'); - $this->fileSystem = $objectManager->create('Magento\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\View\Url'); + $this->viewService = $objectManager->create('Magento\Framework\View\Service'); + $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); + $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); $themePath = $this->model->getDesignTheme()->getFullPath(); $fixtureViewPath = "{$appInstallDir}/media_for_change/{$themePath}/"; @@ -595,7 +595,7 @@ protected function _initTestTheme($allowDuplication = null) array( \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( \Magento\Framework\App\Filesystem::THEMES_DIR => array( - 'path' => dirname(__DIR__) . '/Core/Model/_files/design' + 'path' => dirname(dirname(__DIR__)) . '/Core/Model/_files/design' ) ) ) @@ -606,12 +606,12 @@ protected function _initTestTheme($allowDuplication = null) if ($allowDuplication !== null) { $objectManager->configure( array( - 'Magento\View\Publisher\CssFile' => array( + 'Magento\Framework\View\Publisher\CssFile' => array( 'arguments' => array( 'allowDuplication' => $allowDuplication ) ), - 'Magento\View\Publisher\File' => array( + 'Magento\Framework\View\Publisher\File' => array( 'arguments' => array( 'allowDuplication' => $allowDuplication ) @@ -621,12 +621,12 @@ protected function _initTestTheme($allowDuplication = null) } // Reinit model with new directories - $this->model = $objectManager->get('Magento\View\DesignInterface'); + $this->model = $objectManager->get('Magento\Framework\View\DesignInterface'); $this->model->setDesignTheme('test_default'); - $this->viewService = $objectManager->create('Magento\View\Service'); - $this->fileSystem = $objectManager->create('Magento\View\FileSystem'); - $this->viewUrl = $objectManager->create('Magento\View\Url'); + $this->viewService = $objectManager->create('Magento\Framework\View\Service'); + $this->fileSystem = $objectManager->create('Magento\Framework\View\FileSystem'); + $this->viewUrl = $objectManager->create('Magento\Framework\View\Url'); } /** @@ -641,14 +641,14 @@ public function testCssWithBase64Data() array( \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array( \Magento\Framework\App\Filesystem::THEMES_DIR => array( - 'path' => dirname(__DIR__) . '/Core/Model/_files/design/' + 'path' => dirname(dirname(__DIR__)) . '/Core/Model/_files/design/' ) ) ) ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); /** @var $themeCollection \Magento\Core\Model\Theme\Collection */ $themeCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( @@ -670,7 +670,9 @@ public function testCssWithBase64Data() $this->assertFileEquals($filePath, "{$publishedPath}/css/base64.css"); $this->model->setDesignTheme( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Design\ThemeInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Framework\View\Design\ThemeInterface' + ) ); } diff --git a/dev/tests/integration/testsuite/Magento/View/RelatedFileTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/RelatedFileTest.php similarity index 96% rename from dev/tests/integration/testsuite/Magento/View/RelatedFileTest.php rename to dev/tests/integration/testsuite/Magento/Framework/View/RelatedFileTest.php index 52c5c95f53947..921a6d4c8837e 100644 --- a/dev/tests/integration/testsuite/Magento/View/RelatedFileTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/RelatedFileTest.php @@ -22,7 +22,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\View; +namespace Magento\Framework\View; class RelatedFileTest extends \PHPUnit_Framework_TestCase { @@ -34,7 +34,7 @@ class RelatedFileTest extends \PHPUnit_Framework_TestCase public function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->model = $objectManager->get('Magento\View\RelatedFile'); + $this->model = $objectManager->get('Magento\Framework\View\RelatedFile'); } /** diff --git a/dev/tests/integration/testsuite/Magento/View/Utility/Layout.php b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php similarity index 71% rename from dev/tests/integration/testsuite/Magento/View/Utility/Layout.php rename to dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php index 8ee60d7a2730e..99c7c6eaf88a0 100644 --- a/dev/tests/integration/testsuite/Magento/View/Utility/Layout.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php @@ -28,7 +28,7 @@ /** * Core layout utility */ -namespace Magento\View\Utility; +namespace Magento\Framework\View\Utility; class Layout { @@ -46,18 +46,18 @@ public function __construct(\PHPUnit_Framework_TestCase $testCase) * Retrieve new layout update model instance with XML data from a fixture file * * @param string|array $layoutUpdatesFile - * @return \Magento\View\Layout\ProcessorInterface + * @return \Magento\Framework\View\Layout\ProcessorInterface */ public function getLayoutUpdateFromFixture($layoutUpdatesFile) { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\View\Layout\File\Factory $fileFactory */ - $fileFactory = $objectManager->get('Magento\View\Layout\File\Factory'); + /** @var \Magento\Framework\View\Layout\File\Factory $fileFactory */ + $fileFactory = $objectManager->get('Magento\Framework\View\Layout\File\Factory'); $files = array(); foreach ((array)$layoutUpdatesFile as $filename) { $files[] = $fileFactory->create($filename, 'Magento_View'); } - $fileSource = $this->_testCase->getMockForAbstractClass('Magento\View\Layout\File\SourceInterface'); + $fileSource = $this->_testCase->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); $fileSource->expects( \PHPUnit_Framework_TestCase::any() )->method( @@ -65,9 +65,9 @@ public function getLayoutUpdateFromFixture($layoutUpdatesFile) )->will( \PHPUnit_Framework_TestCase::returnValue($files) ); - $cache = $this->_testCase->getMockForAbstractClass('Magento\Cache\FrontendInterface'); + $cache = $this->_testCase->getMockForAbstractClass('Magento\Framework\Cache\FrontendInterface'); return $objectManager->create( - 'Magento\View\Layout\ProcessorInterface', + 'Magento\Framework\View\Layout\ProcessorInterface', array('fileSource' => $fileSource, 'cache' => $cache) ); } @@ -77,11 +77,11 @@ public function getLayoutUpdateFromFixture($layoutUpdatesFile) * * @param string|array $layoutUpdatesFile * @param array $args - * @return \Magento\View\Layout|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\View\Layout|\PHPUnit_Framework_MockObject_MockObject */ public function getLayoutFromFixture($layoutUpdatesFile, array $args = array()) { - $layout = $this->_testCase->getMock('Magento\View\Layout', array('getUpdate'), $args); + $layout = $this->_testCase->getMock('Magento\Framework\View\Layout', array('getUpdate'), $args); $layoutUpdate = $this->getLayoutUpdateFromFixture($layoutUpdatesFile); $layoutUpdate->asSimplexml(); $layout->expects( @@ -103,18 +103,18 @@ public function getLayoutDependencies() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); return array( - 'processorFactory' => $objectManager->get('Magento\View\Layout\ProcessorFactory'), - 'logger' => $objectManager->get('Magento\Logger'), - 'eventManager' => $objectManager->get('Magento\Event\ManagerInterface'), - 'blockFactory' => $objectManager->create('Magento\View\Element\BlockFactory', array()), - 'structure' => $objectManager->create('Magento\Data\Structure', array()), - 'argumentParser' => $objectManager->get('Magento\View\Layout\Argument\Parser'), + 'processorFactory' => $objectManager->get('Magento\Framework\View\Layout\ProcessorFactory'), + 'logger' => $objectManager->get('Magento\Framework\Logger'), + 'eventManager' => $objectManager->get('Magento\Framework\Event\ManagerInterface'), + 'blockFactory' => $objectManager->create('Magento\Framework\View\Element\BlockFactory', array()), + 'structure' => $objectManager->create('Magento\Framework\Data\Structure', array()), + 'argumentParser' => $objectManager->get('Magento\Framework\View\Layout\Argument\Parser'), 'argumentInterpreter' => $objectManager->get('layoutArgumentInterpreter'), - 'scheduledStructure' => $objectManager->create('Magento\View\Layout\ScheduledStructure', array()), + 'scheduledStructure' => $objectManager->create('Magento\Framework\View\Layout\ScheduledStructure', array()), 'scopeConfig' => $objectManager->create('Magento\Framework\App\Config\ScopeConfigInterface'), 'appState' => $objectManager->get('Magento\Framework\App\State'), - 'messageManager' => $objectManager->get('Magento\Message\ManagerInterface'), - 'themeResolver' => $objectManager->get('Magento\View\Design\Theme\ResolverInterface'), + 'messageManager' => $objectManager->get('Magento\Framework\Message\ManagerInterface'), + 'themeResolver' => $objectManager->get('Magento\Framework\View\Design\Theme\ResolverInterface'), 'scopeResolver' => $objectManager->get('Magento\Framework\App\ScopeResolverInterface'), 'scopeType' => \Magento\Store\Model\ScopeInterface::SCOPE_STORE, ); diff --git a/dev/tests/integration/testsuite/Magento/View/Utility/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/LayoutTest.php similarity index 85% rename from dev/tests/integration/testsuite/Magento/View/Utility/LayoutTest.php rename to dev/tests/integration/testsuite/Magento/Framework/View/Utility/LayoutTest.php index da2f43afdfc79..d4cbe125573d0 100644 --- a/dev/tests/integration/testsuite/Magento/View/Utility/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/LayoutTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\View\Utility; +namespace Magento\Framework\View\Utility; class LayoutTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\Utility\Layout + * @var \Magento\Framework\View\Utility\Layout */ protected $_utility; @@ -39,21 +39,21 @@ protected function setUp() ) ) ); - $this->_utility = new \Magento\View\Utility\Layout($this); + $this->_utility = new \Magento\Framework\View\Utility\Layout($this); } /** * Assert that the actual layout update instance represents the expected layout update file * * @param string $expectedUpdateFile - * @param \Magento\View\Layout\ProcessorInterface $actualUpdate + * @param \Magento\Framework\View\Layout\ProcessorInterface $actualUpdate */ protected function _assertLayoutUpdate($expectedUpdateFile, $actualUpdate) { - $this->assertInstanceOf('Magento\View\Layout\ProcessorInterface', $actualUpdate); + $this->assertInstanceOf('Magento\Framework\View\Layout\ProcessorInterface', $actualUpdate); $layoutUpdateXml = $actualUpdate->getFileLayoutUpdatesXml(); - $this->assertInstanceOf('Magento\View\Layout\Element', $layoutUpdateXml); + $this->assertInstanceOf('Magento\Framework\View\Layout\Element', $layoutUpdateXml); $this->assertXmlStringEqualsXmlFile($expectedUpdateFile, $layoutUpdateXml->asNiceXml()); } @@ -78,7 +78,7 @@ public function testGetLayoutUpdateFromFixture($inputFiles, $expectedFile) public function testGetLayoutFromFixture($inputFiles, $expectedFile) { $layout = $this->_utility->getLayoutFromFixture($inputFiles, $this->_utility->getLayoutDependencies()); - $this->assertInstanceOf('Magento\View\LayoutInterface', $layout); + $this->assertInstanceOf('Magento\Framework\View\LayoutInterface', $layout); $this->_assertLayoutUpdate($expectedFile, $layout->getUpdate()); } diff --git a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_one.xml b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_one.xml similarity index 85% rename from dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_one.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_one.xml index 2a9d8e8f90f15..06875e6d25da4 100644 --- a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_one.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_one.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + Some Default Text diff --git a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_three.xml b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_three.xml similarity index 94% rename from dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_three.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_three.xml index 53d018c3c2d0a..6ba0ffa580917 100644 --- a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_three.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_three.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_two.xml b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_two.xml similarity index 95% rename from dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_two.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_two.xml index fa4414e9b76f6..32b910b0d9896 100644 --- a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout/handle_two.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout/handle_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout_merged/multiple_handles.xml b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout_merged/multiple_handles.xml similarity index 94% rename from dev/tests/integration/testsuite/Magento/View/Utility/_files/layout_merged/multiple_handles.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout_merged/multiple_handles.xml index 9556e18dd6d7a..b18b9109f8ce1 100644 --- a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout_merged/multiple_handles.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout_merged/multiple_handles.xml @@ -25,7 +25,7 @@ --> - + Some Default Text diff --git a/dev/tests/integration/testsuite/Magento/View/Utility/_files/layout_merged/single_handle.xml b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout_merged/single_handle.xml similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/Utility/_files/layout_merged/single_handle.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/Utility/_files/layout_merged/single_handle.xml diff --git a/dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleA/view/adminhtml/product/product.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleA/view/adminhtml/product/product.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleA/view/adminhtml/product/product.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleA/view/adminhtml/product/product.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleB/view/adminhtml/images/gallery-image-base-label.png b/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleB/view/adminhtml/images/gallery-image-base-label.png similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleB/view/adminhtml/images/gallery-image-base-label.png rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleB/view/adminhtml/images/gallery-image-base-label.png diff --git a/dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleC/view/adminhtml/images/allinone.png b/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleC/view/adminhtml/images/allinone.png similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleC/view/adminhtml/images/allinone.png rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleC/view/adminhtml/images/allinone.png diff --git a/dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleC/view/adminhtml/images/logo.png b/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleC/view/adminhtml/images/logo.png similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleC/view/adminhtml/images/logo.png rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleC/view/adminhtml/images/logo.png diff --git a/dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleC/view/adminhtml/styles.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleC/view/adminhtml/styles.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/Magento/ModuleC/view/adminhtml/styles.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleC/view/adminhtml/styles.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/adminhtml/vendor_test/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/adminhtml/vendor_test/theme.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/adminhtml/vendor_test/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/adminhtml/vendor_test/theme.xml index bacd26428ce8e..28452b30853c7 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/adminhtml/vendor_test/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/adminhtml/vendor_test/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/area_two/vendor_theme_one/file b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/file similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/area_two/vendor_theme_one/file rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/file diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/area_two/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/theme.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/area_two/vendor_theme_one/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/theme.xml index 6611455d811d6..a3a7dd87caa6f 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/area_two/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/area_two/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Theme One 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/design_area/vendor_theme_one/file b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/file similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/design_area/vendor_theme_one/file rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/file diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/design_area/vendor_theme_one/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/theme.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/design_area/vendor_theme_one/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/theme.xml index 6611455d811d6..a3a7dd87caa6f 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/design_area/vendor_theme_one/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/design_area/vendor_theme_one/theme.xml @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Theme One 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/access_violation.php b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/access_violation.php similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/access_violation.php rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/access_violation.php diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default/theme.xml similarity index 92% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default/theme.xml index 59624fb430b6c..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default/theme.xml @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core - * @subpackage unit_tests + * @package Design + * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default_iphone/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default_iphone/theme.xml similarity index 92% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default_iphone/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default_iphone/theme.xml index 70c989519bff7..b634be529cdcd 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default_iphone/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/magento_default_iphone/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Iphone 2.0.0.0 magento_default diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml similarity index 94% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml index e60a314463db7..5c58fcc1c1868 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/layout_test_handle.xml @@ -27,7 +27,7 @@ */ --> - + Text declared in the frontend/test/cache_test_theme diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/theme.xml index 8eab3c040e1a5..f3fee5b15d137 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_cache_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_cache_test_theme/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Cache Test Theme 2.0.0.0 test_default diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml index e6c45b1ee2e32..4440b435a1f6e 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view.xml @@ -26,4 +26,4 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml index e6c45b1ee2e32..4440b435a1f6e 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_category_view_type_default.xml @@ -26,4 +26,4 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml index e6c45b1ee2e32..4440b435a1f6e 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view.xml @@ -26,4 +26,4 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml index e6c45b1ee2e32..4440b435a1f6e 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/catalog_product_view_type_simple.xml @@ -26,4 +26,4 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_file.txt b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_file.txt similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_file.txt rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_file.txt diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_file_with_2_dots..txt b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_file_with_2_dots..txt similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_file_with_2_dots..txt rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_file_with_2_dots..txt diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Catalog/theme_template.phtml diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml index e6c45b1ee2e32..4440b435a1f6e 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Cms/layout_test_handle_extra.xml @@ -26,4 +26,4 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml similarity index 88% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml index 2f309bf78355c..c1aa70818fe43 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_main.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + @@ -38,7 +38,7 @@ - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml similarity index 83% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml index b7198ed19de1e..1ca8fd37072ce 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/layout_test_handle_sample.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + @@ -41,11 +41,11 @@ prototype/deprecation.js - + - - + + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/test.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/test.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Magento_Core/test.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Magento_Core/test.phtml diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/Namespace_Module/favicon.ico diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/css/styles.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/css/styles.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/css/styles.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/css/styles.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/i18n/en_US.csv b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/i18n/en_US.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/i18n/en_US.csv rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/i18n/en_US.csv diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/i18n/fr_FR/logo.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/images/logo.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/images/logo.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/images/logo_email.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo_email.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/images/logo_email.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/images/logo_email.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/js/tabs.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/js/tabs.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/js/tabs.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/js/tabs.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/theme.xml index f47d5d6e45438..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/magento_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/view.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/view.xml similarity index 92% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/view.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/view.xml index 542686c175e25..bcf355bc51f0f 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/view.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_default/view.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Core Value1 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/images/rectangle.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/images/rectangle.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/images/rectangle.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/images/rectangle.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/images/square.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/images/square.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/images/square.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/images/square.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/style.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/style.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/style.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/style.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/sub.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/sub.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/sub.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/sub.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/theme.xml index f47d5d6e45438..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_publication/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/layout_test_handle.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/layout_test_handle.xml similarity index 94% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/layout_test_handle.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/layout_test_handle.xml index f7fc81207787a..aae5423d7d8c4 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/layout_test_handle.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/layout_test_handle.xml @@ -27,7 +27,7 @@ */ --> - + Text declared in the frontend/test/test_theme diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/theme.xml index c41eb39f4db1e..ca15f18f7c149 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_test_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/test_test_theme/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Test Theme 2.0.0.0 test_default diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/theme.xml similarity index 92% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/theme.xml index 2d72c6464b0e0..ae82624b4c5f8 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_custom_theme/theme.xml @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Core - * @subpackage unit_tests + * @package Design + * @subpackage integration_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Custom Theme 2.0.0.0 vendor_default diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/Namespace_Module/absolute_valid_module.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/access_violation.php b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/access_violation.php similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/access_violation.php rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/access_violation.php diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/1.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/1.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/1.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/1.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/base64.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/base64.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/base64.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/base64.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/body.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/body.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/body.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/body.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/deep/recursive.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/deep/recursive.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/deep/recursive.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/deep/recursive.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/exception.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/exception.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/exception.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/exception.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/file.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/file.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/css/file.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/css/file.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/h1.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/h1.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/h1.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/h1.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/images/h2.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/images/h2.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/images/h2.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/images/h2.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/recursive.css similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive.css rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/recursive.css diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/recursive.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/recursive.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive2.gif b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/recursive2.gif similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/recursive2.gif rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/recursive2.gif diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/scripts.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/scripts.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_default/scripts.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/scripts.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/theme.xml index f47d5d6e45438..028398950876c 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_default/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/frontend/vendor_default/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/themes.php b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/themes.php similarity index 96% rename from dev/tests/integration/testsuite/Magento/View/_files/design/themes.php rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/design/themes.php index 448e6ab32e5dd..fc3f626e73b17 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/themes.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/design/themes.php @@ -26,7 +26,7 @@ */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array( 'preferences' => array( 'Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data' diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script_two.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script_two.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script_two.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_script_two.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_template_two.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_template_two.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_template_two.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/Fixture_Module/fixture_template_two.phtml diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_script_two.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_script_two.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_script_two.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_script_two.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_template_two.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_template_two.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_template_two.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/fixture_template_two.phtml diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/i18n/en_US.csv b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/i18n/en_US.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/i18n/en_US.csv rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/i18n/en_US.csv diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/mage/script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/mage/script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme/mage/script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/mage/script.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_custom_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml similarity index 87% rename from dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_custom_theme/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml index 38b39fcd0aba4..4c54b62d84144 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/vendor_custom_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme/theme.xml @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Design - * @subpackage integration_tests + * @package Magento_Core + * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Custom Theme 2.0.0.0 vendor_default diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml index b335f20b6caca..5d8ad147ddd21 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_custom_theme2/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Custom Theme 2 2.0.0.0 vendor_custom_theme diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_template.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_template.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_template.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/Fixture_Module/fixture_template.phtml diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/fixture_template.phtml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_template.phtml similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/fixture_template.phtml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/fixture_template.phtml diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/i18n/en_US.csv b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/en_US.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/i18n/en_US.csv rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/en_US.csv diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/Fixture_Module/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/fixture_script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/fixture_script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/fixture_script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/i18n/ru_RU/fixture_script.js diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml new file mode 100644 index 0000000000000..c154d26f9ad5e --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_default/theme.xml @@ -0,0 +1,31 @@ + + + Default + 2.0.0.0 + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml index dd80661aa6093..33d55f94c5e03 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/design/frontend/vendor_standalone_theme/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Standalone Theme 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/fallback/pub/lib/mage/script.js b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/pub/lib/mage/script.js similarity index 100% rename from dev/tests/integration/testsuite/Magento/View/_files/fallback/pub/lib/mage/script.js rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/pub/lib/mage/script.js diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout/cacheable.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/cacheable.xml similarity index 86% rename from dev/tests/integration/testsuite/Magento/View/_files/layout/cacheable.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/cacheable.xml index 3dcab7b9358f1..30dd480cfb406 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout/cacheable.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/cacheable.xml @@ -23,9 +23,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + Test11 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout/container_attributes.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/container_attributes.xml similarity index 83% rename from dev/tests/integration/testsuite/Magento/View/_files/layout/container_attributes.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/container_attributes.xml index c986d0dc4c866..768f64e67675a 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout/container_attributes.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/container_attributes.xml @@ -23,30 +23,30 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + Test11 - + Test12 - + Test21 - + Test22 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout/non_cacheable.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/non_cacheable.xml similarity index 85% rename from dev/tests/integration/testsuite/Magento/View/_files/layout/non_cacheable.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/non_cacheable.xml index 439a49d720137..b87f37c420e40 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout/non_cacheable.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout/non_cacheable.xml @@ -23,9 +23,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + Test11 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/action_for_anonymous_parent_block.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/action_for_anonymous_parent_block.xml similarity index 78% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/action_for_anonymous_parent_block.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/action_for_anonymous_parent_block.xml index b1e967b7317a6..1f7aa013bbf3e 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/action_for_anonymous_parent_block.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/action_for_anonymous_parent_block.xml @@ -23,15 +23,15 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - - + + + test.block.insert - - + + test.block.append diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments.xml index 64a8e70b7b2c2..90af43af7ecd0 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + 1 2 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_complex_values.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_complex_values.xml similarity index 93% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_complex_values.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_complex_values.xml index 524b391345e2a..b1ff861335d80 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_complex_values.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_complex_values.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_object_type.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_object_type.xml similarity index 71% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_object_type.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_object_type.xml index 37fdd43877129..b9105e1c8fe5c 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_object_type.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_object_type.xml @@ -23,18 +23,18 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + - Magento\Data\Collection\Db - Magento\Data\Collection\Db - Magento\Data\Collection\Db - Magento\Data\Collection\Db + Magento\Framework\Data\Collection\Db + Magento\Framework\Data\Collection\Db + Magento\Framework\Data\Collection\Db + Magento\Framework\Data\Collection\Db - Magento\Data\Collection\Db + Magento\Framework\Data\Collection\Db 3 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_object_type_updaters.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_object_type_updaters.xml similarity index 77% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_object_type_updaters.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_object_type_updaters.xml index ed751b05a8873..7b410c75f4979 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_object_type_updaters.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_object_type_updaters.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + Magento\Core\Model\DataSource 0 @@ -33,21 +33,21 @@ - Magento\View\LayoutArgumentObjectUpdater - Magento\View\LayoutArgumentObjectUpdater + Magento\Framework\View\LayoutArgumentObjectUpdater + Magento\Framework\View\LayoutArgumentObjectUpdater - Magento\View\LayoutArgumentSimpleUpdater + Magento\Framework\View\LayoutArgumentSimpleUpdater - Magento\View\LayoutArgumentObjectUpdater + Magento\Framework\View\LayoutArgumentObjectUpdater - Magento\View\LayoutArgumentSimpleUpdater + Magento\Framework\View\LayoutArgumentSimpleUpdater diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_url_type.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_url_type.xml similarity index 91% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_url_type.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_url_type.xml index a387800bb7236..5343f58947640 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/arguments_url_type.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/arguments_url_type.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + 1 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/get_block.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/get_block.xml similarity index 83% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/get_block.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/get_block.xml index 036bced37612f..120bdab29a5b9 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/get_block.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/get_block.xml @@ -23,11 +23,11 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + block2 - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/get_block_exception.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/get_block_exception.xml similarity index 88% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/get_block_exception.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/get_block_exception.xml index 8c1d2428b3d92..ea30952df4566 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/get_block_exception.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/get_block_exception.xml @@ -23,8 +23,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + container diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/group.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/group.xml similarity index 77% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/group.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/group.xml index 7667e2b2548ac..5ac0ad8170460 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/group.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/group.xml @@ -23,19 +23,19 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - - + + + blok2 - + blok3 - + blok4 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/ifconfig.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/ifconfig.xml similarity index 69% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/ifconfig.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/ifconfig.xml index 9015b2b2984c6..3f93b10ab650e 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/ifconfig.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/ifconfig.xml @@ -23,11 +23,11 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - - + + + - - + + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move.xml similarity index 71% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move.xml index 1638a5f14205e..3008f088e57a9 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move.xml @@ -25,20 +25,20 @@ --> - + - - - + + + - + - + - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_alias_broken.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_alias_broken.xml similarity index 85% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_alias_broken.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_alias_broken.xml index d2d9396475008..1c77a148b1b4a 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_alias_broken.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_alias_broken.xml @@ -25,8 +25,8 @@ --> - + - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_broken.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_broken.xml similarity index 93% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_broken.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_broken.xml index 799f91a83e546..9b7da622ab3c6 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_broken.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_broken.xml @@ -26,5 +26,5 @@ - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_new_alias.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_new_alias.xml similarity index 85% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_new_alias.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_new_alias.xml index 0c8366b404eac..3e7742b26c0ce 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_new_alias.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_new_alias.xml @@ -25,8 +25,8 @@ --> - + - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_the_same_alias.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_the_same_alias.xml similarity index 85% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_the_same_alias.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_the_same_alias.xml index 4a72715ef84ca..b4ced9cc108d2 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/move_the_same_alias.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/move_the_same_alias.xml @@ -25,8 +25,8 @@ --> - + - + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/remove.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove.xml similarity index 77% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/remove.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove.xml index 4ecbec7b56c6f..52d4a5ef882f0 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/remove.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove.xml @@ -25,13 +25,13 @@ --> - + - - - + + + diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/remove_broken.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove_broken.xml similarity index 83% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/remove_broken.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove_broken.xml index 89b796a183f6b..0c7fa829611bb 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/remove_broken.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/remove_broken.xml @@ -23,10 +23,10 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - - + + - + test.broken.block diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/render.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/render.xml similarity index 90% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/render.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/render.xml index 7d92dd36b73ad..12b8a2037b463 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/render.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/render.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + @@ -31,12 +31,12 @@ - + 2 - + 3 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_after_after.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_after_after.xml similarity index 81% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_after_after.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_after_after.xml index 06b48f96eee09..8e08e02e0dd90 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_after_after.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_after_after.xml @@ -23,19 +23,19 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + 1 - + 2 - + 3 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_after_previous.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_after_previous.xml similarity index 82% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_after_previous.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_after_previous.xml index 7c3d6aa4ec362..90fedb8fc836d 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_after_previous.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_after_previous.xml @@ -23,19 +23,19 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + 1 - + 2 - + 3 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_before_after.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_before_after.xml similarity index 81% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_before_after.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_before_after.xml index fb5d19b6da33f..7882183394085 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_before_after.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_before_after.xml @@ -23,19 +23,19 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + 1 - + 2 - + 3 diff --git a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_before_before.xml b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_before_before.xml similarity index 81% rename from dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_before_before.xml rename to dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_before_before.xml index 2f764691cd089..554e005e1b8d4 100644 --- a/dev/tests/integration/testsuite/Magento/View/_files/layout_directives_test/sort_before_before.xml +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/layout_directives_test/sort_before_before.xml @@ -23,19 +23,19 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + 1 - + 2 - + 3 diff --git a/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php b/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php index b4d19dd52363c..7c0f6de8dda5f 100644 --- a/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php +++ b/dev/tests/integration/testsuite/Magento/GiftMessage/Block/Message/InlineTest.php @@ -36,7 +36,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\GiftMessage\Block\Message\Inline' ); @@ -48,7 +48,7 @@ protected function setUp() public function testThumbnail() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Product'); $product->load(1); diff --git a/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php b/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php index d3c4dd366c77b..4803331d94f55 100644 --- a/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/GoogleShopping/Block/Adminhtml/Items/ProductTest.php @@ -36,22 +36,24 @@ public function testBeforeToHtml() $this->markTestIncomplete('Magento_GoogleShopping is not implemented yet'); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\GoogleShopping\Block\Adminhtml\Items\Product' ); $filter = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ); $search = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( - 'Magento\View\Element\Text' + 'Magento\Framework\View\Element\Text' ); - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $layout->addBlock($block, 'product'); $layout->addBlock($filter, 'reset_filter_button', 'product'); $layout->addBlock($search, 'search_button', 'product'); diff --git a/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/Attribute/PriceTest.php b/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/Attribute/PriceTest.php new file mode 100644 index 0000000000000..71248b7242985 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/Attribute/PriceTest.php @@ -0,0 +1,58 @@ +create('Magento\GoogleShopping\Model\Attribute\Price'); + $customerGroupService = Bootstrap::getObjectManager()->get( + 'Magento\Customer\Service\V1\CustomerGroupServiceInterface' + ); + $defaultCustomerGroup = $customerGroupService->getDefaultGroup($product->getStoreId()); + $model->convertAttribute($product, $entry); + $this->assertEquals($defaultCustomerGroup->getId(), $product->getCustomerGroupId()); + } + + /** + * @return array + */ + public function convertAttributeDataProvider() + { + $product = Bootstrap::getObjectManager()->create('Magento\Catalog\Model\Product'); + $entry = Bootstrap::getObjectManager()->create('Magento\Framework\Gdata\Gshopping\Entry'); + return [ + [$product, $entry] + ]; + } +} diff --git a/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/ObserverTest.php index d3af484d8fac2..aa399d7f42857 100644 --- a/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/ObserverTest.php @@ -39,7 +39,7 @@ public function testCheckSynchronizationOperationsWithExpiredFlag() /** @var \Magento\GoogleShopping\Model\Observer $observer */ $observer = $objectManager->get('Magento\GoogleShopping\Model\Observer'); - $dummyEventData = $this->getMock('\Magento\Event\Observer', array(), array(), '', false); + $dummyEventData = $this->getMock('\Magento\Framework\Event\Observer', array(), array(), '', false); $result = $observer->checkSynchronizationOperations($dummyEventData); $this->assertSame($observer, $result); diff --git a/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/_files/flag_expired.php b/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/_files/flag_expired.php index d4d8469fe5145..c8da7200e592f 100644 --- a/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/_files/flag_expired.php +++ b/dev/tests/integration/testsuite/Magento/GoogleShopping/Model/_files/flag_expired.php @@ -31,8 +31,8 @@ $flag = $objectManager->create('Magento\GoogleShopping\Model\Flag'); $flag->lock(); -/** @var $flagResource \Magento\Flag\Resource */ +/** @var $flagResource \Magento\Framework\Flag\Resource */ $flagResource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Flag\Resource'); + ->create('Magento\Framework\Flag\Resource'); $flag->setLastUpdate(date('Y-m-d H:i:s', time() - \Magento\GoogleShopping\Model\Flag::FLAG_TTL - 1)); $flagResource->save($flag); diff --git a/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php index 2a09f62a67d0a..0ebfc15c127fe 100644 --- a/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php +++ b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php @@ -42,7 +42,7 @@ protected function setUp() public function testFactory() { - $product = new \Magento\Object(); + $product = new \Magento\Framework\Object(); $product->setTypeId(\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE); $type = $this->_productType->factory($product); $this->assertInstanceOf('\Magento\GroupedProduct\Model\Product\Type\Grouped', $type); diff --git a/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php index a917e6025733c..b9fd99be2e239 100644 --- a/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php @@ -38,7 +38,7 @@ public function testGetColumnValues() $product->load(9); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); /** @var \Magento\GroupedProduct\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection $collection */ $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/Edit/FormTest.php index 91e690ba2bb70..2334b77e0f071 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/Edit/FormTest.php @@ -57,7 +57,7 @@ protected function setUp() { parent::setUp(); $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\ImportExport\Block\Adminhtml\Export\Edit\Form' ); @@ -77,18 +77,18 @@ public function testPrepareForm() $actualFieldsets = array(); $formElements = $this->_model->getForm()->getElements(); foreach ($formElements as $formElement) { - if ($formElement instanceof \Magento\Data\Form\Element\Fieldset) { + if ($formElement instanceof \Magento\Framework\Data\Form\Element\Fieldset) { $actualFieldsets[] = $formElement; } } // assert fieldsets and fields $this->assertSameSize($this->_expectedFields, $actualFieldsets); - /** @var $actualFieldset \Magento\Data\Form\Element\Fieldset */ + /** @var $actualFieldset \Magento\Framework\Data\Form\Element\Fieldset */ foreach ($actualFieldsets as $actualFieldset) { $this->assertArrayHasKey($actualFieldset->getId(), $this->_expectedFields); $expectedFields = $this->_expectedFields[$actualFieldset->getId()]; - /** @var $actualField \Magento\Data\Form\Element\AbstractElement */ + /** @var $actualField \Magento\Framework\Data\Form\Element\AbstractElement */ foreach ($actualFieldset->getElements() as $actualField) { $this->assertArrayHasKey($actualField->getId(), $expectedFields); $this->assertEquals($expectedFields[$actualField->getId()], $actualField->getName()); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php index 388b2241a95f2..d05e68afda96f 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Export/FilterTest.php @@ -39,7 +39,7 @@ public function testGetDateFromToHtmlWithValue() { \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\DesignInterface') ->setDefaultDesignTheme(); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\ImportExport\Block\Adminhtml\Export\Filter'); @@ -65,9 +65,9 @@ public function testGetDateFromToHtmlWithValue() $this->assertNotEmpty($html); $dateFormat = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Stdlib\DateTime\TimezoneInterface' + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' )->getDateFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT ); $pieces = array_filter(explode('', $html)); foreach ($pieces as $piece) { diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Import/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Import/Edit/FormTest.php index 1abecc43c799b..35d9bd5ae16ec 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Import/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Block/Adminhtml/Import/Edit/FormTest.php @@ -60,7 +60,7 @@ protected function setUp() public function testPrepareForm() { $formBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\ImportExport\Block\Adminhtml\Import\Edit\Form' ); @@ -70,21 +70,25 @@ public function testPrepareForm() // check form $form = $formBlock->getForm(); - $this->assertInstanceOf('Magento\Data\Form', $form, 'Incorrect import form class.'); + $this->assertInstanceOf('Magento\Framework\Data\Form', $form, 'Incorrect import form class.'); $this->assertTrue($form->getUseContainer(), 'Form should use container.'); // check form fieldsets $formFieldsets = array(); $formElements = $form->getElements(); foreach ($formElements as $element) { - /** @var $element \Magento\Data\Form\Element\AbstractElement */ + /** @var $element \Magento\Framework\Data\Form\Element\AbstractElement */ if (in_array($element->getId(), $this->_expectedFieldsets)) { $formFieldsets[] = $element; } } $this->assertSameSize($this->_expectedFieldsets, $formFieldsets); foreach ($formFieldsets as $fieldset) { - $this->assertInstanceOf('Magento\Data\Form\Element\Fieldset', $fieldset, 'Incorrect fieldset class.'); + $this->assertInstanceOf( + 'Magento\Framework\Data\Form\Element\Fieldset', + $fieldset, + 'Incorrect fieldset class.' + ); } } } diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php index ad329415953d1..fafd032abea60 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php @@ -85,7 +85,7 @@ protected function setUp() $objectManager->get('Magento\Store\Model\StoreManager'), $objectManager->get('Magento\ImportExport\Model\Export\Factory'), $objectManager->get('Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory'), - $objectManager->get('Magento\Stdlib\DateTime\TimezoneInterface'), + $objectManager->get('Magento\Framework\Stdlib\DateTime\TimezoneInterface'), $objectManager->get('Magento\Eav\Model\Config') ); } diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php index f24bee190001a..f34bab120c807 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php @@ -92,7 +92,7 @@ public function testExport() public function testExportStockItemAttributesAreFilled() { $filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $directoryMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false); + $directoryMock = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false); $filesystemMock->expects($this->once())->method('getDirectoryWrite')->will($this->returnValue($directoryMock)); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php index 19e554eb15878..fc7ecd3542dbb 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php @@ -86,7 +86,7 @@ public function testGetWriter() /** * Check that method throw exception when writer was not defined * - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testGetWriterThrowsException() { diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php index 5acebb9b3f3fc..3a28ca751d4ea 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/ExportTest.php @@ -74,11 +74,11 @@ public function getEntityDataProvider() ), 'customer main data' => array( '$entity' => 'customer', - '$expectedEntityType' => 'Magento\ImportExport\Model\Export\Entity\Eav\Customer' + '$expectedEntityType' => 'Magento\Customer\Model\ImportExport\Export\Customer' ), 'customer address' => array( '$entity' => 'customer_address', - '$expectedEntityType' => 'Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address' + '$expectedEntityType' => 'Magento\Customer\Model\ImportExport\Export\Address' ) ); } @@ -86,7 +86,7 @@ public function getEntityDataProvider() /** * Test method '_getEntityAdapter' in case when entity is invalid * - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @covers \Magento\ImportExport\Model\Export::_getEntityAdapter */ public function testGetEntityAdapterWithInvalidEntity() diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php deleted file mode 100644 index 0d17de2beb976..0000000000000 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php +++ /dev/null @@ -1,179 +0,0 @@ -_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\ImportExport\Model\Import\Entity\Eav\Customer' - ); - - $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\Framework\App\Filesystem'); - $this->directoryWrite = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); - } - - /** - * Test importData() method - * - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer::_importData - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer::_prepareDataForUpdate - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer::_saveCustomerAttributes - * - * @magentoDataFixture Magento/ImportExport/_files/customer.php - */ - public function testImportData() - { - // 3 customers will be imported. - // 1 of this customers is already exist, but its first and last name were changed in file - $expectAddedCustomers = 5; - - - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/customers_to_import.csv', - $this->directoryWrite - ); - - /** @var $customersCollection \Magento\Customer\Model\Resource\Customer\Collection */ - $customersCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Customer\Model\Resource\Customer\Collection' - ); - $customersCollection->addAttributeToSelect('firstname', 'inner')->addAttributeToSelect('lastname', 'inner'); - - $existCustomersCount = count($customersCollection->load()); - - $customersCollection->resetData(); - $customersCollection->clear(); - - $this->_model->setParameters( - array('behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE) - )->setSource( - $source - )->isDataValid(); - - $this->_model->importData(); - - $customers = $customersCollection->getItems(); - - $addedCustomers = count($customers) - $existCustomersCount; - - $this->assertEquals($expectAddedCustomers, $addedCustomers, 'Added unexpected amount of customers'); - - /** @var $objectManager \Magento\TestFramework\ObjectManager */ - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - - $existingCustomer = $objectManager->get( - 'Magento\Registry' - )->registry( - '_fixture/Magento_ImportExport_Customer' - ); - - $updatedCustomer = $customers[$existingCustomer->getId()]; - - $this->assertNotEquals( - $existingCustomer->getFirstname(), - $updatedCustomer->getFirstname(), - 'Firstname must be changed' - ); - - $this->assertNotEquals( - $existingCustomer->getLastname(), - $updatedCustomer->getLastname(), - 'Lastname must be changed' - ); - - $this->assertNotEquals( - $existingCustomer->getCreatedAt(), - $updatedCustomer->getCreatedAt(), - 'Creation date must be changed' - ); - } - - /** - * Test importData() method (delete behavior) - * - * @magentoDataFixture Magento/ImportExport/_files/customers.php - */ - public function testDeleteData() - { - \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); - $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/_files/customers_to_import.csv', - $this->directoryWrite - ); - - /** @var $customerCollection \Magento\Customer\Model\Resource\Customer\Collection */ - $customerCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Customer\Model\Resource\Customer\Collection' - ); - $this->assertEquals(3, $customerCollection->count(), 'Count of existing customers are invalid'); - - - $this->_model->setParameters( - array('behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE) - )->setSource( - $source - )->isDataValid(); - - $this->_model->importData(); - - $customerCollection->resetData(); - $customerCollection->clear(); - $this->assertEmpty($customerCollection->count(), 'Customers were not imported'); - } - - /** - * Test entity type code value - * - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer::getAttributeCollection - */ - public function testGetEntityTypeCode() - { - $this->assertEquals('customer', $this->_model->getEntityTypeCode()); - } -} diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerTest.php deleted file mode 100644 index 42c482891ed44..0000000000000 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerTest.php +++ /dev/null @@ -1,211 +0,0 @@ -_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\ImportExport\Model\Import\Entity\Eav\Customer' - ); - $this->_model->setParameters(array('behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE)); - - $propertyAccessor = new \ReflectionProperty($this->_model, '_messageTemplates'); - $propertyAccessor->setAccessible(true); - $propertyAccessor->setValue($this->_model, array()); - - $this->_customerData = array( - 'firstname' => 'Firstname', - 'lastname' => 'Lastname', - 'group_id' => 1, - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => 'customer@example.com', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => 'base', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_STORE => 'default', - 'store_id' => 1, - 'website_id' => 1, - 'password' => 'password' - ); - } - - /** - * Test which check duplicated data validation - */ - public function testValidateRowDuplicateEmail() - { - $this->_model->validateRow($this->_customerData, 0); - $this->assertEquals(0, $this->_model->getErrorsCount()); - - $this->_customerData[\Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL] = strtoupper( - $this->_customerData[\Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL] - ); - $this->_model->validateRow($this->_customerData, 1); - $this->assertEquals(1, $this->_model->getErrorsCount()); - $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::ERROR_DUPLICATE_EMAIL_SITE, - $this->_model->getErrorMessages() - ); - } - - /** - * Test which check validation of customer email - */ - public function testValidateRowInvalidEmail() - { - $this-> - _customerData[\Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL] = 'wrong_email@format'; - $this->_model->validateRow($this->_customerData, 0); - $this->assertEquals(1, $this->_model->getErrorsCount()); - $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::ERROR_INVALID_EMAIL, - $this->_model->getErrorMessages() - ); - } - - /** - * Test which check validation of website data - */ - public function testValidateRowInvalidWebsite() - { - $this-> - _customerData[\Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE] = - 'not_existing_web_site'; - $this->_model->validateRow($this->_customerData, 0); - $this->assertEquals(1, $this->_model->getErrorsCount()); - $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::ERROR_INVALID_WEBSITE, - $this->_model->getErrorMessages() - ); - } - - /** - * Test which check validation of store data - */ - public function testValidateRowInvalidStore() - { - $this-> - _customerData[\Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_STORE] = - 'not_existing_web_store'; - $this->_model->validateRow($this->_customerData, 0); - $this->assertEquals(1, $this->_model->getErrorsCount()); - $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::ERROR_INVALID_STORE, - $this->_model->getErrorMessages() - ); - } - - /** - * Test which check validation of password length - incorrect case - */ - public function testValidateRowPasswordLengthIncorrect() - { - $this->_customerData['password'] = '12345'; - $this->_model->validateRow($this->_customerData, 0); - $this->assertEquals(1, $this->_model->getErrorsCount()); - $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::ERROR_PASSWORD_LENGTH, - $this->_model->getErrorMessages() - ); - } - - /** - * Test which check validation of password length - correct case - */ - public function testValidateRowPasswordLengthCorrect() - { - $this->_customerData['password'] = '1234567890'; - $this->_model->validateRow($this->_customerData, 0); - $this->assertEquals(0, $this->_model->getErrorsCount()); - } - - /** - * Test which check validation of required fields - */ - public function testValidateRowAttributeRequired() - { - unset($this->_customerData['firstname']); - unset($this->_customerData['lastname']); - unset($this->_customerData['group_id']); - - $this->_model->validateRow($this->_customerData, 0); - $this->assertEquals(0, $this->_model->getErrorsCount()); - - $this-> - _customerData[\Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL] = - 'new.customer@example.com'; - $this->_model->validateRow($this->_customerData, 1); - $this->assertGreaterThan(0, $this->_model->getErrorsCount()); - $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::ERROR_VALUE_IS_REQUIRED, - $this->_model->getErrorMessages() - ); - } - - /** - * Check customer email validation for delete behavior - * - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\Customer::validateRow - */ - public function testValidateEmailForDeleteBehavior() - { - $this-> - _customerData[\Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL] = - 'new.customer@example.com'; - - $this->_model->setParameters(array('behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE)); - $this->_model->validateRow($this->_customerData, 0); - $this->assertGreaterThan(0, $this->_model->getErrorsCount()); - $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::ERROR_CUSTOMER_NOT_FOUND, - $this->_model->getErrorMessages() - ); - } -} diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php index 06b07b5d71be4..16cf9cba95367 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php @@ -548,7 +548,7 @@ public function testSaveMediaImage() array( $objectManager->create('Magento\Core\Helper\File\Storage\Database'), $objectManager->create('Magento\Core\Helper\File\Storage'), - $objectManager->create('Magento\Image\AdapterFactory'), + $objectManager->create('Magento\Framework\Image\AdapterFactory'), $objectManager->create('Magento\Core\Model\File\Validator\NotProtectedExtension') ) ); @@ -569,11 +569,11 @@ public function testSaveMediaImage() ); $product->load($productId); $gallery = $product->getMediaGalleryImages(); - $this->assertInstanceOf('Magento\Data\Collection', $gallery); + $this->assertInstanceOf('Magento\Framework\Data\Collection', $gallery); $items = $gallery->getItems(); $this->assertCount(1, $items); $item = array_pop($items); - $this->assertInstanceOf('Magento\Object', $item); + $this->assertInstanceOf('Magento\Framework\Object', $item); $this->assertEquals('magento_image.jpg', $item->getFile()); $this->assertEquals('Image Label', $item->getLabel()); } @@ -583,7 +583,7 @@ public function testSaveMediaImage() */ public static function mediaImportImageFixture() { - /** @var \Magento\Filesystem\Directory\Write $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\Write $mediaDirectory */ $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( @@ -599,7 +599,7 @@ public static function mediaImportImageFixture() */ public static function mediaImportImageFixtureRollback() { - /** @var \Magento\Filesystem\Directory\Write $mediaDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\Write $mediaDirectory */ $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/customers_for_validation_test.csv b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customers_for_validation_test.csv similarity index 100% rename from dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/_files/customers_for_validation_test.csv rename to dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customers_for_validation_test.csv diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php index b1e771b52de24..dc76e9a8e22c4 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php @@ -41,7 +41,7 @@ public function testSaveValidatedBunches() ->create('Magento\Framework\App\Filesystem'); $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR); $source = new \Magento\ImportExport\Model\Import\Source\Csv( - __DIR__ . '/Entity/Eav/_files/customers_for_validation_test.csv', + __DIR__ . '/Entity/_files/customers_for_validation_test.csv', $directory ); $source->rewind(); @@ -53,7 +53,7 @@ public function testSaveValidatedBunches() 'Magento\ImportExport\Model\Import\AbstractEntity', array( $objectManager->get('Magento\Core\Helper\Data'), - $objectManager->get('Magento\Stdlib\String'), + $objectManager->get('Magento\Framework\Stdlib\String'), $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface'), $objectManager->get('Magento\ImportExport\Model\ImportFactory'), $objectManager->get('Magento\ImportExport\Model\Resource\Helper'), diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/ImportTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/ImportTest.php index 2e1c65079b3b1..f152bda219fae 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/ImportTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/ImportTest.php @@ -125,7 +125,7 @@ public function testValidateSource() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Entity is unknown */ public function testValidateSourceException() @@ -147,7 +147,7 @@ public function testGetEntity() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Entity is unknown */ public function testGetEntityEntityIsNotSet() @@ -175,7 +175,7 @@ public function testGetEntityBehaviors() /** * Test getEntityBehaviors with not existing behavior class * - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Invalid behavior token for customer */ public function testGetEntityBehaviorsWithUnknownBehavior() diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Resource/Import/DataTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Resource/Import/DataTest.php index 5f9915d729cd1..2bb491a4bd43a 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Resource/Import/DataTest.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Resource/Import/DataTest.php @@ -56,7 +56,7 @@ public function testGetUniqueColumnData() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $expectedBunches = $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->registry( '_fixture/Magento_ImportExport_Import_Data' ); @@ -67,7 +67,7 @@ public function testGetUniqueColumnData() /** * Test getUniqueColumnData() in case when in data stored in requested column is NOT unique * - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testGetUniqueColumnDataException() { @@ -83,7 +83,7 @@ public function testGetBehavior() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $expectedBunches = $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->registry( '_fixture/Magento_ImportExport_Import_Data' ); @@ -100,7 +100,7 @@ public function testGetEntityTypeCode() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $expectedBunches = $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->registry( '_fixture/Magento_ImportExport_Import_Data' ); diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/_files/import_data.php b/dev/tests/integration/testsuite/Magento/ImportExport/_files/import_data.php index 73461fe956e59..d4d017a12af38 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/_files/import_data.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/_files/import_data.php @@ -134,5 +134,5 @@ /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$objectManager->get('Magento\Registry')->unregister('_fixture/Magento_ImportExport_Import_Data'); -$objectManager->get('Magento\Registry')->register('_fixture/Magento_ImportExport_Import_Data', $bunches); +$objectManager->get('Magento\Framework\Registry')->unregister('_fixture/Magento_ImportExport_Import_Data'); +$objectManager->get('Magento\Framework\Registry')->register('_fixture/Magento_ImportExport_Import_Data', $bunches); diff --git a/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php b/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php index ce97aeccf5110..962ca8ce2ac6a 100644 --- a/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php +++ b/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php @@ -53,7 +53,7 @@ class FileTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Filesystem\Directory\WriteInterface + * @var \Magento\Framework\Filesystem\Directory\WriteInterface */ protected $_varDirectory; diff --git a/dev/tests/integration/testsuite/Magento/Index/Model/ProcessTest.php b/dev/tests/integration/testsuite/Magento/Index/Model/ProcessTest.php index 8c7c58d991930..4753cd7db9e57 100644 --- a/dev/tests/integration/testsuite/Magento/Index/Model/ProcessTest.php +++ b/dev/tests/integration/testsuite/Magento/Index/Model/ProcessTest.php @@ -46,7 +46,7 @@ class ProcessTest extends \PHPUnit_Framework_TestCase ); /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; diff --git a/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php b/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php index 30c8bf2516a0e..9447fdccc783e 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php +++ b/dev/tests/integration/testsuite/Magento/Install/Block/AdminTest.php @@ -35,15 +35,15 @@ public function testToHtml() ); $omit = array('password' => 'password_with_1_number', 'password_confirmation' => 'password_with_1_number'); - /** @var $session \Magento\Session\Generic */ + /** @var $session \Magento\Framework\Session\Generic */ $session = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Install\Model\Session'); $session->setAdminData(array_merge($preserve, $omit)); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('install'); - /** @var $layout \Magento\View\LayoutInterface */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Layout'); + /** @var $layout \Magento\Framework\View\LayoutInterface */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Framework\View\Layout'); /** @var $block \Magento\Install\Block\Admin */ $block = $layout->createBlock('Magento\Install\Block\Admin'); $output = $block->toHtml(); diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php index fe5000c913863..bab9fcac40567 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php @@ -33,7 +33,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase private $_object; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ private $_objectManager; @@ -72,28 +72,28 @@ public function setUp() ) ); - /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */ + /** @var \Magento\Framework\Module\Declaration\FileResolver $modulesDeclarations */ $modulesDeclarations = $this->_objectManager->create( - 'Magento\Module\Declaration\FileResolver', + 'Magento\Framework\Module\Declaration\FileResolver', array('filesystem' => $filesystem) ); - /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */ + /** @var \Magento\Framework\Module\Declaration\Reader\Filesystem $filesystemReader */ $filesystemReader = $this->_objectManager->create( - 'Magento\Module\Declaration\Reader\Filesystem', + 'Magento\Framework\Module\Declaration\Reader\Filesystem', array('fileResolver' => $modulesDeclarations) ); - /** @var \Magento\Module\ModuleList $modulesList */ + /** @var \Magento\Framework\Module\ModuleList $modulesList */ $modulesList = $this->_objectManager->create( - 'Magento\Module\ModuleList', + 'Magento\Framework\Module\ModuleList', array('reader' => $filesystemReader) ); - /** @var \Magento\Module\Dir\Reader $moduleReader */ + /** @var \Magento\Framework\Module\Dir\Reader $moduleReader */ $moduleReader = $this->_objectManager->create( - 'Magento\Module\Dir\Reader', + 'Magento\Framework\Module\Dir\Reader', array('moduleList' => $modulesList, 'filesystem' => $filesystem) ); $moduleReader->setModuleDir('Magento_Test', 'etc', __DIR__ . '/_files/Magento/Test/etc'); @@ -161,7 +161,7 @@ public function testMergeCompleteAndPartial() file_get_contents(__DIR__ . '/_files/install_wizard_partial.xml') ); $fileResolverMock = $this->getMockBuilder( - 'Magento\Config\FileResolverInterface' + 'Magento\Framework\Config\FileResolverInterface' )->setMethods( array('get') )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php index 8aae492f14300..bb712f651c91d 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php @@ -31,7 +31,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected static $_tmpDir = ''; /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected static $_varDirectory; @@ -91,9 +91,9 @@ public function testGetFormData() $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Install\Model\Installer\Config' ); - /** @var $result \Magento\Object */ + /** @var $result \Magento\Framework\Object */ $result = $model->getFormData(); - $this->assertInstanceOf('Magento\Object', $result); + $this->assertInstanceOf('Magento\Framework\Object', $result); $data = $result->getData(); $this->assertArrayHasKey('db_host', $data); } diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php index 35aaaf917f6d6..ba6d2dede0649 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php +++ b/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php @@ -39,7 +39,7 @@ class InstallerTest extends \PHPUnit_Framework_TestCase protected static $_tmpConfigFile = ''; /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected static $_varDirectory; @@ -88,7 +88,7 @@ protected function _getModel($emulateConfig = false) $objectManager->get('Magento\Framework\App\RequestInterface'), $filesystem, $objectManager->get('Magento\Store\Model\StoreManager'), - $objectManager->get('Magento\Message\Manager') + $objectManager->get('Magento\Framework\Message\Manager') ); $objectManager->addSharedInstance($installerConfig, 'Magento\Install\Model\Installer\Config'); } @@ -147,7 +147,7 @@ public function testInstallEncryptionKey() /** * @magentoAppIsolation enabled - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Key must not exceed */ public function testInstallEncryptionKeySizeViolation() @@ -166,7 +166,7 @@ public function testGetValidEncryptionKey() /** * @magentoAppIsolation enabled - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Key must not exceed */ public function testGetValidEncryptionKeySizeViolation() diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml index 870e1ea941f03..4ef157295695b 100644 --- a/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Install/Model/_files/Magento/Test/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php b/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php index d5a2ecc41da03..a9b1342e2ebaf 100644 --- a/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php +++ b/dev/tests/integration/testsuite/Magento/Integration/Controller/Adminhtml/IntegrationTest.php @@ -93,7 +93,7 @@ public function testSaveActionUpdateIntegration() $this->dispatch('backend/admin/integration/save'); $this->assertSessionMessages( $this->equalTo(array("The integration '{$integrationName}' has been saved.")), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/integration/index/')); } @@ -114,7 +114,7 @@ public function testSaveActionNewIntegration() $this->assertSessionMessages( $this->equalTo(array("The integration '{$integrationName}' has been saved.")), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/integration/index/')); } diff --git a/dev/tests/integration/testsuite/Magento/Integration/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Integration/Model/Config/ReaderTest.php index 2d1fc6855dc0d..bd5a6969f3725 100644 --- a/dev/tests/integration/testsuite/Magento/Integration/Model/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Integration/Model/Config/ReaderTest.php @@ -40,7 +40,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected function setUp() { parent::setUp(); - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_configReader = $objectManager->create( 'Magento\Integration\Model\Config\Reader', diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less deleted file mode 100644 index 41ab05d69c2b7..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/Magento_Test/some_dir/magento_import.less +++ /dev/null @@ -1,4 +0,0 @@ -@import "import_dir/import_in_magento_import.less"; -div.test { - color: white; -} diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less b/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less deleted file mode 100644 index 3644b3f4dddc1..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import1.less +++ /dev/null @@ -1 +0,0 @@ -@import 'import2.less'; diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less b/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less deleted file mode 100644 index ba6a32c7aa061..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import2.less +++ /dev/null @@ -1 +0,0 @@ -@import 'import3.less'; diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less b/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less deleted file mode 100644 index 0a5bda87da3d4..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/circular_dependency/import3.less +++ /dev/null @@ -1 +0,0 @@ -@import 'import1.less'; diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less b/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less deleted file mode 100644 index d3086f6d3e436..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Less/_files/design/frontend/test_pre_process/less/import1/source/import1-1.less +++ /dev/null @@ -1 +0,0 @@ -@import "../import1-1.less"; diff --git a/dev/tests/integration/testsuite/Magento/Less/_files/lib/some_dir/magento_import.less b/dev/tests/integration/testsuite/Magento/Less/_files/lib/some_dir/magento_import.less deleted file mode 100644 index edf3817c255e7..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Less/_files/lib/some_dir/magento_import.less +++ /dev/null @@ -1,4 +0,0 @@ -@import "import_dir/import_in_magento_import.less"; -div.magento_import_lib { - color: green; -} diff --git a/dev/tests/integration/testsuite/Magento/MemoryUsageTest.php b/dev/tests/integration/testsuite/Magento/MemoryUsageTest.php index 794441a2c00b9..bd0014dd6c252 100644 --- a/dev/tests/integration/testsuite/Magento/MemoryUsageTest.php +++ b/dev/tests/integration/testsuite/Magento/MemoryUsageTest.php @@ -41,7 +41,7 @@ class MemoryUsageTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_helper = new \Magento\TestFramework\Helper\Memory( - new \Magento\Shell(new \Magento\Shell\CommandRenderer()) + new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer()) ); } diff --git a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/AddressesTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/AddressesTest.php index eb9d253cd60de..3898e3eedf22a 100644 --- a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/AddressesTest.php +++ b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/AddressesTest.php @@ -38,7 +38,7 @@ class AddressesTest extends \PHPUnit_Framework_TestCase protected $_addresses; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; diff --git a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php index 575383d026672..690c52581b167 100644 --- a/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php +++ b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php @@ -34,15 +34,15 @@ class OverviewTest extends \PHPUnit_Framework_TestCase protected $_block; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; protected function setUp() { - \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_block = $this->_objectManager->get('Magento\View\LayoutInterface') + $this->_block = $this->_objectManager->get('Magento\Framework\View\LayoutInterface') ->createBlock('Magento\Multishipping\Block\Checkout\Overview', 'checkout_overview', array( @@ -53,7 +53,7 @@ protected function setUp() ) ); - $this->_block->addChild('renderer.list', '\Magento\View\Element\RendererList'); + $this->_block->addChild('renderer.list', '\Magento\Framework\View\Element\RendererList'); $this->_block->getChildBlock( 'renderer.list' )->addChild( diff --git a/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php index a261e65d506c9..477b152d74ae9 100644 --- a/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php @@ -53,7 +53,7 @@ public function testOverviewAction() )->setQuoteId( $quote->getId() ); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); /** @var $session \Magento\Customer\Model\Session */ $session = Bootstrap::getObjectManager()->create('Magento\Customer\Model\Session', array($logger)); $service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/Queue/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/Queue/Edit/FormTest.php index bb57cf15fb98c..8016309ae5192 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/Queue/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/Queue/Edit/FormTest.php @@ -39,17 +39,17 @@ public function testPrepareForm() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $queue = $objectManager->get('Magento\Newsletter\Model\Queue'); - /** @var \Magento\Registry $registry */ - $registry = $objectManager->get('\Magento\Registry'); + /** @var \Magento\Framework\Registry $registry */ + $registry = $objectManager->get('\Magento\Framework\Registry'); $registry->register('current_queue', $queue); $objectManager->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->setDefaultDesignTheme(); $objectManager->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/SubscriberTest.php index 46ce4d8318595..2d36813fc82c3 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/SubscriberTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Block/Adminhtml/SubscriberTest.php @@ -33,12 +33,14 @@ class SubscriberTest extends \PHPUnit_Framework_TestCase { public function testGetShowQueueAdd() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Newsletter\Block\Adminhtml\Subscriber */ $block = $layout->createBlock('Magento\Newsletter\Block\Adminhtml\Subscriber', 'block'); - /** @var $childBlock \Magento\View\Element\Template */ - $childBlock = $layout->addBlock('Magento\View\Element\Template', 'grid', 'block'); + /** @var $childBlock \Magento\Framework\View\Element\Template */ + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Template', 'grid', 'block'); $expected = 'test_data'; $this->assertNotEquals($expected, $block->getShowQueueAdd()); diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterQueueTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterQueueTest.php index bf5056134e1d9..c22816a558da5 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterQueueTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterQueueTest.php @@ -77,14 +77,14 @@ public function testSaveActionQueueTemplateAndVerifySuccessMessage() /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); /** * Check that success message is set */ $this->assertSessionMessages( $this->equalTo(array('The newsletter queue has been saved.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } } diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php index 787cebddf55e5..93bdabb6243de 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php @@ -73,13 +73,13 @@ public function testSaveActionCreateNewTemplateAndVerifySuccessMessage() /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); /** * Check that success message is set */ $this->assertSessionMessages( $this->equalTo(array('The newsletter template has been saved.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } @@ -96,14 +96,14 @@ public function testSaveActionEditTemplateAndVerifySuccessMessage() /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); /** * Check that success message is set */ $this->assertSessionMessages( $this->equalTo(array('The newsletter template has been saved.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } @@ -128,13 +128,13 @@ public function testSaveActionTemplateWithInvalidDataAndVerifySuccessMessage() */ $this->assertSessionMessages( $this->logicalNot($this->isEmpty()), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); /** * Check that success message is not set */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_SUCCESS); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS); } /** @@ -150,14 +150,14 @@ public function testDeleteActionTemplateAndVerifySuccessMessage() /** * Check that errors was generated and set to session */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); /** * Check that success message is set */ $this->assertSessionMessages( $this->equalTo(array('The newsletter template has been deleted.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } } diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php index e4c324e60ceb8..fe4f62008cdf0 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php @@ -34,7 +34,7 @@ class ManageTest extends \Magento\TestFramework\TestCase\AbstractController */ protected $customerSession; /** - * @var \Magento\Session\Generic + * @var \Magento\Framework\Session\Generic */ protected $coreSession; @@ -44,7 +44,7 @@ protected function setUp() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->customerSession = $objectManager->get('Magento\Customer\Model\Session'); $this->customerSession->setCustomerId(1); - $this->coreSession = $objectManager->get('Magento\Session\Generic'); + $this->coreSession = $objectManager->get('Magento\Framework\Session\Generic'); $this->coreSession->setData('_form_key', 'formKey'); } @@ -69,14 +69,14 @@ public function testSaveAction() /** * Check that errors */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); /** * Check that success message */ $this->assertSessionMessages( $this->equalTo(['We saved the subscription.']), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } @@ -95,14 +95,14 @@ public function testSaveActionRemoveSubscription() /** * Check that errors */ - $this->assertSessionMessages($this->isEmpty(), \Magento\Message\MessageInterface::TYPE_ERROR); + $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); /** * Check that success message */ $this->assertSessionMessages( $this->equalTo(['We removed the subscription.']), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } } diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php index de09e1ea8d261..692e0538e3c36 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/SubscriberTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Newsletter\Controller; -use Magento\Message\MessageInterface; +use Magento\Framework\Message\MessageInterface; use Magento\TestFramework\Helper\Bootstrap; use Magento\TestFramework\TestCase\AbstractController; diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php index aa91e6a188888..9e55f380f3d51 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php @@ -38,15 +38,15 @@ public function testSendPerSubscriber() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Framework\App\State')->setAreaCode(\Magento\Core\Model\App\Area::AREA_FRONTEND); + $objectManager->get('Magento\Framework\App\State')->setAreaCode(\Magento\Framework\App\Area::AREA_FRONTEND); $area = $objectManager->get('Magento\Framework\App\AreaList') - ->getArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->getArea(\Magento\Framework\App\Area::AREA_FRONTEND); $area->load(); /** @var $filter \Magento\Newsletter\Model\Template\Filter */ $filter = $objectManager->get('Magento\Newsletter\Model\Template\Filter'); - $transport = $this->getMock('\Magento\Mail\TransportInterface'); + $transport = $this->getMock('\Magento\Framework\Mail\TransportInterface'); $transport->expects($this->exactly(2))->method('sendMessage')->will($this->returnSelf()); $builder = $this->getMock( @@ -79,17 +79,17 @@ public function testSendPerSubscriberProblem() $errorMsg = md5(microtime()); \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $transport = $this->getMock('\Magento\Mail\TransportInterface'); + $transport = $this->getMock('\Magento\Framework\Mail\TransportInterface'); $transport->expects( $this->any() )->method( 'sendMessage' )->will( - $this->throwException(new \Magento\Mail\Exception($errorMsg, 99)) + $this->throwException(new \Magento\Framework\Mail\Exception($errorMsg, 99)) ); $builder = $this->getMock( diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorNineArguments.php b/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorNineArguments.php deleted file mode 100644 index a65afd87c36a8..0000000000000 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorNineArguments.php +++ /dev/null @@ -1,66 +0,0 @@ -_nine = $nine; - } -} diff --git a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorTenArguments.php b/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorTenArguments.php deleted file mode 100644 index eedd45606b09c..0000000000000 --- a/dev/tests/integration/testsuite/Magento/ObjectManager/TestAsset/ConstructorTenArguments.php +++ /dev/null @@ -1,70 +0,0 @@ -_ten = $ten; - } -} diff --git a/dev/tests/integration/testsuite/Magento/PageCache/Model/System/Config/Backend/TtlTest.php b/dev/tests/integration/testsuite/Magento/PageCache/Model/System/Config/Backend/TtlTest.php index ec1999c2b8367..3d9eca983112e 100644 --- a/dev/tests/integration/testsuite/Magento/PageCache/Model/System/Config/Backend/TtlTest.php +++ b/dev/tests/integration/testsuite/Magento/PageCache/Model/System/Config/Backend/TtlTest.php @@ -73,7 +73,7 @@ public function beforeSaveDataProvider() */ public function testBeforeSaveWithException($value, $path) { - $this->setExpectedException('\Magento\Model\Exception'); + $this->setExpectedException('\Magento\Framework\Model\Exception'); $this->_prepareData($value, $path); } diff --git a/dev/tests/integration/testsuite/Magento/PayPalRecurringPayment/Model/IpnTest.php b/dev/tests/integration/testsuite/Magento/PayPalRecurringPayment/Model/IpnTest.php index a4449bce5cff2..a99380733ff48 100644 --- a/dev/tests/integration/testsuite/Magento/PayPalRecurringPayment/Model/IpnTest.php +++ b/dev/tests/integration/testsuite/Magento/PayPalRecurringPayment/Model/IpnTest.php @@ -29,7 +29,7 @@ class IpnTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -103,12 +103,12 @@ public static function currencyProvider() /** * Mocked HTTP adapter to get VERIFIED PayPal IPN postback result * - * @return \Magento\HTTP\Adapter\Curl + * @return \Magento\Framework\HTTP\Adapter\Curl */ protected function _createMockedHttpAdapter() { - $factory = $this->getMock('Magento\HTTP\Adapter\CurlFactory', array('create'), array(), '', false); - $adapter = $this->getMock('Magento\HTTP\Adapter\Curl', array('read', 'write'), array(), '', false); + $factory = $this->getMock('Magento\Framework\HTTP\Adapter\CurlFactory', array('create'), array(), '', false); + $adapter = $this->getMock('Magento\Framework\HTTP\Adapter\Curl', array('read', 'write'), array(), '', false); $adapter->expects($this->once())->method('read')->with()->will($this->returnValue("\nVERIFIED")); diff --git a/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php b/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php index e4eb782a4a4cb..4e716761c6f8f 100644 --- a/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php +++ b/dev/tests/integration/testsuite/Magento/Payment/Block/InfoTest.php @@ -35,8 +35,10 @@ class InfoTest extends \PHPUnit_Framework_TestCase */ public function testGetChildPdfAsArray() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $block = $layout->createBlock('Magento\Payment\Block\Info', 'block'); /** @var $paymentInfoBank \Magento\Payment\Model\Info */ @@ -53,7 +55,7 @@ public function testGetChildPdfAsArray() $childBank->setInfo($paymentInfoBank); $nonExpectedHtml = 'non-expected html'; - $childHtml = $layout->addBlock('Magento\View\Element\Text', 'child.html', 'block'); + $childHtml = $layout->addBlock('Magento\Framework\View\Element\Text', 'child.html', 'block'); $childHtml->setText($nonExpectedHtml); /** @var $paymentInfoCheckmo \Magento\Payment\Model\Info */ diff --git a/dev/tests/integration/testsuite/Magento/Payment/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Payment/Model/Config/ReaderTest.php index 0a93edd942e8d..cae05b339d6c1 100644 --- a/dev/tests/integration/testsuite/Magento/Payment/Model/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Payment/Model/Config/ReaderTest.php @@ -32,7 +32,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase */ protected $_model; - /** @var \Magento\Config\FileResolverInterface/PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Config\FileResolverInterface/PHPUnit_Framework_MockObject_MockObject */ protected $_fileResolverMock; public function setUp() @@ -42,7 +42,7 @@ public function setUp() $cache = $objectManager->create('Magento\Framework\App\Cache'); $cache->clean(); $this->_fileResolverMock = $this->getMockBuilder( - 'Magento\Config\FileResolverInterface' + 'Magento\Framework\Config\FileResolverInterface' )->disableOriginalConstructor()->getMock(); $this->_model = $objectManager->create( 'Magento\Payment\Model\Config\Reader', diff --git a/dev/tests/integration/testsuite/Magento/Payment/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Payment/Model/ConfigTest.php index 0d15e90650b1e..0d47046d2ef3e 100644 --- a/dev/tests/integration/testsuite/Magento/Payment/Model/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Payment/Model/ConfigTest.php @@ -42,7 +42,7 @@ protected function setUp() $cache = $objectManager->create('Magento\Framework\App\Cache'); $cache->clean(); $fileResolverMock = $this->getMockBuilder( - 'Magento\Config\FileResolverInterface' + 'Magento\Framework\Config\FileResolverInterface' )->disableOriginalConstructor()->getMock(); $fileList = array( file_get_contents(__DIR__ . '/_files/payment.xml'), diff --git a/dev/tests/integration/testsuite/Magento/Payment/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Payment/Model/ObserverTest.php index 8136b871bc927..e06c79ac2665a 100644 --- a/dev/tests/integration/testsuite/Magento/Payment/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Payment/Model/ObserverTest.php @@ -32,7 +32,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Event\Observer + * @var \Magento\Framework\Event\Observer */ protected $_eventObserver; @@ -145,13 +145,14 @@ public function testUpdateOrderStatusForPaymentMethods() /** * Create event observer * - * @return \Magento\Event\Observer + * @return \Magento\Framework\Event\Observer */ protected function _createEventObserver() { $data = array('status' => 'custom_new_status', 'state' => \Magento\Sales\Model\Order::STATE_NEW); - $event = $this->_objectManager->create('Magento\Event', array('data' => $data)); - return $this->_objectManager->create('Magento\Event\Observer', array('data' => array('event' => $event))); + $event = $this->_objectManager->create('Magento\Framework\Event', array('data' => $data)); + return $this->_objectManager + ->create('Magento\Framework\Event\Observer', array('data' => array('event' => $event))); } /** diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php index 33c420a58005e..016466f7a631c 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php @@ -42,7 +42,7 @@ public function testFetchAction() $this->dispatch('backend/paypal/paypal_reports/fetch'); $this->assertSessionMessages( $this->equalTo(array("We couldn't fetch reports from 'login@127.0.0.1'.")), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } } diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Block/Billing/Agreement/ViewTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Block/Billing/Agreement/ViewTest.php index a86a739900a5b..11ffa7834f8c6 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Block/Billing/Agreement/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Block/Billing/Agreement/ViewTest.php @@ -86,7 +86,7 @@ public function testGetRelatedOrders() $billingAgreement = $billingAgreementCollection->getFirstItem(); $billingAgreement->addOrderRelation($orderA->getId())->save(); - $registry = Bootstrap::getObjectManager()->get('Magento\Registry'); + $registry = Bootstrap::getObjectManager()->get('Magento\Framework\Registry'); $registry->register('current_billing_agreement', $billingAgreement); $relatedOrders = $this->_block->getRelatedOrders(); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Block/Express/ReviewTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Block/Express/ReviewTest.php index ac531f1f6f5f7..446cf64e1fe2d 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Block/Express/ReviewTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Block/Express/ReviewTest.php @@ -41,7 +41,7 @@ public function testRenderAddress() $quote->load('test01', 'reserved_order_id'); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Paypal\Block\Express\Review' ); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Block/Payment/Form/Billing/AgreementTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Block/Payment/Form/Billing/AgreementTest.php index 05de804bb8718..0a6dad9a68e4c 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Block/Payment/Form/Billing/AgreementTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Block/Payment/Form/Billing/AgreementTest.php @@ -35,14 +35,16 @@ protected function setUp() $quote = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Sales\Model\Resource\Quote\Collection' )->getFirstItem(); - /** @var \Magento\View\LayoutInterface $layout */ - $layout = $this->getMockBuilder('Magento\View\LayoutInterface')->disableOriginalConstructor()->getMock(); + /** @var \Magento\Framework\View\LayoutInterface $layout */ + $layout = $this->getMockBuilder('Magento\Framework\View\LayoutInterface') + ->disableOriginalConstructor() + ->getMock(); $layout->expects( $this->once() )->method( 'getBlock' )->will( - $this->returnValue(new \Magento\Object(array('quote' => $quote))) + $this->returnValue(new \Magento\Framework\Object(array('quote' => $quote))) ); $layout->expects($this->once())->method('getParentName')->will($this->returnValue('billing_agreement_form')); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php index 1587a03b3652d..e30bec53b2e58 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Controller/Billing/AgreementTest.php @@ -64,7 +64,7 @@ public function testReturnWizardAction() * Disable billing agreement placement using calls to remote system * in \Magento\Paypal\Model\Billing\Agreement::place() */ - $objectManagerMock = $this->getMockForAbstractClass('Magento\ObjectManager', [], '', false); + $objectManagerMock = $this->getMockForAbstractClass('Magento\Framework\ObjectManager', [], '', false); $paymentMethodMock = $this->getMock( 'Magento\Paypal\Model\Express', ['getTitle', 'setStore', 'placeBillingAgreement'], diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Controller/ExpressTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Controller/ExpressTest.php index 354bb26a6f49f..69a1f852b54aa 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Controller/ExpressTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Controller/ExpressTest.php @@ -67,8 +67,8 @@ public function testCancelAction() )->setQuoteId( $order->getQuoteId() ); - /** @var $paypalSession \Magento\Session\Generic */ - $paypalSession = $this->_objectManager->get('Magento\Session\Generic'); + /** @var $paypalSession \Magento\Framework\Session\Generic */ + $paypalSession = $this->_objectManager->get('Magento\Framework\Session\Generic'); $paypalSession->setExpressCheckoutToken('token'); $this->dispatch('paypal/express/cancel'); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php index f98f80b064bc7..90b5bc8a0cb21 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php @@ -31,7 +31,7 @@ class CheckoutTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $_objectManager; protected function setUp() @@ -133,15 +133,15 @@ public function testPrepareNewCustomerQuoteConfirmationRequired() $this->assertEquals('user@example.com', $customer->getEmail()); $this->assertEquals('11111111', $customerDetails->getAddresses()[0]->getTelephone()); - /** @var \Magento\Message\ManagerInterface $messageManager */ - $messageManager = $this->_objectManager->get('\Magento\Message\ManagerInterface'); + /** @var \Magento\Framework\Message\ManagerInterface $messageManager */ + $messageManager = $this->_objectManager->get('\Magento\Framework\Message\ManagerInterface'); $confirmationText = sprintf( 'customer/account/confirmation/email/%s/key/', $customerDetails->getCustomer()->getEmail() ); - /** @var \Magento\Message\MessageInterface $message */ + /** @var \Magento\Framework\Message\MessageInterface $message */ $message = $messageManager->getMessages()->getLastAddedMessage(); - $this->assertInstanceOf('\Magento\Message\MessageInterface', $message); + $this->assertInstanceOf('\Magento\Framework\Message\MessageInterface', $message); $this->assertTrue( strpos($message->getText(), $confirmationText) !== false ); @@ -167,7 +167,10 @@ public function testPlaceGuestQuote() $this->assertNull($quote->getCustomerId()); $this->assertTrue($quote->getCustomerIsGuest()); - $this->assertEquals(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID, $quote->getCustomerGroupId()); + $this->assertEquals( + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID, + $quote->getCustomerGroupId() + ); $this->assertNotEmpty($quote->getBillingAddress()); $this->assertNotEmpty($quote->getShippingAddress()); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/IpnTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Model/IpnTest.php index 9948924aa64ea..d018ccaa711b7 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/IpnTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/IpnTest.php @@ -32,7 +32,7 @@ class IpnTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -118,12 +118,12 @@ public static function currencyProvider() /** * Mocked HTTP adapter to get VERIFIED PayPal IPN postback result * - * @return \Magento\HTTP\Adapter\Curl + * @return \Magento\Framework\HTTP\Adapter\Curl */ protected function _createMockedHttpAdapter() { - $factory = $this->getMock('Magento\HTTP\Adapter\CurlFactory', array('create'), array(), '', false); - $adapter = $this->getMock('Magento\HTTP\Adapter\Curl', array('read', 'write'), array(), '', false); + $factory = $this->getMock('Magento\Framework\HTTP\Adapter\CurlFactory', array('create'), array(), '', false); + $adapter = $this->getMock('Magento\Framework\HTTP\Adapter\Curl', array('read', 'write'), array(), '', false); $adapter->expects($this->once())->method('read')->with()->will($this->returnValue("\nVERIFIED")); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/Report/SettlementTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Model/Report/SettlementTest.php index 32f042b51ff8a..ab5945db58ec3 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/Report/SettlementTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/Report/SettlementTest.php @@ -34,7 +34,7 @@ public function testFetchAndSave() $model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Paypal\Model\Report\Settlement' ); - $connection = $this->getMock('Magento\Io\Sftp', array('rawls', 'read'), array(), '', false); + $connection = $this->getMock('Magento\Framework\Io\Sftp', array('rawls', 'read'), array(), '', false); $filename = 'STL-00000000.00.abc.CSV'; $connection->expects($this->once())->method('rawls')->will($this->returnValue(array($filename => array()))); $connection->expects($this->once())->method('read')->with($filename, $this->anything()); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php index a601ddf7bd988..38ac073e00374 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/VoidTest.php @@ -35,17 +35,17 @@ class VoidTest extends \PHPUnit_Framework_TestCase public function testPayflowProVoid() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $eventManager = $objectManager->get('Magento\Event\ManagerInterface'); - $moduleList = $objectManager->get('Magento\Module\ModuleListInterface'); + $eventManager = $objectManager->get('Magento\Framework\Event\ManagerInterface'); + $moduleList = $objectManager->get('Magento\Framework\Module\ModuleListInterface'); $paymentData = $objectManager->get('Magento\Payment\Helper\Data'); $scopeConfig = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface'); - $logger = $objectManager->get('Magento\Logger'); - $logAdapterFactory = $objectManager->get('Magento\Logger\AdapterFactory'); - $localeDate = $objectManager->get('Magento\Stdlib\DateTime\TimezoneInterface'); + $logger = $objectManager->get('Magento\Framework\Logger'); + $logAdapterFactory = $objectManager->get('Magento\Framework\Logger\AdapterFactory'); + $localeDate = $objectManager->get('Magento\Framework\Stdlib\DateTime\TimezoneInterface'); $centinelService = $objectManager->get('Magento\Centinel\Model\Service'); $storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface'); $configFactory = $objectManager->get('Magento\Paypal\Model\ConfigFactory'); - $mathRandom = $objectManager->get('Magento\Math\Random'); + $mathRandom = $objectManager->get('Magento\Framework\Math\Random'); /** @var $order \Magento\Sales\Model\Order */ $order = $objectManager->create('Magento\Sales\Model\Order'); @@ -71,7 +71,7 @@ public function testPayflowProVoid() ) ); - $response = new \Magento\Object( + $response = new \Magento\Framework\Object( array( 'result' => '0', 'pnref' => 'V19A3D27B61E', @@ -86,7 +86,7 @@ public function testPayflowProVoid() $instance->expects($this->any())->method('_postRequest')->will($this->returnValue($response)); $payment->setMethodInstance($instance); - $payment->void(new \Magento\Object()); + $payment->void(new \Magento\Framework\Object()); $order->save(); $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Sales\Model\Order'); diff --git a/dev/tests/integration/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php b/dev/tests/integration/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php new file mode 100644 index 0000000000000..bfb4b902b3595 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Persistent/Block/Header/AdditionalTest.php @@ -0,0 +1,102 @@ +_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + + /** @var \Magento\Persistent\Helper\Session $persistentSessionHelper */ + $this->_persistentSessionHelper = $this->_objectManager->create('Magento\Persistent\Helper\Session'); + + $this->_customerSession = $this->_objectManager->get('Magento\Customer\Model\Session'); + + $this->_block = $this->_objectManager->create('Magento\Persistent\Block\Header\Additional'); + } + + /** + * @magentoConfigFixture current_store persistent/options/customer 1 + * @magentoConfigFixture current_store persistent/options/enabled 1 + * @magentoConfigFixture current_store persistent/options/remember_enabled 1 + * @magentoConfigFixture current_store persistent/options/remember_default 1 + * @magentoAppArea frontend + * @magentoAppIsolation enabled + */ + public function testToHtml() + { + $this->_customerSession->loginById(1); + /** @var \Magento\Customer\Helper\View $customerViewHelper */ + $customerViewHelper = $this->_objectManager->create( + 'Magento\Customer\Helper\View' + ); + $customerAccountService = $this->_objectManager->create( + 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' + ); + /** @var \Magento\Framework\Escaper $escaper */ + $escaper = $this->_objectManager->create( + 'Magento\Framework\Escaper' + ); + $persistentName = $escaper->escapeHtml( + $customerViewHelper->getCustomerName( + $customerAccountService->getCustomer( + $this->_persistentSessionHelper->getSession()->getCustomerId() + ) + ) + ); + + $translation = __('(Not %1?)', $persistentName); + + $this->assertStringMatchesFormat( + '%A%A_block->getHref() . '"%A>' . $translation . '%A%A', + $this->_block->toHtml() + ); + $this->_customerSession->logout(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Persistent/Model/Observer/SessionTest.php b/dev/tests/integration/testsuite/Magento/Persistent/Model/Observer/SessionTest.php index ac698b5c88e9f..ad653d0a789c4 100644 --- a/dev/tests/integration/testsuite/Magento/Persistent/Model/Observer/SessionTest.php +++ b/dev/tests/integration/testsuite/Magento/Persistent/Model/Observer/SessionTest.php @@ -34,7 +34,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -44,7 +44,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase protected $_persistentSession; /** - * @var \Magento\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject */ protected $_cookieMock; @@ -57,7 +57,7 @@ public function setUp() { $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_persistentSession = $this->_objectManager->get('Magento\Persistent\Helper\Session'); - $this->_cookieMock = $this->getMock('Magento\Stdlib\Cookie', array('set'), array(), '', false); + $this->_cookieMock = $this->getMock('Magento\Framework\Stdlib\Cookie', array('set'), array(), '', false); $this->_customerSession = $this->_objectManager->get('Magento\Customer\Model\Session'); $this->_model = $this->_objectManager->create( 'Magento\Persistent\Model\Observer\Session', @@ -74,11 +74,16 @@ public function setUp() */ public function testSynchronizePersistentOnLogin() { - $event = new \Magento\Event(); - $observer = new \Magento\Event\Observer(array('event' => $event)); + $event = new \Magento\Framework\Event(); + $observer = new \Magento\Framework\Event\Observer(array('event' => $event)); - /** @var $customer \Magento\Customer\Model\Customer */ - $customer = $this->_objectManager->create('Magento\Customer\Model\Customer')->load(1); + /** @var \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService */ + $customerAccountService = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' + ); + + /** @var $customer \Magento\Customer\Service\V1\Data\Customer */ + $customer = $customerAccountService->getCustomer(1); $event->setData('customer', $customer); $this->_persistentSession->setRememberMeChecked(true); $this->_cookieMock->expects( @@ -92,5 +97,41 @@ public function testSynchronizePersistentOnLogin() $this->_customerSession->getCookiePath() ); $this->_model->synchronizePersistentOnLogin($observer); + + // check that persistent session has been stored for Customer + /** @var \Magento\Persistent\Model\Session $sessionModel */ + $sessionModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Persistent\Model\Session' + ); + $sessionModel->loadByCustomerId(1); + $this->assertEquals(1, $sessionModel->getCustomerId()); + } + + /** + * @magentoConfigFixture current_store persistent/options/enabled 1 + * @magentoConfigFixture current_store persistent/options/logout_clear 1 + * @magentoAppArea frontend + * @magentoAppIsolation enabled + */ + public function testSynchronizePersistentOnLogout() + { + $this->_customerSession->loginById(1); + + // check that persistent session has been stored for Customer + /** @var \Magento\Persistent\Model\Session $sessionModel */ + $sessionModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Persistent\Model\Session' + ); + $sessionModel->loadByCookieKey(); + $this->assertEquals(1, $sessionModel->getCustomerId()); + + $this->_customerSession->logout(); + + /** @var \Magento\Persistent\Model\Session $sessionModel */ + $sessionModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Persistent\Model\Session' + ); + $sessionModel->loadByCookieKey(); + $this->assertNull($sessionModel->getCustomerId()); } } diff --git a/dev/tests/integration/testsuite/Magento/Persistent/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Persistent/Model/ObserverTest.php new file mode 100644 index 0000000000000..229dcb454807d --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Persistent/Model/ObserverTest.php @@ -0,0 +1,206 @@ +_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + + $this->_customerSession = $this->_objectManager->get('Magento\Customer\Model\Session'); + + $this->_customerViewHelper = $this->_objectManager->create( + 'Magento\Customer\Helper\View' + ); + $this->_escaper = $this->_objectManager->create( + 'Magento\Framework\Escaper' + ); + $this->_customerAccountService = $this->_objectManager->create( + 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' + ); + + $this->_checkoutSession = $this->getMockBuilder( + 'Magento\Checkout\Model\Session' + )->disableOriginalConstructor()->setMethods([])->getMock(); + + $this->_persistentSessionHelper = $this->_objectManager->create('Magento\Persistent\Helper\Session'); + + $this->_observer = $this->_objectManager->create( + 'Magento\Persistent\Model\Observer', + [ + 'escaper' => $this->_escaper, + 'customerViewHelper' => $this->_customerViewHelper, + 'customerAccountService' => $this->_customerAccountService, + 'checkoutSession' => $this->_checkoutSession + ] + ); + } + + /** + * @magentoConfigFixture current_store persistent/options/enabled 1 + * @magentoConfigFixture current_store persistent/options/remember_enabled 1 + * @magentoConfigFixture current_store persistent/options/remember_default 1 + * @magentoAppArea frontend + * @magentoAppIsolation enabled + */ + public function testEmulateWelcomeBlock() + { + $this->_customerSession->loginById(1); + + $httpContext = new \Magento\Framework\App\Http\Context(); + $httpContext->setValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH, 1, 1); + $block = $this->_objectManager->create( + 'Magento\Sales\Block\Reorder\Sidebar', + [ + 'httpContext' => $httpContext + ] + ); + $this->_observer->emulateWelcomeBlock($block); + $customerName = $this->_escaper->escapeHtml( + $this->_customerViewHelper->getCustomerName( + $this->_customerAccountService->getCustomer( + $this->_persistentSessionHelper->getSession()->getCustomerId() + ) + ) + ); + $translation = __('Welcome, %1!', $customerName); + $this->assertStringMatchesFormat('%A' . $translation . '%A', $block->getWelcome()); + $this->_customerSession->logout(); + } + + /** + * @magentoConfigFixture current_store persistent/options/enabled 1 + * @magentoConfigFixture current_store persistent/options/remember_enabled 1 + * @magentoConfigFixture current_store persistent/options/remember_default 1 + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoConfigFixture current_store persistent/options/shopping_cart 1 + * @magentoConfigFixture current_store persistent/options/logout_clear 0 + */ + public function testEmulateQuote() + { + $requestMock = $this->getMockBuilder( + 'Magento\Framework\App\Request\Http' + )->disableOriginalConstructor()->setMethods( + [] + )->getMock(); + $requestMock->expects($this->once())->method('getFullActionName')->will($this->returnValue('valid_action')); + $event = new \Magento\Framework\Event( + [ + 'request' => $requestMock + ] + ); + $observer = new \Magento\Framework\Event\Observer(); + $observer->setEvent($event); + + $this->_customerSession->loginById(1); + + $customer = $this->_customerAccountService->getCustomer( + $this->_persistentSessionHelper->getSession()->getCustomerId() + ); + $this->_checkoutSession->expects($this->once())->method('setCustomerData')->with($customer); + $this->_customerSession->logout(); + + $this->_observer->emulateQuote($observer); + } + + /** + * @magentoAppArea frontend + * @magentoAppIsolation enabled + * @magentoConfigFixture current_store persistent/options/shopping_cart 1 + * @magentoConfigFixture current_store persistent/options/logout_clear 0 + * @magentoConfigFixture current_store persistent/options/enabled 1 + */ + public function testEmulateCustomer() + { + $observer = new \Magento\Framework\Event\Observer(); + + $this->_customerSession->loginById(1); + $this->_customerSession->logout(); + $this->assertNull($this->_customerSession->getCustomerId()); + $this->assertEquals( + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID, + $this->_customerSession->getCustomerGroupId() + ); + + $this->_observer->emulateCustomer($observer); + $customer = $this->_customerAccountService->getCustomer( + $this->_persistentSessionHelper->getSession()->getCustomerId() + ); + $this->assertEquals( + $customer->getId(), + $this->_customerSession->getCustomerId() + ); + $this->assertEquals( + $customer->getGroupId(), + $this->_customerSession->getCustomerGroupId() + ); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php index 1e264cd909eb4..4f1421d9dca98 100644 --- a/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php @@ -32,7 +32,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase */ protected $_model; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $_objectManager; public function setUp() diff --git a/dev/tests/unit/testsuite/Magento/Validator/Test/Alnum.php b/dev/tests/integration/testsuite/Magento/Persistent/_files/persistent.php similarity index 73% rename from dev/tests/unit/testsuite/Magento/Validator/Test/Alnum.php rename to dev/tests/integration/testsuite/Magento/Persistent/_files/persistent.php index 602fe9fddbd5f..6a36061ce5ebe 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/Test/Alnum.php +++ b/dev/tests/integration/testsuite/Magento/Persistent/_files/persistent.php @@ -18,18 +18,14 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Alphanumerical test validator - */ -namespace Magento\Validator\Test; +require __DIR__ . '/../../../Magento/Customer/_files/customer.php'; -class Alnum extends \Zend_Validate_Alnum implements \Magento\Validator\ValidatorInterface -{ -} +/** @var \Magento\Persistent\Model\Session $persistentSession */ +$persistentSession = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Persistent\Model\Session' +); +$persistentSession->setCustomerId($customer->getId())->save(); diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php index cbd299281a7fb..ca6b6334bebc0 100644 --- a/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Block/Email/StockTest.php @@ -36,7 +36,7 @@ class StockTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\ProductAlert\Block\Email\Stock' ); @@ -47,7 +47,7 @@ protected function setUp() */ public function testThumbnail() { - \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Product'); $product->load(1); diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php new file mode 100644 index 0000000000000..fe021c4b2a201 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php @@ -0,0 +1,107 @@ +_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->_customerAccountService = $this->_objectManager->create( + 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' + ); + $this->_customerViewHelper = $this->_objectManager->create('Magento\Customer\Helper\View'); + } + + /** + * @magentoDataFixture Magento/Customer/_files/customer.php + * @magentoDataFixture Magento/Catalog/_files/product_simple.php + */ + public function testSend() + { + $this->_objectManager->configure( + [ + 'Magento\ProductAlert\Model\Email' => [ + 'arguments' => [ + 'transportBuilder' => [ + 'instance' => 'Magento\TestFramework\Mail\Template\TransportBuilderMock' + ] + ] + ], + 'preferences' => [ + 'Magento\Framework\Mail\TransportInterface' => 'Magento\TestFramework\Mail\TransportInterfaceMock' + ] + ] + ); + \Magento\TestFramework\Helper\Bootstrap::getInstance() + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); + + $this->_emailModel = $this->_objectManager->create('Magento\ProductAlert\Model\Email'); + + /** @var \Magento\Store\Model\Website $website */ + $website = $this->_objectManager->create('Magento\Store\Model\Website'); + $website->load(1); + $this->_emailModel->setWebsite($website); + + /** @var \Magento\Customer\Service\V1\Data\Customer $customer */ + $customer = $this->_customerAccountService->getCustomer(1); + $this->_emailModel->setCustomerData($customer); + + /** @var \Magento\Catalog\Model\Product $product */ + $product = $this->_objectManager->create('Magento\Catalog\Model\Product'); + $product->load(1); + + $this->_emailModel->addPriceProduct($product); + + $this->_emailModel->send(); + + /** @var \Magento\TestFramework\Mail\Template\TransportBuilderMock $transportBuilder */ + $transportBuilder = $this->_objectManager->get('Magento\TestFramework\Mail\Template\TransportBuilderMock'); + $this->assertStringMatchesFormat( + '%AHello ' . $this->_customerViewHelper->getCustomerName($customer) . '%A', + $transportBuilder->getSentMessage()->getBodyHtml()->getContent() + ); + } +} diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php new file mode 100644 index 0000000000000..2f09ab699c352 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php @@ -0,0 +1,103 @@ +_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->_customerSession = $this->_objectManager->get( + 'Magento\Customer\Model\Session' + ); + $service = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + 'Magento\Customer\Service\V1\CustomerAccountService' + ); + $customer = $service->authenticate('customer@example.com', 'password'); + $this->_customerSession->setCustomerDataAsLoggedIn($customer); + $this->_customerViewHelper = $this->_objectManager->create('Magento\Customer\Helper\View'); + } + + /** + * @magentoConfigFixture current_store catalog/productalert/allow_price 1 + * + * @magentoDataFixture Magento/ProductAlert/_files/product_alert.php + */ + public function testProcess() + { + $this->_objectManager->configure( + [ + 'Magento\ProductAlert\Model\Observer' => [ + 'arguments' => [ + 'transportBuilder' => [ + 'instance' => 'Magento\TestFramework\Mail\Template\TransportBuilderMock' + ] + ] + ], + 'Magento\ProductAlert\Model\Email' => [ + 'arguments' => [ + 'transportBuilder' => [ + 'instance' => 'Magento\TestFramework\Mail\Template\TransportBuilderMock' + ] + ] + ], + 'preferences' => [ + 'Magento\Framework\Mail\TransportInterface' => 'Magento\TestFramework\Mail\TransportInterfaceMock', + 'Magento\TestFramework\Mail\Template\TransportBuilder' => + 'Magento\TestFramework\Mail\Template\TransportBuilderMock' + ] + ] + ); + \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); + $observer = $this->_objectManager->get('Magento\ProductAlert\Model\Observer'); + $observer->process(); + + /** @var \Magento\TestFramework\Mail\Template\TransportBuilderMock $transportBuilder */ + $transportBuilder = $this->_objectManager->get('Magento\TestFramework\Mail\Template\TransportBuilderMock'); + + $this->assertStringMatchesFormat( + '%AHello %A' + . $this->_customerViewHelper->getCustomerName($this->_customerSession->getCustomerDataObject()) . ',%A', + $transportBuilder->getSentMessage()->getBodyHtml()->getContent() + ); + } +} diff --git a/app/code/Magento/Store/Model/Website/Factory.php b/dev/tests/integration/testsuite/Magento/ProductAlert/_files/product_alert.php similarity index 58% rename from app/code/Magento/Store/Model/Website/Factory.php rename to dev/tests/integration/testsuite/Magento/ProductAlert/_files/product_alert.php index 51211f78ce18c..bbd79a8a74693 100644 --- a/app/code/Magento/Store/Model/Website/Factory.php +++ b/dev/tests/integration/testsuite/Magento/ProductAlert/_files/product_alert.php @@ -22,34 +22,27 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Website factory - */ -namespace Magento\Store\Model\Website; - -class Factory -{ - /** - * Object Manager - * - * @var \Magento\ObjectManager - */ - protected $_objectManager; +require __DIR__ . '/../../../Magento/Customer/_files/customer.php'; +require __DIR__ . '/../../../Magento/Catalog/_files/product_simple.php'; - /** - * @param \Magento\ObjectManager $objectManager - */ - public function __construct(\Magento\ObjectManager $objectManager) - { - $this->_objectManager = $objectManager; - } +$price = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\ProductAlert\Model\Price'); +$price->setCustomerId( + $customer->getId() +)->setProductId( + $product->getId() +)->setPrice( + $product->getPrice()+1 +)->setWebsiteId( + 1 +); +$price->save(); - /** - * @param array $data - * @return \Magento\Store\Model\Website - */ - public function create(array $data = array()) - { - return $this->_objectManager->create('Magento\Store\Model\Website', $data); - } -} +$stock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\ProductAlert\Model\Stock'); +$stock->setCustomerId( + $customer->getId() +)->setProductId( + $product->getId() +)->setWebsiteId( + 1 +); +$stock->save(); diff --git a/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Catalog/Product/View/PaymentTest.php b/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Catalog/Product/View/PaymentTest.php index b51af313203c9..1b2d1240981f3 100644 --- a/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Catalog/Product/View/PaymentTest.php +++ b/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Catalog/Product/View/PaymentTest.php @@ -42,21 +42,21 @@ public function testGetDateHtml() $product = $objectManager->create('Magento\Catalog\Model\Product'); $product->setIsRecurring('1'); $product->setRecurringPayment(array('start_date_is_editable' => true)); - $objectManager->get('Magento\Registry')->register('current_product', $product); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product); $block = $objectManager->create('Magento\RecurringPayment\Block\Catalog\Product\View\Payment'); - $block->setLayout($objectManager->create('Magento\View\Layout')); + $block->setLayout($objectManager->create('Magento\Framework\View\Layout')); $html = $block->getDateHtml(); $this->assertNotEmpty($html); $dateFormat = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Stdlib\DateTime\TimezoneInterface' + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' )->getDateFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT ); $timeFormat = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Stdlib\DateTime\TimezoneInterface' + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' )->getTimeFormat( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT ); $this->assertContains('dateFormat: "' . $dateFormat . '",', $html); $this->assertContains('timeFormat: "' . $timeFormat . '",', $html); diff --git a/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Payment/ViewTest.php b/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Payment/ViewTest.php index afc0409e7dab8..00b9237abf339 100644 --- a/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Payment/ViewTest.php +++ b/dev/tests/integration/testsuite/Magento/RecurringPayment/Block/Payment/ViewTest.php @@ -34,7 +34,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase protected $_block; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -50,10 +50,10 @@ protected function setUp() ); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_recurring_payment', $this->_payment); + $objectManager->get('Magento\Framework\Registry')->register('current_recurring_payment', $this->_payment); $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); $this->_block = $this->_layout->createBlock('Magento\RecurringPayment\Block\Payment\View', 'block'); } @@ -62,7 +62,7 @@ protected function tearDown() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('current_recurring_payment'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_recurring_payment'); $this->_payment = null; $this->_block = null; $this->_layout = null; @@ -73,9 +73,9 @@ public function testToHtmlPropagatesUrl() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); $this->_block->setShouldPrepareInfoTabs(true); - $childOne = $this->_layout->addBlock('Magento\View\Element\Text', 'child1', 'block'); + $childOne = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'child1', 'block'); $this->_layout->addToParentGroup('child1', 'info_tabs'); - $childTwo = $this->_layout->addBlock('Magento\View\Element\Text', 'child2', 'block'); + $childTwo = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'child2', 'block'); $this->_layout->addToParentGroup('child2', 'info_tabs'); $this->assertEmpty($childOne->getViewUrl()); diff --git a/dev/tests/integration/testsuite/Magento/RecurringPayment/Controller/RecurringPaymentTest.php b/dev/tests/integration/testsuite/Magento/RecurringPayment/Controller/RecurringPaymentTest.php index 7a711a944c1f1..71d5b1f637573 100644 --- a/dev/tests/integration/testsuite/Magento/RecurringPayment/Controller/RecurringPaymentTest.php +++ b/dev/tests/integration/testsuite/Magento/RecurringPayment/Controller/RecurringPaymentTest.php @@ -47,7 +47,7 @@ public function testPaymentsGridNoPayments() $customerSession = $objectManager->get('Magento\Customer\Model\Session'); $customerId = 1; $customerSession->setCustomerId($customerId); - $coreRegistry = $objectManager->get('Magento\Registry'); + $coreRegistry = $objectManager->get('Magento\Framework\Registry'); $this->assertNotEquals( $customerId, $coreRegistry->registry(\Magento\Customer\Controller\RegistryConstants::CURRENT_CUSTOMER_ID), diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Filter/FormTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Filter/FormTest.php index 5f0a90959511b..c6bdb77798cef 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Filter/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Filter/FormTest.php @@ -38,11 +38,11 @@ class FormTest extends \PHPUnit_Framework_TestCase public function testPrepareForm() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->setDefaultDesignTheme(); - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\View\Layout'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Framework\View\Layout'); $block = $layout->addBlock('Magento\Reports\Block\Adminhtml\Filter\Form'); $prepareFormMethod = new \ReflectionMethod('Magento\Reports\Block\Adminhtml\Filter\Form', '_prepareForm'); $prepareFormMethod->setAccessible(true); diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/GridTest.php index a42a4af7d67cc..47272b38479c9 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Bestsellers/GridTest.php @@ -40,7 +40,7 @@ protected function setUp() { parent::setUp(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Reports\Block\Adminhtml\Sales\Bestsellers\Grid' ); diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Coupons/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Coupons/GridTest.php index 1a4c415dc5427..d7791aaebd59b 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Coupons/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Coupons/GridTest.php @@ -40,12 +40,12 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function _createBlock($reportType = null) { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Reports\Block\Adminhtml\Sales\Coupons\Grid' ); - $filterData = new \Magento\Object(); + $filterData = new \Magento\Framework\Object(); if ($reportType) { $filterData->setReportType($reportType); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Invoiced/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Invoiced/GridTest.php index 8a8fe9772aa69..9801da2d4a4ef 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Invoiced/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Invoiced/GridTest.php @@ -40,12 +40,12 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function _createBlock($reportType = null) { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Reports\Block\Adminhtml\Sales\Invoiced\Grid' ); - $filterData = new \Magento\Object(); + $filterData = new \Magento\Framework\Object(); if ($reportType) { $filterData->setReportType($reportType); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Refunded/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Refunded/GridTest.php index 1ab8c71c5cd95..2407a32e9e666 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Refunded/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Refunded/GridTest.php @@ -40,12 +40,12 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function _createBlock($reportType = null) { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Reports\Block\Adminhtml\Sales\Refunded\Grid' ); - $filterData = new \Magento\Object(); + $filterData = new \Magento\Framework\Object(); if ($reportType) { $filterData->setReportType($reportType); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Sales/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Sales/GridTest.php index 80c984cdf6771..f144860580cfb 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Sales/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Sales/GridTest.php @@ -40,12 +40,12 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function _createBlock($reportType = null) { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Reports\Block\Adminhtml\Sales\Sales\Grid' ); - $filterData = new \Magento\Object(); + $filterData = new \Magento\Framework\Object(); if ($reportType) { $filterData->setReportType($reportType); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Shipping/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Shipping/GridTest.php index a4ecaae58c09d..e89eaa7a8d4f9 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Shipping/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Shipping/GridTest.php @@ -40,12 +40,12 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function _createBlock($reportType = null) { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Reports\Block\Adminhtml\Sales\Shipping\Grid' ); - $filterData = new \Magento\Object(); + $filterData = new \Magento\Framework\Object(); if ($reportType) { $filterData->setReportType($reportType); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Tax/GridTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Tax/GridTest.php index a03251273760a..d5a975671c16c 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Tax/GridTest.php +++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Sales/Tax/GridTest.php @@ -40,12 +40,12 @@ class GridTest extends \PHPUnit_Framework_TestCase protected function _createBlock($reportType = null) { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Reports\Block\Adminhtml\Sales\Tax\Grid' ); - $filterData = new \Magento\Object(); + $filterData = new \Magento\Framework\Object(); if ($reportType) { $filterData->setReportType($reportType); } diff --git a/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php b/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php index f818a4325cbbd..5a5677bb45719 100644 --- a/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php +++ b/dev/tests/integration/testsuite/Magento/Reports/_files/viewed_products.php @@ -24,7 +24,7 @@ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea('adminhtml') - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); require __DIR__ . '/../../../Magento/Catalog/_files/product_simple.php'; require __DIR__ . '/../../../Magento/Catalog/_files/product_simple_duplicated.php'; @@ -37,8 +37,14 @@ ); foreach (array(1, 2, 1, 21, 1, 21) as $productId) { $reportObserver->catalogProductView( - new \Magento\Event\Observer( - array('event' => new \Magento\Object(array('product' => new \Magento\Object(array('id' => $productId))))) + new \Magento\Framework\Event\Observer( + array( + 'event' => new \Magento\Framework\Object( + array( + 'product' => new \Magento\Framework\Object(array('id' => $productId)) + ) + ) + ) ) ); } diff --git a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php index af89aac89ffc9..9d3de6af673b6 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/FormTest.php @@ -38,9 +38,9 @@ public function testCustomerOnForm() ->loadByEmail('customer@example.com'); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Review\Block\Adminhtml\Edit\Form'); - /** @var \Magento\Escaper $escaper */ + /** @var \Magento\Framework\Escaper $escaper */ $escaper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Escaper'); + ->get('Magento\Framework\Escaper'); $this->assertStringMatchesFormat( '%A' . __('%2 %3 (%4)', '%A', diff --git a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/Tab/FormTest.php b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/Tab/FormTest.php index cedc9f4ebe143..0ba603ff9b62a 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/Tab/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/Edit/Tab/FormTest.php @@ -33,7 +33,7 @@ public function testConstruct() $this->assertInstanceOf( 'Magento\Review\Block\Adminhtml\Rating\Edit\Tab\Form', \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Review\Block\Adminhtml\Rating\Edit\Tab\Form' ) diff --git a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/MainTest.php b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/MainTest.php index 65f50812f338b..7874aa6b2c5a8 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/MainTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/Adminhtml/MainTest.php @@ -38,13 +38,13 @@ public function testConstruct() $customer = $service->authenticate('customer@example.com', 'password'); $request = $objectManager->get('Magento\Framework\App\RequestInterface'); $request->setParam('customerId', $customer->getId()); - /** @var \Magento\View\LayoutInterface $layout */ - $layout = $objectManager->get('Magento\View\LayoutInterface'); + /** @var \Magento\Framework\View\LayoutInterface $layout */ + $layout = $objectManager->get('Magento\Framework\View\LayoutInterface'); $block = $layout->createBlock('Magento\Review\Block\Adminhtml\Main'); $customerName = $customer->getFirstname() . ' ' . $customer->getLastname(); - /** @var \Magento\Escaper $escaper */ + /** @var \Magento\Framework\Escaper $escaper */ $escaper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Escaper'); + ->get('Magento\Framework\Escaper'); $this->assertStringMatchesFormat( '%A' . __('All Reviews of Customer `%1`', $escaper->escapeHtml($customerName)) . '%A', $block->getHeaderHtml() diff --git a/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php b/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php index e43088ec2b2ad..d2e6874ca2af0 100644 --- a/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Review/Block/FormTest.php @@ -39,9 +39,9 @@ public function testCustomerOnForm() $session->setCustomerDataAsLoggedIn($customer); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Review\Block\Form'); - /** @var \Magento\Escaper $escaper */ + /** @var \Magento\Framework\Escaper $escaper */ $escaper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\Escaper'); + ->get('Magento\Framework\Escaper'); $this->assertStringMatchesFormat( '%A", $escaper->escapeHtml($this->_customerSession->getCustomerDataObject()->getFirstname()), diff --git a/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php b/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php index 2c94556916031..a47b49866d60e 100644 --- a/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php +++ b/dev/tests/integration/testsuite/Magento/Rss/Controller/CatalogTest.php @@ -170,7 +170,7 @@ protected function _loginAdmin() \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme(); $this->getRequest()->setServer( array( diff --git a/dev/tests/integration/testsuite/Magento/Rss/Helper/WishlistRssTest.php b/dev/tests/integration/testsuite/Magento/Rss/Helper/WishlistRssTest.php index 8a8ea3b53da11..9edcd649eb70e 100644 --- a/dev/tests/integration/testsuite/Magento/Rss/Helper/WishlistRssTest.php +++ b/dev/tests/integration/testsuite/Magento/Rss/Helper/WishlistRssTest.php @@ -39,7 +39,7 @@ class WishlistRssTest extends \PHPUnit_Framework_TestCase protected $_coreData; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; diff --git a/dev/tests/integration/testsuite/Magento/Rule/Model/Condition/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Rule/Model/Condition/AbstractTest.php index b836460fe97e6..479165df77135 100644 --- a/dev/tests/integration/testsuite/Magento/Rule/Model/Condition/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Rule/Model/Condition/AbstractTest.php @@ -34,7 +34,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase { public function testGetValueElement() { - $layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $context = $objectManager->create('Magento\Rule\Model\Condition\Context', array('layout' => $layoutMock)); @@ -56,7 +56,9 @@ public function testGetValueElement() $rule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Rule\Model\Rule'); $model->setRule( - $rule->setForm(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Data\Form')) + $rule->setForm( + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Framework\Data\Form') + ) ); $property = new \ReflectionProperty('Magento\Rule\Model\Condition\AbstractCondition', '_inputType'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php index 940a6a56e318e..38a5b0874b8d2 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Items/AbstractTest.php @@ -33,18 +33,25 @@ class AbstractTest extends \PHPUnit_Framework_TestCase { public function testGetItemExtraInfoHtml() { - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var $block \Magento\Sales\Block\Adminhtml\Items\AbstractItems */ $block = $layout->createBlock('Magento\Sales\Block\Adminhtml\Items\AbstractItems', 'block'); - $item = new \Magento\Object(); + $item = new \Magento\Framework\Object(); $this->assertEmpty($block->getItemExtraInfoHtml($item)); $expectedHtml = 'some data'; - /** @var $childBlock \Magento\View\Element\Text */ - $childBlock = $layout->addBlock('Magento\View\Element\Text', 'other_block', 'block', 'order_item_extra_info'); + /** @var $childBlock \Magento\Framework\View\Element\Text */ + $childBlock = $layout->addBlock( + 'Magento\Framework\View\Element\Text', + 'other_block', + 'block', + 'order_item_extra_info' + ); $childBlock->setText($expectedHtml); $this->assertEquals($expectedHtml, $block->getItemExtraInfoHtml($item)); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php index f18d69e10bc9a..e1678b6795986 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AbstractTest.php @@ -45,12 +45,12 @@ public function testAddAttributesToForm() \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - $objectManager->get('Magento\View\DesignInterface')->setDefaultDesignTheme(); + $objectManager->get('Magento\Framework\View\DesignInterface')->setDefaultDesignTheme(); $arguments = array( $objectManager->get('Magento\Backend\Block\Template\Context'), $objectManager->get('Magento\Backend\Model\Session\Quote'), $objectManager->get('Magento\Sales\Model\AdminOrder\Create'), - $objectManager->get('Magento\Data\FormFactory') + $objectManager->get('Magento\Framework\Data\FormFactory') ); /** @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractForm */ @@ -58,7 +58,7 @@ public function testAddAttributesToForm() 'Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractForm', $arguments ); - $block->setLayout($objectManager->create('Magento\View\Layout')); + $block->setLayout($objectManager->create('Magento\Framework\View\Layout')); $method = new \ReflectionMethod( 'Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractForm', @@ -66,8 +66,8 @@ public function testAddAttributesToForm() ); $method->setAccessible(true); - /** @var $formFactory \Magento\Data\FormFactory */ - $formFactory = $objectManager->get('Magento\Data\FormFactory'); + /** @var $formFactory \Magento\Framework\Data\FormFactory */ + $formFactory = $objectManager->get('Magento\Framework\Data\FormFactory'); $form = $formFactory->create(); $fieldset = $form->addFieldset('test_fieldset', array()); $dateAttribute = (new AttributeMetadataBuilder( diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php index 0e5dc215e72c8..d59cba2760891 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php @@ -47,8 +47,8 @@ protected function setUp() )->getMock(); $sessionQuoteMock->expects($this->any())->method('getCustomerId')->will($this->returnValue(1)); $sessionQuoteMock->expects($this->any())->method('getQuote')->will($this->returnValue($quote)); - /** @var \Magento\View\LayoutInterface $layout */ - $layout = $this->_objectManager->get('Magento\View\LayoutInterface'); + /** @var \Magento\Framework\View\LayoutInterface $layout */ + $layout = $this->_objectManager->get('Magento\Framework\View\LayoutInterface'); $this->_accountBlock = $layout->createBlock( 'Magento\Sales\Block\Adminhtml\Order\Create\Form\Account', 'address_block' . rand(), diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AddressTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AddressTest.php index 6ca340bdc091d..f9f7dd530cdab 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AddressTest.php @@ -30,7 +30,7 @@ */ class AddressTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address */ @@ -43,8 +43,8 @@ protected function setUp() { $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_addressService = $this->getMock('Magento\Customer\Service\V1\CustomerAddressServiceInterface'); - /** @var \Magento\View\LayoutInterface $layout */ - $layout = $this->_objectManager->get('Magento\View\LayoutInterface'); + /** @var \Magento\Framework\View\LayoutInterface $layout */ + $layout = $this->_objectManager->get('Magento\Framework\View\LayoutInterface'); $sessionQuoteMock = $this->getMockBuilder( 'Magento\Backend\Model\Session\Quote' )->disableOriginalConstructor()->setMethods( @@ -152,14 +152,14 @@ public function testGetForm() ); $form = $this->_addressBlock->getForm(); $this->assertEquals(1, $form->getElements()->count(), "Form has invalid number of fieldsets"); - /** @var \Magento\Data\Form\Element\Fieldset $fieldset */ + /** @var \Magento\Framework\Data\Form\Element\Fieldset $fieldset */ $fieldset = $form->getElements()[0]; $this->assertEquals( count($expectedFields), $fieldset->getElements()->count(), "Form has invalid number of fields" ); - /** @var \Magento\Data\Form\Element\AbstractElement $element */ + /** @var \Magento\Framework\Data\Form\Element\AbstractElement $element */ foreach ($fieldset->getElements() as $element) { $this->assertTrue( in_array($element->getId(), $expectedFields), @@ -167,7 +167,7 @@ public function testGetForm() ); } - /** @var \Magento\Data\Form\Element\Select $countryIdField */ + /** @var \Magento\Framework\Data\Form\Element\Select $countryIdField */ $countryIdField = $fieldset->getElements()->searchById('country_id'); $this->assertSelectCount('option', 247, $countryIdField->getElementHtml()); } @@ -180,11 +180,11 @@ protected function _getAddresses() /** @var \Magento\Customer\Service\V1\Data\AddressBuilder $addressBuilder */ $addressBuilder = $this->_objectManager->create('Magento\Customer\Service\V1\Data\AddressBuilder'); $addressBuilder->populateWithArray( - array('id' => 1, 'street' => 'Street1', 'firstname' => 'FirstName1', 'lastname' => 'LastName1') + array('id' => 1, 'street' => ['Street1'], 'firstname' => 'FirstName1', 'lastname' => 'LastName1') ); $addressData[] = $addressBuilder->create(); $addressBuilder->populateWithArray( - array('id' => 2, 'street' => 'Street2', 'firstname' => 'FirstName2', 'lastname' => 'LastName2') + array('id' => 2, 'street' => ['Street2'], 'firstname' => 'FirstName2', 'lastname' => 'LastName2') ); $addressData[] = $addressBuilder->create(); return $addressData; diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/FormTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/FormTest.php index 0657a7d776903..1e4b6478cfea1 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/FormTest.php @@ -35,7 +35,7 @@ class FormTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Form */ protected $_orderCreateBlock; - /** @var \Magento\ObjectManager */ + /** @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** @@ -65,8 +65,8 @@ protected function setUp() $storeMock->expects($this->any())->method('getCurrentCurrencyCode')->will($this->returnValue('USD')); $sessionMock->expects($this->any())->method('getStore')->will($this->returnValue($storeMock)); - /** @var \Magento\View\LayoutInterface $layout */ - $layout = $this->_objectManager->get('Magento\View\LayoutInterface'); + /** @var \Magento\Framework\View\LayoutInterface $layout */ + $layout = $this->_objectManager->get('Magento\Framework\View\LayoutInterface'); $this->_orderCreateBlock = $layout->createBlock( 'Magento\Sales\Block\Adminhtml\Order\Create\Form', 'order_create_block' . rand(), diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/FormTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/FormTest.php index 842133cb20681..280c9a352dae9 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/FormTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/FormTest.php @@ -43,7 +43,7 @@ public function testGetDefaultSenderWithCurrentCustomer() $backendQuoteSession->setCustomerId($fixtureCustomerId); /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Giftmessage\Form $block */ $block = $objectManager->create('Magento\Sales\Block\Adminhtml\Order\Create\Giftmessage\Form'); - $block->setEntity(new \Magento\Object()); + $block->setEntity(new \Magento\Framework\Object()); /** SUT execution and assertions */ $this->assertEquals('Firstname Lastname', $block->getDefaultSender(), 'Sender name is invalid.'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/View/InfoTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/View/InfoTest.php index 90a76e26cef39..6c3cf074a34d4 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/View/InfoTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/View/InfoTest.php @@ -35,7 +35,7 @@ class InfoTest extends \Magento\Backend\Utility\Controller public function testCustomerGridAction() { - $layout = $this->_objectManager->get('Magento\View\LayoutInterface'); + $layout = $this->_objectManager->get('Magento\Framework\View\LayoutInterface'); /** @var \Magento\Sales\Block\Adminhtml\Order\View\Info $infoBlock */ $infoBlock = $layout->createBlock( 'Magento\Sales\Block\Adminhtml\Order\View\Info', @@ -52,7 +52,7 @@ public function testCustomerGridAction() */ public function testGetCustomerGroupName() { - $layout = $this->_objectManager->get('Magento\View\LayoutInterface'); + $layout = $this->_objectManager->get('Magento\Framework\View\LayoutInterface'); /** @var \Magento\Sales\Block\Adminhtml\Order\View\Info $customerGroupBlock */ $customerGroupBlock = $layout->createBlock( 'Magento\Sales\Block\Adminhtml\Order\View\Info', @@ -70,7 +70,7 @@ public function testGetCustomerGroupName() */ public function testGetCustomerAccountData() { - $layout = $this->_objectManager->get('Magento\View\LayoutInterface'); + $layout = $this->_objectManager->get('Magento\Framework\View\LayoutInterface'); $orderData = array( 'customer_' . FIXTURE_ATTRIBUTE_USER_DEFINED_CUSTOMER_NAME => self::ORDER_USER_DEFINED_ATTRIBUTE_VALUE @@ -95,11 +95,11 @@ public function testGetCustomerAccountData() /** * @param array $additionalOrderData - * @return \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected function _putOrderIntoRegistry(array $additionalOrderData = array()) { - $registry = $this->getMockBuilder('Magento\Registry')->disableOriginalConstructor()->getMock(); + $registry = $this->getMockBuilder('Magento\Framework\Registry')->disableOriginalConstructor()->getMock(); $order = $this->_objectManager->get( 'Magento\Sales\Model\Order' diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Report/Filter/Form/CouponTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Report/Filter/Form/CouponTest.php index 600ffdfb3297f..c0e84c277537a 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Report/Filter/Form/CouponTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Report/Filter/Form/CouponTest.php @@ -38,7 +38,7 @@ class CouponTest extends \PHPUnit_Framework_TestCase /** * Layout * - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -46,7 +46,7 @@ protected function setUp() { parent::setUp(); $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\View\LayoutInterface'); + ->get('Magento\Framework\View\LayoutInterface'); } /** @@ -56,7 +56,7 @@ public function testAfterToHtml() { /** @var $block \Magento\Sales\Block\Adminhtml\Report\Filter\Form\Coupon */ $block = $this->_layout->createBlock('Magento\Sales\Block\Adminhtml\Report\Filter\Form\Coupon'); - $block->setFilterData(new \Magento\Object()); + $block->setFilterData(new \Magento\Framework\Object()); $html = $block->toHtml(); $expectedStrings = array( diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/CommentsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/CommentsTest.php index cc15c5f001701..a4bf216e661e2 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/CommentsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/CommentsTest.php @@ -36,7 +36,7 @@ class CommentsTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Sales\Block\Order\Comments' ); @@ -77,7 +77,7 @@ public function getCommentsDataProvider() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testGetCommentsWrongEntityException() { diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php index 78fdc9d57c59c..66f998ba9178d 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Creditmemo/ItemsTest.php @@ -29,7 +29,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -46,7 +46,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); $this->_block = $this->_layout->createBlock('Magento\Sales\Block\Order\Creditmemo\Items', 'block'); $this->_creditmemo = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( @@ -59,7 +59,7 @@ protected function setUp() */ public function testGetTotalsHtml() { - $childBlock = $this->_layout->addBlock('Magento\View\Element\Text', 'creditmemo_totals', 'block'); + $childBlock = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'creditmemo_totals', 'block'); $expectedHtml = 'Any html'; $this->assertEmpty($childBlock->getCreditmemo()); @@ -73,7 +73,7 @@ public function testGetTotalsHtml() public function testGetCommentsHtml() { - $childBlock = $this->_layout->addBlock('Magento\View\Element\Text', 'creditmemo_comments', 'block'); + $childBlock = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'creditmemo_comments', 'block'); $expectedHtml = 'Any html'; $this->assertEmpty($childBlock->getEntity()); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php index 3bac665dda09d..4a9e46d76687e 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Invoice/ItemsTest.php @@ -29,7 +29,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout; @@ -46,7 +46,7 @@ class ItemsTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); $this->_block = $this->_layout->createBlock('Magento\Sales\Block\Order\Invoice\Items', 'block'); $this->_invoice = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( @@ -59,7 +59,7 @@ protected function setUp() */ public function testGetInvoiceTotalsHtml() { - $childBlock = $this->_layout->addBlock('Magento\View\Element\Text', 'invoice_totals', 'block'); + $childBlock = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'invoice_totals', 'block'); $expectedHtml = 'Any html'; $this->assertEmpty($childBlock->getInvoice()); @@ -73,7 +73,7 @@ public function testGetInvoiceTotalsHtml() public function testGetInvoiceCommentsHtml() { - $childBlock = $this->_layout->addBlock('Magento\View\Element\Text', 'invoice_comments', 'block'); + $childBlock = $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'invoice_comments', 'block'); $expectedHtml = 'Any html'; $this->assertEmpty($childBlock->getEntity()); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php index 37d81e8270611..df3bf9ed285fe 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/CreditmemoTest.php @@ -36,16 +36,18 @@ public function testGetTotalsHtml() $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Sales\Model\Order'); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_order', $order); + $objectManager->get('Magento\Framework\Registry')->register('current_order', $order); $payment = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Sales\Model\Order\Payment' ); $payment->setMethod('checkmo'); $order->setPayment($payment); - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $block = $layout->createBlock('Magento\Sales\Block\Order\PrintOrder\Creditmemo', 'block'); - $childBlock = $layout->addBlock('Magento\View\Element\Text', 'creditmemo_totals', 'block'); + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Text', 'creditmemo_totals', 'block'); $expectedHtml = 'Any html'; $creditmemo = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php index ec324fbf7182d..0f49dd935ddfa 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/PrintOrder/InvoiceTest.php @@ -36,16 +36,18 @@ public function testGetInvoiceTotalsHtml() $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Sales\Model\Order'); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_order', $order); + $objectManager->get('Magento\Framework\Registry')->register('current_order', $order); $payment = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Sales\Model\Order\Payment' ); $payment->setMethod('checkmo'); $order->setPayment($payment); - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $block = $layout->createBlock('Magento\Sales\Block\Order\PrintOrder\Invoice', 'block'); - $childBlock = $layout->addBlock('Magento\View\Element\Text', 'invoice_totals', 'block'); + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Text', 'invoice_totals', 'block'); $expectedHtml = 'Any html'; $invoice = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php index eb93148e2b653..0b7339786059a 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Order/TotalsTest.php @@ -33,8 +33,10 @@ public function testToHtmlChildrenInitialized() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); - /** @var $layout \Magento\View\Layout */ - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + /** @var $layout \Magento\Framework\View\Layout */ + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); /** @var \Magento\Sales\Block\Order\Totals $block */ $block = $layout->createBlock('Magento\Sales\Block\Order\Totals', 'block'); $block->setOrder( @@ -43,16 +45,18 @@ public function testToHtmlChildrenInitialized() 'order/totals.phtml' ); - $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\Element\Context'); - $childOne = $this->getMock('Magento\View\Element\Text', array('initTotals'), array($context)); + $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\Element\Context' + ); + $childOne = $this->getMock('Magento\Framework\View\Element\Text', array('initTotals'), array($context)); $childOne->expects($this->once())->method('initTotals'); $layout->addBlock($childOne, 'child1', 'block'); - $childTwo = $this->getMock('Magento\View\Element\Text', array('initTotals'), array($context)); + $childTwo = $this->getMock('Magento\Framework\View\Element\Text', array('initTotals'), array($context)); $childTwo->expects($this->once())->method('initTotals'); $layout->addBlock($childTwo, 'child2', 'block'); - $childThree = $this->getMock('Magento\View\Element\Text', array('initTotals'), array($context)); + $childThree = $this->getMock('Magento\Framework\View\Element\Text', array('initTotals'), array($context)); $childThree->expects($this->once())->method('initTotals'); $layout->addBlock($childThree, 'child3', 'block'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php index 570c9abb8a67c..f34d88da2cb59 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder/CreateTest.php @@ -36,13 +36,13 @@ class CreateTest extends \PHPUnit_Framework_TestCase */ protected $_model; - /** @var \Magento\Message\ManagerInterface */ + /** @var \Magento\Framework\Message\ManagerInterface */ protected $_messageManager; protected function setUp() { parent::setUp(); - $this->_messageManager = Bootstrap::getObjectManager()->get('Magento\Message\ManagerInterface'); + $this->_messageManager = Bootstrap::getObjectManager()->get('Magento\Framework\Message\ManagerInterface'); $this->_model = Bootstrap::getObjectManager()->create( 'Magento\Sales\Model\AdminOrder\Create', array('messageManager' => $this->_messageManager) @@ -62,7 +62,7 @@ public function testInitFromOrderShippingAddressSameAsBillingWhenEmpty() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('rule_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('rule_data'); $this->_model->initFromOrder($order); $this->assertFalse($order->getShippingAddress()); @@ -83,7 +83,7 @@ public function testInitFromOrderShippingAddressSameAsBillingWhenSame() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('rule_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('rule_data'); $this->_model->initFromOrder($order); $this->assertTrue($order->getShippingAddress()->getSameAsBilling()); @@ -105,7 +105,7 @@ public function testInitFromOrderShippingAddressSameAsBillingWhenDifferent() $this->assertNull($order->getShippingAddress()->getSameAsBilling()); - $objectManager->get('Magento\Registry')->unregister('rule_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('rule_data'); $this->_model->initFromOrder($order); $this->assertFalse($order->getShippingAddress()->getSameAsBilling()); @@ -129,7 +129,7 @@ public function testInitFromOrderCcInformationDeleted() $this->assertEquals('AE', $payment->getCcType()); $this->assertEquals('0005', $payment->getCcLast4()); - $objectManager->get('Magento\Registry')->unregister('rule_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('rule_data'); $payment = $this->_model->initFromOrder($order)->getQuote()->getPayment(); $this->assertNull($payment->getCcExpMonth()); @@ -156,7 +156,7 @@ public function testInitFromOrderSavedCcInformationNotDeleted() $this->assertEquals('AE', $payment->getCcType()); $this->assertEquals('0005', $payment->getCcLast4()); - $objectManager->get('Magento\Registry')->unregister('rule_data'); + $objectManager->get('Magento\Framework\Registry')->unregister('rule_data'); $payment = $this->_model->initFromOrder($order)->getQuote()->getPayment(); $this->assertEquals('5', $payment->getCcExpMonth()); @@ -277,11 +277,11 @@ public function testSetBillingAddressValidationErrors() try { $this->_model->createOrder(); $this->fail('Validation errors are expected to lead to exception during createOrder() call.'); - } catch (\Magento\Model\Exception $e) { + } catch (\Magento\Framework\Model\Exception $e) { /** createOrder is expected to throw exception with empty message when validation error occurs */ } $errorMessages = array(); - /** @var $validationError \Magento\Message\Error */ + /** @var $validationError \Magento\Framework\Message\Error */ foreach ($this->_messageManager->getMessages()->getItems() as $validationError) { $errorMessages[] = $validationError->getText(); } diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php index 231eada64cfae..d96f8f79959f1 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Observer/Frontend/Quote/Address/CollectTotalsTest.php @@ -47,7 +47,7 @@ protected function setUp() */ public function testChangeQuoteCustomerGroupIdForCustomerWithDisabledAutomaticGroupChange() { - /** @var \Magento\ObjectManager $objectManager */ + /** @var \Magento\Framework\ObjectManager $objectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $customer \Magento\Customer\Model\Customer */ @@ -65,7 +65,7 @@ public function testChangeQuoteCustomerGroupIdForCustomerWithDisabledAutomaticGr $quoteAddress = $quote->getBillingAddress(); $eventObserver = $objectManager->create( - 'Magento\Event\Observer', + 'Magento\Framework\Event\Observer', array('data' => array('quote_address' => $quoteAddress)) ); $this->model->dispatch($eventObserver); @@ -83,7 +83,7 @@ public function testChangeQuoteCustomerGroupIdForCustomerWithDisabledAutomaticGr */ public function testChangeQuoteCustomerGroupIdForCustomerWithEnabledAutomaticGroupChange() { - /** @var \Magento\ObjectManager $objectManager */ + /** @var \Magento\Framework\ObjectManager $objectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var $customer \Magento\Customer\Model\Customer */ @@ -101,7 +101,7 @@ public function testChangeQuoteCustomerGroupIdForCustomerWithEnabledAutomaticGro $quoteAddress = $quote->getBillingAddress(); $eventObserver = $objectManager->create( - 'Magento\Event\Observer', + 'Magento\Framework\Event\Observer', array('data' => array('quote_address' => $quoteAddress)) ); $this->model->dispatch($eventObserver); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php index 940cf587a4e6f..1c51b8fdefcdc 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/CreditmemoTest.php @@ -34,7 +34,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase public function testSendEmail() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Sales\Model\Order'); $order->loadByIncrementId('100000001'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php index cb747bc161a77..f8f197fa60fc2 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/InvoiceTest.php @@ -34,7 +34,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase public function testSendEmail() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Sales\Model\Order'); $order->loadByIncrementId('100000001'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php index fc2f3d6342df3..fda65c2eec9dd 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/OrderTest.php @@ -34,7 +34,7 @@ class OrderTest extends \PHPUnit_Framework_TestCase public function testSendNewOrderEmail() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $order = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Sales\Model\Order'); $order->loadByIncrementId('100000001'); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Quote/AddressTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Quote/AddressTest.php index 615ef104c68af..1f591d0d98431 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Quote/AddressTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Quote/AddressTest.php @@ -220,7 +220,7 @@ public function testImportCustomerAddressDataWithCustomer() )->setCity( $city )->setStreet( - $street + [$street] )->create(); $this->_address->setQuote($this->_quote); $this->_address->importCustomerAddressData($addressData); diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/QuoteTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/QuoteTest.php index 131a9441f9448..aadc174da9bdf 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/QuoteTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/QuoteTest.php @@ -56,7 +56,12 @@ public function testSetCustomerData() $customerMetadataService = Bootstrap::getObjectManager()->create( 'Magento\Customer\Service\V1\CustomerMetadataService' ); - $customerBuilder = new CustomerBuilder($customerMetadataService); + $customerBuilder = Bootstrap::getObjectManager()->create( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + [ + 'metadataService' => $customerMetadataService + ] + ); $expected = $this->_getCustomerDataArray(); $customerBuilder->populateWithArray($expected); @@ -76,7 +81,12 @@ public function testUpdateCustomerData() $customerMetadataService = Bootstrap::getObjectManager()->create( 'Magento\Customer\Service\V1\CustomerMetadataService' ); - $customerBuilder = new CustomerBuilder($customerMetadataService); + $customerBuilder = Bootstrap::getObjectManager()->create( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + [ + 'metadataService' => $customerMetadataService + ] + ); $expected = $this->_getCustomerDataArray(); $customerBuilder->populateWithArray($expected); @@ -311,7 +321,7 @@ protected function _getCustomerDataArray() Customer::EMAIL => 'qa@example.com', Customer::FIRSTNAME => 'Joe', Customer::GENDER => 'Male', - Customer::GROUP_ID => \Magento\Customer\Service\V1\CustomerGroupService::NOT_LOGGED_IN_ID, + Customer::GROUP_ID => \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID, Customer::LASTNAME => 'Dou', Customer::MIDDLENAME => 'Ivan', Customer::PREFIX => 'Dr.', diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Service/QuoteTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Service/QuoteTest.php index fa7ed6657786e..d422d31701a7d 100755 --- a/dev/tests/integration/testsuite/Magento/Sales/Model/Service/QuoteTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Service/QuoteTest.php @@ -101,7 +101,7 @@ public function testSubmitGuestOrder() /** * @magentoDataFixture Magento/Sales/_files/quote.php - * @expectedException \Magento\Exception\InputException + * @expectedException \Magento\Framework\Exception\InputException * @expectedExceptionMessage One or more input exceptions have occurred. */ public function testSubmitOrderInvalidCustomerData() diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice.php b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice.php index 5cb6328ae1b0d..cd374a766b4cc 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice.php @@ -35,5 +35,5 @@ $invoice->register(); $order->setIsInProcess(true); $transactionSave = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\DB\Transaction'); + ->create('Magento\Framework\DB\Transaction'); $transactionSave->addObject($invoice)->addObject($order)->save(); diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_fixture_store_order.php b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_fixture_store_order.php index 4a183d932f290..34e17a2b2ee4e 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_fixture_store_order.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_fixture_store_order.php @@ -35,5 +35,5 @@ $invoice->register(); $order->setIsInProcess(true); $transactionSave = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\DB\Transaction'); + ->create('Magento\Framework\DB\Transaction'); $transactionSave->addObject($invoice)->addObject($order)->save(); diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_payflowpro.php b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_payflowpro.php index 74104e8bfbacc..e595662eb2dd4 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_payflowpro.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/invoice_payflowpro.php @@ -36,5 +36,5 @@ $invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::NOT_CAPTURE)->register(); $order->setIsInProcess(true); $transactionSave = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->create('Magento\DB\Transaction'); + ->create('Magento\Framework\DB\Transaction'); $transactionSave->addObject($invoice)->addObject($order)->save(); diff --git a/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php b/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php index ac5329a07fd0a..a2768d09f7cea 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php +++ b/dev/tests/integration/testsuite/Magento/Sales/_files/order_info.php @@ -135,7 +135,7 @@ $creditmemo->save(); $transactionSave = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\DB\Transaction' + 'Magento\Framework\DB\Transaction' )->addObject( $creditmemo )->addObject( diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/LabelsTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/LabelsTest.php index 5331b63c96f96..f646ddf53d5d3 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/LabelsTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/LabelsTest.php @@ -33,7 +33,7 @@ public function testConstruct() $this->assertInstanceOf( 'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Labels', \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Labels' ) diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/MainTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/MainTest.php index d8068b05b6908..a0c8b10e4271b 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/MainTest.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/MainTest.php @@ -40,18 +40,18 @@ public function testPrepareForm() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $objectManager->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->setDefaultDesignTheme(); $objectManager->get( - 'Magento\Registry' + 'Magento\Framework\Registry' )->register( 'current_promo_quote_rule', $objectManager->create('Magento\SalesRule\Model\Rule') ); - $layout = $objectManager->create('Magento\View\Layout'); + $layout = $objectManager->create('Magento\Framework\View\Layout'); $block = $layout->addBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main'); $prepareFormMethod = new \ReflectionMethod( 'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Main', @@ -70,7 +70,7 @@ public function testPrepareForm() // assert Customer Groups field $customerGroupsField = $form->getElement('customer_group_ids'); $customerGroupService = $objectManager->create('Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $objectConverter = $objectManager->get('Magento\Convert\Object'); + $objectConverter = $objectManager->get('Magento\Framework\Convert\Object'); $groups = $customerGroupService->getGroups(); $expected = $objectConverter->toOptionArray($groups, 'id', 'code'); $this->assertEquals($expected, $customerGroupsField->getValues()); diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_40_percent_off.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_40_percent_off.php index a9882a11ebf44..46e8f8be7791b 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_40_percent_off.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_40_percent_off.php @@ -28,7 +28,7 @@ array( 'name' => '40% Off on Large Orders', 'is_active' => 1, - 'customer_group_ids' => array(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID), + 'customer_group_ids' => array(\Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID), 'coupon_type' => \Magento\SalesRule\Model\Rule::COUPON_TYPE_NO_COUPON, 'conditions' => array( array( diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_50_percent_off.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_50_percent_off.php index 24e22a1175a6d..6142194f77042 100644 --- a/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_50_percent_off.php +++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_50_percent_off.php @@ -28,7 +28,7 @@ array( 'name' => '50% Off on Large Orders', 'is_active' => 1, - 'customer_group_ids' => array(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID), + 'customer_group_ids' => array(\Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID), 'coupon_type' => \Magento\SalesRule\Model\Rule::COUPON_TYPE_NO_COUPON, 'conditions' => array( array( diff --git a/dev/tests/integration/testsuite/Magento/Sendfriend/Block/SendTest.php b/dev/tests/integration/testsuite/Magento/Sendfriend/Block/SendTest.php new file mode 100644 index 0000000000000..d99c1f18a58e6 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Sendfriend/Block/SendTest.php @@ -0,0 +1,114 @@ +_block = Bootstrap::getObjectManager()->create('Magento\Sendfriend\Block\Send'); + } + + /** + * @param string $field + * @param string $value + * @dataProvider formDataProvider + * @covers \Magento\Sendfriend\Block\Send::getUserName + * @covers \Magento\Sendfriend\Block\Send::getEmail + */ + public function testGetCustomerFieldFromFormData($field, $value) + { + $formData = ['sender' => [$field => $value]]; + $this->_block->setFormData($formData); + $this->assertEquals(trim($value), $this->_callBlockMethod($field)); + } + + /** + * @return array + */ + public function formDataProvider() + { + return [ + ['name', 'Customer Form Name'], + ['email', 'customer_form_email@example.com'] + ]; + } + + /** + * @param string $field + * @param string $value + * @dataProvider customerSessionDataProvider + * @covers \Magento\Sendfriend\Block\Send::getUserName + * @covers \Magento\Sendfriend\Block\Send::getEmail + * @magentoDataFixture Magento/Customer/_files/customer.php + */ + public function testGetCustomerFieldFromSession($field, $value) + { + $logger = $this->getMock('Magento\Framework\Logger', [], [], '', false); + /** @var $session \Magento\Customer\Model\Session */ + $session = Bootstrap::getObjectManager()->create('Magento\Customer\Model\Session', array($logger)); + /** @var \Magento\Customer\Service\V1\CustomerAccountService $service */ + $service = Bootstrap::getObjectManager()->create('Magento\Customer\Service\V1\CustomerAccountServiceInterface'); + $customer = $service->authenticate('customer@example.com', 'password'); + $session->setCustomerDataAsLoggedIn($customer); + $this->assertEquals($value, $this->_callBlockMethod($field)); + } + + /** + * @return array + */ + public function customerSessionDataProvider() + { + return [ + ['name', 'Firstname Lastname'], + ['email', 'customer@example.com'] + ]; + + } + + /** + * Call block method based on form field + * + * @param string $field + * @return null|string + */ + protected function _callBlockMethod($field) + { + switch ($field) { + case 'name': + return $this->_block->getUserName(); + case 'email': + return $this->_block->getEmail(); + default: + return null; + } + } +} diff --git a/dev/tests/integration/testsuite/Magento/Shipping/Block/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Shipping/Block/ItemsTest.php index b82617e89ceb0..bd14d4c43ecb6 100644 --- a/dev/tests/integration/testsuite/Magento/Shipping/Block/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Shipping/Block/ItemsTest.php @@ -30,9 +30,11 @@ class ItemsTest extends \PHPUnit_Framework_TestCase { public function testGetCommentsHtml() { - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $block = $layout->createBlock('Magento\Shipping\Block\Items', 'block'); - $childBlock = $layout->addBlock('Magento\View\Element\Text', 'shipment_comments', 'block'); + $childBlock = $layout->addBlock('Magento\Framework\View\Element\Text', 'shipment_comments', 'block'); $shipment = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Sales\Model\Order\Shipment' ); diff --git a/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php b/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php index 8441162eea305..eaaffccb6926a 100644 --- a/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php +++ b/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php @@ -30,7 +30,7 @@ /** @var \Magento\Catalog\Model\Product\Media\Config $config */ $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config'); -/** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */ +/** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $mediaPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR); $mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR); diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/Resource/Store/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/Resource/Store/CollectionTest.php index e1137adbd7e60..94f1144530348 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/Resource/Store/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/Resource/Store/CollectionTest.php @@ -109,8 +109,8 @@ public function testToOptionArrayHash() } /** - * @covers \Magento\Model\Resource\Db\Collection\AbstractCollection::addFieldToSelect - * @covers \Magento\Model\Resource\Db\Collection\AbstractCollection::removeFieldFromSelect + * @covers \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::addFieldToSelect + * @covers \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::removeFieldFromSelect */ public function testAddRemoveFieldToSelect() { @@ -129,7 +129,7 @@ public function testAddRemoveFieldToSelect() } /** - * @covers \Magento\Model\Resource\Db\Collection\AbstractCollection::addExpressionFieldToSelect + * @covers \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::addExpressionFieldToSelect */ public function testAddExpressionFieldToSelect() { @@ -139,7 +139,7 @@ public function testAddExpressionFieldToSelect() } /** - * @covers \Magento\Model\Resource\Db\Collection\AbstractCollection::getAllIds + * @covers \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::getAllIds */ public function testGetAllIds() { @@ -147,7 +147,7 @@ public function testGetAllIds() } /** - * @covers \Magento\Model\Resource\Db\Collection\AbstractCollection::getData + * @covers \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::getData */ public function testGetData() { @@ -155,7 +155,7 @@ public function testGetData() } /** - * @covers \Magento\Model\Resource\Db\Collection\AbstractCollection::join + * @covers \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::join */ public function testJoin() { diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php index d75eb5ed1d759..f9389b013c46a 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php @@ -47,20 +47,23 @@ protected function _getStoreModel() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_modelParams = array( - 'context' => $objectManager->get('Magento\Model\Context'), - 'registry' => $objectManager->get('Magento\Registry'), + 'context' => $objectManager->get('Magento\Framework\Model\Context'), + 'registry' => $objectManager->get('Magento\Framework\Registry'), 'resource' => $objectManager->get('Magento\Store\Model\Resource\Store'), 'coreFileStorageDatabase' => $objectManager->get('Magento\Core\Helper\File\Storage\Database'), 'configCacheType' => $objectManager->get('Magento\Framework\App\Cache\Type\Config'), - 'url' => $objectManager->get('Magento\Url'), + 'url' => $objectManager->get('Magento\Framework\Url'), 'request' => $objectManager->get('Magento\Framework\App\RequestInterface'), 'configDataResource' => $objectManager->get('Magento\Core\Model\Resource\Config\Data'), 'filesystem' => $objectManager->get('Magento\Framework\App\Filesystem'), 'config' => $objectManager->get('Magento\Framework\App\Config\ReinitableConfigInterface'), 'storeManager' => $objectManager->get('Magento\Store\Model\StoreManager'), - 'sidResolver' => $objectManager->get('Magento\Session\SidResolverInterface'), - 'cookie' => $objectManager->get('Magento\Stdlib\Cookie'), - 'httpContext' => $objectManager->get('Magento\Framework\App\Http\Context') + 'sidResolver' => $objectManager->get('Magento\Framework\Session\SidResolverInterface'), + 'cookie' => $objectManager->get('Magento\Framework\Stdlib\Cookie'), + 'httpContext' => $objectManager->get('Magento\Framework\App\Http\Context'), + 'session' => $objectManager->get('Magento\Framework\Session\SessionManagerInterface'), + 'currencyFactory' => $objectManager->get('Magento\Directory\Model\CurrencyFactory'), + 'currencyInstalled' => 'system/currency/installed', ); return $this->getMock('Magento\Store\Model\Store', array('getUrl'), $this->_modelParams); @@ -149,34 +152,34 @@ public function testGetBaseUrl($type, $useRewrites, $useStoreCode, $expected) public function getBaseUrlDataProvider() { return array( - array(\Magento\UrlInterface::URL_TYPE_WEB, false, false, 'http://localhost/'), - array(\Magento\UrlInterface::URL_TYPE_WEB, false, true, 'http://localhost/'), - array(\Magento\UrlInterface::URL_TYPE_WEB, true, false, 'http://localhost/'), - array(\Magento\UrlInterface::URL_TYPE_WEB, true, true, 'http://localhost/'), - array(\Magento\UrlInterface::URL_TYPE_LINK, false, false, 'http://localhost/index.php/'), - array(\Magento\UrlInterface::URL_TYPE_LINK, false, true, 'http://localhost/index.php/default/'), - array(\Magento\UrlInterface::URL_TYPE_LINK, true, false, 'http://localhost/'), - array(\Magento\UrlInterface::URL_TYPE_LINK, true, true, 'http://localhost/default/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, false, false, 'http://localhost/index.php/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, false, true, 'http://localhost/index.php/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, true, false, 'http://localhost/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, true, true, 'http://localhost/'), - array(\Magento\UrlInterface::URL_TYPE_STATIC, false, false, 'http://localhost/pub/static/'), - array(\Magento\UrlInterface::URL_TYPE_STATIC, false, true, 'http://localhost/pub/static/'), - array(\Magento\UrlInterface::URL_TYPE_STATIC, true, false, 'http://localhost/pub/static/'), - array(\Magento\UrlInterface::URL_TYPE_STATIC, true, true, 'http://localhost/pub/static/'), - array(\Magento\UrlInterface::URL_TYPE_CACHE, false, false, 'http://localhost/pub/cache/'), - array(\Magento\UrlInterface::URL_TYPE_CACHE, false, true, 'http://localhost/pub/cache/'), - array(\Magento\UrlInterface::URL_TYPE_CACHE, true, false, 'http://localhost/pub/cache/'), - array(\Magento\UrlInterface::URL_TYPE_CACHE, true, true, 'http://localhost/pub/cache/'), - array(\Magento\UrlInterface::URL_TYPE_LIB, false, false, 'http://localhost/pub/lib/'), - array(\Magento\UrlInterface::URL_TYPE_LIB, false, true, 'http://localhost/pub/lib/'), - array(\Magento\UrlInterface::URL_TYPE_LIB, true, false, 'http://localhost/pub/lib/'), - array(\Magento\UrlInterface::URL_TYPE_LIB, true, true, 'http://localhost/pub/lib/'), - array(\Magento\UrlInterface::URL_TYPE_MEDIA, false, false, 'http://localhost/pub/media/'), - array(\Magento\UrlInterface::URL_TYPE_MEDIA, false, true, 'http://localhost/pub/media/'), - array(\Magento\UrlInterface::URL_TYPE_MEDIA, true, false, 'http://localhost/pub/media/'), - array(\Magento\UrlInterface::URL_TYPE_MEDIA, true, true, 'http://localhost/pub/media/') + array(\Magento\Framework\UrlInterface::URL_TYPE_WEB, false, false, 'http://localhost/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_WEB, false, true, 'http://localhost/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_WEB, true, false, 'http://localhost/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_WEB, true, true, 'http://localhost/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LINK, false, false, 'http://localhost/index.php/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LINK, false, true, 'http://localhost/index.php/default/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LINK, true, false, 'http://localhost/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LINK, true, true, 'http://localhost/default/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, false, false, 'http://localhost/index.php/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, false, true, 'http://localhost/index.php/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, true, false, 'http://localhost/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, true, true, 'http://localhost/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_STATIC, false, false, 'http://localhost/pub/static/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_STATIC, false, true, 'http://localhost/pub/static/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_STATIC, true, false, 'http://localhost/pub/static/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_STATIC, true, true, 'http://localhost/pub/static/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, false, false, 'http://localhost/pub/cache/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, false, true, 'http://localhost/pub/cache/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, true, false, 'http://localhost/pub/cache/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_CACHE, true, true, 'http://localhost/pub/cache/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, false, false, 'http://localhost/pub/lib/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, false, true, 'http://localhost/pub/lib/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, true, false, 'http://localhost/pub/lib/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LIB, true, true, 'http://localhost/pub/lib/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA, false, false, 'http://localhost/pub/media/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA, false, true, 'http://localhost/pub/media/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA, true, false, 'http://localhost/pub/media/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA, true, true, 'http://localhost/pub/media/') ); } @@ -197,15 +200,15 @@ public function testGetBaseUrlInPub() $this->assertEquals( 'http://localhost/pub/static/', - $this->_model->getBaseUrl(\Magento\UrlInterface::URL_TYPE_STATIC) + $this->_model->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_STATIC) ); $this->assertEquals( 'http://localhost/pub/lib/', - $this->_model->getBaseUrl(\Magento\UrlInterface::URL_TYPE_LIB) + $this->_model->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LIB) ); $this->assertEquals( 'http://localhost/pub/media/', - $this->_model->getBaseUrl(\Magento\UrlInterface::URL_TYPE_MEDIA) + $this->_model->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) ); } @@ -255,14 +258,29 @@ public function testGetBaseUrlForCustomEntryPoint($type, $useCustomEntryPoint, $ public function getBaseUrlForCustomEntryPointDataProvider() { return array( - array(\Magento\UrlInterface::URL_TYPE_LINK, false, false, 'http://localhost/custom_entry.php/'), - array(\Magento\UrlInterface::URL_TYPE_LINK, false, true, 'http://localhost/custom_entry.php/default/'), - array(\Magento\UrlInterface::URL_TYPE_LINK, true, false, 'http://localhost/index.php/'), - array(\Magento\UrlInterface::URL_TYPE_LINK, true, true, 'http://localhost/index.php/default/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, false, false, 'http://localhost/custom_entry.php/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, false, true, 'http://localhost/custom_entry.php/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, true, false, 'http://localhost/index.php/'), - array(\Magento\UrlInterface::URL_TYPE_DIRECT_LINK, true, true, 'http://localhost/index.php/') + array(\Magento\Framework\UrlInterface::URL_TYPE_LINK, false, false, 'http://localhost/custom_entry.php/'), + array( + \Magento\Framework\UrlInterface::URL_TYPE_LINK, + false, + true, + 'http://localhost/custom_entry.php/default/' + ), + array(\Magento\Framework\UrlInterface::URL_TYPE_LINK, true, false, 'http://localhost/index.php/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_LINK, true, true, 'http://localhost/index.php/default/'), + array( + \Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, + false, + false, + 'http://localhost/custom_entry.php/' + ), + array( + \Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, + false, + true, + 'http://localhost/custom_entry.php/' + ), + array(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, true, false, 'http://localhost/index.php/'), + array(\Magento\Framework\UrlInterface::URL_TYPE_DIRECT_LINK, true, true, 'http://localhost/index.php/') ); } @@ -327,7 +345,7 @@ public function testCRUD() * @dataProvider saveValidationDataProvider * @magentoAppIsolation enabled * @magentoDbIsolation enabled - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testSaveValidation($badStoreData) { @@ -371,7 +389,7 @@ public function testIsUseStoreInUrl($isInstalled, $storeInUrl, $disableStoreInUr $params = $this->_modelParams; $params['context'] = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Model\Context', + 'Magento\Framework\Model\Context', array('appState' => $appStateMock) ); diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/WebsiteTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/WebsiteTest.php index acf60aa93d1b6..a75cb6399c8c7 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/WebsiteTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/WebsiteTest.php @@ -169,7 +169,7 @@ public function testGetDefaultStore() public function testGetDefaultStoresSelect() { - $this->assertInstanceOf('Magento\DB\Select', $this->_model->getDefaultStoresSelect()); + $this->assertInstanceOf('Magento\Framework\DB\Select', $this->_model->getDefaultStoresSelect()); } public function testIsReadonly() diff --git a/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php b/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php index b88a6634f8d5b..ba560d63ac358 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Block/Adminhtml/Rate/ImportExportTest.php @@ -37,8 +37,9 @@ protected function setUp() { \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') - ->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExport'); + $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + )->createBlock('Magento\Tax\Block\Adminhtml\Rate\ImportExport'); } protected function tearDown() diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php index 0bfa3ad253f0c..41de016e8bfd5 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Calculation/RuleTest.php @@ -32,7 +32,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -151,12 +151,12 @@ public function getAllOptionsProvider() } /** - * @return \Magento\Registry + * @return \Magento\Framework\Registry */ protected function _getRegistryClassMock() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - return $objectManager->get('Magento\Registry'); + return $objectManager->get('Magento\Framework\Registry'); } /** @@ -197,8 +197,8 @@ protected function _getTaxClassMock($callback, $filter) 'Magento\Tax\Model\ClassModel', array('getCollection'), array( - $this->_objectManager->create('Magento\Model\Context'), - $this->_objectManager->get('Magento\Registry'), + $this->_objectManager->create('Magento\Framework\Model\Context'), + $this->_objectManager->get('Magento\Framework\Registry'), $this->_objectManager->get('Magento\Tax\Model\TaxClass\Factory') ), '', diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/ClassTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/ClassTest.php index 859a109f8efe0..b04a486836f8f 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/ClassTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/ClassTest.php @@ -48,7 +48,7 @@ public function testCheckClassCanBeDeletedCustomerClassAssertException() \Magento\Tax\Model\ClassModel::TAX_CLASS_TYPE_CUSTOMER )->getFirstItem(); - $this->setExpectedException('Magento\Model\Exception'); + $this->setExpectedException('Magento\Framework\Model\Exception'); $model->checkClassCanBeDeleted(); } @@ -90,7 +90,7 @@ public function testCheckClassCanBeDeletedProductClassAssertException() $model->getId() )->save(); - $this->setExpectedException('Magento\Model\Exception'); + $this->setExpectedException('Magento\Framework\Model\Exception'); $model->checkClassCanBeDeleted(); } @@ -121,8 +121,8 @@ public function classesDataProvider() */ public function testCheckClassCanBeDeletedCustomerClassUsedInTaxRule() { - /** @var $registry \Magento\Registry */ - $registry = $this->_objectManager->get('Magento\Registry'); + /** @var $registry \Magento\Framework\Registry */ + $registry = $this->_objectManager->get('Magento\Framework\Registry'); /** @var $taxRule \Magento\Tax\Model\Calculation\Rule */ $taxRule = $registry->registry('_fixture/Magento_Tax_Model_Calculation_Rule'); $customerClasses = $taxRule->getCustomerTaxClasses(); @@ -130,7 +130,7 @@ public function testCheckClassCanBeDeletedCustomerClassUsedInTaxRule() /** @var $model \Magento\Tax\Model\ClassModel */ $model = $this->_objectManager->create('Magento\Tax\Model\ClassModel')->load($customerClasses[0]); $this->setExpectedException( - 'Magento\Model\Exception', + 'Magento\Framework\Model\Exception', 'You cannot delete this tax class because it is used in' . ' Tax Rules. You have to delete the rules it is used in first.' ); @@ -143,8 +143,8 @@ public function testCheckClassCanBeDeletedCustomerClassUsedInTaxRule() */ public function testCheckClassCanBeDeletedProductClassUsedInTaxRule() { - /** @var $registry \Magento\Registry */ - $registry = $this->_objectManager->get('Magento\Registry'); + /** @var $registry \Magento\Framework\Registry */ + $registry = $this->_objectManager->get('Magento\Framework\Registry'); /** @var $taxRule \Magento\Tax\Model\Calculation\Rule */ $taxRule = $registry->registry('_fixture/Magento_Tax_Model_Calculation_Rule'); $productClasses = $taxRule->getProductTaxClasses(); @@ -152,7 +152,7 @@ public function testCheckClassCanBeDeletedProductClassUsedInTaxRule() /** @var $model \Magento\Tax\Model\ClassModel */ $model = $this->_objectManager->create('Magento\Tax\Model\ClassModel')->load($productClasses[0]); $this->setExpectedException( - 'Magento\Model\Exception', + 'Magento\Framework\Model\Exception', 'You cannot delete this tax class because it is used in' . ' Tax Rules. You have to delete the rules it is used in first.' ); diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Rate/CsvImportHandlerTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Rate/CsvImportHandlerTest.php index 184bd170800c8..b86ad2592b43a 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Rate/CsvImportHandlerTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Rate/CsvImportHandlerTest.php @@ -75,7 +75,7 @@ public function testImportFromCsvFileWithCorrectData() /** * @magentoDbIsolation enabled - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage One of the countries has invalid code. */ public function testImportFromCsvFileThrowsExceptionWhenCountryCodeIsInvalid() diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/Calculation/Rule/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/Calculation/Rule/CollectionTest.php index add9eae9b65bd..16e0927ec1348 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/Calculation/Rule/CollectionTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/Calculation/Rule/CollectionTest.php @@ -73,7 +73,7 @@ public function setClassTypeFilterDataProvider() /** * Test setClassTypeFilter with wrong Class Type * - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testSetClassTypeFilterWithWrongType() { diff --git a/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/CalculationTest.php b/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/CalculationTest.php index 7cd17e89e5e6f..7f1e126825221 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/CalculationTest.php +++ b/dev/tests/integration/testsuite/Magento/Tax/Model/Resource/CalculationTest.php @@ -38,11 +38,13 @@ public function testGetRate() /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $taxRule = $objectManager->get('Magento\Registry')->registry('_fixture/Magento_Tax_Model_Calculation_Rule'); + $taxRule = $objectManager->get('Magento\Framework\Registry') + ->registry('_fixture/Magento_Tax_Model_Calculation_Rule'); $customerTaxClasses = $taxRule->getTaxCustomerClass(); $productTaxClasses = $taxRule->getTaxProductClass(); - $taxRate = $objectManager->get('Magento\Registry')->registry('_fixture/Magento_Tax_Model_Calculation_Rate'); - $data = new \Magento\Object(); + $taxRate = $objectManager->get('Magento\Framework\Registry') + ->registry('_fixture/Magento_Tax_Model_Calculation_Rate'); + $data = new \Magento\Framework\Object(); $data->setData( array( 'country_id' => 'US', diff --git a/dev/tests/integration/testsuite/Magento/Tax/_files/tax_classes.php b/dev/tests/integration/testsuite/Magento/Tax/_files/tax_classes.php index ed41333f5c51d..2c4ced64e7bff 100644 --- a/dev/tests/integration/testsuite/Magento/Tax/_files/tax_classes.php +++ b/dev/tests/integration/testsuite/Magento/Tax/_files/tax_classes.php @@ -68,7 +68,7 @@ ); $rate = $objectManager->create('Magento\Tax\Model\Calculation\Rate')->setData($taxRate)->save(); -$objectManager->get('Magento\Registry')->register('_fixture/Magento_Tax_Model_Calculation_Rate', $rate); +$objectManager->get('Magento\Framework\Registry')->register('_fixture/Magento_Tax_Model_Calculation_Rate', $rate); $ruleData = array( 'code' => 'Test Rule', @@ -81,7 +81,7 @@ $taxRule = $objectManager->create('Magento\Tax\Model\Calculation\Rule')->setData($ruleData)->save(); -$objectManager->get('Magento\Registry')->register('_fixture/Magento_Tax_Model_Calculation_Rule', $taxRule); +$objectManager->get('Magento\Framework\Registry')->register('_fixture/Magento_Tax_Model_Calculation_Rule', $taxRule); $ruleData['code'] = 'Test Rule Duplicate'; diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php index 6e69c6067994d..63a930dd040f5 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/LayoutTest.php @@ -52,14 +52,14 @@ public static function tearDownAfterClass() /** * Composes full layout xml for designated parameters * - * @param \Magento\View\Design\ThemeInterface $theme - * @return \Magento\View\Layout\Element + * @param \Magento\Framework\View\Design\ThemeInterface $theme + * @return \Magento\Framework\View\Layout\Element */ - protected function _composeXml(\Magento\View\Design\ThemeInterface $theme) + protected function _composeXml(\Magento\Framework\View\Design\ThemeInterface $theme) { - /** @var \Magento\View\Layout\ProcessorInterface $layoutUpdate */ + /** @var \Magento\Framework\View\Layout\ProcessorInterface $layoutUpdate */ $layoutUpdate = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout\ProcessorInterface', + 'Magento\Framework\View\Layout\ProcessorInterface', array('theme' => $theme) ); return $layoutUpdate->getFileLayoutUpdatesXml(); @@ -69,7 +69,7 @@ protected function _composeXml(\Magento\View\Design\ThemeInterface $theme) * Validate node's declared position in hierarchy and add errors to the specified array if found * * @param \SimpleXMLElement $node - * @param \Magento\View\Layout\Element $xml + * @param \Magento\Framework\View\Layout\Element $xml * @param array &$errors */ protected function _collectHierarchyErrors($node, $xml, &$errors) @@ -106,9 +106,9 @@ public function areasAndThemesDataProvider() { $result = array(); $themeCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' )->getCollection(); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { $result[] = array($theme); } @@ -120,15 +120,15 @@ public function testHandleLabels() $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( /** - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Design\ThemeInterface $theme */ - function (\Magento\View\Design\ThemeInterface $theme) { + function (\Magento\Framework\View\Design\ThemeInterface $theme) { $xml = $this->_composeXml($theme); $xpath = '/layouts/*[@design_abstraction]'; $handles = $xml->xpath($xpath) ?: array(); - /** @var \Magento\View\Layout\Element $node */ + /** @var \Magento\Framework\View\Layout\Element $node */ $errors = array(); foreach ($handles as $node) { if (!$node->xpath('@label')) { @@ -156,7 +156,7 @@ public function testPageTypesDeclaration() /** * Check whether page types are declared only in layout update files allowed for it - base ones */ - function (\Magento\View\Layout\File $layout) { + function (\Magento\Framework\View\Layout\File $layout) { $content = simplexml_load_file($layout->getFilename()); $this->assertEmpty( $content->xpath(\Magento\Core\Model\Layout\Merge::XPATH_HANDLE_DECLARATION), @@ -170,26 +170,26 @@ function (\Magento\View\Layout\File $layout) { /** * Get theme layout updates * - * @return \Magento\View\Layout\File[] + * @return \Magento\Framework\View\Layout\File[] */ public function pageTypesDeclarationDataProvider() { - /** @var $themeUpdates \Magento\View\Layout\File\Source\Theme */ + /** @var $themeUpdates \Magento\Framework\View\Layout\File\Source\Theme */ $themeUpdates = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout\File\Source\Theme' + 'Magento\Framework\View\Layout\File\Source\Theme' ); - /** @var $themeUpdatesOverride \Magento\View\Layout\File\Source\Override\Theme */ + /** @var $themeUpdatesOverride \Magento\Framework\View\Layout\File\Source\Override\Theme */ $themeUpdatesOverride = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout\File\Source\Override\Theme' + 'Magento\Framework\View\Layout\File\Source\Override\Theme' ); /** @var $themeCollection \Magento\Core\Model\Theme\Collection */ $themeCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Core\Model\Theme\Collection' ); $themeCollection->addDefaultPattern('*'); - /** @var $themeLayouts \Magento\View\Layout\File[] */ + /** @var $themeLayouts \Magento\Framework\View\Layout\File[] */ $themeLayouts = array(); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { $themeLayouts = array_merge($themeLayouts, $themeUpdates->getFiles($theme)); $themeLayouts = array_merge($themeLayouts, $themeUpdatesOverride->getFiles($theme)); @@ -208,11 +208,15 @@ public function testOverrideBaseFiles() /** * Check, that for an overriding file ($themeFile) in a theme ($theme), there is a corresponding base file * - * @param \Magento\View\Layout\File $themeFile - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Layout\File $themeFile + * @param \Magento\Framework\View\Design\ThemeInterface $theme */ function ($themeFile, $theme) { - $baseFiles = self::_getCachedFiles($theme->getArea(), 'Magento\View\Layout\File\Source\Base', $theme); + $baseFiles = self::_getCachedFiles( + $theme->getArea(), + 'Magento\Framework\View\Layout\File\Source\Base', + $theme + ); $fileKey = $themeFile->getModule() . '/' . $themeFile->getName(); $this->assertArrayHasKey( $fileKey, @@ -232,8 +236,8 @@ public function testOverrideThemeFiles() * Check, that for an ancestor-overriding file ($themeFile) in a theme ($theme), * there is a corresponding file in that ancestor theme * - * @param \Magento\View\Layout\File $themeFile - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Layout\File $themeFile + * @param \Magento\Framework\View\Design\ThemeInterface $theme */ function ($themeFile, $theme) { // Find an ancestor theme, where a file is to be overridden @@ -256,7 +260,7 @@ function ($themeFile, $theme) { // Search for the overridden file in the ancestor theme $ancestorFiles = self::_getCachedFiles( $ancestorTheme->getFullPath(), - 'Magento\View\Layout\File\Source\Theme', + 'Magento\Framework\View\Layout\File\Source\Theme', $ancestorTheme ); $fileKey = $themeFile->getModule() . '/' . $themeFile->getName(); @@ -279,13 +283,16 @@ function ($themeFile, $theme) { * * @param string $cacheKey * @param string $sourceClass - * @param \Magento\View\Design\ThemeInterface $theme - * @return \Magento\View\Layout\File[] + * @param \Magento\Framework\View\Design\ThemeInterface $theme + * @return \Magento\Framework\View\Layout\File[] */ - protected static function _getCachedFiles($cacheKey, $sourceClass, \Magento\View\Design\ThemeInterface $theme) - { + protected static function _getCachedFiles( + $cacheKey, + $sourceClass, + \Magento\Framework\View\Design\ThemeInterface $theme + ) { if (!isset(self::$_cachedFiles[$cacheKey])) { - /* @var $fileList \Magento\View\Layout\File[] */ + /* @var $fileList \Magento\Framework\View\Layout\File[] */ $fileList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( $sourceClass )->getFiles( @@ -307,7 +314,7 @@ public function overrideBaseFilesDataProvider() { return $this->_retrieveFilesForEveryTheme( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout\File\Source\Override\Base' + 'Magento\Framework\View\Layout\File\Source\Override\Base' ) ); } @@ -319,7 +326,7 @@ public function overrideThemeFilesDataProvider() { return $this->_retrieveFilesForEveryTheme( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout\File\Source\Override\Theme' + 'Magento\Framework\View\Layout\File\Source\Override\Theme' ) ); } @@ -328,10 +335,10 @@ public function overrideThemeFilesDataProvider() * Scan all the themes in the system, for each theme retrieve list of files via $filesRetriever, * and return them as array of pairs [file, theme]. * - * @param \Magento\View\Layout\File\SourceInterface $filesRetriever + * @param \Magento\Framework\View\Layout\File\SourceInterface $filesRetriever * @return array */ - protected function _retrieveFilesForEveryTheme(\Magento\View\Layout\File\SourceInterface $filesRetriever) + protected function _retrieveFilesForEveryTheme(\Magento\Framework\View\Layout\File\SourceInterface $filesRetriever) { $result = array(); /** @var $themeCollection \Magento\Core\Model\Theme\Collection */ @@ -339,7 +346,7 @@ protected function _retrieveFilesForEveryTheme(\Magento\View\Layout\File\SourceI 'Magento\Core\Model\Theme\Collection' ); $themeCollection->addDefaultPattern('*'); - /** @var $theme \Magento\View\Design\ThemeInterface */ + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ foreach ($themeCollection as $theme) { foreach ($filesRetriever->getFiles($theme) as $file) { $result[] = array($file, $theme); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php index 5d8418a6592d8..ddf56f29eb765 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Payment/MethodsTest.php @@ -41,9 +41,9 @@ class MethodsTest extends \PHPUnit_Framework_TestCase */ public function testPaymentMethod($code, $methodClass) { - /** @var $blockFactory \Magento\View\Element\BlockFactory */ + /** @var $blockFactory \Magento\Framework\View\Element\BlockFactory */ $blockFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\Element\BlockFactory' + 'Magento\Framework\View\Element\BlockFactory' ); $storeId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Store\Model\StoreManagerInterface' @@ -74,7 +74,7 @@ public function testPaymentMethod($code, $methodClass) $this->assertNotEmpty($model->getTitle()); foreach (array($model->getFormBlockType(), $model->getInfoBlockType()) as $blockClass) { $message = "Block class: {$blockClass}"; - /** @var $block \Magento\View\Element\Template */ + /** @var $block \Magento\Framework\View\Element\Template */ $block = $blockFactory->createBlock($blockClass); $block->setArea('frontend'); $this->assertFileExists($block->getTemplateFile(), $message); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php index c4dc2be55b45c..53b94eb511c65 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/SkinFilesTest.php @@ -35,7 +35,7 @@ public function testWidgetPlaceholderImages($skinImage) { $this->assertFileExists( \Magento\TestFramework\Helper\Bootstrap::getObjectmanager()->get( - 'Magento\View\FileSystem' + 'Magento\Framework\View\FileSystem' )->getViewFile( $skinImage, array('area' => 'adminhtml') diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php index 44cb040d48ec2..7d382a707bb36 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Widget/TemplateFilesTest.php @@ -40,13 +40,13 @@ class TemplateFilesTest extends \PHPUnit_Framework_TestCase */ public function testWidgetTemplates($class, $template) { - /** @var $blockFactory \Magento\View\Element\BlockFactory */ + /** @var $blockFactory \Magento\Framework\View\Element\BlockFactory */ $blockFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\Element\BlockFactory' + 'Magento\Framework\View\Element\BlockFactory' ); - /** @var \Magento\View\Element\Template $block */ + /** @var \Magento\Framework\View\Element\Template $block */ $block = $blockFactory->createBlock($class); - $this->assertInstanceOf('Magento\View\Element\Template', $block); + $this->assertInstanceOf('Magento\Framework\View\Element\Template', $block); $block->setTemplate((string)$template); $this->assertFileExists($block->getTemplateFile()); } @@ -68,7 +68,7 @@ public function widgetTemplatesDataProvider() ); $config = $instance->setType($row['type'])->getWidgetConfigAsArray(); $class = $row['type']; - if (is_subclass_of($class, 'Magento\View\Element\Template')) { + if (is_subclass_of($class, 'Magento\Framework\View\Element\Template')) { if (isset( $config['parameters'] ) && isset( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php index f01954ac7d4dd..6a8ced760e205 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php @@ -48,7 +48,7 @@ protected function setUp() 'Magento\Framework\App\Filesystem' )->getPath( \Magento\Framework\App\Filesystem::LIB_DIR - ) . '/Magento/Acl/etc/acl.xsd'; + ) . '/Magento/Framework/Acl/etc/acl.xsd'; } /** @@ -58,7 +58,7 @@ protected function setUp() */ public function testAclConfigFile($file) { - $domConfig = new \Magento\Config\Dom(file_get_contents($file)); + $domConfig = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $domConfig->validate($this->_schemeFile, $errors); $message = "Invalid XML-file: {$file}\n"; foreach ($errors as $error) { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php index f7c975609ac83..ee3b4895ecc97 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php @@ -42,7 +42,7 @@ function ($module, $class, $area) { $this->assertNotEmpty($module); $this->assertTrue(class_exists($class), "Block class: {$class}"); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( $area ); @@ -52,8 +52,8 @@ function ($module, $class, $area) { $context->setValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH, false, false); $context->setValue( \Magento\Customer\Helper\Data::CONTEXT_GROUP, - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID, - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID, + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID ); \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea($area); @@ -87,7 +87,7 @@ public function allBlocksDataProvider() continue; } $class = new \ReflectionClass($blockClass); - if ($class->isAbstract() || !$class->isSubclassOf('Magento\View\Element\Template')) { + if ($class->isAbstract() || !$class->isSubclassOf('Magento\Framework\View\Element\Template')) { continue; } $templateBlocks = $this->_addBlock($module, $blockClass, $class, $templateBlocks); @@ -146,7 +146,7 @@ private function _addBlock($module, $blockClass, $class, $templateBlocks) )->getArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->load( - \Magento\Core\Model\App\Area::PART_CONFIG + \Magento\Framework\App\Area::PART_CONFIG ); $templateBlocks[$module . ', ' . $blockClass . ', ' . $area] = array($module, $blockClass, $area); return $templateBlocks; diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php index 73d5e9a60f409..0d4636f9e1275 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CacheFilesTest.php @@ -31,19 +31,19 @@ class CacheFilesTest extends \PHPUnit_Framework_TestCase */ public function testCacheConfig($area) { - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - /** @var \Magento\Cache\Config\Reader $reader */ + /** @var \Magento\Framework\Cache\Config\Reader $reader */ $reader = $objectManager->create( - 'Magento\Cache\Config\Reader', + 'Magento\Framework\Cache\Config\Reader', array('validationState' => $validationStateMock) ); try { $reader->read($area); - } catch (\Magento\Exception $exception) { + } catch (\Magento\Framework\Exception $exception) { $this->fail($exception->getMessage()); } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CarrierConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CarrierConfigFilesTest.php index e4582e5cacc13..54aa657f66c17 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CarrierConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CarrierConfigFilesTest.php @@ -35,7 +35,7 @@ class CarrierConfigFilesTest extends \PHPUnit_Framework_TestCase protected function setUp() { $moduleReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Module\Dir\Reader' + 'Magento\Framework\Module\Dir\Reader' ); $schemaFile = $moduleReader->getModuleDir('etc', 'Magento_Backend') . '/system.xsd'; $this->_reader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php index 3cf46e8f2b596..ca9a8af61819b 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/CrontabConfigFilesTest.php @@ -51,7 +51,7 @@ public function testCrontabConfigFiles() $invalidFiles = array(); $files = \Magento\TestFramework\Utility\Files::init()->getConfigFiles('crontab.xml'); - $mergedConfig = new \Magento\Config\Dom( + $mergedConfig = new \Magento\Framework\Config\Dom( '', $this->_idAttributes ); @@ -59,10 +59,10 @@ public function testCrontabConfigFiles() foreach ($files as $file) { $content = file_get_contents($file[0]); try { - new \Magento\Config\Dom($content, $this->_idAttributes); + new \Magento\Framework\Config\Dom($content, $this->_idAttributes); //merge won't be performed if file is invalid because of exception thrown $mergedConfig->merge($content); - } catch (\Magento\Config\Dom\ValidationException $e) { + } catch (\Magento\Framework\Config\Dom\ValidationException $e) { $invalidFiles[] = $file[0]; } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php index 5779828e8778f..670a41ccb3395 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php @@ -50,14 +50,15 @@ protected function _prepareFiles() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $configDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::CONFIG_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); self::$_primaryFiles = $fileIteratorFactory->create( $configDirectory, $configDirectory->search('{*/di.xml,di.xml}') ); //init module global configs - /** @var $modulesReader \Magento\Module\Dir\Reader */ - $modulesReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Module\Dir\Reader'); + /** @var $modulesReader \Magento\Framework\Module\Dir\Reader */ + $modulesReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\Module\Dir\Reader'); self::$_moduleGlobalFiles = $modulesReader->getConfigurationFiles('di.xml'); //init module area configs @@ -75,9 +76,9 @@ protected function _prepareFiles() */ public function testDiConfigFileWithoutMerging($xml) { - /** @var \Magento\ObjectManager\Config\SchemaLocator $schemaLocator */ + /** @var \Magento\Framework\ObjectManager\Config\SchemaLocator $schemaLocator */ $schemaLocator = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\ObjectManager\Config\SchemaLocator' + 'Magento\Framework\ObjectManager\Config\SchemaLocator' ); $dom = new \DOMDocument(); @@ -113,18 +114,18 @@ public function linearFilesProvider() */ public function testMergedDiConfig(array $files) { - $mapperMock = $this->getMock('Magento\ObjectManager\Config\Mapper\Dom', array(), array(), '', false); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $mapperMock = $this->getMock('Magento\Framework\ObjectManager\Config\Mapper\Dom', array(), array(), '', false); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('read')->will($this->returnValue($files)); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); - /** @var \Magento\ObjectManager\Config\SchemaLocator $schemaLocator */ + /** @var \Magento\Framework\ObjectManager\Config\SchemaLocator $schemaLocator */ $schemaLocator = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\ObjectManager\Config\SchemaLocator' + 'Magento\Framework\ObjectManager\Config\SchemaLocator' ); - new \Magento\ObjectManager\Config\Reader\Dom( + new \Magento\Framework\ObjectManager\Config\Reader\Dom( $fileResolverMock, $mapperMock, $schemaLocator, diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php index 0e41f4b7ebe95..392200648ff9f 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php @@ -36,15 +36,15 @@ public function setUp() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); $xmlFiles = $fileIteratorFactory->create( $modulesDirectory, $modulesDirectory->search('/*/*/etc/{*/eav_attributes.xml,eav_attributes.xml}') ); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue($xmlFiles)); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EventConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EventConfigFilesTest.php index 8b991a0d96123..1ad16fdf697da 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EventConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EventConfigFilesTest.php @@ -33,7 +33,7 @@ class EventConfigFilesTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_schemaFile = $objectManager->get('Magento\Event\Config\SchemaLocator')->getSchema(); + $this->_schemaFile = $objectManager->get('Magento\Framework\Event\Config\SchemaLocator')->getSchema(); } /** @@ -43,7 +43,7 @@ protected function setUp() public function testEventConfigFiles($file) { $errors = array(); - $dom = new \Magento\Config\Dom(file_get_contents($file)); + $dom = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $dom->validate($this->_schemaFile, $errors); $message = "Invalid XML-file: {$file}\n"; foreach ($errors as $error) { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php index 068ca7346be48..6359d6de2a69d 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php @@ -36,15 +36,15 @@ public function setUp() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); $xmlFiles = $fileIteratorFactory->create( $modulesDirectory, $modulesDirectory->search('/*/*/etc/{*/export.xml,export.xml}') ); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue($xmlFiles)); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php index 3247aea32abf4..af6eeafc0b9ba 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/FieldsetConfigFilesTest.php @@ -34,7 +34,7 @@ class FieldsetConfigFilesTest extends \Magento\TestFramework\TestCase\AbstractCo */ protected function _getReaderClassName() { - return 'Magento\Object\Copy\Config\Reader'; + return 'Magento\Framework\Object\Copy\Config\Reader'; } /** @@ -56,6 +56,6 @@ protected function _getConfigFilePathGlob() */ protected function _getXsdPath() { - return '/../../lib/Magento/Object/etc/fieldset_file.xsd'; + return '/../../lib/Magento/Framework/Object/etc/fieldset_file.xsd'; } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php index 3745bc71e9982..9ad888949d811 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php @@ -36,15 +36,15 @@ public function setUp() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); $xmlFiles = $fileIteratorFactory->create( $modulesDirectory, $modulesDirectory->search('/*/*/etc/{*/import.xml,import.xml}') ); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue($xmlFiles)); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php index 67a2076721bfc..3c7f7b6bcc5a1 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php @@ -36,15 +36,15 @@ public function setUp() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); $xmlFiles = $fileIteratorFactory->create( $modulesDirectory, $modulesDirectory->search('/*/*/etc/{*/indexers.xml,indexers.xml}') ); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue($xmlFiles)); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php index cecd3f6f219a1..85e671eb071c7 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php @@ -26,19 +26,19 @@ class LayoutFilesTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\Layout\Argument\Parser + * @var \Magento\Framework\View\Layout\Argument\Parser */ protected $_argParser; /** - * @var \Magento\Data\Argument\InterpreterInterface + * @var \Magento\Framework\Data\Argument\InterpreterInterface */ protected $_argInterpreter; protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->_argParser = $objectManager->get('Magento\View\Layout\Argument\Parser'); + $this->_argParser = $objectManager->get('Magento\Framework\View\Layout\Argument\Parser'); $this->_argInterpreter = $objectManager->get('layoutArgumentInterpreter'); } @@ -62,7 +62,7 @@ public function testLayoutArguments($area, $layoutFile) continue; } $this->_argInterpreter->evaluate($argumentData); - } catch (\Magento\Data\Argument\MissingOptionalValueException $e) { + } catch (\Magento\Framework\Data\Argument\MissingOptionalValueException $e) { // Argument value is missing in the testing environment, but it's optional, so no big deal } catch (\Exception $e) { $this->fail($e->getMessage()); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Catalog/AttributeConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Catalog/AttributeConfigFilesTest.php index aa89df78c2bf5..3c1921885aed3 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Catalog/AttributeConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Catalog/AttributeConfigFilesTest.php @@ -44,7 +44,7 @@ protected function setUp() */ public function testFileFormat($file) { - $dom = new \Magento\Config\Dom(file_get_contents($file)); + $dom = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $dom->validate($this->_schemaFile, $errors); $this->assertTrue($result, print_r($errors, true)); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Customer/AddressFormatsFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Customer/AddressFormatsFilesTest.php index 39cade289435f..0f1305910705d 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Customer/AddressFormatsFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Customer/AddressFormatsFilesTest.php @@ -45,7 +45,7 @@ protected function setUp() */ public function testFileFormat($file) { - $dom = new \Magento\Config\Dom(file_get_contents($file)); + $dom = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $dom->validate($this->_schemaFile, $errors); $this->assertTrue($result, print_r($errors, true)); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Email/EmailTemplateConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Email/EmailTemplateConfigFilesTest.php index aee1df2712c2b..2a84296ca7d2f 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Email/EmailTemplateConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Email/EmailTemplateConfigFilesTest.php @@ -34,7 +34,7 @@ class EmailTemplateConfigFilesTest extends \PHPUnit_Framework_TestCase public function testFileFormat($file) { $schemaFile = BP . '/app/code/Magento/Email/etc/email_templates.xsd'; - $dom = new \Magento\Config\Dom(file_get_contents($file)); + $dom = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $dom->validate($schemaFile, $errors); $this->assertTrue($result, print_r($errors, true)); } @@ -84,7 +84,7 @@ public function templateReferenceDataProvider() */ public function testMergedFormat() { - $validationState = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationState = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationState->expects($this->any())->method('isValidated')->will($this->returnValue(true)); /** @var \Magento\Email\Model\Template\Config\Reader $reader */ $reader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Sales/PdfConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Sales/PdfConfigFilesTest.php index e7107530d2f1b..24e4cf2c082ce 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Sales/PdfConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/Magento/Sales/PdfConfigFilesTest.php @@ -37,7 +37,7 @@ public function testFileFormat($file) ); $schemaFile = $schemaLocator->getPerFileSchema(); - $dom = new \Magento\Config\Dom(file_get_contents($file)); + $dom = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $dom->validate($schemaFile, $errors); $this->assertTrue($result, print_r($errors, true)); } @@ -52,7 +52,7 @@ public function fileFormatDataProvider() public function testMergedFormat() { - $validationState = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationState = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationState->expects($this->any())->method('isValidated')->will($this->returnValue(true)); /** @var \Magento\Sales\Model\Order\Pdf\Config\Reader $reader */ diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php index 6f3ca61c3b210..18dea20680152 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MenuConfigFilesTest.php @@ -36,7 +36,7 @@ class MenuConfigFilesTest extends \PHPUnit_Framework_TestCase protected function setUp() { $moduleReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Module\Dir\Reader' + 'Magento\Framework\Module\Dir\Reader' ); $schemaFile = $moduleReader->getModuleDir('etc', 'Magento_Backend') . '/menu.xsd'; $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php index f855e342805d4..612ee22c34dee 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php @@ -48,7 +48,7 @@ protected function setUp() 'Magento\Framework\App\Filesystem' )->getPath( \Magento\Framework\App\Filesystem::LIB_DIR - ) . '/Magento/Mview/etc/mview.xsd'; + ) . '/Magento/Framework/Mview/etc/mview.xsd'; } /** @@ -58,7 +58,7 @@ protected function setUp() */ public function testIndexerConfigFile($file) { - $domConfig = new \Magento\Config\Dom(file_get_contents($file)); + $domConfig = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $domConfig->validate($this->schemeFile, $errors); $message = "Invalid XML-file: {$file}\n"; foreach ($errors as $error) { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/NewIndexerConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/NewIndexerConfigFilesTest.php index 788941eb464b2..fe8a8def084e1 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/NewIndexerConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/NewIndexerConfigFilesTest.php @@ -58,7 +58,7 @@ protected function setUp() */ public function testIndexerConfigFile($file) { - $domConfig = new \Magento\Config\Dom(file_get_contents($file)); + $domConfig = new \Magento\Framework\Config\Dom(file_get_contents($file)); $result = $domConfig->validate($this->schemeFile, $errors); $message = "Invalid XML-file: {$file}\n"; foreach ($errors as $error) { diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php index a8028cbb7f9c4..0ce4d0d27f79b 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php @@ -37,15 +37,15 @@ protected function setUp() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); $xmlFiles = $fileIteratorFactory->create( $modulesDirectory, $modulesDirectory->search('/*/*/etc/{*/product_options.xml,product_options.xml}') ); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue($xmlFiles)); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_model = $objectManager->create( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php index bc390d9e005f9..e74971fa165d5 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php @@ -36,15 +36,15 @@ protected function setUp() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); $xmlFiles = $fileIteratorFactory->create( $modulesDirectory, $modulesDirectory->search('/*/*/etc/{*/product_types.xml,product_types.xml}') ); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue($xmlFiles)); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_model = $objectManager->create( diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php index 84ca175fc8cd8..37477773fe833 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php @@ -36,15 +36,15 @@ protected function setUp() /** @var $filesystem \Magento\Framework\App\Filesystem */ $filesystem = $objectManager->get('Magento\Framework\App\Filesystem'); $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR); - $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory'); + $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory'); $xmlFiles = $fileIteratorFactory->create( $modulesDirectory, $modulesDirectory->search('/*/*/etc/{*/resources.xml,resources.xml}') ); - $fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue($xmlFiles)); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->any())->method('isValidated')->will($this->returnValue(true)); $localConfigMock = $this->getMock('Magento\Framework\App\Arguments', array(), array(), '', false); $localConfigMock->expects($this->any())->method('getConfiguration')->will($this->returnValue(array())); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php index e36bf75deaf79..3eae10182e23a 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/RouteConfigFilesTest.php @@ -65,16 +65,16 @@ public function testRouteConfigsValidation() $mask = $magentoBaseDir . '/app/code/*/*/etc/*/routes.xml'; $files = glob($mask); - $mergedConfig = new \Magento\Config\Dom('', $this->_idAttributes); + $mergedConfig = new \Magento\Framework\Config\Dom('', $this->_idAttributes); foreach ($files as $file) { $content = file_get_contents($file); try { - new \Magento\Config\Dom($content, $this->_idAttributes, null, $this->_schemaFile); + new \Magento\Framework\Config\Dom($content, $this->_idAttributes, null, $this->_schemaFile); //merge won't be performed if file is invalid because of exception thrown $mergedConfig->merge($content); - } catch (\Magento\Config\Dom\ValidationException $e) { + } catch (\Magento\Framework\Config\Dom\ValidationException $e) { $invalidFiles[] = $file; } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php index 7842d3d689cae..15dd1f789d21f 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SalesConfigFilesTest.php @@ -59,7 +59,7 @@ public function testSalesConfigFiles() $invalidFiles = array(); $files = \Magento\TestFramework\Utility\Files::init()->getConfigFiles('sales.xml'); - $mergedConfig = new \Magento\Config\Dom( + $mergedConfig = new \Magento\Framework\Config\Dom( '', $this->_idAttributes ); @@ -67,10 +67,10 @@ public function testSalesConfigFiles() foreach ($files as $file) { $content = file_get_contents($file[0]); try { - new \Magento\Config\Dom($content, $this->_idAttributes); + new \Magento\Framework\Config\Dom($content, $this->_idAttributes); //merge won't be performed if file is invalid because of exception thrown $mergedConfig->merge($content); - } catch (\Magento\Config\Dom\ValidationException $e) { + } catch (\Magento\Framework\Config\Dom\ValidationException $e) { $invalidFiles[] = $file[0]; } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php index 21124cb1aca9d..4cf6306e9fd43 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php @@ -43,7 +43,7 @@ public function testConfiguration() $fileList = glob($modulesDir . '/*/*/etc/adminhtml/system.xml'); $configMock = $this->getMock( - 'Magento\Module\Dir\Reader', + 'Magento\Framework\Module\Dir\Reader', array('getConfigurationFiles', 'getModuleDir'), array(), '', @@ -65,7 +65,7 @@ public function testConfiguration() 'Magento\Backend\Model\Config\Structure\Reader', array('moduleReader' => $configMock, 'runtimeValidation' => true) ); - } catch (\Magento\Exception $exp) { + } catch (\Magento\Framework\Exception $exp) { $this->fail($exp->getMessage()); } } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php index 40b39f834d569..1b627ba19ec87 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php @@ -37,18 +37,18 @@ public function testAllTemplates() $invoker( function ($module, $template, $class, $area) { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme(); // intentionally to make sure the module files will be requested $params = array( 'area' => $area, 'themeModel' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ), 'module' => $module ); $file = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager()->get( - 'Magento\View\FileSystem' + 'Magento\Framework\View\FileSystem' )->getFilename( $template, $params @@ -80,7 +80,7 @@ public function allTemplatesDataProvider() continue; } $class = new \ReflectionClass($blockClass); - if ($class->isAbstract() || !$class->isSubclassOf('Magento\View\Element\Template')) { + if ($class->isAbstract() || !$class->isSubclassOf('Magento\Framework\View\Element\Template')) { continue; } @@ -105,10 +105,10 @@ public function allTemplatesDataProvider() )->getArea( $area )->load( - \Magento\Core\Model\App\Area::PART_CONFIG + \Magento\Framework\App\Area::PART_CONFIG ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Config\ScopeInterface' + 'Magento\Framework\Config\ScopeInterface' )->setCurrentScope( $area ); @@ -123,8 +123,8 @@ public function allTemplatesDataProvider() $context->setValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH, false, false); $context->setValue( \Magento\Customer\Helper\Data::CONTEXT_GROUP, - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID, - \Magento\Customer\Model\Group::NOT_LOGGED_IN_ID + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID, + \Magento\Customer\Service\V1\CustomerGroupServiceInterface::NOT_LOGGED_IN_ID ); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($blockClass); $template = $block->getTemplate(); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php index 2d1c284b8c1ed..bf9108500096c 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php @@ -34,13 +34,13 @@ class ViewConfigFilesTest extends \PHPUnit_Framework_TestCase */ public function testViewConfigFile($file) { - $domConfig = new \Magento\Config\Dom($file); + $domConfig = new \Magento\Framework\Config\Dom($file); $result = $domConfig->validate( \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getPath( \Magento\Framework\App\Filesystem::LIB_DIR - ) . '/Magento/Config/etc/view.xsd', + ) . '/Magento/Framework/Config/etc/view.xsd', $errors ); $message = "Invalid XML-file: {$file}\n"; @@ -57,7 +57,7 @@ public function viewConfigFileDataProvider() { $result = array(); $files = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Module\Dir\Reader' + 'Magento\Framework\Module\Dir\Reader' )->getConfigurationFiles( 'view.xml' ); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php index 9c246c060b82a..6e2f3816c5856 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewFilesTest.php @@ -40,10 +40,10 @@ function ($application, $file) { \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea($application); \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\View\DesignInterface') + ->get('Magento\Framework\View\DesignInterface') ->setDefaultDesignTheme(); $result = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\View\FileSystem') + ->get('Magento\Framework\View\FileSystem') ->getViewFile($file); $fileInfo = pathinfo($result); @@ -51,7 +51,7 @@ function ($application, $file) { if (!file_exists($result)) { $file = str_replace('.css', '.less', $file); $result = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() - ->get('Magento\View\FileSystem') + ->get('Magento\Framework\View\FileSystem') ->getViewFile($file); }; } @@ -70,9 +70,9 @@ function ($application, $file) { public function viewFilesFromModulesViewDataProvider() { $files = array(); - /** @var $configModelReader \Magento\Module\Dir\Reader */ + /** @var $configModelReader \Magento\Framework\Module\Dir\Reader */ $configModelReader = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Module\Dir\Reader' + 'Magento\Framework\Module\Dir\Reader' ); foreach ($this->_getEnabledModules() as $moduleName) { $moduleViewDir = $configModelReader->getModuleDir('view', $moduleName); @@ -160,10 +160,10 @@ function ($application, $file) { $application ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme(); $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\FileSystem' + 'Magento\Framework\View\FileSystem' ); $this->assertFileExists($filesystem->getViewFile($file)); }, diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php index 10f80ed6bc1c3..c69a2f08034db 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php @@ -52,7 +52,7 @@ public function testTemplates() $params = array('area' => $area, 'themeId' => $themeId, 'module' => $module); try { $templateFilename = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager()->get( - 'Magento\View\FileSystem' + 'Magento\Framework\View\FileSystem' )->getFilename( $file, $params @@ -80,9 +80,9 @@ public function templatesDataProvider() $themes = $this->_getDesignThemes(); foreach ($themes as $theme) { - /** @var \Magento\View\Layout\ProcessorInterface $layoutUpdate */ + /** @var \Magento\Framework\View\Layout\ProcessorInterface $layoutUpdate */ $layoutUpdate = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Layout\ProcessorInterface', + 'Magento\Framework\View\Layout\ProcessorInterface', array('theme' => $theme) ); $layoutTemplates = $this->_getLayoutTemplates($layoutUpdate->getFileLayoutUpdatesXml()); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php index 52dc44142ffc5..6602433d5c10a 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php @@ -34,7 +34,7 @@ class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity protected $objectManager; /** - * @var \Magento\View\FileSystem + * @var \Magento\Framework\View\FileSystem */ protected $viewFileSystem; @@ -46,7 +46,7 @@ class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity protected function setUp() { $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectmanager(); - $this->viewFileSystem = $this->objectManager->get('Magento\View\FileSystem'); + $this->viewFileSystem = $this->objectManager->get('Magento\Framework\View\FileSystem'); $this->filesystem = $this->objectManager->get('Magento\Framework\App\Filesystem'); $this->objectManager->configure( array('preferences' => array('Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data')) @@ -59,10 +59,10 @@ protected function setUp() public function testViewLessFilesPreProcessing() { $errorHandlerMock = $this->getMock( - 'Magento\Less\PreProcessor\ErrorHandlerInterface', + 'Magento\Framework\Less\PreProcessor\ErrorHandlerInterface', array('processException') ); - $this->objectManager->addSharedInstance($errorHandlerMock, 'Magento\Less\PreProcessor\ErrorHandler'); + $this->objectManager->addSharedInstance($errorHandlerMock, 'Magento\Framework\Less\PreProcessor\ErrorHandler'); $errorHandlerMock->expects($this->any())->method('processException')->will( $this->returnCallback( function ($exception) { @@ -71,13 +71,13 @@ function ($exception) { } ) ); - /** @var $lessPreProcessor \Magento\Less\PreProcessor */ - $lessPreProcessor = $this->objectManager->create('Magento\Less\PreProcessor'); + /** @var $lessPreProcessor \Magento\Framework\Less\PreProcessor */ + $lessPreProcessor = $this->objectManager->create('Magento\Framework\Less\PreProcessor'); $directoryRead = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); /** - * Solution for \Magento\View\Layout\File\Source\Base aggregator, it depends on theme and area + * Solution for \Magento\Framework\View\Layout\File\Source\Base aggregator, it depends on theme and area */ - $theme = $this->objectManager->create('Magento\View\Design\ThemeInterface'); + $theme = $this->objectManager->create('Magento\Framework\View\Design\ThemeInterface'); $theme->setArea('frontend'); $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( @@ -115,8 +115,8 @@ function ($file, $area) use ($lessPreProcessor, $directoryRead, $theme) { public function testViewFilesFromThemes() { $directoryRead = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR); - /** @var $viewService \Magento\View\Service */ - $viewService = $this->objectManager->get('Magento\View\Service'); + /** @var $viewService \Magento\Framework\View\Service */ + $viewService = $this->objectManager->get('Magento\Framework\View\Service'); $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( /** @@ -160,7 +160,7 @@ protected function checkCssRelatedFiles($file, $viewFile, $params) { $files = array(); $content = file_get_contents($viewFile); - preg_match_all(\Magento\View\Url\CssResolver::REGEX_CSS_RELATIVE_URLS, $content, $matches); + preg_match_all(\Magento\Framework\View\Url\CssResolver::REGEX_CSS_RELATIVE_URLS, $content, $matches); foreach ($matches[1] as $relativePath) { $path = $this->_addCssDirectory($relativePath, $file); $pathFile = $this->viewFileSystem->getViewFile($path, $params); @@ -267,9 +267,9 @@ protected function _collectViewUrlInvokes($theme, &$files) protected function _collectViewLayoutDeclarations($theme, &$files) { // Collect "addCss" and "addJs" from theme layout - /** @var \Magento\View\Layout\ProcessorInterface $layoutUpdate */ + /** @var \Magento\Framework\View\Layout\ProcessorInterface $layoutUpdate */ $layoutUpdate = $this->objectManager->create( - 'Magento\View\Layout\ProcessorInterface', + 'Magento\Framework\View\Layout\ProcessorInterface', array('theme' => $theme) ); $fileLayoutUpdates = $layoutUpdate->getFileLayoutUpdatesXml(); diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php index 156bf3a5062b3..1bf841bd809a0 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php @@ -41,7 +41,7 @@ public function testViewConfigFile($file) } $this->_validateConfigFile( $file, - $this->getPath(\Magento\Framework\App\Filesystem::LIB_DIR) . '/Magento/Config/etc/view.xsd' + $this->getPath(\Magento\Framework\App\Filesystem::LIB_DIR) . '/Magento/Framework/Config/etc/view.xsd' ); } @@ -88,7 +88,7 @@ public function testThemeConfigFileSchema($file) { $this->_validateConfigFile( $file, - $this->getPath(\Magento\Framework\App\Filesystem::LIB_DIR) . '/Magento/Config/etc/theme.xsd' + $this->getPath(\Magento\Framework\App\Filesystem::LIB_DIR) . '/Magento/Framework/Config/etc/theme.xsd' ); } @@ -128,7 +128,7 @@ public function themeConfigFileDataProvider() */ protected function _validateConfigFile($file, $schemaFile) { - $domConfig = new \Magento\Config\Dom(file_get_contents($file)); + $domConfig = new \Magento\Framework\Config\Dom(file_get_contents($file)); $errors = array(); $result = $domConfig->validate($schemaFile, $errors); $message = "Invalid XML-file: {$file}\n"; diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php index 7a8fb5d6b6768..dda3f84c7a3c7 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/ViewFileReferenceTest.php @@ -41,12 +41,12 @@ class ViewFileReferenceTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\Design\Fallback\Rule\RuleInterface + * @var \Magento\Framework\View\Design\Fallback\Rule\RuleInterface */ protected static $_fallbackRule; /** - * @var \Magento\View\Design\FileResolution\Strategy\Fallback + * @var \Magento\Framework\View\Design\FileResolution\Strategy\Fallback */ protected static $_fallback; @@ -67,11 +67,11 @@ public static function setUpBeforeClass() array('preferences' => array('Magento\Core\Model\Theme' => 'Magento\Core\Model\Theme\Data')) ); - /** @var $fallbackFactory \Magento\View\Design\Fallback\Factory */ - $fallbackFactory = $objectManager->get('Magento\View\Design\Fallback\Factory'); + /** @var $fallbackFactory \Magento\Framework\View\Design\Fallback\Factory */ + $fallbackFactory = $objectManager->get('Magento\Framework\View\Design\Fallback\Factory'); self::$_fallbackRule = $fallbackFactory->createViewFileRule(); - self::$_fallback = $objectManager->get('Magento\View\Design\FileResolution\Strategy\Fallback'); + self::$_fallback = $objectManager->get('Magento\Framework\View\Design\FileResolution\Strategy\Fallback'); // Themes to be checked self::$_themeCollection = $objectManager->get('Magento\Core\Model\Theme\Collection'); @@ -90,10 +90,10 @@ public static function setUpBeforeClass() /** * Return array of locales, supported by the theme * - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Design\ThemeInterface $theme * @return array */ - protected static function _getThemeLocales(\Magento\View\Design\ThemeInterface $theme) + protected static function _getThemeLocales(\Magento\Framework\View\Design\ThemeInterface $theme) { $result = array(); $patternDir = self::_getLocalePatternDir($theme); @@ -110,11 +110,11 @@ protected static function _getThemeLocales(\Magento\View\Design\ThemeInterface $ /** * Return pattern for theme locale directories, where is placed to mark a locale's location. * - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Design\ThemeInterface $theme * @return string * @throws \Exception */ - protected static function _getLocalePatternDir(\Magento\View\Design\ThemeInterface $theme) + protected static function _getLocalePatternDir(\Magento\Framework\View\Design\ThemeInterface $theme) { $localePlaceholder = ''; $params = array('area' => $theme->getArea(), 'theme' => $theme, 'locale' => $localePlaceholder); @@ -139,7 +139,7 @@ protected static function _getLocalePatternDir(\Magento\View\Design\ThemeInterfa */ public function testModularFallback($modularCall, array $usages, $area) { - list(, $file) = explode(\Magento\View\Service::SCOPE_SEPARATOR, $modularCall); + list(, $file) = explode(\Magento\Framework\View\Service::SCOPE_SEPARATOR, $modularCall); $wrongResolutions = array(); foreach (self::$_themeCollection as $theme) { @@ -166,11 +166,11 @@ public function testModularFallback($modularCall, array $usages, $area) /** * Resolves file to find its fallback'ed paths * - * @param \Magento\View\Design\ThemeInterface $theme + * @param \Magento\Framework\View\Design\ThemeInterface $theme * @param string $file * @return array */ - protected function _getFileResolutions(\Magento\View\Design\ThemeInterface $theme, $file) + protected function _getFileResolutions(\Magento\Framework\View\Design\ThemeInterface $theme, $file) { $found = array(); $fileResolved = self::$_fallback->getFile($theme->getArea(), $theme, $file); @@ -198,7 +198,8 @@ public static function modularFallbackDataProvider() $modulePattern = '[A-Z][a-z]+_[A-Z][a-z]+'; $filePattern = '[[:alnum:]_/-]+\\.[[:alnum:]_./-]+'; - $pattern = '#' . $modulePattern . preg_quote(\Magento\View\Service::SCOPE_SEPARATOR) . $filePattern . '#S'; + $pattern = '#' . $modulePattern . preg_quote(\Magento\Framework\View\Service::SCOPE_SEPARATOR) + . $filePattern . '#S'; if (!preg_match_all($pattern, file_get_contents($file), $matches)) { continue; } diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml index 70ddb3f03f4a5..1c0f650f56424 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml index 3096251054d62..789ef9761a9f9 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config1.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml index dc29823e4c02a..5a0c62d73af34 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config2.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml index 2f62623d82235..45dc90668ee66 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config3.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml index df308216ce6e2..63c10ddf34082 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config4.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml index 517641e83b9bb..bf40c4cf49092 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/config5.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php index 8db346e0f471c..27e59b6fa4f97 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/I18n/Code/Pack/GeneratorTest.php @@ -80,7 +80,7 @@ protected function setUp() protected function tearDown() { - \Magento\System\Dirs::rm($this->_pathPath); + \Magento\Framework\System\Dirs::rm($this->_pathPath); } public function testGeneration() diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php index 09ed3169e6ea6..535e083a156dd 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php @@ -73,7 +73,7 @@ protected function setUp() public function tearDown() { - \Magento\System\Dirs::rm($this->_varDir); + \Magento\Framework\System\Dirs::rm($this->_varDir); } public function testGetReferences() diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml index fbd3daacf6efc..2c58b4f0c73a3 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutInvalid.xml @@ -25,13 +25,13 @@ --> - + - + - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml index 49d448682bd7a..22ed6b5a88666 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValid.xml @@ -25,10 +25,10 @@ --> - + - + diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml index b8b11ae9f2150..b0fc02e09c4ca 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/_files/layoutValidExpectUpdated.xml @@ -25,10 +25,10 @@ --> - + - + diff --git a/dev/tests/integration/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/GeneralTest.php b/dev/tests/integration/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/GeneralTest.php index 1c7d9e9f2c74d..aee1b95db3025 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/GeneralTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/GeneralTest.php @@ -31,10 +31,10 @@ */ class GeneralTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\View\LayoutInterface */ + /** @var \Magento\Framework\View\LayoutInterface */ protected $_layout; - /** @var \Magento\View\Design\ThemeInterface */ + /** @var \Magento\Framework\View\Design\ThemeInterface */ protected $_theme; /** @var \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab_General */ @@ -44,12 +44,12 @@ protected function setUp() { parent::setUp(); $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); $this->_theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Design\ThemeInterface' + 'Magento\Framework\View\Design\ThemeInterface' ); - $this->_theme->setType(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL); + $this->_theme->setType(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL); $this->_block = $this->_layout->createBlock( 'Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\General' ); @@ -59,7 +59,7 @@ public function testToHtmlPreviewImageNote() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_theme', $this->_theme); + $objectManager->get('Magento\Framework\Registry')->register('current_theme', $this->_theme); $this->_block->setArea('adminhtml'); $this->_block->toHtml(); diff --git a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/BreadcrumbsTest.php b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/BreadcrumbsTest.php index 5795e61409f41..7345ee0d069cc 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/BreadcrumbsTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/BreadcrumbsTest.php @@ -38,7 +38,7 @@ protected function setUp() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Theme\Block\Html\Breadcrumbs' ); diff --git a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/FooterTest.php b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/FooterTest.php index 1677314ee4e10..8de6899f46382 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/FooterTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/FooterTest.php @@ -37,7 +37,9 @@ protected function setUp() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); - $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface'); + $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\DesignInterface' + ); $this->_theme = $design->setDefaultDesignTheme()->getDesignTheme(); } @@ -46,7 +48,8 @@ public function testGetCacheKeyInfo() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $context = $objectManager->get('Magento\Framework\App\Http\Context'); $context->setValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH, false, false); - $block = $objectManager->get('Magento\View\LayoutInterface')->createBlock('Magento\Theme\Block\Html\Footer'); + $block = $objectManager->get('Magento\Framework\View\LayoutInterface') + ->createBlock('Magento\Theme\Block\Html\Footer'); $storeId = $objectManager->get('Magento\Store\Model\StoreManagerInterface')->getStore()->getId(); $this->assertEquals( array('PAGE_FOOTER', $storeId, 0, $this->_theme->getId(), null), diff --git a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php index 69d5f3f3c266d..b73722e8ade09 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Block/Html/HeadTest.php @@ -38,12 +38,12 @@ protected function setUp() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDesignTheme( 'Magento/blank' ); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Theme\Block\Html\Head' ); diff --git a/dev/tests/integration/testsuite/Magento/Theme/Block/HtmlTest.php b/dev/tests/integration/testsuite/Magento/Theme/Block/HtmlTest.php index a81b16d636cec..f1bfabaa4ef90 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Block/HtmlTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Block/HtmlTest.php @@ -39,20 +39,20 @@ public function testGetPrintLogoUrl($configData, $returnValue) )->disableOriginalConstructor()->getMock(); $scopeConfig->expects($this->atLeastOnce())->method('getValue')->will($this->returnValueMap($configData)); - $securityInfoMock = $this->getMock('Magento\Url\SecurityInfoInterface'); + $securityInfoMock = $this->getMock('Magento\Framework\Url\SecurityInfoInterface'); $codeData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); $urlBuilder = $this->getMock( - 'Magento\Url', + 'Magento\Framework\Url', array('getBaseUrl'), array( $this->getMock('Magento\Framework\App\Route\ConfigInterface'), $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false), $securityInfoMock, - $this->getMock('Magento\Url\ScopeResolverInterface', array(), array(), '', false), - $this->getMock('Magento\Session\Generic', array(), array(), '', false), - $this->getMock('Magento\Session\SidResolverInterface', array(), array(), '', false), - $this->getMock('Magento\Url\RouteParamsResolverFactory', array(), array(), '', false), - $this->getMock('Magento\Url\QueryParamsResolver', array(), array(), '', false), + $this->getMock('Magento\Framework\Url\ScopeResolverInterface', array(), array(), '', false), + $this->getMock('Magento\Framework\Session\Generic', array(), array(), '', false), + $this->getMock('Magento\Framework\Session\SidResolverInterface', array(), array(), '', false), + $this->getMock('Magento\Framework\Url\RouteParamsResolverFactory', array(), array(), '', false), + $this->getMock('Magento\Framework\Url\QueryParamsResolver', array(), array(), '', false), $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface', array(), array(), '', false), \Magento\Store\Model\ScopeInterface::SCOPE_STORE, array() @@ -67,7 +67,7 @@ public function testGetPrintLogoUrl($configData, $returnValue) ); $context = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array('scopeConfig' => $scopeConfig, 'urlBuilder' => $urlBuilder) ); $storeManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php index b1e449931e201..a230deb732477 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php @@ -62,7 +62,9 @@ public function testUploadJsAction() /** @var $directoryList \Magento\Framework\App\Filesystem\DirectoryList */ $directoryList->addDirectory(\Magento\Framework\App\Filesystem::SYS_TMP_DIR, array('path' => '/')); - $theme = $this->_objectManager->create('Magento\View\Design\ThemeInterface')->getCollection()->getFirstItem(); + $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface') + ->getCollection() + ->getFirstItem(); $this->getRequest()->setPost('id', $theme->getId()); $this->dispatch('backend/admin/system_design_theme/uploadjs'); diff --git a/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/Config/ReaderTest.php index 582020d13ef7d..143a4162e5266 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/Config/ReaderTest.php @@ -32,7 +32,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase */ protected $_model; - /** @var \Magento\Config\FileResolverInterface/PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Config\FileResolverInterface/PHPUnit_Framework_MockObject_MockObject */ protected $_fileResolverMock; public function setUp() @@ -42,7 +42,7 @@ public function setUp() $cache = $objectManager->create('Magento\Framework\App\Cache'); $cache->clean(); $this->_fileResolverMock = $this->getMockBuilder( - 'Magento\Config\FileResolverInterface' + 'Magento\Framework\Config\FileResolverInterface' )->disableOriginalConstructor()->getMock(); $this->_model = $objectManager->create( 'Magento\Theme\Model\Layout\Config\Reader', diff --git a/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/ConfigTest.php index b7c1be80a3527..6ad1a0e38eac1 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Model/Layout/ConfigTest.php @@ -39,7 +39,7 @@ public function setUp() $cache = $objectManager->create('Magento\Framework\App\Cache'); $cache->clean(); $fileResolverMock = $this->getMockBuilder( - 'Magento\Config\FileResolverInterface' + 'Magento\Framework\Config\FileResolverInterface' )->disableOriginalConstructor()->getMock(); $configFile = file_get_contents(__DIR__ . '/_files/page_layouts.xml'); $fileResolverMock->expects($this->any())->method('get')->will($this->returnValue(array($configFile))); diff --git a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php b/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php index 7c45bb3f54306..c4667dd2c20b7 100644 --- a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php +++ b/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php @@ -37,7 +37,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase protected $_request; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -57,12 +57,12 @@ class StorageTest extends \PHPUnit_Framework_TestCase protected $_storageModel; /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected $directoryTmp; /** - * @var \Magento\Filesystem\Directory\Write + * @var \Magento\Framework\Filesystem\Directory\Write */ protected $directoryVar; @@ -96,8 +96,10 @@ protected function setUp() $this->directoryVar = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR); $this->directoryTmp = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::TMP_DIR); - /** @var $theme \Magento\View\Design\ThemeInterface */ - $theme = $this->_objectManager->create('Magento\View\Design\ThemeInterface')->getCollection()->getFirstItem(); + /** @var $theme \Magento\Framework\View\Design\ThemeInterface */ + $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface') + ->getCollection() + ->getFirstItem(); /** @var $request \Magento\Framework\App\Request\Http */ $request = $this->_objectManager->get('Magento\Framework\App\Request\Http'); diff --git a/dev/tests/integration/testsuite/Magento/Tools/View/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Tools/View/GeneratorTest.php index 2a832187acb22..f5350f812a12d 100644 --- a/dev/tests/integration/testsuite/Magento/Tools/View/GeneratorTest.php +++ b/dev/tests/integration/testsuite/Magento/Tools/View/GeneratorTest.php @@ -26,12 +26,12 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Shell + * @var \Magento\Framework\Shell */ protected $shell; /** - * @var \Magento\Filesystem\Driver\File + * @var \Magento\Framework\Filesystem\Driver\File */ protected $filesystem; @@ -45,8 +45,8 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->tmpDir = BP . '/var/static'; - $this->shell = new \Magento\Shell(new \Magento\Shell\CommandRenderer()); - $this->filesystem = new \Magento\Filesystem\Driver\File(); + $this->shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer()); + $this->filesystem = new \Magento\Framework\Filesystem\Driver\File(); if (!$this->filesystem->isExists($this->tmpDir)) { $this->filesystem->createDirectory($this->tmpDir, 0777); } @@ -69,7 +69,7 @@ public function testViewGenerator() 'php -f %s -- --source %s --destination %s', array(BP . '/dev/tools/Magento/Tools/View/generator.php', BP . '/app/design', $this->tmpDir) ); - } catch (\Magento\Exception $exception) { + } catch (\Magento\Framework\Exception $exception) { $this->fail($exception->getPrevious()->getMessage()); } } diff --git a/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php b/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php index 578945e8b3ae3..c01aa816295ad 100644 --- a/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php +++ b/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php @@ -36,7 +36,7 @@ class InlineParserTest extends \PHPUnit_Framework_TestCase public static function setUpBeforeClass() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDesignTheme( 'Magento/blank' ); @@ -44,8 +44,9 @@ public static function setUpBeforeClass() protected function setUp() { - /** @var $inline \Magento\Translate\Inline */ - $inline = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Translate\Inline'); + /** @var $inline \Magento\Framework\Translate\Inline */ + $inline = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create('Magento\Framework\Translate\Inline'); $this->_inlineParser = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Translation\Model\Inline\Parser', array('translateInline' => $inline) @@ -88,7 +89,9 @@ public function testProcessAjaxPost($originalText, $translatedText, $isPerStore $model->delete(); } catch (\Exception $e) { $model->delete(); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Logger')->logException($e); + \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->get('Magento\Framework\Logger') + ->logException($e); } } diff --git a/dev/tests/integration/testsuite/Magento/Translation/_files/db_translate_admin_store.php b/dev/tests/integration/testsuite/Magento/Translation/_files/db_translate_admin_store.php index a1c4c6db88329..161aa9adc77cb 100644 --- a/dev/tests/integration/testsuite/Magento/Translation/_files/db_translate_admin_store.php +++ b/dev/tests/integration/testsuite/Magento/Translation/_files/db_translate_admin_store.php @@ -27,7 +27,7 @@ )->getArea( \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE )->load( - \Magento\Core\Model\App\Area::PART_CONFIG + \Magento\Framework\App\Area::PART_CONFIG ); /** @var \Magento\Translation\Model\Resource\String $translateString */ $translateString = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( diff --git a/dev/tests/integration/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php b/dev/tests/integration/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php index 7c1c66ddf34df..29df7603436fd 100644 --- a/dev/tests/integration/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php +++ b/dev/tests/integration/testsuite/Magento/UrlRewrite/Helper/UrlRewriteTest.php @@ -48,7 +48,7 @@ public function testValidateRequestPath($requestPath) /** * @dataProvider requestPathExceptionDataProvider - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testValidateRequestPathException($requestPath) { @@ -65,7 +65,7 @@ public function testValidateSuffix($suffix) /** * @dataProvider requestPathExceptionDataProvider - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testValidateSuffixException($suffix) { diff --git a/dev/tests/integration/testsuite/Magento/User/Block/Role/Grid/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Block/Role/Grid/UserTest.php index 2c4a00d6a8dc5..b670cd63f2692 100644 --- a/dev/tests/integration/testsuite/Magento/User/Block/Role/Grid/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Block/Role/Grid/UserTest.php @@ -38,7 +38,9 @@ class UserTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $this->_block = $layout->createBlock('Magento\User\Block\Role\Grid\User'); } diff --git a/dev/tests/integration/testsuite/Magento/User/Block/User/Edit/Tab/MainTest.php b/dev/tests/integration/testsuite/Magento/User/Block/User/Edit/Tab/MainTest.php index 822762b78c3b4..df4a6a48febed 100644 --- a/dev/tests/integration/testsuite/Magento/User/Block/User/Edit/Tab/MainTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Block/User/Edit/Tab/MainTest.php @@ -51,7 +51,7 @@ protected function setUp() $this->_block->setArea('adminhtml'); $this->_user = $objectManager->create('Magento\User\Model\User'); - $objectManager->get('Magento\Registry')->register('permissions_user', $this->_user); + $objectManager->get('Magento\Framework\Registry')->register('permissions_user', $this->_user); } protected function tearDown() @@ -60,7 +60,7 @@ protected function tearDown() $this->_user = null; /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('permissions_user'); + $objectManager->get('Magento\Framework\Registry')->unregister('permissions_user'); parent::tearDown(); } diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php index 6916a0ef07bf3..05db045c44098 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php @@ -103,7 +103,7 @@ public function testResetPasswordActionWithDummyToken() $this->dispatch('backend/admin/auth/resetpassword'); $this->assertSessionMessages( $this->equalTo(array('Your password reset link has expired.')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertRedirect(); } @@ -155,8 +155,8 @@ public function testResetPasswordPostAction() $user = $objectManager->create('Magento\User\Model\User'); $user->loadByUsername('dummy_username'); - /** @var \Magento\Encryption\EncryptorInterface $encryptor */ - $encryptor = $objectManager->get('Magento\Encryption\EncryptorInterface'); + /** @var \Magento\Framework\Encryption\EncryptorInterface $encryptor */ + $encryptor = $objectManager->get('Magento\Framework\Encryption\EncryptorInterface'); $this->assertTrue($encryptor->validateHash($newDummyPassword, $user->getPassword())); } @@ -171,7 +171,7 @@ public function testResetPasswordPostActionWithDummyToken() $this->dispatch('backend/admin/auth/resetpasswordpost'); $this->assertSessionMessages( $this->equalTo(array('Your password reset link has expired.')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -223,7 +223,7 @@ public function testResetPasswordPostActionWithInvalidPassword() $this->assertSessionMessages( $this->equalTo(array('Your password confirmation must match your password.')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertRedirect(); } diff --git a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php index 50e34fb5d8671..de89c226f2769 100644 --- a/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/UserTest.php @@ -63,7 +63,7 @@ public function testSaveActionWrongId() $this->dispatch('backend/admin/user/save'); $this->assertSessionMessages( $this->equalTo(array('This user no longer exists.')), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); $this->assertRedirect($this->stringContains('backend/admin/user/index/')); } @@ -76,7 +76,7 @@ public function testSaveAction() $this->_createNew(); $this->assertSessionMessages( $this->equalTo(array('You saved the user.')), - \Magento\Message\MessageInterface::TYPE_SUCCESS + \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); $this->assertRedirect($this->stringContains('backend/admin/user/index/')); } diff --git a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php index 7c7254b3f6ea2..64e45d28503a4 100644 --- a/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php +++ b/dev/tests/integration/testsuite/Magento/User/Model/UserTest.php @@ -37,7 +37,7 @@ class UserTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $_dateTime; @@ -50,7 +50,7 @@ protected function setUp() { $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\User\Model\User'); $this->_dateTime = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( - 'Magento\Stdlib\DateTime' + 'Magento\Framework\Stdlib\DateTime' ); } @@ -184,7 +184,7 @@ public function testRoleUserExists() public function testGetCollection() { - $this->assertInstanceOf('Magento\Model\Resource\Db\Collection\AbstractCollection', + $this->assertInstanceOf('Magento\Framework\Model\Resource\Db\Collection\AbstractCollection', $this->_model->getCollection()); } @@ -311,7 +311,7 @@ public function testHasAssigned2Role() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage User Name is a required field. * @expectedExceptionMessage First Name is a required field. * @expectedExceptionMessage Last Name is a required field. @@ -361,7 +361,7 @@ public function testBeforeSavePasswordHash() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Your password confirmation must match your password. * @magentoDbIsolation enabled */ @@ -373,7 +373,7 @@ public function testBeforeSavePasswordsDoNotMatch() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Your password must include both numeric and alphabetic characters. * @magentoDbIsolation enabled */ @@ -385,7 +385,7 @@ public function testBeforeSavePasswordTooShort() /** * @dataProvider beforeSavePasswordInsecureDataProvider - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Your password must include both numeric and alphabetic characters. * @magentoDbIsolation enabled * @param string $password @@ -402,7 +402,7 @@ public function beforeSavePasswordInsecureDataProvider() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage A user with the same user name or email already exists. * @magentoDbIsolation enabled */ diff --git a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/theme.xml b/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/theme.xml deleted file mode 100644 index f47d5d6e45438..0000000000000 --- a/dev/tests/integration/testsuite/Magento/View/_files/design/frontend/test_publication/theme.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - Default - 2.0.0.0 - diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/ReaderTest.php index 5dbb431b81772..b2ab58562b4b3 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/Integration/ReaderTest.php @@ -40,7 +40,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected function setUp() { parent::setUp(); - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_configReader = $objectManager->create( 'Magento\Webapi\Model\Config\Integration\Reader', diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/ReaderTest.php index b3e9fae6317d5..34a88ddae5236 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Model/Config/ReaderTest.php @@ -40,7 +40,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected function setUp() { parent::setUp(); - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_configReader = $objectManager->create( 'Magento\Webapi\Model\Config\Reader', diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Model/PathProcessorTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Model/PathProcessorTest.php index fcc27c5a470db..72022d264da3a 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Model/PathProcessorTest.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Model/PathProcessorTest.php @@ -55,11 +55,11 @@ public function testProcessWithValidStoreCode() $path = $basePath . '/V1/customerAccounts/createCustomer'; $resultPath = $this->pathProcessor->process($path); $this->assertEquals(str_replace($basePath, "", $path), $resultPath); - $this->assertEquals($storeCode, $this->storeManager->getCurrentStore()); + $this->assertEquals($storeCode, $this->storeManager->getStore()->getCode()); } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage No such entity with storeCode = InvalidStorecode */ public function testProcessWithInValidStoreCode() diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php index ef2dab6f43d25..0ec54eb5fa68f 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ServerTest.php @@ -40,7 +40,7 @@ class ServerTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Webapi\Controller\Soap\Request */ protected $_requestMock; - /** @var \Magento\DomDocument\Factory */ + /** @var \Magento\Framework\DomDocument\Factory */ protected $_domDocumentFactory; /** @var \Magento\Store\Model\Store */ @@ -68,7 +68,7 @@ protected function setUp() )->disableOriginalConstructor()->getMock(); $this->_areaListMock = $this->getMock('Magento\Framework\App\AreaList', array(), array(), '', false); - $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface'); + $this->_configScopeMock = $this->getMock('Magento\Framework\Config\ScopeInterface'); $this->_storeManagerMock->expects( $this->any() )->method( @@ -80,7 +80,7 @@ protected function setUp() 'Magento\Webapi\Controller\Soap\Request' )->disableOriginalConstructor()->getMock(); $this->_domDocumentFactory = $this->getMockBuilder( - 'Magento\DomDocument\Factory' + 'Magento\Framework\DomDocument\Factory' )->disableOriginalConstructor()->getMock(); $this->_soapServerFactory = $this->getMockBuilder( 'Magento\Webapi\Model\Soap\Server\Factory' diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataObjectBuilder.php index 53e21b88c496a..131deeac129ab 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/AssociativeArrayDataObjectBuilder.php @@ -23,7 +23,7 @@ */ namespace Magento\Webapi\Service\Entity; -class AssociativeArrayDataObjectBuilder extends \Magento\Service\Data\AbstractObjectBuilder +class AssociativeArrayDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractObjectBuilder { /** * @param string[] $associativeArray diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayDataObjectBuilder.php index 3c2cff53dab97..2abac6fcf1cb6 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/DataObjectArrayDataObjectBuilder.php @@ -23,7 +23,7 @@ */ namespace Magento\Webapi\Service\Entity; -class DataObjectArrayDataObjectBuilder extends \Magento\Service\Data\AbstractObjectBuilder +class DataObjectArrayDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractObjectBuilder { /** * @param \Magento\Webapi\Service\Entity\SimpleDataObject[] $items diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedDataObjectBuilder.php index f6f115d12b38e..537a536746525 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/NestedDataObjectBuilder.php @@ -23,7 +23,7 @@ */ namespace Magento\Webapi\Service\Entity; -class NestedDataObjectBuilder extends \Magento\Service\Data\AbstractObjectBuilder +class NestedDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractObjectBuilder { /** * @param \Magento\Webapi\Service\Entity\SimpleDataObject $details diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataObjectBuilder.php index 0589af46f62c2..380ed8dc85c69 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleArrayDataObjectBuilder.php @@ -23,7 +23,7 @@ */ namespace Magento\Webapi\Service\Entity; -class SimpleArrayDataObjectBuilder extends \Magento\Service\Data\AbstractObjectBuilder +class SimpleArrayDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractObjectBuilder { /** * @param int[] $ids diff --git a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleDataObjectBuilder.php b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleDataObjectBuilder.php index 533554412404c..10dd9d012b0ef 100644 --- a/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleDataObjectBuilder.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Service/Entity/SimpleDataObjectBuilder.php @@ -23,7 +23,7 @@ */ namespace Magento\Webapi\Service\Entity; -class SimpleDataObjectBuilder extends \Magento\Service\Data\AbstractObjectBuilder +class SimpleDataObjectBuilder extends \Magento\Framework\Service\Data\AbstractObjectBuilder { /** * @param int $entityId diff --git a/dev/tests/integration/testsuite/Magento/Weee/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Weee/Model/ObserverTest.php index 1681cdbc42bb3..f04111f7b7f2a 100644 --- a/dev/tests/integration/testsuite/Magento/Weee/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Magento/Weee/Model/ObserverTest.php @@ -48,7 +48,7 @@ public function testUpdateProductOptions() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->unregister('current_product'); + $objectManager->get('Magento\Framework\Registry')->unregister('current_product'); $eventObserver = $this->_createEventObserverForUpdateConfigurableProductOptions(); $this->_model->updateProductOptions($eventObserver); $this->assertEquals(array(), $eventObserver->getEvent()->getResponseObject()->getAdditionalOptions()); @@ -56,7 +56,7 @@ public function testUpdateProductOptions() $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Catalog\Model\Product' ); - $objectManager->get('Magento\Registry')->register('current_product', $product->load(1)); + $objectManager->get('Magento\Framework\Registry')->register('current_product', $product->load(1)); foreach (array(\Magento\Weee\Model\Tax::DISPLAY_INCL, \Magento\Weee\Model\Tax::DISPLAY_INCL_DESCR) as $mode) { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( @@ -95,12 +95,12 @@ public function testUpdateProductOptions() } /** - * @return \Magento\Event\Observer + * @return \Magento\Framework\Event\Observer */ protected function _createEventObserverForUpdateConfigurableProductOptions() { - $response = new \Magento\Object(array('additional_options' => array())); - $event = new \Magento\Event(array('response_object' => $response)); - return new \Magento\Event\Observer(array('event' => $event)); + $response = new \Magento\Framework\Object(array('additional_options' => array())); + $event = new \Magento\Framework\Event(array('response_object' => $response)); + return new \Magento\Framework\Event\Observer(array('event' => $event)); } } diff --git a/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php b/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php index 3438034a2a4ac..44b27c75b815b 100644 --- a/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php +++ b/dev/tests/integration/testsuite/Magento/Weee/Model/TaxTest.php @@ -61,8 +61,13 @@ public function testGetProductWeeeAttributes() $customerMetadataService = Bootstrap::getObjectManager()->create( 'Magento\Customer\Service\V1\CustomerMetadataService' ); - $customerBuilder = new CustomerBuilder($customerMetadataService); - $expected = \Magento\Service\DataObjectConverter::toFlatArray($customerAccountService->getCustomer(1)); + $customerBuilder = Bootstrap::getObjectManager()->create( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + ['metadataService' => $customerMetadataService] + ); + $expected = \Magento\Framework\Service\EavDataObjectConverter::toFlatArray( + $customerAccountService->getCustomer(1) + ); $customerBuilder->populateWithArray($expected); $customerDataSet = $customerBuilder->create(); $fixtureGroupCode = 'custom_group'; @@ -75,7 +80,7 @@ public function testGetProductWeeeAttributes() $quote->setCustomerGroupId($fixtureGroupId); $quote->setCustomerTaxClassId($fixtureTaxClassId); $quote->setCustomerData($customerDataSet); - $shipping = new \Magento\Object([ + $shipping = new \Magento\Framework\Object([ 'quote' => $quote ]); $product = Bootstrap::getObjectManager()->create('Magento\Catalog\Model\Product'); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/ContainerTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/ContainerTest.php index 8adc9698fb728..85297f4b2a874 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/ContainerTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/ContainerTest.php @@ -41,7 +41,7 @@ protected function setUp() parent::setUp(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Container' ); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php index b7d75acd16374..9c28f4bbccdbf 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/DesignAbstractionTest.php @@ -42,11 +42,11 @@ protected function setUp() parent::setUp(); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $layoutUtility = new \Magento\View\Utility\Layout($this); + $layoutUtility = new \Magento\Framework\View\Utility\Layout($this); $appState = $objectManager->get('Magento\Framework\App\State'); $appState->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); $processorMock = $this->getMock( - 'Magento\View\Layout\Processor', + 'Magento\Framework\View\Layout\Processor', array('isPageLayoutDesignAbstraction'), array(), '', @@ -60,7 +60,7 @@ function ($abstraction) { ) ); $processorFactoryMock = $this->getMock( - 'Magento\View\Layout\ProcessorFactory', + 'Magento\Framework\View\Layout\ProcessorFactory', array('create'), array(), '', @@ -77,7 +77,7 @@ function ($data) use ($processorMock, $layoutUtility) { ); $this->_block = new DesignAbstraction( - $objectManager->get('Magento\View\Element\Template\Context'), + $objectManager->get('Magento\Framework\View\Element\Template\Context'), $processorFactoryMock, $objectManager->get('Magento\Core\Model\Resource\Theme\CollectionFactory'), $appState, diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php index 8b3a8b4f5a838..684c859cba4ba 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php @@ -42,7 +42,7 @@ protected function setUp() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $config = $this->getMockBuilder( - 'Magento\View\Layout\PageType\Config' + 'Magento\Framework\View\Layout\PageType\Config' )->setMethods( array('getPageTypes') )->disableOriginalConstructor()->getMock(); @@ -57,7 +57,7 @@ protected function setUp() $config->expects($this->any())->method('getPageTypes')->will($this->returnValue($pageTypeValues)); $this->_block = new \Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Layout( - $objectManager->get('Magento\View\Element\Template\Context'), + $objectManager->get('Magento\Framework\View\Element\Template\Context'), $config, array( 'name' => 'page_type', diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php index 1bed7457cf8dc..96f5384de8b41 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/LayoutTest.php @@ -41,7 +41,7 @@ protected function setUp() parent::setUp(); $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main\Layout', '', @@ -54,7 +54,7 @@ protected function setUp() ) ); $this->_block->setLayout( - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface') + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\LayoutInterface') ); } @@ -66,10 +66,10 @@ public function testGetLayoutsChooser() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\State' )->setAreaCode( - \Magento\Core\Model\App\Area::AREA_FRONTEND + \Magento\Framework\App\Area::AREA_FRONTEND ); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme(); $actualHtml = $this->_block->getLayoutsChooser(); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/MainTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/MainTest.php index fd6251dcadcb2..22622c25ea75d 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/MainTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/MainTest.php @@ -35,31 +35,32 @@ public function testPackageThemeElement() { /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_widget_instance', new \Magento\Object()); + $objectManager->get('Magento\Framework\Registry') + ->register('current_widget_instance', new \Magento\Framework\Object()); /** @var \Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main $block */ $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main' ); $block->setTemplate(null); $block->toHtml(); $element = $block->getForm()->getElement('theme_id'); - $this->assertInstanceOf('Magento\Data\Form\Element\Select', $element); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Select', $element); $this->assertTrue($element->getDisabled()); } public function testTypeElement() { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\Layout' + 'Magento\Framework\View\Layout' )->createBlock( 'Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main' ); $block->setTemplate(null); $block->toHtml(); $element = $block->getForm()->getElement('instance_code'); - $this->assertInstanceOf('Magento\Data\Form\Element\Select', $element); + $this->assertInstanceOf('Magento\Framework\Data\Form\Element\Select', $element); $this->assertTrue($element->getDisabled()); } } diff --git a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/EditTest.php b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/EditTest.php index 5e013a9fc5cd1..f55decf48f8e6 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/EditTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Block/Adminhtml/Widget/Instance/EditTest.php @@ -40,7 +40,7 @@ public function testConstruct() $type = 'Magento\Catalog\Block\Product\Widget\NewWidget'; $code = 'catalog_product_newwidget'; $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme()->getDesignTheme(); /** @var $widgetInstance \Magento\Widget\Model\Widget\Instance */ @@ -50,7 +50,7 @@ public function testConstruct() $widgetInstance->setType($type)->setCode($code)->setThemeId($theme->getId())->save(); /** @var $objectManager \Magento\TestFramework\ObjectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $objectManager->get('Magento\Registry')->register('current_widget_instance', $widgetInstance); + $objectManager->get('Magento\Framework\Registry')->register('current_widget_instance', $widgetInstance); \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Framework\App\RequestInterface' @@ -59,7 +59,7 @@ public function testConstruct() $widgetInstance->getId() ); $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Widget\Block\Adminhtml\Widget\Instance\Edit', 'widget' diff --git a/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php b/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php index 6c27b48ace16c..71d1ff6f6eaa4 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php @@ -36,7 +36,7 @@ protected function setUp() parent::setUp(); $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme()->getDesignTheme(); $type = 'Magento\Cms\Block\Widget\Page\Link'; /** @var $model \Magento\Widget\Model\Widget\Instance */ diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php index f426b72726c19..d2a842a3912ae 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php @@ -70,28 +70,31 @@ public function setUp() ); $this->directoryList->addDirectory(\Magento\Framework\App\Filesystem::MODULES_DIR, array('path' => $dirPath)); - /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */ + /** @var \Magento\Framework\Module\Declaration\FileResolver $modulesDeclarations */ $modulesDeclarations = $objectManager->create( - 'Magento\Module\Declaration\FileResolver', + 'Magento\Framework\Module\Declaration\FileResolver', array( 'filesystem' => $filesystem, - 'fileIteratorFactory' => $objectManager->create('Magento\Config\FileIteratorFactory') + 'fileIteratorFactory' => $objectManager->create('Magento\Framework\Config\FileIteratorFactory') ) ); - /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */ + /** @var \Magento\Framework\Module\Declaration\Reader\Filesystem $filesystemReader */ $filesystemReader = $objectManager->create( - 'Magento\Module\Declaration\Reader\Filesystem', + 'Magento\Framework\Module\Declaration\Reader\Filesystem', array('fileResolver' => $modulesDeclarations) ); - /** @var \Magento\Module\ModuleList $modulesList */ - $modulesList = $objectManager->create('Magento\Module\ModuleList', array('reader' => $filesystemReader)); + /** @var \Magento\Framework\Module\ModuleList $modulesList */ + $modulesList = $objectManager->create( + 'Magento\Framework\Module\ModuleList', + array('reader' => $filesystemReader) + ); - /** @var \Magento\Module\Dir\Reader $moduleReader */ + /** @var \Magento\Framework\Module\Dir\Reader $moduleReader */ $moduleReader = $objectManager->create( - 'Magento\Module\Dir\Reader', + 'Magento\Framework\Module\Dir\Reader', array('moduleList' => $modulesList, 'filesystem' => $filesystem) ); $moduleReader->setModuleDir('Magento_Test', 'etc', __DIR__ . '/_files/code/Magento/Test/etc'); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php index 5ee05c6b24c46..99a2e04985c4a 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php @@ -61,7 +61,7 @@ public function setUp() ); $moduleListMock = $this->getMockBuilder( - 'Magento\Module\ModuleListInterface' + 'Magento\Framework\Module\ModuleListInterface' )->disableOriginalConstructor()->getMock(); $moduleListMock->expects( $this->any() @@ -75,7 +75,7 @@ public function setUp() $moduleReader = $objectManager->create( - 'Magento\Module\Dir\Reader', + 'Magento\Framework\Module\Dir\Reader', array('moduleList' => $moduleListMock, 'filesystem' => $filesystem) ); $moduleReader->setModuleDir('Magento_Test', 'etc', __DIR__ . '/_files/code/Magento/Test/etc'); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php index 6c6dbbede183a..4d210aeb1c8b7 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php @@ -59,24 +59,27 @@ public function setUp() array('directoryList' => $this->directoryList) ); - /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */ + /** @var \Magento\Framework\Module\Declaration\FileResolver $modulesDeclarations */ $modulesDeclarations = $objectManager->create( - 'Magento\Module\Declaration\FileResolver', + 'Magento\Framework\Module\Declaration\FileResolver', array('filesystem' => $filesystem) ); - /** @var \Magento\Module\Declaration\Reader\Filesystem $filesystemReader */ + /** @var \Magento\Framework\Module\Declaration\Reader\Filesystem $filesystemReader */ $filesystemReader = $objectManager->create( - 'Magento\Module\Declaration\Reader\Filesystem', + 'Magento\Framework\Module\Declaration\Reader\Filesystem', array('fileResolver' => $modulesDeclarations) ); - /** @var \Magento\Module\ModuleList $modulesList */ - $modulesList = $objectManager->create('Magento\Module\ModuleList', array('reader' => $filesystemReader)); + /** @var \Magento\Framework\Module\ModuleList $modulesList */ + $modulesList = $objectManager->create( + 'Magento\Framework\Module\ModuleList', + array('reader' => $filesystemReader) + ); - /** @var \Magento\Module\Dir\Reader $moduleReader */ + /** @var \Magento\Framework\Module\Dir\Reader $moduleReader */ $moduleReader = $objectManager->create( - 'Magento\Module\Dir\Reader', + 'Magento\Framework\Module\Dir\Reader', array('moduleList' => $modulesList, 'filesystem' => $filesystem) ); $moduleReader->setModuleDir('Magento_Test', 'etc', __DIR__ . '/_files/code/Magento/Test/etc'); @@ -122,7 +125,7 @@ public function testMergeCompleteAndPartial() __DIR__ . '/_files/widgetSecond.xml' => file_get_contents(__DIR__ . '/_files/widgetSecond.xml') ); $fileResolverMock = $this->getMockBuilder( - 'Magento\Config\FileResolverInterface' + 'Magento\Framework\Config\FileResolverInterface' )->setMethods( array('get') )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml index 5795124ed9e36..5c66db22206b6 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/_files/code/Magento/Test/etc/module.xml @@ -23,6 +23,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php index 1f76c616caca9..79d979739c804 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php @@ -51,12 +51,12 @@ protected function setUp() public function testGetPluginSettings() { \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDesignTheme( 'Magento/backend' ); - $config = new \Magento\Object(); + $config = new \Magento\Framework\Object(); $settings = $this->_model->getPluginSettings($config); $this->assertArrayHasKey('widget_plugin_src', $settings); @@ -77,7 +77,7 @@ public function testGetPluginSettings() public function testGetWidgetWindowUrl() { - $config = new \Magento\Object(array('widget_filters' => array('is_email_compatible' => 1))); + $config = new \Magento\Framework\Object(array('widget_filters' => array('is_email_compatible' => 1))); $url = $this->_model->getWidgetWindowUrl($config); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php index 15989d53b8de0..1f59da91379f1 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Widget/InstanceTest.php @@ -52,7 +52,7 @@ public function testSetThemeId() \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State') ->setAreaCode('frontend'); $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\DesignInterface' + 'Magento\Framework\View\DesignInterface' )->setDefaultDesignTheme()->getDesignTheme(); $this->_model->setThemeId($theme->getId()); diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php index f52eb3aff6754..d2c8174e2e6a5 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php +++ b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php @@ -71,7 +71,7 @@ public function testGetPlaceholderImageUrl($type, $expectedFile) $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); \Magento\TestFramework\Helper\Bootstrap::getInstance() ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); - $objectManager->get('Magento\View\DesignInterface')->setDesignTheme('Magento/backend'); + $objectManager->get('Magento\Framework\View\DesignInterface')->setDesignTheme('Magento/backend'); $expectedFilePath = "/adminhtml/Magento/backend/en_US/{$expectedFile}"; $expectedPubFile = $objectManager->get( 'Magento\Framework\App\Filesystem' diff --git a/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml b/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml index fb81d725a45c0..3f1e9140cd8e2 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml +++ b/dev/tests/integration/testsuite/Magento/Widget/_files/design/adminhtml/magento_basic/theme.xml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Basic 2.0.0.0 diff --git a/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php b/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php index c940265a0ecbb..320481e150994 100644 --- a/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php +++ b/dev/tests/integration/testsuite/Magento/Widget/_files/themes.php @@ -26,7 +26,7 @@ */ \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList') ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE) - ->load(\Magento\Core\Model\App\Area::PART_CONFIG); + ->load(\Magento\Framework\App\Area::PART_CONFIG); /** @var $registration \Magento\Core\Model\Theme\Registration */ $registration = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( 'Magento\Core\Model\Theme\Registration' diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php index b5543e69bd357..2d9cc12577890 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/AbstractTest.php @@ -53,8 +53,8 @@ protected function setUp() public function testImage() { \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); - \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\DesignInterface') + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\View\DesignInterface') ->setDefaultDesignTheme(); $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() ->create('Magento\Catalog\Model\Product'); diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php index 4f32531853df3..61ec765e48f90 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/ColumnTest.php @@ -29,7 +29,7 @@ class ColumnTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layout = null; @@ -41,10 +41,10 @@ class ColumnTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' ); $this->_block = $this->_layout->addBlock('Magento\Wishlist\Block\Customer\Wishlist\Item\Column', 'test'); - $this->_layout->addBlock('Magento\View\Element\Text', 'child', 'test'); + $this->_layout->addBlock('Magento\Framework\View\Element\Text', 'child', 'test'); } /** diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/OptionsTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/OptionsTest.php index 151ab4d4694ab..c2356ad963c9d 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/OptionsTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/Item/OptionsTest.php @@ -35,13 +35,13 @@ class OptionsTest extends \PHPUnit_Framework_TestCase public function testGetTemplate() { $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\View\LayoutInterface' + 'Magento\Framework\View\LayoutInterface' )->createBlock( 'Magento\Wishlist\Block\Customer\Wishlist\Item\Options' ); $this->assertEmpty($block->getTemplate()); - $product = new \Magento\Object(array('type_id' => 'test')); - $item = new \Magento\Object(array('product' => $product)); + $product = new \Magento\Framework\Object(array('type_id' => 'test')); + $item = new \Magento\Framework\Object(array('product' => $product)); $block->setItem($item); $this->assertNotEmpty($block->getTemplate()); $block->setTemplate('template'); diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php index d8c8b060f8712..35aa967405182 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Block/Customer/Wishlist/ItemsTest.php @@ -30,12 +30,18 @@ class ItemsTest extends \PHPUnit_Framework_TestCase { public function testGetColumns() { - $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface'); + $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\LayoutInterface' + ); $block = $layout->addBlock('Magento\Wishlist\Block\Customer\Wishlist\Items', 'test'); $child = $this->getMock( - 'Magento\View\Element\Text', + 'Magento\Framework\View\Element\Text', array('isEnabled'), - array(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\Element\Context')) + array( + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + 'Magento\Framework\View\Element\Context' + ) + ) ); $child->expects($this->any())->method('isEnabled')->will($this->returnValue(true)); $layout->addBlock($child, 'child', 'test'); diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php index cf2e1347f16b7..26e46e77c671c 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php @@ -34,7 +34,7 @@ class IndexTest extends \Magento\TestFramework\TestCase\AbstractController protected $_customerSession; /** - * @var \Magento\Message\ManagerInterface + * @var \Magento\Framework\Message\ManagerInterface */ protected $_messages; @@ -46,7 +46,7 @@ class IndexTest extends \Magento\TestFramework\TestCase\AbstractController protected function setUp() { parent::setUp(); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->_customerSession = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( 'Magento\Customer\Model\Session', array($logger) @@ -60,7 +60,7 @@ protected function setUp() $this->_customerViewHelper = $this->_objectManager->create('Magento\Customer\Helper\View'); $this->_messages = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( - 'Magento\Message\ManagerInterface' + 'Magento\Framework\Message\ManagerInterface' ); } @@ -117,7 +117,7 @@ public function testAddActionProductNameXss() */ public function testAllcartAction() { - $formKey = $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(); + $formKey = $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(); $this->getRequest()->setParam('form_key', $formKey); $this->dispatch('wishlist/index/allcart'); @@ -128,7 +128,7 @@ public function testAllcartAction() $this->assertEquals(0, $quoteCount); $this->assertSessionMessages( $this->contains('You can buy this product only in increments of 5 for "Simple Product".'), - \Magento\Message\MessageInterface::TYPE_ERROR + \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); } @@ -142,20 +142,20 @@ public function testSendAction() 'Magento\Wishlist\Controller\Index' => [ 'arguments' => [ 'transportBuilder' => [ - 'instance' => 'Magento\Wishlist\Controller\MockedTransportBuilder' + 'instance' => 'Magento\TestFramework\Mail\Template\TransportBuilderMock' ] ] ], 'preferences' => [ - 'Magento\Mail\TransportInterface' => 'Magento\Wishlist\Controller\MockedMailTransport' + 'Magento\Framework\Mail\TransportInterface' => 'Magento\TestFramework\Mail\TransportInterfaceMock' ] ] ); \Magento\TestFramework\Helper\Bootstrap::getInstance() - ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND); + ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND); $request = [ - 'form_key' => $this->_objectManager->get('Magento\Data\Form\FormKey')->getFormKey(), + 'form_key' => $this->_objectManager->get('Magento\Framework\Data\Form\FormKey')->getFormKey(), 'emails' => 'test@tosend.com', 'message' => 'message', 'rss_url' => null // no rss @@ -163,14 +163,14 @@ public function testSendAction() $this->getRequest()->setPost($request); - $this->_objectManager->get('Magento\Registry')->register( + $this->_objectManager->get('Magento\Framework\Registry')->register( 'wishlist', $this->_objectManager->get('Magento\Wishlist\Model\Wishlist')->loadByCustomerId(1) ); $this->dispatch('wishlist/index/send'); - /** @var \Magento\Wishlist\Controller\MockedTransportBuilder $transportBuilder */ - $transportBuilder = $this->_objectManager->get('Magento\Wishlist\Controller\MockedTransportBuilder'); + /** @var \Magento\TestFramework\Mail\Template\TransportBuilderMock $transportBuilder */ + $transportBuilder = $this->_objectManager->get('Magento\TestFramework\Mail\Template\TransportBuilderMock'); $this->assertStringMatchesFormat( '%AThank you, %A' @@ -179,45 +179,3 @@ public function testSendAction() ); } } - -class MockedTransportBuilder extends \Magento\Mail\Template\TransportBuilder -{ - /** - * @var \Magento\Mail\Message - */ - protected $_sentMessage; - - /** - * Reset object state - * - * @return $this - */ - protected function reset() - { - $this->_sentMessage = $this->message; - parent::reset(); - } - - /** - * Returns message object with prepared data - * - * @return \Magento\Mail\Message|null - */ - public function getSentMessage() - { - return $this->_sentMessage; - } -} - -class MockedMailTransport implements \Magento\Mail\TransportInterface -{ - /** - * Mock of send a mail using transport - * - * @return void - */ - public function sendMessage() - { - return; - } -} \ No newline at end of file diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Helper/DataTest.php index 10cfd770856f9..263fc5fcf1536 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Helper/DataTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Helper/DataTest.php @@ -34,7 +34,7 @@ class DataTest extends \Magento\TestFramework\TestCase\AbstractController private $_wishlistHelper; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ private $objectManager; diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist.php b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist.php index 4051cf223e6f7..484096683a69d 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist.php @@ -30,7 +30,7 @@ $wishlist = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Wishlist\Model\Wishlist'); $wishlist->loadByCustomerId($customer->getId(), true); -$item = $wishlist->addNewItem($product, new \Magento\Object(array())); +$item = $wishlist->addNewItem($product, new \Magento\Framework\Object(array())); // 'product' => '1', // 'related_product' => '', // 'options' => array( diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_increments.php b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_increments.php index 8ad43321ad96a..1ef7a2ab0baa9 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_increments.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_product_qty_increments.php @@ -28,7 +28,7 @@ require __DIR__ . '/../../../Magento/Customer/_files/customer.php'; require __DIR__ . '/../../../Magento/Catalog/_files/product_special_price.php'; -/** @var \Magento\ObjectManager $objectManager */ +/** @var \Magento\Framework\ObjectManager $objectManager */ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); /** @var \Magento\Catalog\Model\Product $product */ diff --git a/dev/tests/js/jsTestDriver.php.dist b/dev/tests/js/jsTestDriver.php.dist index 2177f06cb33fc..7e68383a95863 100644 --- a/dev/tests/js/jsTestDriver.php.dist +++ b/dev/tests/js/jsTestDriver.php.dist @@ -33,7 +33,7 @@ return array( 'load' => array( '/pub/lib/mage/translate.js', '/pub/lib/mage/webapi.js', - '/pub/lib/jquery/jquery-ui-timepicker-addon.js', + '/pub/lib/jquery/jquery-ui-timepicker-addon-1.0.1.js', '/pub/lib/jquery/jquery.tmpl.min.js', '/dev/tests/js/framework/stub.js', '/app/code/Magento/DesignEditor/view/adminhtml/js/base.js', diff --git a/dev/tests/js/run_js_tests.php b/dev/tests/js/run_js_tests.php index a7629d26788dd..f2b2fee92e987 100644 --- a/dev/tests/js/run_js_tests.php +++ b/dev/tests/js/run_js_tests.php @@ -28,7 +28,7 @@ define('RELATIVE_APP_ROOT', '../../..'); require __DIR__ . '/../../../app/autoload.php'; -\Magento\Autoload\IncludePath::addIncludePath(realpath(RELATIVE_APP_ROOT . '/lib')); +\Magento\Framework\Autoload\IncludePath::addIncludePath(realpath(RELATIVE_APP_ROOT . '/lib')); $userConfig = normalize('jsTestDriver.php'); $defaultConfig = normalize('jsTestDriver.php.dist'); @@ -135,7 +135,7 @@ $testOutput = __DIR__ . '/test-output'; -$filesystemAdapter = new \Magento\Filesystem\Driver\File(); +$filesystemAdapter = new \Magento\Framework\Filesystem\Driver\File(); if ($filesystemAdapter->isExists($testOutput)) { $filesystemAdapter->deleteDirectory($testOutput); } diff --git a/dev/tests/js/testsuite/mage/calendar/calendar-qunit.js b/dev/tests/js/testsuite/mage/calendar/calendar-qunit.js new file mode 100644 index 0000000000000..3af18590ac3fd --- /dev/null +++ b/dev/tests/js/testsuite/mage/calendar/calendar-qunit.js @@ -0,0 +1,97 @@ +/** + * 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.js + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +test( "initialization", function() { + var calendar = $('#calendar').calendar(); + ok( calendar.is(':mage-calendar'), "this test is fine" ); + calendar.calendar('destroy'); +}); +test( "global configuration merge", function() { + $.extend(true, $, { + calendarConfig: { + showOn: 'button', + showAnim: '', + buttonImageOnly: true, + showButtonPanel: true, + showWeek: true, + timeFormat: '', + showTime: false, + showHour: false, + showMinute: false + } + }); + var calendar = $('#calendar').calendar(); + equal('button', calendar.calendar('option', 'showOn')); + equal('', calendar.calendar('option', 'showAnim')); + ok(calendar.calendar('option', 'buttonImageOnly')); + ok(calendar.calendar('option', 'showButtonPanel')); + ok(calendar.calendar('option', 'showWeek')); + equal('', calendar.calendar('option', 'timeFormat')); + equal(false, calendar.calendar('option', 'showTime')); + equal(false, calendar.calendar('option', 'showHour')); + equal(false, calendar.calendar('option', 'showMinute')); + calendar.calendar('destroy'); + delete $.calendarConfig; +}); +test( "specifying AM/PM in timeformat option changes AMPM option to true", function(){ + var calendar = $('#calendar').calendar({timeFormat: 'hh:mm tt', ampm: false}); + ok(calendar.calendar('option', 'ampm')); + calendar.calendar('destroy'); +}); +test( "omitting AM/PM in timeformat option changes AMPM option to false", function(){ + var calendar = $('#calendar').calendar({timeFormat: 'hh:mm'}); + notEqual(true, calendar.calendar('option', 'ampm')); + calendar.calendar('destroy'); +}); +test( "with server timezone offset", function(){ + var serverTimezoneSeconds = 1346122095, + calendar = $('#calendar').calendar({serverTimezoneSeconds: serverTimezoneSeconds}), + currentDate = new Date(); + currentDate.setTime((serverTimezoneSeconds + currentDate.getTimezoneOffset() * 60) * 1000); + ok(currentDate.toString() === calendar.calendar('getTimezoneDate').toString()); + calendar.calendar('destroy'); +}); +test( "without sever timezone offset", function() { + var calendar = $('#calendar').calendar(), + currentDate = new Date(); + ok(currentDate.toString() === calendar.calendar('getTimezoneDate').toString()); + calendar.calendar('destroy'); +}); +test( "dateTime format conversions", function() { + var calendar = $('#calendar').calendar({dateFormat: 'M/d/yy', timeFormat: 'h:mm a'}); + equal('mm/d/yy', calendar.calendar('option', 'dateFormat')); + equal('h:mm tt', calendar.calendar('option', 'timeFormat')); + calendar.calendar('destroy'); + calendar.calendar({dateFormat: 'MMMM/EEEE/yyyy', timeFormat: 'HH:mm'}); + equal('MM/DD/yy', calendar.calendar('option', 'dateFormat')); + equal('hh:mm', calendar.calendar('option', 'timeFormat')); + calendar.calendar('destroy'); +}); +test( "destroy", function() { + var calendar = $('#calendar').calendar(), + calendarExist = calendar.is(':mage-calendar'); + calendar.calendar('destroy'); + equal(true, calendarExist != calendar.is(':mage-calendar')); +}); \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/calendar/calendar.html b/dev/tests/js/testsuite/mage/calendar/calendar.html new file mode 100644 index 0000000000000..d8e938f70770f --- /dev/null +++ b/dev/tests/js/testsuite/mage/calendar/calendar.html @@ -0,0 +1,49 @@ + + + + + + + Calendar Widget: QUnit Tests + + + + + + + + + + + +
+
+ +
+ + \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/dropdown/index.html b/dev/tests/js/testsuite/mage/dropdown/index.html new file mode 100644 index 0000000000000..ecd3b48f08b7e --- /dev/null +++ b/dev/tests/js/testsuite/mage/dropdown/index.html @@ -0,0 +1,48 @@ + + + + + + Unit test + + + + + + + + + + + + +
+
+
+ + diff --git a/dev/tests/js/testsuite/mage/dropdown/test-dropdown.js b/dev/tests/js/testsuite/mage/dropdown/test-dropdown.js new file mode 100644 index 0000000000000..9b639e8544e06 --- /dev/null +++ b/dev/tests/js/testsuite/mage/dropdown/test-dropdown.js @@ -0,0 +1,290 @@ +/** + * 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.js + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ + +/* + testing if dialog opens when the triggerEvent is triggered + */ +test( "triggerEvent", function() { + expect(2); + var opener = $('
'); + var dialog = $('
'); + dialog.dropdownDialog({"triggerEvent":"click", "triggerTarget":opener}); + opener.trigger("click"); + equal(dialog.dropdownDialog("isOpen"), true, "Dropdown opens when click opener"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"triggerEvent":null, "triggerTarget":opener}); + opener.trigger("click"); + equal(dialog.dropdownDialog("isOpen"), false, "Dropdown doesn't open when click opener"); + dialog.dropdownDialog( "destroy" ); + +}); + +/* + testing if a specified class is added to the trigger + */ +test( "triggerClass", function() { + expect(2); + var opener = $('
'); + var dialog = $('
'); + dialog.dropdownDialog({"triggerTarget":opener,"triggerClass":"active"}); + dialog.dropdownDialog("open"); + ok( opener.hasClass("active"), "Class added to opener when dialog opens" ); + dialog.dropdownDialog("close"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"triggerEvent":opener, "triggerClass":null}); + dialog.dropdownDialog("open"); + ok( !opener.hasClass("active"), "Class added to opener when dialog opens" ); + dialog.dropdownDialog("close"); + dialog.dropdownDialog( "destroy" ) + +}); + +/* + testing if a specified class is added to the element which the dialog appends to + */ +test( "parentClass", function() { + expect(2); + var parent = $('
'); + var dialog = $('
'); + + dialog.dropdownDialog({"parentClass":"active","appendTo":parent}); + dialog.dropdownDialog("open"); + ok( parent.hasClass("active"), "Class is added to parent when dialog opens" ); + dialog.dropdownDialog("close"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"parentClass":null,"appendTo":parent}); + dialog.dropdownDialog("open"); + ok( !parent.hasClass("active"), "No class is added to parent when dialog opens" ); + dialog.dropdownDialog("close"); + dialog.dropdownDialog( "destroy" ); + +}); + +/* + testing if a specified class is added to the element that becomes dialog + */ +test( "dialogContentClass", function() { + expect(2); + var dialog = $('
'); + + dialog.dropdownDialog({"dialogContentClass":"active"}); + dialog.dropdownDialog("open"); + ok( $('.ui-dialog-content').hasClass("active"), "Class is added to dialog content when dialog opens" ); + dialog.dropdownDialog("close"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"dialogContentClass": null}); + dialog.dropdownDialog("open"); + ok( !$('.ui-dialog-content').hasClass("active"), "No class is added to dialog content" ); + dialog.dropdownDialog("close"); + dialog.dropdownDialog( "destroy" ); +}); + +/* + testing if a specified class is added to dialog + */ +test( "defaultDialogClass", function() { + expect(3); + var dialog = $('
'); + + dialog.dropdownDialog({"defaultDialogClass":"custom"}); + ok( $('.ui-dialog').hasClass("custom"), "Class is added to dialog" ); + ok( !$('.ui-dialog').hasClass("mage-dropdown-dialog"), "Default class has been overwritten" ); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({}); + ok( $('.ui-dialog').hasClass("mage-dropdown-dialog"), "Default class hasn't been overwritten" ); + dialog.dropdownDialog( "destroy" ); +}); + +/* + testing if the specified trigger actually opens the dialog + */ +test( "triggerTarget", function() { + expect(2); + var opener = $('
'); + var dialog = $('
'); + + dialog.dropdownDialog({"triggerTarget":opener}); + opener.trigger("click"); + equal(dialog.dropdownDialog("isOpen"), true, "Dropdown opens when click opener"); + dialog.dropdownDialog("close"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"triggerTarget":null}); + opener.trigger("click"); + equal(dialog.dropdownDialog("isOpen"), false, "Dropdown doesn't open when click opener"); + dialog.dropdownDialog( "destroy" ); +}); + +/* + testing if the dialog gets closed when clicking outside of it + */ +test( "closeOnClickOutside", function() { + expect(2); + var outside = $('
').attr({"id":"outside"}); + var dialog = $('
').attr({"id":"dialog"}); + outside.appendTo("#qunit-fixture"); + dialog.appendTo("#qunit-fixture"); + + dialog.dropdownDialog({"closeOnClickOutside":true}); + dialog.dropdownDialog("open"); + outside.trigger("click"); + equal(dialog.dropdownDialog("isOpen"), false, "Dropdown closes when click outside dropdown"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"closeOnClickOutside":false}); + dialog.dropdownDialog("open"); + outside.trigger("click"); + equal(dialog.dropdownDialog("isOpen"), true, "Dropdown doesn't close when click outside dropdown"); + dialog.dropdownDialog( "destroy" ); +}); + +/* + testing if the dialog gets closed when mouse leaves the dialog area + */ +asyncTest( "closeOnMouseLeave true", function() { + expect(1); + var outside = $('
').attr({"id":"outside"}); + var dialog = $('
').attr({"id":"dialog"}); + var opener = $('
').attr({"id":"opener"}); + outside.appendTo("#qunit-fixture"); + dialog.appendTo("#qunit-fixture"); + opener.appendTo("#qunit-fixture"); + + dialog.dropdownDialog({"closeOnMouseLeave":true}); + dialog.dropdownDialog("open"); + dialog.trigger("mouseenter"); + dialog.trigger("mouseleave"); + + setTimeout(function() { + equal(dialog.dropdownDialog("isOpen"), false, "Dropdown closes when mouseleave the dropdown area"); + dialog.dropdownDialog( "destroy" ); + start(); + }, 3000); + +}); + +/* + testing if the dialog gets closed when mouse leaves the dialog area + */ +asyncTest( "closeOnMouseLeave false", function() { + expect(1); + var outside = $('
').attr({"id":"outside"}); + var dialog = $('
').attr({"id":"dialog"}); + var opener = $('
').attr({"id":"opener"}); + outside.appendTo("#qunit-fixture"); + dialog.appendTo("#qunit-fixture"); + opener.appendTo("#qunit-fixture"); + + dialog.dropdownDialog({"closeOnMouseLeave":false}); + dialog.dropdownDialog("open"); + dialog.trigger("mouseenter"); + dialog.trigger("mouseleave"); + + setTimeout(function() { + equal(dialog.dropdownDialog("isOpen"), true, "Dropdown doesn't close when mouseleave the dropdown area"); + dialog.dropdownDialog( "destroy" ); + start(); + }, 3000); + +}); + +/* + testing if the dialog gets closed with the specified delay + */ +asyncTest( "timeout", function() { + expect(2); + var outside = $('
').attr({"id":"outside"}); + var dialog = $('
').attr({"id":"dialog"}); + var opener = $('
').attr({"id":"opener"}); + outside.appendTo("#qunit-fixture"); + dialog.appendTo("#qunit-fixture"); + opener.appendTo("#qunit-fixture"); + + dialog.dropdownDialog({"timeout":2000}); + dialog.dropdownDialog("open"); + dialog.trigger("mouseenter"); + dialog.trigger("mouseleave"); + equal(dialog.dropdownDialog("isOpen"), true, "Dropdown doesn't close when mouseleave the dropdown area"); + setTimeout(function() { + equal(dialog.dropdownDialog("isOpen"), false, "Dropdown closes when mouseleave the dropdown area, after timeout passed"); + dialog.dropdownDialog( "destroy" ); + start(); + }, 3000); + +}); + +/* + testing if the title bar is prevented from being created + */ +test( "createTitileBar", function() { + expect(2); + var dialog = $('
'); + dialog.dropdownDialog({"createTitleBar":true}); + ok(($(".ui-dialog").find(".ui-dialog-titlebar").length > 0), "Title bar is created"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"createTitleBar":false}); + ok(!($(".ui-dialog").find(".ui-dialog-titlebar").length > 0), "Title bar isn't created"); + dialog.dropdownDialog( "destroy" ); +}); + +/* + testing if the position function gets disabled + */ +test( "autoPosition", function() { + expect(2); + var dialog = $('
'); + dialog.dropdownDialog({"autoPosition":false}); + dialog.dropdownDialog("open"); + ok(($(".ui-dialog").css("top") === 'auto'), "_position function disabled"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"autoPosition":true}); + dialog.dropdownDialog("open"); + ok(($(".ui-dialog").css("top") !== '0px'), "_position function enabled"); + dialog.dropdownDialog( "destroy" ); +}); + +/* + testing if the size function gets disabled + */ +test( "autoSize", function() { + expect(2); + var dialog = $('
'); + dialog.dropdownDialog({"autoSize":true, width:"300"}); + dialog.dropdownDialog("open"); + ok(($(".ui-dialog").css("width") === '300px'), "_size function enabled"); + dialog.dropdownDialog( "destroy" ); + + dialog.dropdownDialog({"autoSize":false, width:"300"}); + dialog.dropdownDialog("open"); + ok(!($(".ui-dialog").css("width") === '300px'), "_size function disabled"); + dialog.dropdownDialog( "destroy" ); +}); diff --git a/dev/tests/js/testsuite/mage/validation/index.html b/dev/tests/js/testsuite/mage/validation/index.html new file mode 100644 index 0000000000000..84c2aaa739390 --- /dev/null +++ b/dev/tests/js/testsuite/mage/validation/index.html @@ -0,0 +1,53 @@ + + + + + + Validation + + + + + + + + + + + + + + + + + +
+
+
+ + \ No newline at end of file diff --git a/dev/tests/js/testsuite/mage/validation/test-validation.js b/dev/tests/js/testsuite/mage/validation/test-validation.js new file mode 100644 index 0000000000000..dfdf8934f4309 --- /dev/null +++ b/dev/tests/js/testsuite/mage/validation/test-validation.js @@ -0,0 +1,528 @@ +/** + * 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.validation + * @package test + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +test( "testValidateNoHtmlTags", function() { + expect(4); + equal($.validator.methods['validate-no-html-tags'].call(this, ""),true); + equal($.validator.methods['validate-no-html-tags'].call(this, null),true); + equal($.validator.methods['validate-no-html-tags'].call(this, "abc"),true); + equal($.validator.methods['validate-no-html-tags'].call(this, "
abc
"),false); + +}); + +test( "testAllowContainerClassName", function() { + expect(4); + var radio = $(''); + radio.appendTo("#qunit-fixture"); + equal($.validator.methods['allow-container-className'].call(this, radio[0]),true); + var checkbox = $(''); + equal($.validator.methods['allow-container-className'].call(this, checkbox[0]),true); + var radio2 = $(''); + equal($.validator.methods['allow-container-className'].call(this, radio2[0]),false); + var checkbox2 = $(''); + equal($.validator.methods['allow-container-className'].call(this, checkbox2[0]),false); +}); + +test( "testValidateSelect", function() { + expect(5); + equal($.validator.methods['validate-select'].call(this, ""),false); + equal($.validator.methods['validate-select'].call(this, "none"),false); + equal($.validator.methods['validate-select'].call(this, null),false); + equal($.validator.methods['validate-select'].call(this, undefined),false); + equal($.validator.methods['validate-select'].call(this, "abc"),true); +}); + +test( "testValidateNotEmpty", function() { + expect(5); + ok(!$.validator.methods['validate-no-empty'].call(this, "")); + ok(!$.validator.methods['validate-no-empty'].call(this, null)); + ok(!$.validator.methods['validate-no-empty'].call(this, undefined)); + ok(!$.validator.methods['validate-no-empty'].call(this, " ")); + ok($.validator.methods['validate-no-empty'].call(this, "test")); +}); + +test( "testValidateStreet", function() { + expect(9); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, ""),true); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, null),true); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, undefined),true); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, " "),true); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, "abc "),true); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, " 123 "),true); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, " abc123 "),true); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, " !@# "),false); + equal($.validator.methods['validate-alphanum-with-spaces'].call(this, " abc.123 "),false); +}); + +test( "testValidatePhoneStrict", function() { + expect(9); + equal($.validator.methods['validate-phoneStrict'].call(this, ""),true); + equal($.validator.methods['validate-phoneStrict'].call(this, null),true); + equal($.validator.methods['validate-phoneStrict'].call(this, undefined),true); + equal($.validator.methods['validate-phoneStrict'].call(this, " "),false); + equal($.validator.methods['validate-phoneStrict'].call(this, "5121231234"),false); + equal($.validator.methods['validate-phoneStrict'].call(this, "512.123.1234"),false); + equal($.validator.methods['validate-phoneStrict'].call(this, "512-123-1234"),true); + equal($.validator.methods['validate-phoneStrict'].call(this, "(512)123-1234"),true); + equal($.validator.methods['validate-phoneStrict'].call(this, "(512) 123-1234"),true); +}); + +test( "testValidatePhoneLax", function() { + expect(11); + equal($.validator.methods['validate-phoneLax'].call(this, ""),true); + equal($.validator.methods['validate-phoneLax'].call(this, null),true); + equal($.validator.methods['validate-phoneLax'].call(this, undefined),true); + equal($.validator.methods['validate-phoneLax'].call(this, " "),false); + equal($.validator.methods['validate-phoneLax'].call(this, "5121231234"),true); + equal($.validator.methods['validate-phoneLax'].call(this, "512.123.1234"),true); + equal($.validator.methods['validate-phoneLax'].call(this, "512-123-1234"),true); + equal($.validator.methods['validate-phoneLax'].call(this, "(512)123-1234"),true); + equal($.validator.methods['validate-phoneLax'].call(this, "(512) 123-1234"),true); + equal($.validator.methods['validate-phoneLax'].call(this, "(512)1231234"),true); + equal($.validator.methods['validate-phoneLax'].call(this, "(512)_123_1234"),false); +}); + +test( "testValidateFax", function() { + expect(9); + equal($.validator.methods['validate-fax'].call(this, ""),true); + equal($.validator.methods['validate-fax'].call(this, null),true); + equal($.validator.methods['validate-fax'].call(this, undefined),true); + equal($.validator.methods['validate-fax'].call(this, " "),false); + equal($.validator.methods['validate-fax'].call(this, "5121231234"),false); + equal($.validator.methods['validate-fax'].call(this, "512.123.1234"),false); + equal($.validator.methods['validate-fax'].call(this, "512-123-1234"),true); + equal($.validator.methods['validate-fax'].call(this, "(512)123-1234"),true); + equal($.validator.methods['validate-fax'].call(this, "(512) 123-1234"),true); +}); + +test( "testValidateEmail", function() { + expect(11); + equal($.validator.methods['validate-email'].call(this, ""),true); + equal($.validator.methods['validate-email'].call(this, null),true); + equal($.validator.methods['validate-email'].call(this, undefined),true); + equal($.validator.methods['validate-email'].call(this, " "),false); + equal($.validator.methods['validate-email'].call(this, "123@123.com"),true); + equal($.validator.methods['validate-email'].call(this, "abc@124.en"),true); + equal($.validator.methods['validate-email'].call(this, "abc@abc.commmmm"),true); + equal($.validator.methods['validate-email'].call(this, "abc.abc.abc@abc.commmmm"),true); + equal($.validator.methods['validate-email'].call(this, "abc.abc-abc@abc.commmmm"),true); + equal($.validator.methods['validate-email'].call(this, "abc.abc_abc@abc.commmmm"),true); + equal($.validator.methods['validate-email'].call(this, "abc.abc_abc@abc"),false); +}); + +test( "testValidateEmailSender", function() { + expect(10); + equal($.validator.methods['validate-emailSender'].call(this, ""),true); + equal($.validator.methods['validate-emailSender'].call(null),true); + equal($.validator.methods['validate-emailSender'].call(undefined),true); + equal($.validator.methods['validate-emailSender'].call(" "),true); + equal($.validator.methods['validate-emailSender'].call("123@123.com"),true); + equal($.validator.methods['validate-emailSender'].call("abc@124.en"),true); + equal($.validator.methods['validate-emailSender'].call("abc@abc.commmmm"),true); + equal($.validator.methods['validate-emailSender'].call("abc.abc.abc@abc.commmmm"),true); + equal($.validator.methods['validate-emailSender'].call("abc.abc-abc@abc.commmmm"),true); + equal($.validator.methods['validate-emailSender'].call("abc.abc_abc@abc.commmmm"),true); +}); + +test( "testValidatePassword", function() { + expect(9); + equal($.validator.methods['validate-password'].call(this, ""),true); + equal($.validator.methods['validate-password'].call(this, null),false); + equal($.validator.methods['validate-password'].call(this, undefined),false); + equal($.validator.methods['validate-password'].call(this, " "),true); + equal($.validator.methods['validate-password'].call(this, "123@123.com"),true); + equal($.validator.methods['validate-password'].call(this, "abc"),false); + equal($.validator.methods['validate-password'].call(this, "abc "),false); + equal($.validator.methods['validate-password'].call(this, " abc "),false); + equal($.validator.methods['validate-password'].call(this, "dddd"),false); +}); + +test( "testValidateAdminPassword", function() { + expect(9); + equal(true, $.validator.methods['validate-admin-password'].call(this, "")); + equal(false, $.validator.methods['validate-admin-password'].call(this, null)); + equal(false, $.validator.methods['validate-admin-password'].call(this, undefined)); + equal(true, $.validator.methods['validate-admin-password'].call(this, " ")); + equal(true, $.validator.methods['validate-admin-password'].call(this, "123@123.com")); + equal(false, $.validator.methods['validate-admin-password'].call(this, "abc")); + equal(false, $.validator.methods['validate-admin-password'].call(this, "abc ")); + equal(false, $.validator.methods['validate-admin-password'].call(this, " abc ")); + equal(false, $.validator.methods['validate-admin-password'].call(this, "dddd")); +}); + +test( "testValidateUrl", function() { + expect(8); + equal(true, $.validator.methods['validate-url'].call(this, "")); + equal(true, $.validator.methods['validate-url'].call(this, null)); + equal(true, $.validator.methods['validate-url'].call(this, undefined)); + equal(false, $.validator.methods['validate-url'].call(this, " ")); + equal(true, $.validator.methods['validate-url'].call(this, "http://www.google.com")); + equal(true, $.validator.methods['validate-url'].call(this, "http://127.0.0.1:8080/index.php")); + equal(true, $.validator.methods['validate-url'].call(this, "http://app-spot.com/index.php")); + equal(true, $.validator.methods['validate-url'].call(this, "http://app-spot_space.com/index.php")); +}); + +test( "testValidateCleanUrl", function() { + expect(8); + equal(true, $.validator.methods['validate-clean-url'].call(this, "")); + equal(true, $.validator.methods['validate-clean-url'].call(this, null)); + equal(true, $.validator.methods['validate-clean-url'].call(this, undefined)); + equal(false, $.validator.methods['validate-clean-url'].call(this, " ")); + equal(true, $.validator.methods['validate-clean-url'].call(this, "http://www.google.com")); + equal(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1:8080/index.php")); + equal(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1:8080")); + equal(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1")); +}); + +test( "testValidateXmlIdentifier", function() { + expect(8); + equal(true, $.validator.methods['validate-xml-identifier'].call(this, "")); + equal(true, $.validator.methods['validate-xml-identifier'].call(this, null)); + equal(true, $.validator.methods['validate-xml-identifier'].call(this, undefined)); + equal(false, $.validator.methods['validate-xml-identifier'].call(this, " ")); + equal(true, $.validator.methods['validate-xml-identifier'].call(this, "abc")); + equal(true, $.validator.methods['validate-xml-identifier'].call(this, "abc_123")); + equal(true, $.validator.methods['validate-xml-identifier'].call(this, "abc-123")); + equal(false, $.validator.methods['validate-xml-identifier'].call(this, "123-abc")); +}); + +test( "testValidateSsn", function() { + expect(8); + equal(true, $.validator.methods['validate-ssn'].call(this, "")); + equal(true, $.validator.methods['validate-ssn'].call(this, null)); + equal(true, $.validator.methods['validate-ssn'].call(this, undefined)); + equal(false, $.validator.methods['validate-ssn'].call(this, " ")); + equal(false, $.validator.methods['validate-ssn'].call(this, "abc")); + equal(true, $.validator.methods['validate-ssn'].call(this, "123-13-1234")); + equal(true, $.validator.methods['validate-ssn'].call(this, "012-12-1234")); + equal(false, $.validator.methods['validate-ssn'].call(this, "23-12-1234")); +}); + +test( "testValidateZip", function() { + expect(8); + equal(true, $.validator.methods['validate-zip'].call(this, "")); + equal(true, $.validator.methods['validate-zip'].call(this, null)); + equal(true, $.validator.methods['validate-zip'].call(this, undefined)); + equal(false, $.validator.methods['validate-zip'].call(this, " ")); + equal(true, $.validator.methods['validate-zip'].call(this, "12345-1234")); + equal(true, $.validator.methods['validate-zip'].call(this, "02345")); + equal(false, $.validator.methods['validate-zip'].call(this, "1234")); + equal(false, $.validator.methods['validate-zip'].call(this, "1234-1234")); +}); + +test( "testValidateDateAu", function() { + expect(8); + equal(true, $.validator.methods['validate-date-au'].call(this, "")); + equal(true, $.validator.methods['validate-date-au'].call(this, null)); + equal(true, $.validator.methods['validate-date-au'].call(this, undefined)); + equal(false, $.validator.methods['validate-date-au'].call(this, " ")); + equal(true, $.validator.methods['validate-date-au'].call(this, "01/01/2012")); + equal(true, $.validator.methods['validate-date-au'].call(this, "30/01/2012")); + equal(false, $.validator.methods['validate-date-au'].call(this, "01/30/2012")); + equal(false, $.validator.methods['validate-date-au'].call(this, "1/1/2012")); +}); + +test( "testValidateCurrencyDollar", function() { + expect(8); + equal(true, $.validator.methods['validate-currency-dollar'].call(this, "")); + equal(true, $.validator.methods['validate-currency-dollar'].call(this, null)); + equal(true, $.validator.methods['validate-currency-dollar'].call(this, undefined)); + equal(false, $.validator.methods['validate-currency-dollar'].call(this, " ")); + equal(true, $.validator.methods['validate-currency-dollar'].call(this, "$123")); + equal(true, $.validator.methods['validate-currency-dollar'].call(this, "$1,123.00")); + equal(true, $.validator.methods['validate-currency-dollar'].call(this, "$1234")); + equal(false, $.validator.methods['validate-currency-dollar'].call(this, "$1234.1234")); +}); + +test( "testValidateNotNegativeNumber", function() { + expect(11); + equal(true, $.validator.methods['validate-not-negative-number'].call(this, "")); + equal(true, $.validator.methods['validate-not-negative-number'].call(this, null)); + equal(true, $.validator.methods['validate-not-negative-number'].call(this, undefined)); + equal(false, $.validator.methods['validate-not-negative-number'].call(this, " ")); + equal(true, $.validator.methods['validate-not-negative-number'].call(this, "0")); + equal(true, $.validator.methods['validate-not-negative-number'].call(this, "1")); + equal(true, $.validator.methods['validate-not-negative-number'].call(this, "1234")); + equal(true, $.validator.methods['validate-not-negative-number'].call(this, "1,234.1234")); + equal(false, $.validator.methods['validate-not-negative-number'].call(this, "-1")); + equal(false, $.validator.methods['validate-not-negative-number'].call(this, "-1e")); + equal(false, $.validator.methods['validate-not-negative-number'].call(this, "-1,234.1234")); +}); + +test( "testValidateGreaterThanZero", function() { + expect(11); + equal(true, $.validator.methods['validate-greater-than-zero'].call(this, "")); + equal(true, $.validator.methods['validate-greater-than-zero'].call(this, null)); + equal(true, $.validator.methods['validate-greater-than-zero'].call(this, undefined)); + equal(false, $.validator.methods['validate-greater-than-zero'].call(this, " ")); + equal(false, $.validator.methods['validate-greater-than-zero'].call(this, "0")); + equal(true, $.validator.methods['validate-greater-than-zero'].call(this, "1")); + equal(true, $.validator.methods['validate-greater-than-zero'].call(this, "1234")); + equal(true, $.validator.methods['validate-greater-than-zero'].call(this, "1,234.1234")); + equal(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1")); + equal(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1e")); + equal(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1,234.1234")); +}); + +test( "testValidateCssLength", function() { + expect(11); + equal(true, $.validator.methods['validate-css-length'].call(this, "")); + equal(true, $.validator.methods['validate-css-length'].call(this, null)); + equal(true, $.validator.methods['validate-css-length'].call(this, undefined)); + equal(false, $.validator.methods['validate-css-length'].call(this, " ")); + equal(false, $.validator.methods['validate-css-length'].call(this, "0")); + equal(true, $.validator.methods['validate-css-length'].call(this, "1")); + equal(true, $.validator.methods['validate-css-length'].call(this, "1234")); + equal(true, $.validator.methods['validate-css-length'].call(this, "1,234.1234")); + equal(false, $.validator.methods['validate-css-length'].call(this, "-1")); + equal(false, $.validator.methods['validate-css-length'].call(this, "-1e")); + equal(false, $.validator.methods['validate-css-length'].call(this, "-1,234.1234")); +}); + +test( "testValidateData", function() { + expect(9); + equal(true, $.validator.methods['validate-data'].call(this, "")); + equal(true, $.validator.methods['validate-data'].call(this, null)); + equal(true, $.validator.methods['validate-data'].call(this, undefined)); + equal(false, $.validator.methods['validate-data'].call(this, " ")); + equal(false, $.validator.methods['validate-data'].call(this, "123abc")); + equal(true, $.validator.methods['validate-data'].call(this, "abc")); + equal(false, $.validator.methods['validate-data'].call(this, " abc")); + equal(true, $.validator.methods['validate-data'].call(this, "abc123")); + equal(false, $.validator.methods['validate-data'].call(this, "abc-123")); +}); + + +test( "testValidateOneRequiredByName", function() { + expect(4); + var radio = $(''); + radio.appendTo("#qunit-fixture"); + ok(!$.validator.methods['validate-one-required-by-name'].call(this, + null, radio[0])); + var radio2 = $(''); + radio2.appendTo("#qunit-fixture"); + ok($.validator.methods['validate-one-required-by-name'].call(this, + null, radio2[0])); + + var checkbox = $(''); + checkbox.appendTo("#qunit-fixture"); + ok(!$.validator.methods['validate-one-required-by-name'].call(this, + null, checkbox[0])); + var checkbox2 = $(''); + checkbox2.appendTo("#qunit-fixture"); + ok($.validator.methods['validate-one-required-by-name'].call(this, + null, checkbox2[0])); +}); + +test( "testLessThanEqualsTo", function() { + expect(5); + var elm1 = $(''); + var elm2 = $(''); + ok(!$.validator.methods['less-than-equals-to'].call(this, elm1[0].value, + elm1, elm2)); + elm1[0].value = 4; + ok($.validator.methods['less-than-equals-to'].call(this, elm1[0].value, + elm1, elm2)); + + var elm3 = $(''); + var elm4= $(''); + ok($.validator.methods['less-than-equals-to'].call(this, elm3[0].value, + elm3, elm4)); + + var elm5 = $(''); + var elm6= $(''); + ok($.validator.methods['less-than-equals-to'].call(this, elm5[0].value, + elm5, elm6)); + + var elm7 = $(''); + var elm8= $(''); + ok($.validator.methods['less-than-equals-to'].call(this, elm7[0].value, + elm7, elm8)); +}); + +test( "testGreaterThanEqualsTo", function() { + expect(5); + + var elm1 = $(''); + var elm2 = $(''); + ok(!$.validator.methods['greater-than-equals-to'].call(this, elm1[0].value, + elm1, elm2)); + elm1[0].value = 9; + ok($.validator.methods['greater-than-equals-to'].call(this, elm1[0].value, + elm1, elm2)); + + var elm3 = $(''); + var elm4= $(''); + ok($.validator.methods['greater-than-equals-to'].call(this, elm3[0].value, + elm3, elm4)); + + var elm5 = $(''); + var elm6= $(''); + ok($.validator.methods['greater-than-equals-to'].call(this, elm5[0].value, + elm5, elm6)); + + var elm7 = $(''); + var elm8= $(''); + ok($.validator.methods['greater-than-equals-to'].call(this, elm7[0].value, + elm7, elm8)); +}); + +test( "testValidateGroupedQty", function() { + expect(5); + var div1 = $('
'); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div1); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div1); + $('').appendTo(div1); + + ok(!$.validator.methods['validate-grouped-qty'].call(this, null, null, div1[0])); + + var div2 = $('
'); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div2); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div2); + $('').appendTo(div2); + ok(!$.validator.methods['validate-grouped-qty'].call(this, null, null, div2[0])); + + var div3 = $('
'); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div3); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div3); + $('').appendTo(div3); + ok(!$.validator.methods['validate-grouped-qty'].call(this, null, null, div3[0])); + + var div4 = $('
'); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div4); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div4); + $('').appendTo(div4); + ok($.validator.methods['validate-grouped-qty'].call(this, null, null, div4[0])); + + var div5 = $('
'); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div5); + $('').attr("data-validate","{'validate-grouped-qty':'#super-product-table'}") + .appendTo(div5); + $('').appendTo(div5); + ok($.validator.methods['validate-grouped-qty'].call(this, null, null, div5[0])); + +}); + +test( "testValidateCCTypeSelect", function() { + expect(6); + var visaValid = $(''); + var visaInvalid = $(''); + var mcValid = $(''); + var mcInvalid = $(''); + var aeValid = $(''); + var aeInvalid = $(''); + + ok($.validator.methods['validate-cc-type-select'].call(this, 'VI', null, visaValid)); + ok(!$.validator.methods['validate-cc-type-select'].call(this, 'VI', null, visaInvalid)); + ok($.validator.methods['validate-cc-type-select'].call(this, 'MC', null, mcValid)); + ok(!$.validator.methods['validate-cc-type-select'].call(this, 'MC', null, mcInvalid)); + ok($.validator.methods['validate-cc-type-select'].call(this, 'AE', null, aeValid)); + ok(!$.validator.methods['validate-cc-type-select'].call(this, 'AE', null, aeInvalid)); +}); + +test( "testValidateCCNumber", function() { + expect(8); + ok($.validator.methods['validate-cc-number'].call(this, '4916835098995909', null, null)); + ok($.validator.methods['validate-cc-number'].call(this, '5265071363284878', null, null)); + ok($.validator.methods['validate-cc-number'].call(this, '6011120623356953', null, null)); + ok($.validator.methods['validate-cc-number'].call(this, '371293266574617', null, null)); + ok(!$.validator.methods['validate-cc-number'].call(this, '4916835098995901', null, null)); + ok(!$.validator.methods['validate-cc-number'].call(this, '5265071363284870', null, null)); + ok(!$.validator.methods['validate-cc-number'].call(this, '6011120623356951', null, null)); + ok(!$.validator.methods['validate-cc-number'].call(this, '371293266574619', null, null)); +}); + +test( "testValidateCCType", function() { + expect(8); + var select = $(''); + + select.val('VI'); + ok($.validator.methods['validate-cc-type'].call(this, '4916835098995909', null, select)); + ok(!$.validator.methods['validate-cc-type'].call(this, '5265071363284878', null, select)); + select.val('MC'); + ok($.validator.methods['validate-cc-type'].call(this, '5265071363284878', null, select)); + ok(!$.validator.methods['validate-cc-type'].call(this, '4916835098995909', null, select)); + select.val('AE'); + ok($.validator.methods['validate-cc-type'].call(this, '371293266574617', null, select)); + ok(!$.validator.methods['validate-cc-type'].call(this, '5265071363284878', null, select)); + select.val('DI'); + ok($.validator.methods['validate-cc-type'].call(this, '6011000990139424', null, select)); + ok(!$.validator.methods['validate-cc-type'].call(this, '4916835098995909', null, select)); +}); + +test( "testValidateCCExp", function() { + expect(3); + var year = $(''), + currentTime = new Date(), + currentMonth = currentTime.getMonth() + 1, + currentYear = currentTime.getFullYear(); + year.val(currentYear); + if (currentMonth > 1) { + ok(!$.validator.methods['validate-cc-exp'].call(this, currentMonth - 1, null, year)); + } + ok($.validator.methods['validate-cc-exp'].call(this, currentMonth, null, year)); + year.val(currentYear + 1); + ok($.validator.methods['validate-cc-exp'].call(this, currentMonth, null, year)); + +}); + +test( "testValidateCCCvn", function() { + expect(8); + var ccType = $(''); + + ccType.val('VI'); + ok($.validator.methods['validate-cc-cvn'].call(this, '123', null, ccType)); + ok(!$.validator.methods['validate-cc-cvn'].call(this, '1234', null, ccType)); + ccType.val('MC'); + ok($.validator.methods['validate-cc-cvn'].call(this, '123', null, ccType)); + ok(!$.validator.methods['validate-cc-cvn'].call(this, '1234', null, ccType)); + ccType.val('AE'); + ok($.validator.methods['validate-cc-cvn'].call(this, '1234', null, ccType)); + ok(!$.validator.methods['validate-cc-cvn'].call(this, '123', null, ccType)); + ccType.val('DI'); + ok($.validator.methods['validate-cc-cvn'].call(this, '123', null, ccType)); + ok(!$.validator.methods['validate-cc-cvn'].call(this, '1234', null, ccType)); +}); diff --git a/dev/tests/js/testsuite/mage/validation/validate-test.js b/dev/tests/js/testsuite/mage/validation/validate-test.js deleted file mode 100644 index a3255988afe96..0000000000000 --- a/dev/tests/js/testsuite/mage/validation/validate-test.js +++ /dev/null @@ -1,509 +0,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.validation - * @package test - * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ -MageValidationTest = TestCase('MageValidationTest'); - -MageValidationTest.prototype.testValidateNoHtmlTags = function () { - assertEquals(true, $.validator.methods['validate-no-html-tags'].call(this, "")); - assertEquals(true, $.validator.methods['validate-no-html-tags'].call(this, null)); - assertEquals(true, $.validator.methods['validate-no-html-tags'].call(this, "abc")); - assertEquals(false, $.validator.methods['validate-no-html-tags'].call(this, "
abc
")); -}; - -MageValidationTest.prototype.testAllowContainerClassName = function () { - /*:DOC radio = */ - assertEquals(true, $.validator.methods['allow-container-className'].call(this, this.radio)); - /*:DOC checkbox = */ - assertEquals(true, $.validator.methods['allow-container-className'].call(this, this.checkbox)); - /*:DOC radio2 = */ - assertEquals(false, $.validator.methods['allow-container-className'].call(this, this.radio2)); - /*:DOC checkbox2 = */ - assertEquals(false, $.validator.methods['allow-container-className'].call(this, this.checkbox2)); -}; - -MageValidationTest.prototype.testValidateSelect = function () { - assertEquals(false, $.validator.methods['validate-select'].call(this, "")); - assertEquals(false, $.validator.methods['validate-select'].call(this, "none")); - assertEquals(false, $.validator.methods['validate-select'].call(this, null)); - assertEquals(false, $.validator.methods['validate-select'].call(this, undefined)); - assertEquals(true, $.validator.methods['validate-select'].call(this, "abc")); -}; - -MageValidationTest.prototype.testValidateNotEmpty = function () { - assertFalse($.validator.methods['validate-no-empty'].call(this, "")); - assertFalse($.validator.methods['validate-no-empty'].call(this, null)); - assertFalse($.validator.methods['validate-no-empty'].call(this, undefined)); - assertFalse($.validator.methods['validate-no-empty'].call(this, " ")); - assertTrue($.validator.methods['validate-no-empty'].call(this, "test")); -}; - -MageValidationTest.prototype.testValidateAlphanumWithSpaces = function () { - assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, "")); - assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, null)); - assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, undefined)); - assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, "abc ")); - assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, " 123 ")); - assertEquals(true, $.validator.methods['validate-alphanum-with-spaces'].call(this, " abc123 ")); - assertEquals(false, $.validator.methods['validate-alphanum-with-spaces'].call(this, " !@# ")); - assertEquals(false, $.validator.methods['validate-alphanum-with-spaces'].call(this, " abc.123 ")); -}; - -MageValidationTest.prototype.testValidateStreet = function () { - assertEquals(true, $.validator.methods['validate-street'].call(this, "")); - assertEquals(true, $.validator.methods['validate-street'].call(this, null)); - assertEquals(true, $.validator.methods['validate-street'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-street'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-street'].call(this, "1234 main st")); - assertEquals(true, $.validator.methods['validate-street'].call(this, "7700 w parmer ln")); - assertEquals(true, $.validator.methods['validate-street'].call(this, "7700 w parmer ln #125")); - assertEquals(false, $.validator.methods['validate-street'].call(this, "!@# w parmer ln $125")); -}; - -MageValidationTest.prototype.testValidatePhoneStrict = function () { - assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "")); - assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, null)); - assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-phoneStrict'].call(this, " ")); - assertEquals(false, $.validator.methods['validate-phoneStrict'].call(this, "5121231234")); - assertEquals(false, $.validator.methods['validate-phoneStrict'].call(this, "512.123.1234")); - assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "512-123-1234")); - assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "(512)123-1234")); - assertEquals(true, $.validator.methods['validate-phoneStrict'].call(this, "(512) 123-1234")); -}; - -MageValidationTest.prototype.testValidatePhoneLax = function () { - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "")); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, null)); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-phoneLax'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "5121231234")); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "512.123.1234")); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "512-123-1234")); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "(512)123-1234")); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "(512) 123-1234")); - assertEquals(true, $.validator.methods['validate-phoneLax'].call(this, "(512)1231234")); - assertEquals(false, $.validator.methods['validate-phoneLax'].call(this, "(512)_123_1234")); -}; - -MageValidationTest.prototype.testValidateFax = function () { - assertEquals(true, $.validator.methods['validate-fax'].call(this, "")); - assertEquals(true, $.validator.methods['validate-fax'].call(this, null)); - assertEquals(true, $.validator.methods['validate-fax'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-fax'].call(this, " ")); - assertEquals(false, $.validator.methods['validate-fax'].call(this, "5121231234")); - assertEquals(false, $.validator.methods['validate-fax'].call(this, "512.123.1234")); - assertEquals(true, $.validator.methods['validate-fax'].call(this, "512-123-1234")); - assertEquals(true, $.validator.methods['validate-fax'].call(this, "(512)123-1234")); - assertEquals(true, $.validator.methods['validate-fax'].call(this, "(512) 123-1234")); -}; - -MageValidationTest.prototype.testValidateEmail = function () { - assertEquals(true, $.validator.methods['validate-email'].call(this, "")); - assertEquals(true, $.validator.methods['validate-email'].call(this, null)); - assertEquals(true, $.validator.methods['validate-email'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-email'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-email'].call(this, "123@123.com")); - assertEquals(true, $.validator.methods['validate-email'].call(this, "abc@124.en")); - assertEquals(true, $.validator.methods['validate-email'].call(this, "abc@abc.commmmm")); - assertEquals(true, $.validator.methods['validate-email'].call(this, "abc.abc.abc@abc.commmmm")); - assertEquals(true, $.validator.methods['validate-email'].call(this, "abc.abc-abc@abc.commmmm")); - assertEquals(true, $.validator.methods['validate-email'].call(this, "abc.abc_abc@abc.commmmm")); - assertEquals(false, $.validator.methods['validate-email'].call(this, "abc.abc_abc@abc")); -}; - -MageValidationTest.prototype.testValidateEmailSender = function () { - assertEquals(true, $.validator.methods['validate-emailSender'].call(this, "")); - assertEquals(true, $.validator.methods['validate-emailSender'].call(null)); - assertEquals(true, $.validator.methods['validate-emailSender'].call(undefined)); - assertEquals(true, $.validator.methods['validate-emailSender'].call(" ")); - assertEquals(true, $.validator.methods['validate-emailSender'].call("123@123.com")); - assertEquals(true, $.validator.methods['validate-emailSender'].call("abc@124.en")); - assertEquals(true, $.validator.methods['validate-emailSender'].call("abc@abc.commmmm")); - assertEquals(true, $.validator.methods['validate-emailSender'].call("abc.abc.abc@abc.commmmm")); - assertEquals(true, $.validator.methods['validate-emailSender'].call("abc.abc-abc@abc.commmmm")); - assertEquals(true, $.validator.methods['validate-emailSender'].call("abc.abc_abc@abc.commmmm")); -}; - -MageValidationTest.prototype.testValidatePassword = function () { - assertEquals(true, $.validator.methods['validate-password'].call(this, "")); - assertEquals(false, $.validator.methods['validate-password'].call(this, null)); - assertEquals(false, $.validator.methods['validate-password'].call(this, undefined)); - assertEquals(true, $.validator.methods['validate-password'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-password'].call(this, "123@123.com")); - assertEquals(false, $.validator.methods['validate-password'].call(this, "abc")); - assertEquals(false, $.validator.methods['validate-password'].call(this, "abc ")); - assertEquals(false, $.validator.methods['validate-password'].call(this, " abc ")); - assertEquals(false, $.validator.methods['validate-password'].call(this, "dddd")); -}; - -MageValidationTest.prototype.testValidateAdminPassword = function () { - assertEquals(true, $.validator.methods['validate-admin-password'].call(this, "")); - assertEquals(false, $.validator.methods['validate-admin-password'].call(this, null)); - assertEquals(false, $.validator.methods['validate-admin-password'].call(this, undefined)); - assertEquals(true, $.validator.methods['validate-admin-password'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-admin-password'].call(this, "123@123.com")); - assertEquals(false, $.validator.methods['validate-admin-password'].call(this, "abc")); - assertEquals(false, $.validator.methods['validate-admin-password'].call(this, "abc ")); - assertEquals(false, $.validator.methods['validate-admin-password'].call(this, " abc ")); - assertEquals(false, $.validator.methods['validate-admin-password'].call(this, "dddd")); -}; - -MageValidationTest.prototype.testValidateUrl = function () { - assertEquals(true, $.validator.methods['validate-url'].call(this, "")); - assertEquals(true, $.validator.methods['validate-url'].call(this, null)); - assertEquals(true, $.validator.methods['validate-url'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-url'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-url'].call(this, "http://www.google.com")); - assertEquals(true, $.validator.methods['validate-url'].call(this, "http://127.0.0.1:8080/index.php")); - assertEquals(true, $.validator.methods['validate-url'].call(this, "http://app-spot.com/index.php")); - assertEquals(true, $.validator.methods['validate-url'].call(this, "http://app-spot_space.com/index.php")); -}; - -MageValidationTest.prototype.testValidateCleanUrl = function () { - assertEquals(true, $.validator.methods['validate-clean-url'].call(this, "")); - assertEquals(true, $.validator.methods['validate-clean-url'].call(this, null)); - assertEquals(true, $.validator.methods['validate-clean-url'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-clean-url'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-clean-url'].call(this, "http://www.google.com")); - assertEquals(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1:8080/index.php")); - assertEquals(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1:8080")); - assertEquals(false, $.validator.methods['validate-clean-url'].call(this, "http://127.0.0.1")); -}; - -MageValidationTest.prototype.testValidateXmlIdentifier = function () { - assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "")); - assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, null)); - assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-xml-identifier'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "abc")); - assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "abc_123")); - assertEquals(true, $.validator.methods['validate-xml-identifier'].call(this, "abc-123")); - assertEquals(false, $.validator.methods['validate-xml-identifier'].call(this, "123-abc")); -}; - -MageValidationTest.prototype.testValidateSsn = function () { - assertEquals(true, $.validator.methods['validate-ssn'].call(this, "")); - assertEquals(true, $.validator.methods['validate-ssn'].call(this, null)); - assertEquals(true, $.validator.methods['validate-ssn'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-ssn'].call(this, " ")); - assertEquals(false, $.validator.methods['validate-ssn'].call(this, "abc")); - assertEquals(true, $.validator.methods['validate-ssn'].call(this, "123-13-1234")); - assertEquals(true, $.validator.methods['validate-ssn'].call(this, "012-12-1234")); - assertEquals(false, $.validator.methods['validate-ssn'].call(this, "23-12-1234")); -}; - -MageValidationTest.prototype.testValidateZip = function () { - assertEquals(true, $.validator.methods['validate-zip'].call(this, "")); - assertEquals(true, $.validator.methods['validate-zip'].call(this, null)); - assertEquals(true, $.validator.methods['validate-zip'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-zip'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-zip'].call(this, "12345-1234")); - assertEquals(true, $.validator.methods['validate-zip'].call(this, "02345")); - assertEquals(false, $.validator.methods['validate-zip'].call(this, "1234")); - assertEquals(false, $.validator.methods['validate-zip'].call(this, "1234-1234")); -}; - -MageValidationTest.prototype.testValidateDateAu = function () { - assertEquals(true, $.validator.methods['validate-date-au'].call(this, "")); - assertEquals(true, $.validator.methods['validate-date-au'].call(this, null)); - assertEquals(true, $.validator.methods['validate-date-au'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-date-au'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-date-au'].call(this, "01/01/2012")); - assertEquals(true, $.validator.methods['validate-date-au'].call(this, "30/01/2012")); - assertEquals(false, $.validator.methods['validate-date-au'].call(this, "01/30/2012")); - assertEquals(false, $.validator.methods['validate-date-au'].call(this, "1/1/2012")); -}; - -MageValidationTest.prototype.testValidateCurrencyDollar = function () { - assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "")); - assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, null)); - assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-currency-dollar'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "$123")); - assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "$1,123.00")); - assertEquals(true, $.validator.methods['validate-currency-dollar'].call(this, "$1234")); - assertEquals(false, $.validator.methods['validate-currency-dollar'].call(this, "$1234.1234")); -}; - -MageValidationTest.prototype.testValidateNotNegativeNumber = function () { - assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "")); - assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, null)); - assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, " ")); - assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "0")); - assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "1")); - assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "1234")); - assertEquals(true, $.validator.methods['validate-not-negative-number'].call(this, "1,234.1234")); - assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, "-1")); - assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, "-1e")); - assertEquals(false, $.validator.methods['validate-not-negative-number'].call(this, "-1,234.1234")); -}; - -MageValidationTest.prototype.testValidateGreaterThanZero = function () { - assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "")); - assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, null)); - assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, " ")); - assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "0")); - assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "1")); - assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "1234")); - assertEquals(true, $.validator.methods['validate-greater-than-zero'].call(this, "1,234.1234")); - assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1")); - assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1e")); - assertEquals(false, $.validator.methods['validate-greater-than-zero'].call(this, "-1,234.1234")); -}; - -MageValidationTest.prototype.testValidateCssLength = function () { - assertEquals(true, $.validator.methods['validate-css-length'].call(this, "")); - assertEquals(true, $.validator.methods['validate-css-length'].call(this, null)); - assertEquals(true, $.validator.methods['validate-css-length'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-css-length'].call(this, " ")); - assertEquals(false, $.validator.methods['validate-css-length'].call(this, "0")); - assertEquals(true, $.validator.methods['validate-css-length'].call(this, "1")); - assertEquals(true, $.validator.methods['validate-css-length'].call(this, "1234")); - assertEquals(true, $.validator.methods['validate-css-length'].call(this, "1,234.1234")); - assertEquals(false, $.validator.methods['validate-css-length'].call(this, "-1")); - assertEquals(false, $.validator.methods['validate-css-length'].call(this, "-1e")); - assertEquals(false, $.validator.methods['validate-css-length'].call(this, "-1,234.1234")); -}; - -MageValidationTest.prototype.testValidateData = function () { - assertEquals(true, $.validator.methods['validate-data'].call(this, "")); - assertEquals(true, $.validator.methods['validate-data'].call(this, null)); - assertEquals(true, $.validator.methods['validate-data'].call(this, undefined)); - assertEquals(false, $.validator.methods['validate-data'].call(this, " ")); - assertEquals(false, $.validator.methods['validate-data'].call(this, "123abc")); - assertEquals(true, $.validator.methods['validate-data'].call(this, "abc")); - assertEquals(false, $.validator.methods['validate-data'].call(this, " abc")); - assertEquals(true, $.validator.methods['validate-data'].call(this, "abc123")); - assertEquals(false, $.validator.methods['validate-data'].call(this, "abc-123")); -}; - -MageValidationTest.prototype.testValidateOneRequiredByName = function () { - /*:DOC += */ - /*:DOC += */ - assertFalse($.validator.methods['validate-one-required-by-name'].call(this, - null, document.getElementById('radio'))); - /*:DOC += */ - assertTrue($.validator.methods['validate-one-required-by-name'].call(this, - null, document.getElementById('radio'))); - - /*:DOC += */ - /*:DOC += */ - assertFalse($.validator.methods['validate-one-required-by-name'].call(this, - null, document.getElementById('checkbox'))); - /*:DOC += */ - assertTrue($.validator.methods['validate-one-required-by-name'].call(this, - null, document.getElementById('checkbox'))); -}; - -MageValidationTest.prototype.testLessThanEqualsTo = function () { - /*:DOC += */ - /*:DOC += */ - var element1 = document.getElementById('element1'); - assertFalse($.validator.methods['less-than-equals-to'].call(this, element1.value, - element1, '#element2')); - element1.value = 4; - assertTrue($.validator.methods['less-than-equals-to'].call(this, element1.value, - element1, '#element2')); - - /*:DOC += */ - /*:DOC += */ - var element3 = document.getElementById('element3'); - assertTrue($.validator.methods['less-than-equals-to'].call(this, element3.value, - element3, '#element4')); - - /*:DOC += */ - /*:DOC += */ - var element5 = document.getElementById('element5'); - assertTrue($.validator.methods['less-than-equals-to'].call(this, element5.value, - element5, '#element6')); - - /*:DOC += */ - /*:DOC += */ - var element7 = document.getElementById('element7'); - assertTrue($.validator.methods['less-than-equals-to'].call(this, element7.value, - element7, '#element8')); -}; - -MageValidationTest.prototype.testGreaterThanEqualsTo = function () { - /*:DOC += */ - /*:DOC += */ - var element1 = document.getElementById('element1'); - assertFalse($.validator.methods['greater-than-equals-to'].call(this, element1.value, - element1, '#element2')); - element1.value = 9; - assertTrue($.validator.methods['greater-than-equals-to'].call(this, element1.value, - element1, '#element2')); - - /*:DOC += */ - /*:DOC += */ - var element3 = document.getElementById('element3'); - assertTrue($.validator.methods['greater-than-equals-to'].call(this, element3.value, - element3, '#element4')); - - /*:DOC += */ - /*:DOC += */ - var element5 = document.getElementById('element5'); - assertTrue($.validator.methods['greater-than-equals-to'].call(this, element5.value, - element5, '#element6')); - - /*:DOC += */ - /*:DOC += */ - var element7 = document.getElementById('element7'); - assertTrue($.validator.methods['greater-than-equals-to'].call(this, element7.value, - element7, '#element8')); -}; - -MageValidationTest.prototype.testValidateGroupedQty = function () { - /*:DOC +=
- - - -
- */ - assertFalse($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div1')); - /*:DOC +=
- - - -
- */ - assertFalse($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div2')); - /*:DOC +=
- - - -
- */ - assertFalse($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div3')); - /*:DOC +=
- - - -
- */ - assertTrue($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div4')); - /*:DOC +=
- - - -
- */ - assertTrue($.validator.methods['validate-grouped-qty'].call(this, null, null, '#div5')); - -}; - -MageValidationTest.prototype.testValidateCCTypeSelect = function () { - /*:DOC += - - - - - - */ - assertTrue($.validator.methods['validate-cc-type-select'].call(this, 'VI', null, '#visa-valid')); - assertFalse($.validator.methods['validate-cc-type-select'].call(this, 'VI', null, '#visa-invalid')); - assertTrue($.validator.methods['validate-cc-type-select'].call(this, 'MC', null, '#mc-valid')); - assertFalse($.validator.methods['validate-cc-type-select'].call(this, 'MC', null, '#mc-invalid')); - assertTrue($.validator.methods['validate-cc-type-select'].call(this, 'AE', null, '#ae-valid')); - assertFalse($.validator.methods['validate-cc-type-select'].call(this, 'AE', null, '#ae-invalid')); -}; - -MageValidationTest.prototype.testValidateCCNumber = function () { - assertTrue($.validator.methods['validate-cc-number'].call(this, '4916835098995909', null, null)); - assertTrue($.validator.methods['validate-cc-number'].call(this, '5265071363284878', null, null)); - assertTrue($.validator.methods['validate-cc-number'].call(this, '6011120623356953', null, null)); - assertTrue($.validator.methods['validate-cc-number'].call(this, '371293266574617', null, null)); - assertFalse($.validator.methods['validate-cc-number'].call(this, '4916835098995901', null, null)); - assertFalse($.validator.methods['validate-cc-number'].call(this, '5265071363284870', null, null)); - assertFalse($.validator.methods['validate-cc-number'].call(this, '6011120623356951', null, null)); - assertFalse($.validator.methods['validate-cc-number'].call(this, '371293266574619', null, null)); -}; - -MageValidationTest.prototype.testValidateCCType = function () { - /*:DOC += - */ - var ccType = $('#cc-type'); - ccType.val('VI'); - assertTrue($.validator.methods['validate-cc-type'].call(this, '4916835098995909', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-type'].call(this, '5265071363284878', null, '#cc-type')); - ccType.val('MC'); - assertTrue($.validator.methods['validate-cc-type'].call(this, '5265071363284878', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-type'].call(this, '4916835098995909', null, '#cc-type')); - ccType.val('AE'); - assertTrue($.validator.methods['validate-cc-type'].call(this, '371293266574617', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-type'].call(this, '5265071363284878', null, '#cc-type')); - ccType.val('DI'); - assertTrue($.validator.methods['validate-cc-type'].call(this, '6011000990139424', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-type'].call(this, '4916835098995909', null, '#cc-type')); -}; - -MageValidationTest.prototype.testValidateCCExp = function () { - /*:DOC += - */ - var year = $('#year'), - currentTime = new Date(), - currentMonth = currentTime.getMonth() + 1, - currentYear = currentTime.getFullYear();; - year.val(currentYear); - if (currentMonth > 1) { - assertFalse($.validator.methods['validate-cc-exp'].call(this, currentMonth - 1, null, '#year')); - } - assertTrue($.validator.methods['validate-cc-exp'].call(this, currentMonth, null, '#year')); - year.val(currentYear + 1); - assertTrue($.validator.methods['validate-cc-exp'].call(this, currentMonth, null, '#year')); - -}; - -MageValidationTest.prototype.testValidateCCCvn = function () { - /*:DOC += - */ - var ccType = $('#cc-type'); - ccType.val('VI'); - assertTrue($.validator.methods['validate-cc-cvn'].call(this, '123', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-cvn'].call(this, '1234', null, '#cc-type')); - ccType.val('MC'); - assertTrue($.validator.methods['validate-cc-cvn'].call(this, '123', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-cvn'].call(this, '1234', null, '#cc-type')); - ccType.val('AE'); - assertTrue($.validator.methods['validate-cc-cvn'].call(this, '1234', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-cvn'].call(this, '123', null, '#cc-type')); - ccType.val('DI'); - assertTrue($.validator.methods['validate-cc-cvn'].call(this, '123', null, '#cc-type')); - assertFalse($.validator.methods['validate-cc-cvn'].call(this, '1234', null, '#cc-type')); -}; diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php index e7d8d4a8938b6..6963c3ef9ab25 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Application.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php @@ -39,7 +39,7 @@ class Application /** * Configuration object * - * @param \Magento\Config + * @var \Magento\TestFramework\Performance\Config */ protected $_config; @@ -51,12 +51,12 @@ class Application protected $_installerScript; /** - * @var \Magento\Shell + * @var \Magento\Framework\Shell */ protected $_shell; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -78,14 +78,14 @@ class Application * Constructor * * @param \Magento\TestFramework\Performance\Config $config - * @param \Magento\Shell $shell - * @throws \Magento\Exception + * @param \Magento\Framework\Shell $shell + * @throws \Magento\Framework\Exception */ - public function __construct(\Magento\TestFramework\Performance\Config $config, \Magento\Shell $shell) + public function __construct(\Magento\TestFramework\Performance\Config $config, \Magento\Framework\Shell $shell) { $installerScript = $config->getApplicationBaseDir() . '/dev/shell/install.php'; if (!is_file($installerScript)) { - throw new \Magento\Exception("File '{$installerScript}' is not found."); + throw new \Magento\Framework\Exception("File '{$installerScript}' is not found."); } $this->_installerScript = realpath($installerScript); $this->_config = $config; @@ -153,13 +153,13 @@ protected function _uninstall() * Install application according to installation options * * @return \Magento\TestFramework\Application - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ protected function _install() { $installOptions = $this->_config->getInstallOptions(); if (!$installOptions) { - throw new \Magento\Exception('Trying to install Magento, but installation options are not set'); + throw new \Magento\Framework\Exception('Trying to install Magento, but installation options are not set'); } // Populate install options with global options @@ -188,7 +188,7 @@ protected function _install() */ protected function _updateFilesystemPermissions() { - /** @var \Magento\Filesystem\Directory\Write $varDirectory */ + /** @var \Magento\Framework\Filesystem\Directory\Write $varDirectory */ $varDirectory = $this->getObjectManager()->get( 'Magento\Framework\App\Filesystem' )->getDirectoryWrite( @@ -207,7 +207,7 @@ protected function _bootstrap() $this->getObjectManager()->configure( $this->getObjectManager()->get('Magento\Framework\App\ObjectManager\ConfigLoader')->load(self::AREA_CODE) ); - $this->getObjectManager()->get('Magento\Config\ScopeInterface')->setCurrentScope(self::AREA_CODE); + $this->getObjectManager()->get('Magento\Framework\Config\ScopeInterface')->setCurrentScope(self::AREA_CODE); return $this; } @@ -274,7 +274,7 @@ protected function _doFixturesNeedReinstall($fixtures) /** * Get object manager * - * @return \Magento\ObjectManager + * @return \Magento\Framework\ObjectManager */ public function getObjectManager() { @@ -289,7 +289,7 @@ public function getObjectManager() /** * Reset object manager * - * @return \Magento\ObjectManager + * @return \Magento\Framework\ObjectManager */ public function resetObjectManager() { diff --git a/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php b/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php index 280c295931d4f..d0d39e77dafcb 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php @@ -33,7 +33,7 @@ class Categories /** * Object manager * - * @var \Magento\ObjectManager\ObjectManager + * @var \Magento\Framework\ObjectManager\ObjectManager */ protected $_objectManager = null; @@ -99,7 +99,7 @@ public function __construct() /** * Get object manager * - * @return \Magento\ObjectManager\ObjectManager|null + * @return \Magento\Framework\ObjectManager\ObjectManager|null */ protected function getObjectManager() { diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php index 687e6af912917..f826c332de888 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php @@ -55,19 +55,19 @@ public function __construct($testsBaseDir, $appBaseDir) /** * Ensure reports directory exists, empty, and has write permissions * - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function cleanupReports() { $reportDir = $this->_config->getReportDir(); try { - $filesystemAdapter = new \Magento\Filesystem\Driver\File(); + $filesystemAdapter = new \Magento\Framework\Filesystem\Driver\File(); if ($filesystemAdapter->isExists($reportDir)) { $filesystemAdapter->deleteDirectory($reportDir); } - } catch (\Magento\Filesystem\FilesystemException $e) { + } catch (\Magento\Framework\Filesystem\FilesystemException $e) { if (file_exists($reportDir)) { - throw new \Magento\Exception("Cannot cleanup reports directory '{$reportDir}'."); + throw new \Magento\Framework\Exception("Cannot cleanup reports directory '{$reportDir}'."); } } mkdir($reportDir, 0777, true); diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php index 743ffa71725dc..5f66004aa92cd 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Config.php @@ -78,14 +78,14 @@ class Config * @param string $testsBaseDir * @param string $appBaseDir * @throws \InvalidArgumentException - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function __construct(array $configData, $testsBaseDir, $appBaseDir) { $this->_validateData($configData); if (!is_dir($testsBaseDir)) { - throw new \Magento\Exception("Base directory '{$testsBaseDir}' does not exist."); + throw new \Magento\Framework\Exception("Base directory '{$testsBaseDir}' does not exist."); } $this->_testsBaseDir = $testsBaseDir; $this->_reportDir = $this->_getTestsRelativePath($configData['report_dir']); @@ -117,7 +117,7 @@ public function getTestsBaseDir() * Validate high-level configuration structure * * @param array $configData - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ protected function _validateData(array $configData) { @@ -125,7 +125,7 @@ protected function _validateData(array $configData) $requiredKeys = array('application', 'scenario', 'report_dir'); foreach ($requiredKeys as $requiredKeyName) { if (empty($configData[$requiredKeyName])) { - throw new \Magento\Exception("Configuration array must define '{$requiredKeyName}' key."); + throw new \Magento\Framework\Exception("Configuration array must define '{$requiredKeyName}' key."); } } @@ -133,7 +133,7 @@ protected function _validateData(array $configData) $requiredAdminKeys = array('frontname', 'username', 'password'); foreach ($requiredAdminKeys as $requiredKeyName) { if (empty($configData['application']['admin'][$requiredKeyName])) { - throw new \Magento\Exception("Admin options array must define '{$requiredKeyName}' key."); + throw new \Magento\Framework\Exception("Admin options array must define '{$requiredKeyName}' key."); } } } diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/FailureException.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/FailureException.php index f6337546a0e87..0970c404feb2b 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/FailureException.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/FailureException.php @@ -29,7 +29,7 @@ */ namespace Magento\TestFramework\Performance\Scenario; -class FailureException extends \Magento\Exception +class FailureException extends \Magento\Framework\Exception { /** * @var \Magento\TestFramework\Performance\Scenario diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/FileFormat.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/FileFormat.php index aa0f6d61d5cda..5ffad984a14af 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/FileFormat.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/FileFormat.php @@ -67,7 +67,7 @@ public function getHandler($fileExtension) * * @param \Magento\TestFramework\Performance\Scenario $scenario * @param string|null $reportFile Report file to write results to, NULL disables report creation - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception */ public function run(\Magento\TestFramework\Performance\Scenario $scenario, $reportFile = null) { @@ -75,7 +75,9 @@ public function run(\Magento\TestFramework\Performance\Scenario $scenario, $repo /** @var $scenarioHandler \Magento\TestFramework\Performance\Scenario\HandlerInterface */ $scenarioHandler = $this->getHandler($scenarioExtension); if (!$scenarioHandler) { - throw new \Magento\Exception("Unable to run scenario '{$scenario->getTitle()}', format is not supported."); + throw new \Magento\Framework\Exception( + "Unable to run scenario '{$scenario->getTitle()}', format is not supported." + ); } $scenarioHandler->run($scenario, $reportFile); } diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Jmeter.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Jmeter.php index fb63738545917..1d8d37f10bd60 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Jmeter.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Jmeter.php @@ -32,7 +32,7 @@ class Jmeter implements \Magento\TestFramework\Performance\Scenario\HandlerInterface { /** - * @var \Magento\Shell + * @var \Magento\Framework\Shell */ protected $_shell; @@ -44,10 +44,10 @@ class Jmeter implements \Magento\TestFramework\Performance\Scenario\HandlerInter /** * Constructor * - * @param \Magento\Shell $shell + * @param \Magento\Framework\Shell $shell * @param bool $validateExecutable */ - public function __construct(\Magento\Shell $shell, $validateExecutable = true) + public function __construct(\Magento\Framework\Shell $shell, $validateExecutable = true) { $this->_shell = $shell; $this->_validateExecutable = $validateExecutable; @@ -70,7 +70,7 @@ protected function _validateScenarioExecutable() * * @param \Magento\TestFramework\Performance\Scenario $scenario * @param string|null $reportFile Report file to write results to, NULL disables report creation - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception * @throws \Magento\TestFramework\Performance\Scenario\FailureException */ public function run(\Magento\TestFramework\Performance\Scenario $scenario, $reportFile = null) @@ -83,7 +83,7 @@ public function run(\Magento\TestFramework\Performance\Scenario $scenario, $repo if ($reportFile) { if (!file_exists($reportFile)) { - throw new \Magento\Exception( + throw new \Magento\Framework\Exception( "Report file '{$reportFile}' for '{$scenario->getTitle()}' has not been created." ); } diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Php.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Php.php index 1850aad9f9baa..e1bf15612a98b 100644 --- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Php.php +++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Scenario/Handler/Php.php @@ -32,7 +32,7 @@ class Php implements \Magento\TestFramework\Performance\Scenario\HandlerInterface { /** - * @var \Magento\Shell + * @var \Magento\Framework\Shell */ protected $_shell; @@ -44,10 +44,10 @@ class Php implements \Magento\TestFramework\Performance\Scenario\HandlerInterfac /** * Constructor * - * @param \Magento\Shell $shell + * @param \Magento\Framework\Shell $shell * @param bool $validateExecutable */ - public function __construct(\Magento\Shell $shell, $validateExecutable = true) + public function __construct(\Magento\Framework\Shell $shell, $validateExecutable = true) { $this->_shell = $shell; $this->_validateExecutable = $validateExecutable; @@ -70,7 +70,7 @@ protected function _validateScenarioExecutable() * * @param \Magento\TestFramework\Performance\Scenario $scenario * @param string|null $reportFile Report file to write results to, NULL disables report creation - * @throws \Magento\Exception + * @throws \Magento\Framework\Exception * @throws \Magento\TestFramework\Performance\Scenario\FailureException * * @todo Implement execution in concurrent threads defined by the "users" scenario argument @@ -117,7 +117,7 @@ protected function _executeScenario(\Magento\TestFramework\Performance\Scenario $executionTime = microtime(true); try { $result['output'] = $this->_shell->execute($scenarioCmd, $scenarioCmdArgs); - } catch (\Magento\Exception $e) { + } catch (\Magento\Framework\Exception $e) { $result['success'] = false; $result['exit_code'] = $e->getPrevious()->getCode(); $result['output'] = $e->getPrevious()->getMessage(); diff --git a/dev/tests/performance/framework/bootstrap.php b/dev/tests/performance/framework/bootstrap.php index dc6367695b6a7..dcaaa6aed4e85 100644 --- a/dev/tests/performance/framework/bootstrap.php +++ b/dev/tests/performance/framework/bootstrap.php @@ -30,7 +30,7 @@ $magentoBaseDir = realpath($testsBaseDir . '/../../../'); require_once "{$magentoBaseDir}/app/bootstrap.php"; -\Magento\Autoload\IncludePath::addIncludePath("{$testsBaseDir}/framework"); +\Magento\Framework\Autoload\IncludePath::addIncludePath("{$testsBaseDir}/framework"); $bootstrap = new \Magento\TestFramework\Performance\Bootstrap($testsBaseDir, $magentoBaseDir); $bootstrap->cleanupReports(); diff --git a/dev/tests/performance/framework/tests/unit/framework/bootstrap.php b/dev/tests/performance/framework/tests/unit/framework/bootstrap.php index 545b6987f61a9..6ccf62ff29a67 100644 --- a/dev/tests/performance/framework/tests/unit/framework/bootstrap.php +++ b/dev/tests/performance/framework/tests/unit/framework/bootstrap.php @@ -27,4 +27,4 @@ $magentoBaseDir = realpath(__DIR__ . '/../../../../../../../'); require_once "{$magentoBaseDir}/app/bootstrap.php"; -\Magento\Autoload\IncludePath::addIncludePath("{$magentoBaseDir}/dev/tests/performance/framework"); +\Magento\Framework\Autoload\IncludePath::addIncludePath("{$magentoBaseDir}/dev/tests/performance/framework"); diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php index f2ff8dc2268c6..c0938f52518f9 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php @@ -39,7 +39,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase protected $_config; /** - * @var \Magento\Shell|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Shell|\PHPUnit_Framework_MockObject_MockObject */ protected $_shell; @@ -78,7 +78,7 @@ protected function setUp() $this->_fixtureDir, $this->_fixtureDir . '/app_base_dir' ); - $this->_shell = $this->getMock('Magento\Shell', array('execute'), array(), '', false); + $this->_shell = $this->getMock('Magento\Framework\Shell', array('execute'), array(), '', false); $this->_object = $this->getMock( 'Magento\TestFramework\Application', @@ -104,7 +104,7 @@ protected function tearDown() /** * Constructor test * - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testConstructorException() { diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php index f46a63792a1ce..8332e481d47c1 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php @@ -32,7 +32,7 @@ protected function tearDown() { // Delete a directory, where tests do some temporary work $tmpDir = $this->_getBaseFixtureDir() . '/config_dist/tmp'; - $filesystemAdapter = new \Magento\Filesystem\Driver\File(); + $filesystemAdapter = new \Magento\Framework\Filesystem\Driver\File(); if ($filesystemAdapter->isExists($tmpDir)) { $filesystemAdapter->deleteDirectory($tmpDir); } diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php index d537ca675a6b0..0031a661a87c6 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/ConfigTest.php @@ -91,7 +91,7 @@ public function constructorExceptionDataProvider() 'non-existing base dir' => array( require __DIR__ . '/_files/config_data.php', 'non_existing_dir', - 'Magento\Exception', + 'Magento\Framework\Exception', "Base directory 'non_existing_dir' does not exist" ), 'invalid scenarios format' => array( diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/FileFormatTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/FileFormatTest.php index b30e48f30458f..e35af4b2da5bb 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/FileFormatTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/FileFormatTest.php @@ -81,7 +81,7 @@ public function testRunDelegation() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Unable to run scenario 'Scenario', format is not supported. */ public function testRunUnsupportedFormat() diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/JmeterTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/JmeterTest.php index 9a3debce425a4..6c9de5b1d720b 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/JmeterTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/JmeterTest.php @@ -29,7 +29,7 @@ class JmeterTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Shell|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Shell|PHPUnit_Framework_MockObject_MockObject */ protected $_shell; @@ -71,7 +71,7 @@ protected function setUp() ); $this->_reportFile = realpath(__DIR__ . '/../../_files') . '/scenario.jtl'; - $this->_shell = $this->getMock('Magento\Shell', array('execute'), array(), '', false); + $this->_shell = $this->getMock('Magento\Framework\Shell', array('execute'), array(), '', false); $this->_object = new \Magento\TestFramework\Performance\Scenario\Handler\Jmeter($this->_shell, false); } @@ -153,7 +153,7 @@ public function runExceptionDataProvider() 'no report created' => array( "{$fixtureDir}/scenario_without_report.jmx", "{$fixtureDir}/scenario_without_report.jtl", - 'Magento\Exception', + 'Magento\Framework\Exception', "Report file '{$fixtureDir}/scenario_without_report.jtl' for 'Scenario' has not been created." ), 'scenario failure in report' => array( diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/PhpTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/PhpTest.php index dbf5dab08657f..bbed339e9380f 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/PhpTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/Scenario/Handler/PhpTest.php @@ -29,7 +29,7 @@ class PhpTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Shell|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Shell|PHPUnit_Framework_MockObject_MockObject */ protected $_shell; @@ -70,7 +70,7 @@ protected function setUp() ); $this->_reportFile = realpath(__DIR__ . '/../../_files/scenario.jtl'); - $this->_shell = $this->getMock('Magento\Shell', array('execute'), array(), '', false); + $this->_shell = $this->getMock('Magento\Framework\Shell', array('execute'), array(), '', false); $this->_object = new \Magento\TestFramework\Performance\Scenario\Handler\Php($this->_shell, false); } @@ -138,7 +138,7 @@ public function testRunReport() */ public function testRunException() { - $failure = new \Magento\Exception( + $failure = new \Magento\Framework\Exception( 'Command returned non-zero exit code.', 0, new \Exception('command failure message', 1) diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php index e7fb0814ed134..acbdd47c64839 100644 --- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php +++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/TestsuiteTest.php @@ -76,7 +76,7 @@ protected function setUp() $this->_fixtureDir = __DIR__ . '/_files'; $fixtureConfigData = include $this->_fixtureDir . '/config_data.php'; - $shell = $this->getMock('Magento\Shell', array('execute'), array(), '', false); + $shell = $this->getMock('Magento\Framework\Shell', array('execute'), array(), '', false); $this->_config = new \Magento\TestFramework\Performance\Config( $fixtureConfigData, $this->_fixtureDir, diff --git a/dev/tests/performance/run_scenarios.php b/dev/tests/performance/run_scenarios.php index 7199d5f31d357..92aef62f7dabc 100644 --- a/dev/tests/performance/run_scenarios.php +++ b/dev/tests/performance/run_scenarios.php @@ -33,7 +33,7 @@ $logWriter->setFormatter(new \Zend_Log_Formatter_Simple('%message%' . PHP_EOL)); $logger = new \Zend_Log($logWriter); -$shell = new \Magento\Shell(new \Magento\Shell\CommandRenderer(), $logger); +$shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer(), $logger); $scenarioHandler = new \Magento\TestFramework\Performance\Scenario\Handler\FileFormat(); $scenarioHandler->register( 'jmx', diff --git a/dev/tests/static/framework/Magento/TestFramework/Integrity/AbstractConfig.php b/dev/tests/static/framework/Magento/TestFramework/Integrity/AbstractConfig.php index 8c844276c1b2c..23c938721eef3 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Integrity/AbstractConfig.php +++ b/dev/tests/static/framework/Magento/TestFramework/Integrity/AbstractConfig.php @@ -103,10 +103,10 @@ protected function _validateFileExpectSuccess($xmlFile, $schemaFile, $fileSchema { $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schemaFile); + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schemaFile); if ($errors) { if (!is_null($fileSchemaFile)) { - $moreErrors = \Magento\Config\Dom::validateDomDocument($dom, $fileSchemaFile); + $moreErrors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $fileSchemaFile); if (empty($moreErrors)) { return; } else { @@ -136,7 +136,7 @@ protected function _validateFileExpectFailure($xmlFile, $schemaFile, $expectedEr { $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); - $actualErrors = \Magento\Config\Dom::validateDomDocument($dom, $schemaFile); + $actualErrors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schemaFile); if (isset($expectedErrors)) { $this->assertNotEmpty( diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php index f97ce47afeff4..8cb3b8d193c4c 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Classes.php @@ -214,7 +214,7 @@ public static function collectModuleClasses($subTypePattern = '[A-Za-z]+') foreach (\Magento\TestFramework\Utility\Files::init()->getPhpFiles(true, false, false, false) as $file) { if (preg_match($pattern, $file, $matches)) { $module = "{$matches[1]}_{$matches[2]}"; - $class = "{$module}" . \Magento\Autoload\IncludePath::NS_SEPARATOR . str_replace( + $class = "{$module}" . \Magento\Framework\Autoload\IncludePath::NS_SEPARATOR . str_replace( '/', '\\', $matches[3] diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php index c44d6fe87a63e..3f9f6710a0b15 100644 --- a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php +++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php @@ -121,7 +121,8 @@ public function getPhpFiles($appCode = true, $otherCode = true, $templates = tru { $key = __METHOD__ . "/{$this->_path}/{$appCode}/{$otherCode}/{$templates}"; if (!isset(self::$_cache[$key])) { - $namespace = $module = $area = $theme = '*'; + $namespace = $module = $area = '*'; + $themePath = '*/*'; $files = array(); if ($appCode) { @@ -136,7 +137,7 @@ public function getPhpFiles($appCode = true, $otherCode = true, $templates = tru glob($this->_path . '/*.php', GLOB_NOSORT), glob($this->_path . '/pub/*.php', GLOB_NOSORT), self::getFiles(array("{$this->_path}/downloader"), '*.php'), - self::getFiles(array("{$this->_path}/lib/{Mage,Magento,Varien}"), '*.php') + self::getFiles(array("{$this->_path}/lib/Magento"), '*.php') ); } if ($templates) { @@ -144,7 +145,7 @@ public function getPhpFiles($appCode = true, $otherCode = true, $templates = tru $files, self::getFiles(array("{$this->_path}/app/code/{$namespace}/{$module}"), '*.phtml'), self::getFiles( - array("{$this->_path}/app/design/{$area}/{$theme}/{$namespace}_{$module}"), + array("{$this->_path}/app/design/{$area}/{$themePath}/{$namespace}_{$module}"), '*.phtml' ) ); @@ -326,7 +327,7 @@ public function getLayoutFiles($incomingParams = array(), $asDataSet = true) 'namespace' => '*', 'module' => '*', 'area' => '*', - 'theme' => '*', + 'theme_path' => '*/*', 'include_code' => true, 'include_design' => true ); @@ -349,7 +350,7 @@ public function getLayoutFiles($incomingParams = array(), $asDataSet = true) ); } if ($params['include_design']) { - $themeLayoutDir = "{$this->_path}/app/design/{$params['area']}/{$params['theme']}" . + $themeLayoutDir = "{$this->_path}/app/design/{$params['area']}/{$params['theme_path']}" . "/{$params['namespace']}_{$params['module']}/layout"; $dirPatterns = array( $themeLayoutDir, @@ -384,7 +385,7 @@ public function getLayoutFiles($incomingParams = array(), $asDataSet = true) */ public function getPageTypeFiles($incomingParams = array(), $asDataSet = true) { - $params = array('namespace' => '*', 'module' => '*', 'area' => '*', 'theme' => '*'); + $params = array('namespace' => '*', 'module' => '*', 'area' => '*', 'theme_path' => '*/*'); foreach (array_keys($params) as $key) { if (isset($incomingParams[$key])) { $params[$key] = $incomingParams[$key]; @@ -419,11 +420,12 @@ public function getJsFiles() if (isset(self::$_cache[$key])) { return self::$_cache[$key]; } - $namespace = $module = $area = $theme = $skin = '*'; + $namespace = $module = $area = $skin = '*'; + $themePath = '*/*'; $files = self::getFiles( array( "{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}", - "{$this->_path}/app/design/{$area}/{$theme}/skin/{$skin}", + "{$this->_path}/app/design/{$area}/{$themePath}/skin/{$skin}", "{$this->_path}/pub/lib/{mage,varien}" ), '*.js' @@ -444,10 +446,11 @@ public function getJsFilesForArea($area) if (isset(self::$_cache[$key])) { return self::$_cache[$key]; } - $namespace = $module = $theme = '*'; + $namespace = $module = '*'; + $themePath = '*/*'; $paths = array( "{$this->_path}/app/code/{$namespace}/{$module}/view/{$area}", - "{$this->_path}/app/design/{$area}/{$theme}", + "{$this->_path}/app/design/{$area}/{$themePath}", "{$this->_path}/pub/lib/varien" ); $files = self::getFiles($paths, '*.js'); @@ -684,7 +687,8 @@ public function getModuleFile($namespace, $module, $file) */ protected function _getConfigFilesList($fileNamePattern, $appDir) { - return glob($this->_path . '/app/' . $appDir . "/*/*/etc/{$fileNamePattern}", GLOB_NOSORT | GLOB_BRACE); + $pathPattern = $appDir == 'design' ? "/*/*/*/etc/{$fileNamePattern}" : "/*/*/etc/{$fileNamePattern}"; + return glob($this->_path . '/app/' . $appDir . $pathPattern, GLOB_NOSORT | GLOB_BRACE); } /** diff --git a/dev/tests/static/framework/bootstrap.php b/dev/tests/static/framework/bootstrap.php index f39e8188d3027..359d1b8ec6f73 100644 --- a/dev/tests/static/framework/bootstrap.php +++ b/dev/tests/static/framework/bootstrap.php @@ -27,7 +27,7 @@ define('BP', realpath(__DIR__ . '/../../../../')); require BP . '/app/autoload.php'; -\Magento\Autoload\IncludePath::addIncludePath(array(__DIR__, dirname(__DIR__) . '/testsuite', BP . '/lib')); +\Magento\Framework\Autoload\IncludePath::addIncludePath(array(__DIR__, dirname(__DIR__) . '/testsuite', BP . '/lib')); \Magento\TestFramework\Utility\Files::setInstance(new \Magento\TestFramework\Utility\Files(BP)); function tool_autoloader($className) diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php index eac87157dd0ee..6f58bc4e42d6a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php @@ -29,6 +29,9 @@ */ namespace Magento\Test\Integrity; +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + */ class DependencyTest extends \PHPUnit_Framework_TestCase { /** @@ -605,6 +608,8 @@ protected static function _getTypes() /** * Initialise map of dependencies + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ protected static function _initDependencies() { @@ -627,18 +632,21 @@ protected static function _initDependencies() } } - foreach ($module[0]->depends->children() as $dependency) { - /** @var \SimpleXMLElement $dependency */ - $type = isset( - $dependency['type'] - ) && (string)$dependency['type'] == self::TYPE_SOFT ? self::TYPE_SOFT : self::TYPE_HARD; - if ($dependency->getName() == 'module') { - self::_addDependencies( - $moduleName, - $type, - self::MAP_TYPE_DECLARED, - str_replace('_', '\\', (string)$dependency->attributes()->name) - ); + if (isset($module[0]->depends)) { + foreach ($module[0]->depends->children() as $dependency) { + /** @var \SimpleXMLElement $dependency */ + $type = self::TYPE_HARD; + if (isset($dependency['type']) && (string)$dependency['type'] == self::TYPE_SOFT) { + $type = self::TYPE_SOFT; + } + if ($dependency->getName() == 'module') { + self::_addDependencies( + $moduleName, + $type, + self::MAP_TYPE_DECLARED, + str_replace('_', '\\', (string)$dependency->attributes()->name) + ); + } } } } diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php index 0745f02f5368b..053a7a76edd48 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Di/CompilerTest.php @@ -36,7 +36,7 @@ class CompilerTest extends \PHPUnit_Framework_TestCase protected $_command; /** - * @var \Magento\Shell + * @var \Magento\Framework\Shell */ protected $_shell; @@ -56,25 +56,25 @@ class CompilerTest extends \PHPUnit_Framework_TestCase protected $_tmpDir; /** - * @var \Magento\ObjectManager\Config\Mapper\Dom() + * @var \Magento\Framework\ObjectManager\Config\Mapper\Dom() */ protected $_mapper; /** - * @var \Magento\Code\Validator + * @var \Magento\Framework\Code\Validator */ protected $_validator; /** * Class arguments reader * - * @var \Magento\Interception\Code\InterfaceValidator + * @var \Magento\Framework\Interception\Code\InterfaceValidator */ protected $pluginValidator; protected function setUp() { - $this->_shell = new \Magento\Shell(new \Magento\Shell\CommandRenderer()); + $this->_shell = new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer()); $basePath = \Magento\TestFramework\Utility\Files::init()->getPathToSource(); $basePath = str_replace('\\', '/', $basePath); @@ -82,48 +82,48 @@ protected function setUp() $this->_generationDir = $this->_tmpDir . '/generation'; $this->_compilationDir = $this->_tmpDir . '/di'; - \Magento\Autoload\IncludePath::addIncludePath( + \Magento\Framework\Autoload\IncludePath::addIncludePath( array($basePath . '/app/code', $basePath . '/lib', $this->_generationDir) ); $this->_command = 'php ' . $basePath . '/dev/tools/Magento/Tools/Di/compiler.php --generation=%s --di=%s'; - $booleanUtils = new \Magento\Stdlib\BooleanUtils(); - $constInterpreter = new \Magento\Data\Argument\Interpreter\Constant(); - $argumentInterpreter = new \Magento\Data\Argument\Interpreter\Composite( + $booleanUtils = new \Magento\Framework\Stdlib\BooleanUtils(); + $constInterpreter = new \Magento\Framework\Data\Argument\Interpreter\Constant(); + $argumentInterpreter = new \Magento\Framework\Data\Argument\Interpreter\Composite( [ - 'boolean' => new \Magento\Data\Argument\Interpreter\Boolean($booleanUtils), - 'string' => new \Magento\Data\Argument\Interpreter\String($booleanUtils), - 'number' => new \Magento\Data\Argument\Interpreter\Number(), - 'null' => new \Magento\Data\Argument\Interpreter\NullType(), - 'object' => new \Magento\Data\Argument\Interpreter\Object($booleanUtils), + 'boolean' => new \Magento\Framework\Data\Argument\Interpreter\Boolean($booleanUtils), + 'string' => new \Magento\Framework\Data\Argument\Interpreter\String($booleanUtils), + 'number' => new \Magento\Framework\Data\Argument\Interpreter\Number(), + 'null' => new \Magento\Framework\Data\Argument\Interpreter\NullType(), + 'object' => new \Magento\Framework\Data\Argument\Interpreter\Object($booleanUtils), 'const' => $constInterpreter, 'init_parameter' => new \Magento\Framework\App\Arguments\ArgumentInterpreter($constInterpreter) ], - \Magento\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE + \Magento\Framework\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE ); // Add interpreters that reference the composite $argumentInterpreter->addInterpreter( 'array', - new \Magento\Data\Argument\Interpreter\ArrayType($argumentInterpreter) + new \Magento\Framework\Data\Argument\Interpreter\ArrayType($argumentInterpreter) ); - $this->_mapper = new \Magento\ObjectManager\Config\Mapper\Dom( + $this->_mapper = new \Magento\Framework\ObjectManager\Config\Mapper\Dom( $argumentInterpreter, $booleanUtils, - new \Magento\ObjectManager\Config\Mapper\ArgumentParser() + new \Magento\Framework\ObjectManager\Config\Mapper\ArgumentParser() ); - $this->_validator = new \Magento\Code\Validator(); - $this->_validator->add(new \Magento\Code\Validator\ConstructorIntegrity()); - $this->_validator->add(new \Magento\Code\Validator\ContextAggregation()); - $this->_validator->add(new \Magento\Code\Validator\TypeDuplication()); - $this->_validator->add(new \Magento\Code\Validator\ArgumentSequence()); - $this->pluginValidator = new \Magento\Interception\Code\InterfaceValidator(); + $this->_validator = new \Magento\Framework\Code\Validator(); + $this->_validator->add(new \Magento\Framework\Code\Validator\ConstructorIntegrity()); + $this->_validator->add(new \Magento\Framework\Code\Validator\ContextAggregation()); + $this->_validator->add(new \Magento\Framework\Code\Validator\TypeDuplication()); + $this->_validator->add(new \Magento\Framework\Code\Validator\ArgumentSequence()); + $this->pluginValidator = new \Magento\Framework\Interception\Code\InterfaceValidator(); } protected function tearDown() { - $filesystem = new \Magento\Filesystem\Driver\File(); + $filesystem = new \Magento\Framework\Filesystem\Driver\File(); if ($filesystem->isExists($this->_tmpDir)) { $filesystem->deleteDirectory($this->_tmpDir); } @@ -291,7 +291,7 @@ protected function _validateClass($className) { try { $this->_validator->validate($className); - } catch (\Magento\Code\ValidationException $exceptions) { + } catch (\Magento\Framework\Code\ValidationException $exceptions) { $this->fail($exceptions->getMessage()); } catch (\ReflectionException $exceptions) { $this->fail($exceptions->getMessage()); @@ -331,21 +331,21 @@ function ($plugin, $type) { */ public function testConstructorIntegrity() { - $autoloader = new \Magento\Autoload\IncludePath(); - $generatorIo = new \Magento\Code\Generator\Io( - new \Magento\Filesystem\Driver\File(), + $autoloader = new \Magento\Framework\Autoload\IncludePath(); + $generatorIo = new \Magento\Framework\Code\Generator\Io( + new \Magento\Framework\Filesystem\Driver\File(), $autoloader, $this->_generationDir ); - $generator = new \Magento\Code\Generator( + $generator = new \Magento\Framework\Code\Generator( $autoloader, $generatorIo, array( - \Magento\ObjectManager\Code\Generator\Factory::ENTITY_TYPE - => 'Magento\ObjectManager\Code\Generator\Factory' + \Magento\Framework\ObjectManager\Code\Generator\Factory::ENTITY_TYPE + => 'Magento\Framework\ObjectManager\Code\Generator\Factory' ) ); - $autoloader = new \Magento\Code\Generator\Autoloader($generator); + $autoloader = new \Magento\Framework\Code\Generator\Autoloader($generator); spl_autoload_register(array($autoloader, 'load')); $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); @@ -371,7 +371,7 @@ protected function validatePlugins($plugin, $type) if (\Magento\TestFramework\Utility\Files::init()->isModuleExists($module)) { $this->pluginValidator->validate($plugin, $type); } - } catch (\Magento\Interception\Code\ValidatorException $exception) { + } catch (\Magento\Framework\Interception\Code\ValidatorException $exception) { $this->fail($exception->getMessage()); } } @@ -416,7 +416,7 @@ public function testCompiler() { try { $this->_shell->execute($this->_command, array($this->_generationDir, $this->_compilationDir)); - } catch (\Magento\Exception $exception) { + } catch (\Magento\Framework\Exception $exception) { $this->fail($exception->getPrevious()->getMessage()); } } diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/HandlesTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/HandlesTest.php index 972bec6096096..1a9b579fb200b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/HandlesTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Layout/HandlesTest.php @@ -103,7 +103,7 @@ public function testLayoutFormat() */ function ($layoutFile) { $schemaFile = BP . '/app/code/Magento/Core/etc/layout_single.xsd'; - $domLayout = new \Magento\Config\Dom(file_get_contents($layoutFile)); + $domLayout = new \Magento\Framework\Config\Dom(file_get_contents($layoutFile)); $result = $domLayout->validate($schemaFile, $errors); $this->assertTrue($result, print_r($errors, true)); }, diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php index 9f82d3ee500d8..29a0f037b9a92 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/DependencyTest.php @@ -127,8 +127,8 @@ protected function getFailMessage() */ public function libraryDataProvider() { - // @TODO: remove this code when class Magento\Data\Collection will fixed - include_once BP . '/lib/Magento/Option/ArrayInterface.php'; + // @TODO: remove this code when class Magento\Framework\Data\Collection will fixed + include_once BP . '/lib/Magento/Framework/Option/ArrayInterface.php'; $blackList = file(__DIR__ . '/_files/blacklist.txt', FILE_IGNORE_NEW_LINES); $dataProvider = Files::init()->getClassFiles(false, false, false, false, false, true, true); diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt index 9e21e0ffbde13..7a02e85f56662 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt @@ -1,74 +1,73 @@ -lib/Magento/Data/Collection/Filesystem.php -lib/Magento/Data/Collection/Db.php -lib/Magento/Data/Form/Element/Radio.php -lib/Magento/Data/Form/Element/Label.php -lib/Magento/Data/Form/Element/AbstractElement.php -lib/Magento/Data/Form/Element/File.php -lib/Magento/Data/Form/Element/Checkbox.php -lib/Magento/Data/Form/Element/Checkboxes.php -lib/Magento/Data/Form/Element/Password.php -lib/Magento/Data/Form/Element/Column.php -lib/Magento/Data/Form/Element/Gallery.php -lib/Magento/Data/Form/Element/Obscure.php -lib/Magento/Data/Form/Element/Data.php -lib/Magento/Data/Form/Element/Multiline.php -lib/Magento/Data/Form/Element/Radios.php -lib/Magento/Data/Form/Element/Submit.php -lib/Magento/Data/Form/Element/Note.php -lib/Magento/Data/Form/Element/Image.php -lib/Magento/Data/Form/Element/Text.php -lib/Magento/Data/Form/Element/Time.php -lib/Magento/Data/Form/Element/Button.php -lib/Magento/Data/Form/Element/Editor.php -lib/Magento/Data/Form/Element/Hidden.php -lib/Magento/Data/Form/Element/Reset.php -lib/Magento/Data/Form/Element/Link.php -lib/Magento/Data/Form/Element/Editablemultiselect.php -lib/Magento/Data/Form/Element/Multiselect.php -lib/Magento/Data/Form/Element/Fieldset.php -lib/Magento/Data/Form/Element/Select.php -lib/Magento/Data/Form/Element/Textarea.php -lib/Magento/Data/Form/Element/Imagefile.php -lib/Magento/Data/Form/Element/Imagefile.php -lib/Magento/Data/Form/Element/Date.php -lib/Magento/Data/Form/AbstractForm.php -lib/Magento/Data/Form/Factory.php -lib/Magento/Data/Collection.php -lib/Magento/Data/Form.php -lib/Magento/Data/Form/FormKey.php +lib/Magento/Framework/Data/Collection/Filesystem.php +lib/Magento/Framework/Data/Collection/Db.php +lib/Magento/Framework/Data/Form/Element/Radio.php +lib/Magento/Framework/Data/Form/Element/Label.php +lib/Magento/Framework/Data/Form/Element/AbstractElement.php +lib/Magento/Framework/Data/Form/Element/File.php +lib/Magento/Framework/Data/Form/Element/Checkbox.php +lib/Magento/Framework/Data/Form/Element/Checkboxes.php +lib/Magento/Framework/Data/Form/Element/Password.php +lib/Magento/Framework/Data/Form/Element/Column.php +lib/Magento/Framework/Data/Form/Element/Gallery.php +lib/Magento/Framework/Data/Form/Element/Obscure.php +lib/Magento/Framework/Data/Form/Element/Data.php +lib/Magento/Framework/Data/Form/Element/Multiline.php +lib/Magento/Framework/Data/Form/Element/Radios.php +lib/Magento/Framework/Data/Form/Element/Submit.php +lib/Magento/Framework/Data/Form/Element/Note.php +lib/Magento/Framework/Data/Form/Element/Image.php +lib/Magento/Framework/Data/Form/Element/Text.php +lib/Magento/Framework/Data/Form/Element/Time.php +lib/Magento/Framework/Data/Form/Element/Button.php +lib/Magento/Framework/Data/Form/Element/Editor.php +lib/Magento/Framework/Data/Form/Element/Hidden.php +lib/Magento/Framework/Data/Form/Element/Reset.php +lib/Magento/Framework/Data/Form/Element/Link.php +lib/Magento/Framework/Data/Form/Element/Editablemultiselect.php +lib/Magento/Framework/Data/Form/Element/Multiselect.php +lib/Magento/Framework/Data/Form/Element/Fieldset.php +lib/Magento/Framework/Data/Form/Element/Select.php +lib/Magento/Framework/Data/Form/Element/Textarea.php +lib/Magento/Framework/Data/Form/Element/Imagefile.php +lib/Magento/Framework/Data/Form/Element/Imagefile.php +lib/Magento/Framework/Data/Form/Element/Date.php +lib/Magento/Framework/Data/Form/AbstractForm.php +lib/Magento/Framework/Data/Form/Factory.php +lib/Magento/Framework/Data/Collection.php +lib/Magento/Framework/Data/Form.php +lib/Magento/Framework/Data/Form/FormKey.php -lib/Magento/Exception/AuthenticationException.php -lib/Magento/Exception/AuthorizationException.php -lib/Magento/Exception/Exception.php -lib/Magento/Exception/InputException.php -lib/Magento/Exception/NoSuchEntityException.php -lib/Magento/Exception/StateException.php +lib/Magento/Framework/Exception/AuthenticationException.php +lib/Magento/Framework/Exception/AuthorizationException.php +lib/Magento/Framework/Exception/Exception.php +lib/Magento/Framework/Exception/InputException.php +lib/Magento/Framework/Exception/NoSuchEntityException.php -lib/Magento/Filter/Object/Grid.php -lib/Magento/Filter/Object.php +lib/Magento/Framework/Filter/Object/Grid.php +lib/Magento/Framework/Filter/Object.php -lib/Magento/View/Context.php -lib/Magento/View/Element/Js/Cookie.php -lib/Magento/View/Element/Html/Calendar.php -lib/Magento/View/Element/Html/Link/Current.php -lib/Magento/View/Element/Messages.php -lib/Magento/View/Element/AbstractBlock.php -lib/Magento/View/Element/Template.php -lib/Magento/View/Element/Context.php -lib/Magento/View/Element/Template/Context.php -lib/Magento/View/Element/Redirect.php +lib/Magento/Framework/View/Context.php +lib/Magento/Framework/View/Element/Js/Cookie.php +lib/Magento/Framework/View/Element/Html/Calendar.php +lib/Magento/Framework/View/Element/Html/Link/Current.php +lib/Magento/Framework/View/Element/Messages.php +lib/Magento/Framework/View/Element/AbstractBlock.php +lib/Magento/Framework/View/Element/Template.php +lib/Magento/Framework/View/Element/Context.php +lib/Magento/Framework/View/Element/Template/Context.php +lib/Magento/Framework/View/Element/Redirect.php lib/Magento/Framework/App/Module/ResourceResolver.php -lib/Magento/Event/Invoker/InvokerDefault.php -lib/Magento/Phrase/Renderer/Translate.php -lib/Magento/Backup/Snapshot.php -lib/Magento/Oauth/Exception.php +lib/Magento/Framework/Event/Invoker/InvokerDefault.php +lib/Magento/Framework/Phrase/Renderer/Translate.php +lib/Magento/Framework/Backup/Snapshot.php +lib/Magento/Framework/Oauth/Exception.php lib/Magento/Framework/App/Helper/AbstractHelper.php lib/Magento/Framework/App/Helper/Context.php -lib/Magento/View/DesignLoader.php -lib/Magento/Session/SidResolverInterface.php +lib/Magento/Framework/View/DesignLoader.php +lib/Magento/Framework/Session/SidResolverInterface.php lib/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php -lib/Magento/Filesystem/Driver/Http.php +lib/Magento/Framework/Filesystem/Driver/Http.php diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/SystemConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/SystemConfigTest.php index abbb887230e8e..7acdb34dd5281 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/SystemConfigTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/SystemConfigTest.php @@ -39,7 +39,7 @@ function ($configFile) { $dom->loadXML(file_get_contents($configFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . '/app/code/Magento/Backend/etc/system_file.xsd'; - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schema); + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if ($errors) { $this->fail('XML-file has validation errors:' . PHP_EOL . implode(PHP_EOL . PHP_EOL, $errors)); } diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php index af9508c334d1a..13d02bb07f0af 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/FieldsetConfigTest.php @@ -38,8 +38,8 @@ function ($configFile) { $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($configFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Object/etc/fieldset_file.xsd'; - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schema); + '/lib/Magento/Framework/Object/etc/fieldset_file.xsd'; + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if ($errors) { $this->fail( 'XML-file ' . $configFile . ' has validation errors:' . PHP_EOL . implode( @@ -59,8 +59,8 @@ public function testSchemaUsingValidXml() $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Object/etc/fieldset.xsd'; - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schema); + '/lib/Magento/Framework/Object/etc/fieldset.xsd'; + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if ($errors) { $this->fail( 'There is a problem with the schema. A known good XML file failed validation: ' . PHP_EOL . implode( @@ -77,8 +77,8 @@ public function testSchemaUsingInvalidXml() $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Object/etc/fieldset.xsd'; - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schema); + '/lib/Magento/Framework/Object/etc/fieldset.xsd'; + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if (!$errors) { $this->fail('There is a problem with the schema. A known bad XML file passed validation'); } @@ -90,8 +90,8 @@ public function testFileSchemaUsingValidXml() $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Object/etc/fieldset_file.xsd'; - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schema); + '/lib/Magento/Framework/Object/etc/fieldset_file.xsd'; + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if ($errors) { $this->fail( 'There is a problem with the schema. A known good XML file failed validation: ' . PHP_EOL . implode( @@ -108,8 +108,8 @@ public function testFileSchemaUsingInvalidXml() $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); $schema = \Magento\TestFramework\Utility\Files::init()->getPathToSource() . - '/lib/Magento/Object/etc/fieldset_file.xsd'; - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schema); + '/lib/Magento/Framework/Object/etc/fieldset_file.xsd'; + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schema); if (!$errors) { $this->fail('There is a problem with the schema. A known bad XML file passed validation'); } diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml index 7ee2420d8657b..271c8bfef7fcd 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd">
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml index cab51a6bda0c8..4bbbda0012136 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/fieldset_file.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset_file.xsd">
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml index 5331b154fdf09..abb3f007b0989 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/Fieldset/_files/invalid_fieldset.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Widget/WidgetConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Widget/WidgetConfigTest.php index a5903954e1690..3b4f463ed4d54 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Widget/WidgetConfigTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Widget/WidgetConfigTest.php @@ -90,7 +90,7 @@ protected function _validateFileExpectFailure($xmlFile, $schemaFile) { $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schemaFile); + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schemaFile); if (!$errors) { $this->fail('There is a problem with the schema. A known bad XML file passed validation'); } @@ -108,7 +108,7 @@ protected function _validateFileExpectSuccess($xmlFile, $schemaFile) { $dom = new \DOMDocument(); $dom->loadXML(file_get_contents($xmlFile)); - $errors = \Magento\Config\Dom::validateDomDocument($dom, $schemaFile); + $errors = \Magento\Framework\Config\Dom::validateDomDocument($dom, $schemaFile); if ($errors) { $this->fail( 'There is a problem with the schema. A known good XML file failed validation: ' . PHP_EOL . implode( diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt index d2617b0e211a0..490babd93d688 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt @@ -2,16 +2,16 @@ dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModul dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Helper/Test.php dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/Element.php dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/code/Magento/SomeModule/ElementFactory.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php -dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php -dev/tests/unit/testsuite/Magento/ObjectManager/Config/Reader/_files/ConfigDomMock.php -dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/Sample.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php +dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php +dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php +dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/Sample.php dev/tools/Magento/Tools/I18n/Zend/Exception.php dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php @@ -56,20 +56,20 @@ dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/n dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/underscore_absent.php dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/underscore_middle.php dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input/naming/property/underscore_start_public.php -dev/tests/unit/testsuite/Magento/Backup/_files/Fs.php -dev/tests/unit/testsuite/Magento/Backup/_files/Ftp.php -dev/tests/unit/testsuite/Magento/Backup/_files/Gz.php -dev/tests/unit/testsuite/Magento/Backup/_files/Helper.php -dev/tests/unit/testsuite/Magento/Backup/_files/Tar.php -dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php -dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php -dev/tests/unit/testsuite/Magento/Code/Reader/_files/ClassesForArgumentsReader.php -dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php -dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForTypeDuplication.php +dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Fs.php +dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Ftp.php +dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Gz.php +dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Helper.php +dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Tar.php +dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php +dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php +dev/tests/unit/testsuite/Magento/Framework/Code/Reader/_files/ClassesForArgumentsReader.php +dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php +dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForTypeDuplication.php dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/Magento/Sniffs/Annotations/RequireAnnotatedMethodsSniff.php dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/Helper/Helper.php dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/Model/Model.php dev/tests/integration/testsuite/Magento/Test/Tools/Dependency/_files/code/Magento/FirstModule/Model/WithoutDependencies.php -dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceFactory.php -dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceInterceptor.php -dev/tests/integration/testsuite/Magento/Code/_expected/SourceClassWithNamespaceProxy.php +dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceFactory.php +dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceInterceptor.php +dev/tests/integration/testsuite/Magento/Framework/Code/_expected/SourceClassWithNamespaceProxy.php diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php index f65a365c88201..2db32dc0ab6ae 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php @@ -165,8 +165,9 @@ function ($layoutFile) { } $this->assertSame( array(), - $layoutXml->xpath('/layout//block[@class="Magento\View\Element\Text\ListText"]'), - 'The class \Magento\View\Element\Text\ListTest is not supposed to be used in layout anymore.' + $layoutXml->xpath('/layout//block[@class="Magento\Framework\View\Element\Text\ListText"]'), + 'The class \Magento\Framework\View\Element\Text\ListTest' . + ' is not supposed to be used in layout anymore.' ); }, \Magento\TestFramework\Utility\Files::init()->getLayoutFiles() diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php index f03a687c96450..b6ea1e3274266 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Core/Block/AbstractBlockTest.php @@ -26,7 +26,7 @@ */ /** - * Tests usage of \Magento\View\Element\AbstractBlock + * Tests usage of \Magento\Framework\View\Element\AbstractBlock */ namespace Magento\Test\Legacy\Magento\Core\Block; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/ObjectManager/DiConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Framework/ObjectManager/DiConfigTest.php similarity index 97% rename from dev/tests/static/testsuite/Magento/Test/Legacy/Magento/ObjectManager/DiConfigTest.php rename to dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Framework/ObjectManager/DiConfigTest.php index 429b028196a78..a54d6ccb6089a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/ObjectManager/DiConfigTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/Magento/Framework/ObjectManager/DiConfigTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Test\Legacy\Magento\ObjectManager; +namespace Magento\Test\Legacy\Magento\Framework\ObjectManager; class DiConfigTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php index 82ceffc991c2c..40040b98d6d0d 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php @@ -53,6 +53,8 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase protected static $_namespaces = array(); + protected static $_paths = array(); + /**#@-*/ /** @@ -64,6 +66,7 @@ public static function setUpBeforeClass() self::_populateList(self::$_classes, $errors, 'obsolete_classes*.php', false); self::_populateList(self::$_constants, $errors, 'obsolete_constants*.php'); self::_populateList(self::$_methods, $errors, 'obsolete_methods*.php'); + self::_populateList(self::$_paths, $errors, 'obsolete_paths*.php', false); self::_populateList(self::$_namespaces, $errors, 'obsolete_namespaces*.php', false); self::_populateList(self::$_attributes, $errors, 'obsolete_properties*.php'); if ($errors) { @@ -123,7 +126,7 @@ protected static function _padRow($row, $hasScope) /** * Isolate including a file into a method to reduce scope * - * @param $file + * @param string $file * @return array */ protected static function _readList($file) @@ -135,12 +138,10 @@ public function testPhpFiles() { $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( - /** - * @param string $file - */ function ($file) { $content = file_get_contents($file); $this->_testObsoleteClasses($content); + $this->_testObsoleteNamespaces($content); $this->_testObsoleteMethods($content, $file); $this->_testGetChildSpecialCase($content, $file); $this->_testGetOptionsSpecialCase($content); @@ -149,19 +150,26 @@ function ($file) { $this->_testObsoleteActions($content); $this->_testObsoleteConstants($content); $this->_testObsoletePropertySkipCalculate($content); - $this->_testObsoleteNamespace($file); }, \Magento\TestFramework\Utility\Files::init()->getPhpFiles() ); } + public function testClassFiles() + { + $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); + $invoker( + function ($file) { + $this->_testObsoletePaths($file); + }, + \Magento\TestFramework\Utility\Files::init()->getClassFiles() + ); + } + public function testTemplateMageCalls() { $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( - /** - * @param string $file - */ function ($file) { $content = file_get_contents($file); $this->_assertNotRegExp( @@ -178,13 +186,11 @@ public function testXmlFiles() { $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( - /** - * @param string $file - */ function ($file) { $content = file_get_contents($file); $this->_testObsoleteClasses($content, $file); - $this->_testObsoleteNamespace($file); + $this->_testObsoleteNamespaces($content); + $this->_testObsoletePaths($file); }, \Magento\TestFramework\Utility\Files::init()->getXmlFiles() ); @@ -194,9 +200,6 @@ public function testJsFiles() { $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this); $invoker( - /** - * @param string $file - */ function ($file) { $content = file_get_contents($file); $this->_testObsoletePropertySkipCalculate($content); @@ -224,6 +227,28 @@ protected function _testObsoleteClasses($content) } } + /** + * Assert that obsolete classes are not used in the content + * + * @param string $content + */ + protected function _testObsoleteNamespaces($content) + { + foreach (self::$_namespaces as $row) { + list($namespace, , $replacement) = $row; + $this->_assertNotRegExp( + '/namespace\s+' . preg_quote($namespace, '/') . ';/iS', + $content, + $this->_suggestReplacement(sprintf("Namespace '%s' is obsolete.", $namespace), $replacement) + ); + $this->_assertNotRegExp( + '/[^a-z\d_]' . preg_quote($namespace . '\\', '/') . '/iS', + $content, + $this->_suggestReplacement(sprintf("Namespace '%s' is obsolete.", $namespace), $replacement) + ); + } + } + /** * Assert that obsolete methods or functions are not used in the content * @@ -284,24 +309,27 @@ protected function _testObsoleteMethods($content, $file) } /** - * Assert that obsolete namespaces are not used in the content + * Assert that obsolete pathes are not used in the content * * This method will search the content for references to class * that start with obsolete namespace * * @param string $file */ - protected function _testObsoleteNamespace($file) + protected function _testObsoletePaths($file) { - foreach (self::$_namespaces as $row) { - list($namespacePath, , $replacementPath) = $row; + foreach (self::$_paths as $row) { + list($obsoletePath, , $replacementPath) = $row; $relativePath = str_replace(\Magento\TestFramework\Utility\Files::init()->getPathToSource(), "", $file); - $namespacePathArray = explode('/', $namespacePath); - $namespace = $namespacePathArray[4]; - $replacementPathArray = explode('/', $replacementPath); - $replacement = $replacementPathArray[3]; - $message = $this->_suggestReplacement("Namespace '{$namespace}' is obsolete.", $replacement); - $this->assertStringStartsNotWith($namespace, $relativePath, $message); + $message = $this->_suggestReplacement( + "Path '{$obsoletePath}' is obsolete.", + $replacementPath + ); + $this->assertStringStartsNotWith($obsoletePath . '/', $relativePath, $message); + $this->assertStringStartsNotWith($obsoletePath . '.', $relativePath, $message); + $this->assertStringStartsNotWith($obsoletePath . 'Factory.', $relativePath, $message); + $this->assertStringStartsNotWith($obsoletePath . 'Interface.', $relativePath, $message); + $this->assertStringStartsNotWith($obsoletePath . 'Test.', $relativePath, $message); } } @@ -321,7 +349,7 @@ protected function _testGetChildSpecialCase($content, $file) '/[^a-z\d_]getChild\s*\(/iS', $content, 'Block method getChild() is obsolete. ' . - 'Replacement suggestion: \Magento\View\Element\AbstractBlock::getChildBlock()' + 'Replacement suggestion: \Magento\Framework\View\Element\AbstractBlock::getChildBlock()' ); } } diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/blacklist/obsolete_mage.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/blacklist/obsolete_mage.php index aa94ed3c67105..b61248810907b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/blacklist/obsolete_mage.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/blacklist/obsolete_mage.php @@ -28,7 +28,7 @@ 'dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php', 'dev/tests/static/framework/Magento/TestFramework/Dependency/TemplateRule.php', 'downloader/app/Magento/Downloader/Model/Session.php', - 'downloader/lib/Magento/Backup/Db.php', - 'downloader/lib/Magento/Backup/Snapshot.php', + 'downloader/lib/Magento/Framework/Backup/Db.php', + 'downloader/lib/Magento/Framework/Backup/Snapshot.php', 'dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php' ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index 01ae80983954f..169d402d0afe6 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -29,8 +29,8 @@ array('Mage_Admin_Helper_Data', 'Magento\Backend\Helper\Data'), array('Mage_Admin_Model_Acl', 'Magento_Acl'), array('Mage_Admin_Model_Acl_Role'), - array('Mage_Admin_Model_Acl_Resource', 'Magento\Acl\Resource'), - array('Mage_Admin_Model_Acl_Role_Registry', 'Magento\Acl\Role\Registry'), + array('Mage_Admin_Model_Acl_Resource', 'Magento\Framework\Acl\Resource'), + array('Mage_Admin_Model_Acl_Role_Registry', 'Magento\Framework\Acl\Role\Registry'), array('Mage_Admin_Model_Acl_Role_Generic', 'Magento\User\Model\Acl\Role\Generic'), array('Mage_Admin_Model_Acl_Role_Group', 'Magento\User\Model\Acl\Role\Group'), array('Mage_Admin_Model_Acl_Role_User', 'Magento\User\Model\Acl\Role\User'), @@ -782,43 +782,46 @@ array('Mage_Core_Model_Convert'), array('Mage_Core_Model_Config_Fieldset', 'Magento\Core\Model\Fieldset\Config'), array('Mage_Core_Model_Config_Options', 'Magento\Framework\App\Filesystem'), - array('Magento\Framework\App\Dir', 'Magento\Filesystem'), - array('Magento\Filesystem\Adapter\Local', 'Magento\Filesystem\Driver\File'), - array('Magento\Filesystem\Adapter\Zlib', 'Magento\Filesystem\Driver\Zlib'), - array('Magento\Filesystem\AdapterInterface'), - array('Magento\Filesystem\Stream\FactoryInterface'), - array('Magento\Filesystem\Stream\Local'), - array('Magento\Filesystem\Stream\Mode'), - array('Magento\Filesystem\Stream\Zlib'), - array('Magento\Filesystem\Stream\Mode\Zlib'), + array('Magento\Framework\App\Dir', 'Magento\Framework\Filesystem'), + array('Magento\Framework\Filesystem\Adapter\Local', 'Magento\Framework\Filesystem\Driver\File'), + array('Magento\Framework\Filesystem\Adapter\Zlib', 'Magento\Framework\Filesystem\Driver\Zlib'), + array('Magento\Framework\Filesystem\AdapterInterface'), + array('Magento\Framework\Filesystem\Stream\FactoryInterface'), + array('Magento\Framework\Filesystem\Stream\Local'), + array('Magento\Framework\Filesystem\Stream\Mode'), + array('Magento\Framework\Filesystem\Stream\Zlib'), + array('Magento\Framework\Filesystem\Stream\Mode\Zlib'), array('Mage_Core_Model_Config_Module'), array('Mage_Core_Model_Config_System'), array('Mage_Core_Model_Design_Source_Apply'), array('Mage_Core_Model_Language'), - array('Magento\Core\Model\Flag', 'Magento\Flag'), - array('Magento\Core\Exception', 'Magento\Model\Exception'), - array('Magento\Core\Model\AbstractModel', 'Magento\Model\AbstractModel'), - array('Magento\Core\Model\Email\Info', 'Magento\Mail\MessageInterface'), - array('Magento\Core\Model\Email\Sender', 'Magento\Mail\Template\TransportBuilder'), - array('Magento\Core\Model\Email\Template\Mailer', 'Magento\Mail\Template\TransportBuilder'), - array('Magento\Core\Model\Resource\AbstractResource', 'Magento\Model\Resource\AbstractResource'), - array('Magento\Core\Model\Resource\Db\AbstractDb', 'Magento\Model\Resource\Db\AbstractDb'), - array('Magento\Core\Model\Resource\Db\Profiler', 'Magento\Model\Resource\Db\Profiler'), - array('Magento\Core\Model\Resource\Entity\AbstractEntity', 'Magento\Model\Resource\Entity\AbstractEntity'), - array('Magento\Core\Model\Resource\Entity\Table', 'Magento\Model\Resource\Entity\Table'), - array('Magento\Core\Model\Resource\Flag', 'Magento\Flag\Resource'), - array('Magento\Core\Model\Resource\Iterator', 'Magento\Model\Resource\Iterator'), + array('Magento\Core\Model\Flag', 'Magento\Framework\Flag'), + array('Magento\Core\Exception', 'Magento\Framework\Model\Exception'), + array('Magento\Core\Model\AbstractModel', 'Magento\Framework\Model\AbstractModel'), + array('Magento\Core\Model\Email\Info', 'Magento\Framework\Mail\MessageInterface'), + array('Magento\Core\Model\Email\Sender', 'Magento\Framework\Mail\Template\TransportBuilder'), + array('Magento\Core\Model\Email\Template\Mailer', 'Magento\Framework\Mail\Template\TransportBuilder'), + array('Magento\Core\Model\Resource\AbstractResource', 'Magento\Framework\Model\Resource\AbstractResource'), + array('Magento\Core\Model\Resource\Db\AbstractDb', 'Magento\Framework\Model\Resource\Db\AbstractDb'), + array('Magento\Core\Model\Resource\Db\Profiler', 'Magento\Framework\Model\Resource\Db\Profiler'), + array( + 'Magento\Core\Model\Resource\Entity\AbstractEntity', + 'Magento\Framework\Model\Resource\Entity\AbstractEntity' + ), + array('Magento\Core\Model\Resource\Entity\Table', 'Magento\Framework\Model\Resource\Entity\Table'), + array('Magento\Core\Model\Resource\Flag', 'Magento\Framework\Flag\Resource'), + array('Magento\Core\Model\Resource\Iterator', 'Magento\Framework\Model\Resource\Iterator'), array('Magento\Core\Model\Resource\Resource', 'Magento\Install\Model\Resource\Resource'), - array('Magento\Core\Model\Resource\Type\AbstractType', 'Magento\Model\Resource\Type\AbstractType'), - array('Magento\Core\Model\Resource\Type\Db', 'Magento\Model\Resource\Type\Db'), - array('Magento\Core\Model\Resource\Type\Db\Pdo\Mysql', 'Magento\Model\Resource\Type\Db\Pdo\Mysql'), + array('Magento\Core\Model\Resource\Type\AbstractType', 'Magento\Framework\Model\Resource\Type\AbstractType'), + array('Magento\Core\Model\Resource\Type\Db', 'Magento\Framework\Model\Resource\Type\Db'), + array('Magento\Core\Model\Resource\Type\Db\Pdo\Mysql', 'Magento\Framework\Model\Resource\Type\Db\Pdo\Mysql'), array( 'Magento\Core\Model\Resource\Db\Collection\AbstractCollection', - 'Magento\Model\Resource\Db\Collection\AbstractCollection' + 'Magento\Framework\Model\Resource\Db\Collection\AbstractCollection' ), - array('Magento\Email\Model\Info', 'Magento\Mail\MessageInterface'), - array('Magento\Email\Model\Sender', 'Magento\Mail\Template\TransportBuilder'), - array('Magento\Email\Model\Template\Mailer', 'Magento\Mail\Template\TransportBuilder'), + array('Magento\Email\Model\Info', 'Magento\Framework\Mail\MessageInterface'), + array('Magento\Email\Model\Sender', 'Magento\Framework\Mail\Template\TransportBuilder'), + array('Magento\Email\Model\Template\Mailer', 'Magento\Framework\Mail\Template\TransportBuilder'), array('Magento\Core\Model\Email\Template', 'Magento\Email\Model\Template'), array('Magento\Core\Model\Email\Transport', 'Magento\Email\Model\Transport'), array('Magento\Core\Model\Email\Template\Config', 'Magento\Email\Model\Template\Config'), @@ -1032,7 +1035,7 @@ array('Varien_Convert_Validator_Dryrun'), array('Varien_Convert_Validator_Interface'), array('Mage_File_Uploader_Image'), - array('Varien_Profiler', 'Magento_Profiler'), + array('Varien_Profiler', 'Magento_Framework_Profiler'), array('Mage_Adminhtml_Block_Notification_Window', 'Magento\AdminNotification\Block\Window'), array('Mage_Adminhtml_Block_Notification_Toolbar'), array('Mage_Adminhtml_Block_Notification_Survey'), @@ -1253,7 +1256,7 @@ array('Magento\ImportExport\Model\Config'), array('Magento\Install\Model\EntryPoint\Console', 'Magento\Install\App\Console'), array('Magento\Install\Model\EntryPoint\Output', 'Magento\Install\App\Output'), - array('Magento\Data\Collection\Factory', 'Magento\Data\CollectionFactory'), + array('Magento\Framework\Data\Collection\Factory', 'Magento\Framework\Data\CollectionFactory'), array('Magento\Customer\Block\Adminhtml\System\Config\ValidatevatFactory'), array('Magento\Customer\Model\Attribute\Data'), array('Magento\Eav\Model\Attribute\Data'), @@ -1282,12 +1285,12 @@ ), array('Magento\Sales\Model\ResourceFactory'), array('Magento\Sales\Model\Resource\Helper\Mysql4', 'Magento\Sales\Model\Resource\Helper'), - array('Magento\Core\Model\Resource\Helper\Mysql4', 'Magento\DB\Helper'), - array('Magento\Core\Model\Resource\Helper', 'Magento\DB\Helper'), - array('Magento\Core\Model\Resource\Helper\AbstractHelper', 'Magento\DB\Helper\AbstractHelper'), + array('Magento\Core\Model\Resource\Helper\Mysql4', 'Magento\Framework\DB\Helper'), + array('Magento\Core\Model\Resource\Helper', 'Magento\Framework\DB\Helper'), + array('Magento\Core\Model\Resource\Helper\AbstractHelper', 'Magento\Framework\DB\Helper\AbstractHelper'), array('Magento\Core\Model\Resource\HelperFactory'), array('Magento\Core\Model\Resource\HelperPool'), - array('Magento\Core\Model\Resource\Transaction', 'Magento\DB\Transaction'), + array('Magento\Core\Model\Resource\Transaction', 'Magento\Framework\DB\Transaction'), array('Magento\Catalog\Model\Resource\Helper\Mysql4', 'Magento\Catalog\Model\Resource\Helper'), array('Magento\Eav\Model\Resource\Helper\Mysql4', 'Magento\Eav\Model\Resource\Helper'), array( @@ -1300,6 +1303,19 @@ 'Magento\Payment\Block\Catalog\Product\View\Profile', 'Magento\RecurringPayment\Block\Catalog\Product\View\Payment' ), + ['Magento\Payment\Block\Form\Banktransfer', 'Magento\OfflinePayments\Block\Form\Banktransfer'], + ['Magento\Payment\Block\Form\Cashondelivery', 'Magento\OfflinePayments\Block\Form\Cashondelivery'], + ['Magento\Payment\Block\Form\Ccsave', 'Magento\OfflinePayments\Block\Form\Ccsave'], + ['Magento\Payment\Block\Form\Checkmo', 'Magento\OfflinePayments\Block\Form\Checkmo'], + ['Magento\Payment\Block\Form\Purchaseorder', 'Magento\OfflinePayments\Block\Form\Purchaseorder'], + ['Magento\Payment\Block\Info\Ccsave', 'Magento\OfflinePayments\Block\Info\Ccsave'], + ['Magento\Payment\Block\Info\Checkmo', 'Magento\OfflinePayments\Block\Info\Checkmo'], + ['Magento\Payment\Block\Info\Purchaseorder', 'Magento\OfflinePayments\Block\Info\Purchaseorder'], + ['Magento\Payment\Model\Method\Banktransfer', 'Magento\OfflinePayments\Model\Banktransfer'], + ['Magento\Payment\Model\Method\Cashondelivery', 'Magento\OfflinePayments\Model\Cashondelivery'], + ['Magento\Payment\Model\Method\Ccsave', 'Magento\OfflinePayments\Model\Ccsave'], + ['Magento\Payment\Model\Method\Checkmo', 'Magento\OfflinePayments\Model\Checkmo'], + ['Magento\Payment\Model\Method\Purchaseorder', 'Magento\OfflinePayments\Model\Purchaseorder'], array( 'Magento\Payment\Model\Recurring\Profile\MethodInterface', 'Magento\RecurringPayment\Model\ManagerInterface' @@ -1315,7 +1331,7 @@ array('Magento\Poll\Model\Resource\Poll\Answer\Collection'), array('Magento\Poll\Model\Resource\Poll\Collection'), array('Magento\Poll\Model\Resource\Poll\Vote'), - array('Magento\Backup'), + array('Magento\Framework\Backup'), array('Magento\Core\Controller\Front\Router'), array('Magento\Core\Controller\Request\HttpProxy'), array('Magento\Core\Controller\Response\Http', 'Magento\Framework\App\Response\Http'), @@ -1326,11 +1342,11 @@ array('Magento\Core\Controller\FrontInterface', 'Magento\Framework\App\FrontControllerInterface'), array('Magento\Core\Model\App\Handler'), array('Magento\Core\Model\App\Proxy'), - array('Magento\Core\Model\Event\Config\SchemaLocator', 'Magento\Event\Config\SchemaLocator'), + array('Magento\Core\Model\Event\Config\SchemaLocator', 'Magento\Framework\Event\Config\SchemaLocator'), array('Magento\Core\Controller\Varien\Router\AbstractRouter'), array('Magento\Core\Controller\Varien\AbstractAction'), array('Magento\Core\Controller\Varien\Exception'), - array('Magento\HTTP\HandlerFactory'), + array('Magento\Framework\HTTP\HandlerFactory'), array('Magento\Core\Controller\Request\Http'), array('Magento\Core\Controller\Varien\Router\DefaultRouter'), array('Magento\Core\Model\NoRouteHandlerList'), @@ -1356,8 +1372,8 @@ array('Magento\Core\Model\Event\ConfigInterface'), array('Magento\Core\Model\Event\InvokerInterface'), array('Magento\Core\Model\Event\Manager'), - array('Magento\HTTP\Handler\Composite'), - array('Magento\HTTP\HandlerInterface'), + array('Magento\Framework\HTTP\Handler\Composite'), + array('Magento\Framework\HTTP\HandlerInterface'), array('Magento\Backend\Model\Request\PathInfoProcessor'), array('Magento\Backend\Model\Router\NoRouteHandler'), array('Magento\Core\Model\Request\PathInfoProcessor', 'Magento\Store\App\Request\PathInfoProcessor'), @@ -1385,46 +1401,55 @@ array('Magento\Sales\Model\Resource\Order\Shipment\Attribute\Backend\Parent'), array('Magento\Sales\Model\Resource\Quote\Address\Attribute\Backend\Parent'), array('Magento\Core\Helper\Http'), - array('Magento\Core\Model\ThemeInterface', 'Magento\View\Design\ThemeInterface'), - array('Magento\Core\Model\View\DesignInterface', 'Magento\View\DesignInterface'), - array('Magento\Core\Model\Layout\Element', 'Magento\View\Layout\Element'), + array('Magento\Core\Model\ThemeInterface', 'Magento\Framework\View\Design\ThemeInterface'), + array('Magento\Core\Model\View\DesignInterface', 'Magento\Framework\View\DesignInterface'), + array('Magento\Core\Model\Layout\Element', 'Magento\Framework\View\Layout\Element'), array('Magento\Core\Helper\Hint', 'Magento\Backend\Block\Store\Switcher'), - array('Magento\Core\Model\Design\Fallback\Rule\ModularSwitch', 'Magento\View\Design\Fallback\Rule\ModularSwitch'), - array('Magento\Core\Model\Design\Fallback\Rule\RuleInterface', 'Magento\View\Design\Fallback\Rule\RuleInterface'), - array('Magento\Core\Model\Design\Fallback\Rule\Simple', 'Magento\View\Design\Fallback\Rule\Simple'), - array('Magento\Core\Model\Design\Fallback\Factory', 'Magento\View\Design\Fallback\Factory'), + array( + 'Magento\Core\Model\Design\Fallback\Rule\ModularSwitch', + 'Magento\Framework\View\Design\Fallback\Rule\ModularSwitch' + ), + array( + 'Magento\Core\Model\Design\Fallback\Rule\RuleInterface', + 'Magento\Framework\View\Design\Fallback\Rule\RuleInterface' + ), + array('Magento\Core\Model\Design\Fallback\Rule\Simple', 'Magento\Framework\View\Design\Fallback\Rule\Simple'), + array('Magento\Core\Model\Design\Fallback\Factory', 'Magento\Framework\View\Design\Fallback\Factory'), array( 'Magento\Core\Model\Design\FileResolution\Strategy\Fallback\CachingProxy', - 'Magento\View\Design\FileResolution\Strategy\Fallback\CachingProxy' + 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback\CachingProxy' ), array( 'Magento\Core\Model\Design\FileResolution\Strategy\Fallback', - 'Magento\View\Design\FileResolution\Strategy\Fallback' + 'Magento\Framework\View\Design\FileResolution\Strategy\Fallback' + ), + array( + 'Magento\Core\Model\Design\FileResolution\StrategyPool', + 'Magento\Framework\View\Design\FileResolution\StrategyPool' ), - array('Magento\Core\Model\Design\FileResolution\StrategyPool', 'Magento\View\Design\FileResolution\StrategyPool'), - array('Magento\Core\Model\Layout\File', 'Magento\View\Layout\File'), - array('Magento\Core\Model\Layout\File\Factory', 'Magento\View\Layout\File\Factory'), - array('Magento\Core\Model\Layout\File\FileList\Factory', 'Magento\View\Layout\File\FileList\Factory'), - array('Magento\Core\Model\Layout\File\ListFile', 'Magento\View\Layout\File\FileList'), - array('Magento\Core\Model\Layout\File\Source\Aggregated', 'Magento\View\Layout\File\Source\Aggregated'), - array('Magento\Core\Model\Layout\File\Source\Base', 'Magento\View\Layout\File\Source\Base'), + array('Magento\Core\Model\Layout\File', 'Magento\Framework\View\Layout\File'), + array('Magento\Core\Model\Layout\File\Factory', 'Magento\Framework\View\Layout\File\Factory'), + array('Magento\Core\Model\Layout\File\FileList\Factory', 'Magento\Framework\View\Layout\File\FileList\Factory'), + array('Magento\Core\Model\Layout\File\ListFile', 'Magento\Framework\View\Layout\File\FileList'), + array('Magento\Core\Model\Layout\File\Source\Aggregated', 'Magento\Framework\View\Layout\File\Source\Aggregated'), + array('Magento\Core\Model\Layout\File\Source\Base', 'Magento\Framework\View\Layout\File\Source\Base'), array( 'Magento\Core\Model\Layout\File\Source\Decorator\ModuleDependency', - 'Magento\View\Layout\File\Source\Decorator\ModuleDependency' + 'Magento\Framework\View\Layout\File\Source\Decorator\ModuleDependency' ), array( 'Magento\Core\Model\Layout\File\Source\Decorator\ModuleOutput', - 'Magento\View\Layout\File\Source\Decorator\ModuleOutput' - ), - array('Magento\Core\Model\Layout\File\Source\Override\Base', 'Magento\View\Layout\File\Override\Base'), - array('Magento\Core\Model\Layout\File\Source\Override\Theme', 'Magento\View\Layout\File\Override\Theme'), - array('Magento\Core\Model\Layout\File\Source\Theme', 'Magento\View\Layout\File\Source\Theme'), - array('Magento\Core\Model\Layout\File\SourceInterface', 'Magento\View\Layout\File\SourceInterface'), - array('Magento\Core\Model\LayoutFactory', 'Magento\View\LayoutFactory'), - array('Magento\Core\Model\TemplateEngine\EngineInterface', 'Magento\View\TemplateEngineInterface'), - array('Magento\Core\Model\TemplateEngine\Factory', 'Magento\View\TemplateEngineFactory'), - array('Magento\Core\Model\TemplateEngine\Php', 'Magento\View\TemplateEngine\Php'), - array('Magento\Core\Model\TemplateEngine\Pool', 'Magento\View\TemplateEnginePool'), + 'Magento\Framework\View\Layout\File\Source\Decorator\ModuleOutput' + ), + array('Magento\Core\Model\Layout\File\Source\Override\Base', 'Magento\Framework\View\Layout\File\Override\Base'), + array('Magento\Core\Model\Layout\File\Source\Override\Theme', 'Magento\Framework\View\Layout\File\Override\Theme'), + array('Magento\Core\Model\Layout\File\Source\Theme', 'Magento\Framework\View\Layout\File\Source\Theme'), + array('Magento\Core\Model\Layout\File\SourceInterface', 'Magento\Framework\View\Layout\File\SourceInterface'), + array('Magento\Core\Model\LayoutFactory', 'Magento\Framework\View\LayoutFactory'), + array('Magento\Core\Model\TemplateEngine\EngineInterface', 'Magento\Framework\View\TemplateEngineInterface'), + array('Magento\Core\Model\TemplateEngine\Factory', 'Magento\Framework\View\TemplateEngineFactory'), + array('Magento\Core\Model\TemplateEngine\Php', 'Magento\Framework\View\TemplateEngine\Php'), + array('Magento\Core\Model\TemplateEngine\Pool', 'Magento\Framework\View\TemplateEnginePool'), array('Magento\Media\Model\File\Image'), array('Magento\Media\Model\Image'), array('Magento\Media\Helper\Data'), @@ -1567,23 +1592,29 @@ array('Magento\Adminhtml\Block\System\Variable', 'Magento\Backend\Block\System\Variable'), array( 'Magento\Adminhtml\Block\Checkout\Agreement\Edit\Form', - 'Magento\Checkout\Block\Adminhtml\Agreement\Edit\Form' + 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement\Edit\Form' ), - array('Magento\Adminhtml\Block\Checkout\Agreement\Edit', 'Magento\Checkout\Block\Adminhtml\Agreement\Edit'), - array('Magento\Adminhtml\Block\Checkout\Agreement\Grid', 'Magento\Checkout\Block\Adminhtml\Agreement\Grid'), - array('Magento\Adminhtml\Block\Checkout\Agreement', 'Magento\Checkout\Block\Adminhtml\Agreement'), + array( + 'Magento\Adminhtml\Block\Checkout\Agreement\Edit', + 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement\Edit' + ), + array( + 'Magento\Adminhtml\Block\Checkout\Agreement\Grid', + 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement\Grid' + ), + array('Magento\Adminhtml\Block\Checkout\Agreement', 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement'), array('Magento\Adminhtml\Controller\Checkout\Agreement', 'Magento\Checkout\Controller\Adminhtml\Agreement'), - array('Magento\Core\Model\View\PublicFilesManagerInterface', 'Magento\View\PublicFilesManagerInterface'), - array('Magento\Core\Model\View\DeployedFilesManager', 'Magento\View\DeployedFilesManager'), - array('Magento\Core\Model\View\Publisher', 'Magento\View\Publisher'), - array('Magento\Core\Model\View\FileSystem', 'Magento\View\FileSystem'), - array('Magento\Core\Model\View\Service', 'Magento\View\Service'), - array('Magento\Core\Model\View\Url', 'Magento\View\Url'), - array('Magento\Core\Model\View\Config', 'Magento\View\Config'), - array('Magento\Core\Model\Image\Factory', 'Magento\Image\Factory'), - array('Magento\Core\Model\Theme\Image', 'Magento\View\Design\Theme\Image'), - array('Magento\Core\Model\Theme\FlyweightFactory', 'Magento\View\Design\Theme\FlyweightFactory'), - array('Magento\Core\Model\Image\AdapterFactory', 'Magento\Image\AdapterFactory'), + array('Magento\Core\Model\View\PublicFilesManagerInterface', 'Magento\Framework\View\PublicFilesManagerInterface'), + array('Magento\Core\Model\View\DeployedFilesManager', 'Magento\Framework\View\DeployedFilesManager'), + array('Magento\Core\Model\View\Publisher', 'Magento\Framework\View\Publisher'), + array('Magento\Core\Model\View\FileSystem', 'Magento\Framework\View\FileSystem'), + array('Magento\Core\Model\View\Service', 'Magento\Framework\View\Service'), + array('Magento\Core\Model\View\Url', 'Magento\Framework\View\Url'), + array('Magento\Core\Model\View\Config', 'Magento\Framework\View\Config'), + array('Magento\Core\Model\Image\Factory', 'Magento\Framework\Image\Factory'), + array('Magento\Core\Model\Theme\Image', 'Magento\Framework\View\Design\Theme\Image'), + array('Magento\Core\Model\Theme\FlyweightFactory', 'Magento\Framework\View\Design\Theme\FlyweightFactory'), + array('Magento\Core\Model\Image\AdapterFactory', 'Magento\Framework\Image\AdapterFactory'), array('Magento\Core\Model\EntryPoint\Cron', 'Magento\Framework\App\Cron'), array( 'Magento\Checkout\Block\Cart\Item\Renderer\Grouped', @@ -1592,19 +1623,19 @@ array('Magento\Log\Model\EntryPoint\Shell', 'Magento\Log\App\Shell'), array('Magento\Index\Model\EntryPoint\Shell', 'Magento\Index\App\Shell'), array('Magento\Index\Model\EntryPoint\Indexer', 'Magento\Index\App\Indexer'), - array('Magento\Core\Model\Config\Modules\Reader', 'Magento\Module\Dir\Reader'), - array('Magento\Data\Form\Factory', 'Magento\Data\FormFactory'), - array('Magento\Framework\App\Cache\Config', 'Magento\Cache\Config'), - array('Magento\Framework\App\Cache\Config\Converter', 'Magento\Cache\Config\Converter'), - array('Magento\Framework\App\Cache\Config\Data', 'Magento\Cache\Config\Data'), - array('Magento\Framework\App\Cache\Config\Reader', 'Magento\Cache\Config\Reader'), - array('Magento\Framework\App\Cache\Config\SchemaLocator', 'Magento\Cache\Config\SchemaLocator'), - array('Magento\Core\Model\Fieldset\Config', 'Magento\Object\Copy\Config'), - array('Magento\Core\Model\Fieldset\Config\Converter', 'Magento\Object\Copy\Config\Converter'), - array('Magento\Core\Model\Fieldset\Config\Data', 'Magento\Object\Copy\Config\Data'), - array('Magento\Core\Model\Fieldset\Config\Reader', 'Magento\Object\Copy\Config\Reader'), - array('Magento\Core\Model\Fieldset\Config\SchemaLocator', 'Magento\Object\Copy\Config\SchemaLocator'), - array('Magento\Core\Model\ModuleManager', 'Magento\Module\Manager'), + array('Magento\Core\Model\Config\Modules\Reader', 'Magento\Framework\Module\Dir\Reader'), + array('Magento\Framework\Data\Form\Factory', 'Magento\Framework\Data\FormFactory'), + array('Magento\Framework\App\Cache\Config', 'Magento\Framework\Cache\Config'), + array('Magento\Framework\App\Cache\Config\Converter', 'Magento\Framework\Cache\Config\Converter'), + array('Magento\Framework\App\Cache\Config\Data', 'Magento\Framework\Cache\Config\Data'), + array('Magento\Framework\App\Cache\Config\Reader', 'Magento\Framework\Cache\Config\Reader'), + array('Magento\Framework\App\Cache\Config\SchemaLocator', 'Magento\Framework\Cache\Config\SchemaLocator'), + array('Magento\Core\Model\Fieldset\Config', 'Magento\Framework\Object\Copy\Config'), + array('Magento\Core\Model\Fieldset\Config\Converter', 'Magento\Framework\Object\Copy\Config\Converter'), + array('Magento\Core\Model\Fieldset\Config\Data', 'Magento\Framework\Object\Copy\Config\Data'), + array('Magento\Core\Model\Fieldset\Config\Reader', 'Magento\Framework\Object\Copy\Config\Reader'), + array('Magento\Core\Model\Fieldset\Config\SchemaLocator', 'Magento\Framework\Object\Copy\Config\SchemaLocator'), + array('Magento\Core\Model\ModuleManager', 'Magento\Framework\Module\Manager'), array('Magento\Core\Model\EntryPoint\Media', 'Magento\Core\App\Media'), array('Magento\Core\Controller\Varien\Action', 'Magento\Framework\App\Action\Action'), array('Magento\Core\Controller\Varien\Action\Context', 'Magento\Framework\App\Action\Context'), @@ -1612,26 +1643,26 @@ array('Magento\Backend\Controller\Context', 'Magento\Backend\App\Action\Context'), array('Magento\Backend\Controller\Adminhtml\Action', 'Magento\Backend\App\Action'), array('Magento\Backend\Block\System\Shipping\Ups', 'Magento\Ups\Block\Backend\System\CarrierConfig'), - array('Magento\Core\Block\Text', 'Magento\View\Element\Text'), - array('Magento\Core\Block\Text\ListText', 'Magento\View\Element\Text\ListText'), - array('Magento\Core\Block\Text\TextList\Item', 'Magento\View\Element\Text\TextList\Item'), - array('Magento\Core\Block\Text\TextList\Link', 'Magento\View\Element\Text\TextList\Link'), - array('Magento\Core\Block\Messages', 'Magento\View\Element\Messages'), - array('Magento\Core\Model\Message', 'Magento\Message\Factory'), - array('Magento\Core\Model\Message\AbstractMessage', 'Magento\Message\AbstractMessage'), - array('Magento\Core\Model\Message\Collection', 'Magento\Message\Collection'), - array('Magento\Core\Model\Message\CollectionFactory', 'Magento\Message\CollectionFactory'), - array('Magento\Core\Model\Message\Error', 'Magento\Message\Error'), - array('Magento\Core\Model\Message\Warning', 'Magento\Message\Warning'), - array('Magento\Core\Model\Message\Notice', 'Magento\Message\Notice'), - array('Magento\Core\Model\Message\Success', 'Magento\Message\Success'), - array('Magento\Core\Block\Html\Date', 'Magento\View\Element\Html\Date'), - array('Magento\Core\Block\Html\Select', 'Magento\View\Element\Html\Select'), - array('Magento\Core\Block\AbstractBlock', 'Magento\View\Element\AbstractBlock'), - array('Magento\Core\Block\Template', 'Magento\View\Element\Template'), - array('Magento\Core\Block\Html\Calendar', 'Magento\View\Element\Html\Calendar'), - array('Magento\Core\Block\Html\Link', 'Magento\View\Element\Html\Link'), - array('Magento\Core\Block\Context', 'Magento\View\Element\Context'), + array('Magento\Core\Block\Text', 'Magento\Framework\View\Element\Text'), + array('Magento\Core\Block\Text\ListText', 'Magento\Framework\View\Element\Text\ListText'), + array('Magento\Core\Block\Text\TextList\Item', 'Magento\Framework\View\Element\Text\TextList\Item'), + array('Magento\Core\Block\Text\TextList\Link', 'Magento\Framework\View\Element\Text\TextList\Link'), + array('Magento\Core\Block\Messages', 'Magento\Framework\View\Element\Messages'), + array('Magento\Core\Model\Message', 'Magento\Framework\Message\Factory'), + array('Magento\Core\Model\Message\AbstractMessage', 'Magento\Framework\Message\AbstractMessage'), + array('Magento\Core\Model\Message\Collection', 'Magento\Framework\Message\Collection'), + array('Magento\Core\Model\Message\CollectionFactory', 'Magento\Framework\Message\CollectionFactory'), + array('Magento\Core\Model\Message\Error', 'Magento\Framework\Message\Error'), + array('Magento\Core\Model\Message\Warning', 'Magento\Framework\Message\Warning'), + array('Magento\Core\Model\Message\Notice', 'Magento\Framework\Message\Notice'), + array('Magento\Core\Model\Message\Success', 'Magento\Framework\Message\Success'), + array('Magento\Core\Block\Html\Date', 'Magento\Framework\View\Element\Html\Date'), + array('Magento\Core\Block\Html\Select', 'Magento\Framework\View\Element\Html\Select'), + array('Magento\Core\Block\AbstractBlock', 'Magento\Framework\View\Element\AbstractBlock'), + array('Magento\Core\Block\Template', 'Magento\Framework\View\Element\Template'), + array('Magento\Core\Block\Html\Calendar', 'Magento\Framework\View\Element\Html\Calendar'), + array('Magento\Core\Block\Html\Link', 'Magento\Framework\View\Element\Html\Link'), + array('Magento\Core\Block\Context', 'Magento\Framework\View\Element\Context'), array('Magento\Core\Model\Factory\Helper'), array('Magento\Framework\App\Helper\HelperFactory'), array('Magento\Core\Helper\AbstractHelper', 'Magento\Framework\App\Helper\AbstractHelper'), @@ -1733,14 +1764,14 @@ array('Magento\Adminhtml\Block\Report\Wishlist', 'Magento\Reports\Block\Adminhtml\Wishlist'), array('Magento\Framework\App\Dir\Verification', 'Magento\Framework\App\Filesystem\DirectoryList\Verification'), array('Magento\Backend\Helper\Addresses'), - array('Magento\Core\Model\Cookie', 'Magento\Stdlib\Cookie'), - array('Magento\Core\Model\Logger', 'Magento\Logger'), - array('Magento\Core\Block\Template\Context', 'Magento\View\Element\Template\Context'), + array('Magento\Core\Model\Cookie', 'Magento\Framework\Stdlib\Cookie'), + array('Magento\Core\Model\Logger', 'Magento\Framework\Logger'), + array('Magento\Core\Block\Template\Context', 'Magento\Framework\View\Element\Template\Context'), array('Magento\Page\Block\Template\Container'), - array('Magento\Page\Block\Redirect', 'Magento\View\Element\Redirect'), + array('Magento\Page\Block\Redirect', 'Magento\Framework\View\Element\Redirect'), array('Magento\Page\Block\Js\Translate'), - array('Magento\Page\Block\Js\Components', 'Magento\View\Element\Js\Components'), - array('Magento\Page\Block\Js\Cookie', 'Magento\View\Element\Js\Cookie'), + array('Magento\Page\Block\Js\Components', 'Magento\Framework\View\Element\Js\Components'), + array('Magento\Page\Block\Js\Cookie', 'Magento\Framework\View\Element\Js\Cookie'), array('Magento\Page\Block\Html', 'Magento\Theme\Block\Html'), array('Magento\Page\Block\Html\Breadcrumbs', 'Magento\Theme\Block\Html\Breadcrumbs'), array('Magento\Page\Block\Html\Footer', 'Magento\Theme\Block\Html\Footer'), @@ -1760,49 +1791,64 @@ array('Magento\Page\Helper\Html'), array('Magento\Page\Helper\Robots'), array('Magento\Core\Model\Page'), - array('Magento\Core\Model\Page\Asset\AssetInterface', 'Magento\View\Asset\AssetInterface'), - array('Magento\Core\Model\Page\Asset\Collection', 'Magento\View\Asset\Collection'), - array('Magento\Core\Model\Page\Asset\LocalInterface', 'Magento\View\Asset\LocalInterface'), - array('Magento\Core\Model\Page\Asset\MergeService', 'Magento\View\Asset\MergeService'), - array('Magento\Core\Model\Page\Asset\MergeStrategy\Checksum', 'Magento\View\Asset\MergeStrategy\Checksum'), - array('Magento\Core\Model\Page\Asset\MergeStrategy\Direct', 'Magento\View\Asset\MergeStrategy\Direct'), - array('Magento\Core\Model\Page\Asset\MergeStrategy\FileExists', 'Magento\View\Asset\MergeStrategy\FileExists'), - array('Magento\Core\Model\Page\Asset\MergeStrategyInterface', 'Magento\View\Asset\MergeStrategyInterface'), - array('Magento\Core\Model\Page\Asset\MergeableInterface', 'Magento\View\Asset\MergeableInterface'), - array('Magento\Core\Model\Page\Asset\Merged', 'Magento\View\Asset\Merged'), - array('Magento\Core\Model\Page\Asset\Minified', 'Magento\View\Asset\Minified'), - array('Magento\Core\Model\Page\Asset\MinifyService', 'Magento\View\Asset\MinifyService'), - array('Magento\Core\Model\Page\Asset\PublicFile', 'Magento\View\Asset\PublicFile'), - array('Magento\Core\Model\Page\Asset\Remote', 'Magento\View\Asset\Remote'), - array('Magento\Core\Model\Page\Asset\ViewFile', 'Magento\View\Asset\ViewFile'), + array('Magento\Core\Model\Page\Asset\AssetInterface', 'Magento\Framework\View\Asset\AssetInterface'), + array('Magento\Core\Model\Page\Asset\Collection', 'Magento\Framework\View\Asset\Collection'), + array('Magento\Core\Model\Page\Asset\LocalInterface', 'Magento\Framework\View\Asset\LocalInterface'), + array('Magento\Core\Model\Page\Asset\MergeService', 'Magento\Framework\View\Asset\MergeService'), + array( + 'Magento\Core\Model\Page\Asset\MergeStrategy\Checksum', + 'Magento\Framework\View\Asset\MergeStrategy\Checksum' + ), + array('Magento\Core\Model\Page\Asset\MergeStrategy\Direct', 'Magento\Framework\View\Asset\MergeStrategy\Direct'), + array( + 'Magento\Core\Model\Page\Asset\MergeStrategy\FileExists', + 'Magento\Framework\View\Asset\MergeStrategy\FileExists' + ), + array( + 'Magento\Core\Model\Page\Asset\MergeStrategyInterface', + 'Magento\Framework\View\Asset\MergeStrategyInterface' + ), + array('Magento\Core\Model\Page\Asset\MergeableInterface', 'Magento\Framework\View\Asset\MergeableInterface'), + array('Magento\Core\Model\Page\Asset\Merged', 'Magento\Framework\View\Asset\Merged'), + array('Magento\Core\Model\Page\Asset\Minified', 'Magento\Framework\View\Asset\Minified'), + array('Magento\Core\Model\Page\Asset\MinifyService', 'Magento\Framework\View\Asset\MinifyService'), + array('Magento\Core\Model\Page\Asset\PublicFile', 'Magento\Framework\View\Asset\PublicFile'), + array('Magento\Core\Model\Page\Asset\Remote', 'Magento\Framework\View\Asset\Remote'), + array('Magento\Core\Model\Page\Asset\ViewFile', 'Magento\Framework\View\Asset\ViewFile'), array('Magento\Page\Block\Html\Head\AssetBlock', 'Magento\Theme\Block\Html\Head\AssetBlockInterface'), array('Magento\Page\Block\Html\Head\Css', 'Magento\Theme\Block\Html\Head\Css'), array('Magento\Page\Block\Html\Head\Link', 'Magento\Theme\Block\Html\Head\Link'), array('Magento\Page\Block\Html\Head\Script', 'Magento\Theme\Block\Html\Head\Script'), - array('Magento\Page\Model\Asset\GroupedCollection', 'Magento\View\Asset\GroupedCollection'), - array('Magento\Page\Model\Asset\PropertyGroup', 'Magento\View\Asset\PropertyGroup'), + array('Magento\Page\Model\Asset\GroupedCollection', 'Magento\Framework\View\Asset\GroupedCollection'), + array('Magento\Page\Model\Asset\PropertyGroup', 'Magento\Framework\View\Asset\PropertyGroup'), array('Magento\Page\Block\Template\Links\Block'), - array('Magento\Page\Block\Link\Current', 'Magento\View\Element\Html\Link\Current'), - array('Magento\Page\Block\Links', 'Magento\View\Element\Html\Links'), - array('Magento\Page\Block\Link', 'Magento\View\Element\Html\Link'), - array('Magento\Core\Model\Layout\Argument\HandlerInterface', 'Magento\View\Layout\Argument\HandlerInterface'), - array('Magento\Core\Model\Layout\Argument\HandlerFactory', 'Magento\View\Layout\Argument\HandlerFactory'), - array('Magento\Core\Model\Theme\Label', 'Magento\View\Design\Theme\Label'), - array('Magento\Core\Model\Theme\LabelFactory', 'Magento\View\Design\Theme\LabelFactory'), - array('Magento\Core\Model\DesignLoader', 'Magento\View\DesignLoader'), + array('Magento\Page\Block\Link\Current', 'Magento\Framework\View\Element\Html\Link\Current'), + array('Magento\Page\Block\Links', 'Magento\Framework\View\Element\Html\Links'), + array('Magento\Page\Block\Link', 'Magento\Framework\View\Element\Html\Link'), + array( + 'Magento\Core\Model\Layout\Argument\HandlerInterface', + 'Magento\Framework\View\Layout\Argument\HandlerInterface' + ), + array('Magento\Core\Model\Layout\Argument\HandlerFactory', 'Magento\Framework\View\Layout\Argument\HandlerFactory'), + array('Magento\Core\Model\Theme\Label', 'Magento\Framework\View\Design\Theme\Label'), + array('Magento\Core\Model\Theme\LabelFactory', 'Magento\Framework\View\Design\Theme\LabelFactory'), + array('Magento\Core\Model\DesignLoader', 'Magento\Framework\View\DesignLoader'), array('Magento\Page\Block\Switcher', 'Magento\Store\Block\Switcher'), - array('Magento\Core\Model\Layout\PageType\Config', 'Magento\View\Layout\PageType\Config'), - array('Magento\Core\Model\Layout\PageType\Config\Converter', 'Magento\View\Layout\PageType\Config\Converter'), - array('Magento\Core\Model\Layout\PageType\Config\Reader', 'Magento\View\Layout\PageType\Config\Reader'), + array('Magento\Core\Model\Layout\PageType\Config', 'Magento\Framework\View\Layout\PageType\Config'), + array( + 'Magento\Core\Model\Layout\PageType\Config\Converter', + 'Magento\Framework\View\Layout\PageType\Config\Converter' + ), + array('Magento\Core\Model\Layout\PageType\Config\Reader', 'Magento\Framework\View\Layout\PageType\Config\Reader'), array( 'Magento\Core\Model\Layout\PageType\Config\SchemaLocator', - 'Magento\View\Layout\PageType\Config\SchemaLocator' + 'Magento\Framework\View\Layout\PageType\Config\SchemaLocator' ), array('Magento\Core\Model\Theme\CopyService', 'Magento\Theme\Model\CopyService'), - array('Magento\Core\Model\Resource\Session', 'Magento\Session\SaveHandler\DbTable'), - array('Magento\Core\Model\Session\Exception', 'Magento\Session\Exception'), + array('Magento\Core\Model\Resource\Session', 'Magento\Framework\Session\SaveHandler\DbTable'), + array('Magento\Core\Model\Session\Exception', 'Magento\Framework\Session\Exception'), array('Magento\Core\Model\Session\Context'), - array('Magento\Core\Model\Session\AbstractSession', 'Magento\Session\SessionManager'), + array('Magento\Core\Model\Session\AbstractSession', 'Magento\Framework\Session\SessionManager'), array('Magento\Catalog\Model\Resource\Convert'), array('Magento\Reminder\Model\Resource\HelperFactory'), array('Magento\Reminder\Model\Resource\Helper'), @@ -1943,8 +1989,8 @@ array('Magento\Catalog\Block\Adminhtml\System\Config\Form\Field\Select\Flatcatalog'), array('Magento\Catalog\Helper\Category\Flat'), array('Magento\Catalog\Model\Category\Indexer\Flat'), - array('Magento\Config\Dom\Converter\ArrayConverter'), - array('Magento\Acl\Resource\Config\Dom'), + array('Magento\Framework\Config\Dom\Converter\ArrayConverter'), + array('Magento\Framework\Acl\Resource\Config\Dom'), array('Magento\Sales\Model\Recurring\Profile', 'Magento\RecurringPayment\Model\Payment'), array('Magento\Sales\Model\Resource\Recurring\Profile', 'Magento\RecurringPayment\Model\Resource\Payment'), array( @@ -1952,34 +1998,55 @@ 'Magento\RecurringPayment\Model\Resource\Payment\Collection' ), array('Magento\Payment\Model\Recurring\Profile', 'Magento\RecurringPayment\Model\RecurringPayment'), - array('Magento\Validator\Composite\VarienObject', 'Magento\Validator\Object'), + array('Magento\Validator\Composite\VarienObject', 'Magento\Framework\Validator\Object'), array('Magento\GoogleShopping\Helper\Price', 'Magento\Catalog\Model\Product\CatalogPrice'), - array('Magento\Core\Model\Layout\Argument\Handler\ArrayHandler', 'Magento\Data\Argument\Interpreter\ArrayType'), - array('Magento\Core\Model\Layout\Argument\Handler\String', 'Magento\Data\Argument\Interpreter\String'), - array('Magento\Core\Model\Layout\Argument\Handler\Number', 'Magento\Data\Argument\Interpreter\Number'), - array('Magento\Core\Model\Layout\Argument\Handler\Boolean', 'Magento\Data\Argument\Interpreter\Boolean'), - array('Magento\Core\Model\Layout\Argument\Handler\Object', 'Magento\View\Layout\Argument\Interpreter\Object'), - array('Magento\Core\Model\Layout\Argument\Handler\Options', 'Magento\View\Layout\Argument\Interpreter\Options'), - array('Magento\Core\Model\Layout\Argument\Handler\Url', 'Magento\View\Layout\Argument\Interpreter\Url'), + array( + 'Magento\Core\Model\Layout\Argument\Handler\ArrayHandler', + 'Magento\Framework\Data\Argument\Interpreter\ArrayType' + ), + array('Magento\Core\Model\Layout\Argument\Handler\String', 'Magento\Framework\Data\Argument\Interpreter\String'), + array('Magento\Core\Model\Layout\Argument\Handler\Number', 'Magento\Framework\Data\Argument\Interpreter\Number'), + array('Magento\Core\Model\Layout\Argument\Handler\Boolean', 'Magento\Framework\Data\Argument\Interpreter\Boolean'), + array( + 'Magento\Core\Model\Layout\Argument\Handler\Object', + 'Magento\Framework\View\Layout\Argument\Interpreter\Object' + ), + array( + 'Magento\Core\Model\Layout\Argument\Handler\Options', + 'Magento\Framework\View\Layout\Argument\Interpreter\Options' + ), + array('Magento\Core\Model\Layout\Argument\Handler\Url', 'Magento\Framework\View\Layout\Argument\Interpreter\Url'), array( 'Magento\Core\Model\Layout\Argument\Handler\Helper', - 'Magento\View\Layout\Argument\Interpreter\HelperMethod' + 'Magento\Framework\View\Layout\Argument\Interpreter\HelperMethod' ), array( 'Magento\Core\Model\Layout\Argument\AbstractHandler', - 'Magento\View\Layout\Argument\Interpreter\Decorator\Updater' + 'Magento\Framework\View\Layout\Argument\Interpreter\Decorator\Updater' ), array( 'Magento\Core\Model\Layout\Argument\Processor', - 'Magento\View\Layout\Argument\Interpreter\Decorator\Updater' + 'Magento\Framework\View\Layout\Argument\Interpreter\Decorator\Updater' + ), + array( + 'Magento\Core\Model\Layout\Argument\Updater', + 'Magento\Framework\View\Layout\Argument\Interpreter\Decorator\Updater' + ), + array( + 'Magento\Core\Model\Layout\Argument\UpdaterInterface', + 'Magento\Framework\View\Layout\Argument\UpdaterInterface' ), - array('Magento\Core\Model\Layout\Argument\Updater', 'Magento\View\Layout\Argument\Interpreter\Decorator\Updater'), - array('Magento\Core\Model\Layout\Argument\UpdaterInterface', 'Magento\View\Layout\Argument\UpdaterInterface'), array('Magento\Core\Model\Layout\Filter\Acl', 'Magento\Backend\Model\Layout\Filter\Acl'), - array('Magento\View\Layout\Argument\HandlerInterface', 'Magento\Data\Argument\InterpreterInterface'), - array('Magento\View\Layout\Argument\HandlerFactory', 'Magento\Data\Argument\Interpreter\Composite'), - array('Magento\Phrase\Renderer\Factory'), - array('Magento\View\Layout\Factory', 'Magento\DesignEditor\Model\AreaEmulator'), + array( + 'Magento\Framework\View\Layout\Argument\HandlerInterface', + 'Magento\Framework\Data\Argument\InterpreterInterface' + ), + array( + 'Magento\Framework\View\Layout\Argument\HandlerFactory', + 'Magento\Framework\Data\Argument\Interpreter\Composite' + ), + array('Magento\Framework\Phrase\Renderer\Factory'), + array('Magento\Framework\View\Layout\Factory', 'Magento\DesignEditor\Model\AreaEmulator'), array('Magento\Catalog\Model\Category\Indexer\Product'), array('Magento\Catalog\Model\Resource\Category\Indexer\Product'), array('Magento\Catalog\Model\Index'), @@ -2012,18 +2079,18 @@ 'Magento\RecurringPayment\Controller\Adminhtml\Payment' ), array('Magento\Sales\Controller\Recurring\Profile', 'Magento\RecurringPayment\Controller\Payment'), - array('Magento\Core\Model\Image\Adapter\Config', 'Magento\Image\Adapter\Config'), + array('Magento\Core\Model\Image\Adapter\Config', 'Magento\Framework\Image\Adapter\Config'), array('Magento\Core\Model\AbstractShell', 'Magento\Framework\App\AbstractShell'), - array('Magento\Core\Model\Calculator', 'Magento\Math\Calculator'), - array('Magento\Core\Model\Log\Adapter', 'Magento\Logger\Adapter'), - array('Magento\Core\Model\Input\Filter', 'Magento\Filter\Input'), - array('Magento\Core\Model\Input\Filter\MaliciousCode', 'Magento\Filter\Input\MaliciousCode'), - array('Magento\Core\Model\Option\ArrayInterface', 'Magento\Option\ArrayInterface'), - array('Magento\Core\Model\Option\ArrayPool', 'Magento\Option\ArrayPool'), - array('Magento\Core\Helper\String', 'Magento\Code\NameBuilder'), - array('Magento\Core\Model\Context', 'Magento\Model\Context'), - array('Magento\Core\Model\Registry', 'Magento\Registry'), - array('Magento\Code\Plugin\InvocationChain'), + array('Magento\Core\Model\Calculator', 'Magento\Framework\Math\Calculator'), + array('Magento\Core\Model\Log\Adapter', 'Magento\Framework\Logger\Adapter'), + array('Magento\Core\Model\Input\Filter', 'Magento\Framework\Filter\Input'), + array('Magento\Core\Model\Input\Filter\MaliciousCode', 'Magento\Framework\Filter\Input\MaliciousCode'), + array('Magento\Core\Model\Option\ArrayInterface', 'Magento\Framework\Option\ArrayInterface'), + array('Magento\Core\Model\Option\ArrayPool', 'Magento\Framework\Option\ArrayPool'), + array('Magento\Core\Helper\String', 'Magento\Framework\Code\NameBuilder'), + array('Magento\Core\Model\Context', 'Magento\Framework\Model\Context'), + array('Magento\Core\Model\Registry', 'Magento\Framework\Registry'), + array('Magento\Framework\Code\Plugin\InvocationChain'), array('RecurringProfile', 'RecurringPayment'), // recurring profile was renamed to recurring payment array('Recurring\Profile', 'Recurring\Payment'), // recurring profile was renamed to recurring payment array('Magento\Catalog\Helper\Product\Flat'), @@ -2032,21 +2099,30 @@ array('Magento\Core\App\Action\Plugin\Session', 'Magento\Core\Block\RequireCookie'), array( 'Magento\Core\Model\LocaleInterface', - 'Magento\Locale\ResolverInterface, Magento\Locale\CurrencyInterface,' . - 'Magento\Locale\FormatInterface, Magento\Stdlib\DateTime\TimezoneInterface' + 'Magento\Framework\Locale\ResolverInterface, Magento\Framework\Locale\CurrencyInterface,' . + 'Magento\Framework\Locale\FormatInterface, Magento\Framework\Stdlib\DateTime\TimezoneInterface' ), array( 'Magento\Core\Model\Locale', - 'Magento\Locale\Resolver, Magento\Locale\Currency, Magento\Locale\Format, ' . - 'Magento\Stdlib\DateTime\Timezone, Magento\Locale\Lists' - ), - array('Magento\Core\Model\Locale\Hierarchy\Config\Converter', 'Magento\Locale\Hierarchy\Config\Converter'), - array('Magento\Core\Model\Locale\Hierarchy\Config\FileResolver', 'Magento\Locale\Hierarchy\Config\FileResolver'), - array('Magento\Core\Model\Locale\Hierarchy\Config\Reader', 'Magento\Locale\Hierarchy\Config\Reader'), - array('Magento\Core\Model\Locale\Hierarchy\Config\SchemaLocator', 'Magento\Locale\Hierarchy\Config\SchemaLocator'), - array('Magento\Core\Model\Locale\Config', 'Magento\Locale\Config'), - array('Magento\Core\Model\Locale\Validator', 'Magento\Locale\Validator'), - array('Magento\Core\Model\Date', 'Magento\Stdlib\DateTime\DateTime'), + 'Magento\Framework\Locale\Resolver, Magento\Framework\Locale\Currency, Magento\Framework\Locale\Format, ' . + 'Magento\Framework\Stdlib\DateTime\Timezone, Magento\Framework\Locale\Lists' + ), + array( + 'Magento\Core\Model\Locale\Hierarchy\Config\Converter', + 'Magento\Framework\Locale\Hierarchy\Config\Converter' + ), + array( + 'Magento\Core\Model\Locale\Hierarchy\Config\FileResolver', + 'Magento\Framework\Locale\Hierarchy\Config\FileResolver' + ), + array('Magento\Core\Model\Locale\Hierarchy\Config\Reader', 'Magento\Framework\Locale\Hierarchy\Config\Reader'), + array( + 'Magento\Core\Model\Locale\Hierarchy\Config\SchemaLocator', + 'Magento\Framework\Locale\Hierarchy\Config\SchemaLocator' + ), + array('Magento\Core\Model\Locale\Config', 'Magento\Framework\Locale\Config'), + array('Magento\Core\Model\Locale\Validator', 'Magento\Framework\Locale\Validator'), + array('Magento\Core\Model\Date', 'Magento\Framework\Stdlib\DateTime\DateTime'), array('Magento\Shipping\Model\Config\Source\Flatrate', 'Magento\OfflineShipping\Model\Config\Source\Flatrate'), array('Magento\Shipping\Model\Carrier\Flatrate', 'Magento\OfflineShipping\Model\Carrier\Flatrate'), array('Magento\Usa\Block\Adminhtml\Dhl\Unitofmeasure', 'Magento\Dhl\Block\Adminhtml\Unitofmeasure'), @@ -2130,7 +2206,7 @@ 'Magento\Usa\Model\Shipping\Carrier\AbstractCarrier\Source\Requesttype', 'Magento\Shipping\Model\Config\Source\Online\Requesttype' ), - array('Magento\Catalog\Helper\Product\Url', 'Magento\Filter\Translit'), + array('Magento\Catalog\Helper\Product\Url', 'Magento\Framework\Filter\Translit'), array('Magento\Catalog\Model\Product\Indexer\Price'), array('Magento\Catalog\Model\Resource\Product\Indexer\Price'), ['Magento\PubSub'], // unused library code which was removed @@ -2152,10 +2228,10 @@ 'Magento\LauncherInterface', 'Magento\Framework\AppInterface', ), - array('Magento\Convert\ConvertException'), - array('Magento\Convert\Container\AbstractContainer'), - array('Magento\Convert\Mapper\Column'), - array('Magento\Convert\Mapper\MapperInterface'), + array('Magento\Framework\Convert\ConvertException'), + array('Magento\Framework\Convert\Container\AbstractContainer'), + array('Magento\Framework\Convert\Mapper\Column'), + array('Magento\Framework\Convert\Mapper\MapperInterface'), ['Magento\Core\Controller\Ajax', 'Magento\Translation\Controller\Ajax'], ['Magento\Core\Helper\Translate', 'Magento\Translation\Helper\Data'], ['Magento\Core\Model\Translate\Inline\Config', 'Magento\Translation\Model\Inline\Config'], @@ -2164,11 +2240,11 @@ ['Magento\Core\Model\Resource\Translate', 'Magento\Translation\Model\Resource\Translate'], ['Magento\Core\Model\Translate\String', 'Magento\Translation\Model\String'], ['Magento\Translation\Helper\Data'], - ['Magento\Translate\Factory'], + ['Magento\Framework\Translate\Factory'], ['Magento\Backend\Model\Translate'], ['Magento\DesignEditor\Model\Translate\InlineVde', 'Magento\DesignEditor\Model\Translate\Inline'], ['Magento\Backend\Model\Translate\Inline\ConfigFactory'], - ['Magento\Translate\Inline\ConfigFactory'], + ['Magento\Framework\Translate\Inline\ConfigFactory'], ['Magento\Bundle\Model\Price\Index'], ['Magento\Bundle\Model\Resource\Price\Index'], array('Magento\Core\Model\Template', 'Magento\Email\Model\AbstractTemplate'), @@ -2240,7 +2316,7 @@ ['Magento\Core\Model\Store', 'Magento\Store\Model\Store'], ['Magento\Core\Model\Store\Exception', 'Magento\Store\Model\Exception'], ['Magento\Core\Model\Store\Group', 'Magento\Store\Model\Group'], - ['Magento\Core\Model\Store\Group\Factory', 'Magento\Store\Model\Group\Factory'], + ['Magento\Core\Model\Store\Group\Factory', 'Magento\Store\Model\GroupFactory'], ['Magento\Core\Model\Store\Storage\Db', 'Magento\Store\Model\Storage\Db'], ['Magento\Core\Model\Store\Storage\DefaultStorage', 'Magento\Store\Model\Storage\DefaultStorage'], ['Magento\Core\Model\Store\StorageFactory', 'Magento\Store\Model\StorageFactory'], @@ -2248,22 +2324,22 @@ ['Magento\Core\Model\StoreManagerInterface', 'Magento\Store\Model\StoreManagerInterface'], ['Magento\Core\Model\System\Store', 'Magento\Store\Model\System\Store'], ['Magento\Core\Model\Website', 'Magento\Store\Model\Website'], - ['Magento\Core\Model\Website\Factory', 'Magento\Store\Model\Website\Factory'], + ['Magento\Core\Model\Website\Factory', 'Magento\Store\Model\WebsiteFactory'], ['Magento\Framework\App\ReinitableConfigInterface', 'Magento\Framework\App\Config\ReinitableConfigInterface'], ['Magento\BaseScopeInterface', 'Magento\Framework\App\ScopeInterface'], ['Magento\BaseScopeResolverInterface', 'Magento\Framework\App\ScopeResolverInterface'], - ['Magento\Locale\ScopeConfigInterface'], - ['Magento\Core\Model\Module\Output\Config','Magento\Module\Output\Config'], - ['Magento\Core\Model\Resource\Setup\Context','Magento\Module\Setup\Context'], - ['Magento\Core\Model\Resource\Setup\Migration','Magento\Module\Setup\Migration'], + ['Magento\Framework\Locale\ScopeConfigInterface'], + ['Magento\Core\Model\Module\Output\Config','Magento\Framework\Module\Output\Config'], + ['Magento\Core\Model\Resource\Setup\Context','Magento\Framework\Module\Setup\Context'], + ['Magento\Core\Model\Resource\Setup\Migration','Magento\Framework\Module\Setup\Migration'], ['Magento\Core\Model\Resource\Setup\Generic'], ['Magento\Newsletter\Model\Resource\Setup'], ['Magento\SalesRule\Model\Resource\Setup'], - array('Magento\Core\Model\Session', 'Magento\Session\Generic'), - array('Magento\Core\Model\Session\Config', 'Magento\Session\Config'), - array('Magento\Core\Model\Session\SidResolver', 'Magento\Session\SidResolver'), - array('Magento\Core\Model\Session\Validator', 'Magento\Session\Validator'), - ['Magento\Core\Block\Formkey', 'Magento\View\Element\FormKey'], + array('Magento\Core\Model\Session', 'Magento\Framework\Session\Generic'), + array('Magento\Core\Model\Session\Config', 'Magento\Framework\Session\Config'), + array('Magento\Core\Model\Session\SidResolver', 'Magento\Framework\Session\SidResolver'), + array('Magento\Core\Model\Session\Validator', 'Magento\Framework\Session\Validator'), + ['Magento\Core\Block\Formkey', 'Magento\Framework\View\Element\FormKey'], ['Magento\Rating\Helper\Data', 'Magento\Review\Helper\Data'], ['Magento\Rating\Controller\Adminhtml\Index', 'Magento\Review\Controller\Adminhtml\Rating'], ['Magento\Rating\Block\Entity\Detailed', 'Magento\Review\Block\Rating\Entity\Detailed'], @@ -2292,6 +2368,23 @@ ['Magento\Rating\Model\Resource\Rating', 'Magento\Review\Model\Resource\Rating'], ['Magento\Rating\Model\Rating\Option', 'Magento\Review\Model\Rating\Option'], ['Magento\Rating\Model\Observer'], + ['Magento\Core\Model\App\Area\CacheIdentifierPlugin', 'Magento\PageCache\App\CacheIdentifierPlugin'], + ['Magento\Core\Model\App\Area', 'Magento\Framework\App\Area'], + ['Magento\Core\Model\App\Area\DesignExceptions', 'Magento\Framework\View\DesignExceptions'], + ['Magento\Checkout\Block\Adminhtml\Agreement', 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement'], + ['Magento\Checkout\Block\Adminhtml\Agreement\Edit', 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement\Edit'], + [ + 'Magento\Checkout\Block\Adminhtml\Agreement\Edit\Form', + 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement\Edit\Form' + ], + ['Magento\Checkout\Block\Adminhtml\Agreement\Grid', 'Magento\CheckoutAgreements\Block\Adminhtml\Agreement\Grid'], + ['Magento\Checkout\Block\Agreements', 'Magento\CheckoutAgreements\Block\Agreements'], + ['Magento\Checkout\Controller\Adminhtml\Agreement', 'Magento\CheckoutAgreements\Controller\Adminhtml\Agreement'], + ['Magento\Checkout\Model\Resource\Agreement', 'Magento\CheckoutAgreements\Model\Resource\Agreement'], + [ + 'Magento\Checkout\Model\Resource\Agreement\Collection', + 'Magento\CheckoutAgreements\Model\Resource\Agreement\Collection' + ], array('Magento\Sales\Block\Adminhtml\Invoice\Grid'), array('Magento\Sales\Block\Adminhtml\Shipment\Grid'), array('Magento\Sales\Block\Adminhtml\Creditmemo\Grid'), @@ -2302,8 +2395,102 @@ 'Magento\Framework\App\FrontController\Plugin\Clickjacking', 'X-Frame-Options HTTP header setting moved to server configuration' ], - ['Magento\Backend\Model\Translate\Inline', 'Magento\Translate\Inline'], + ['Magento\Backend\Model\Translate\Inline', 'Magento\Framework\Translate\Inline'], ['Magento\Backend\Model\Resource\Translate', 'Magento\Translation\Model\Resource\Translate'], ['Magento\Backend\Model\Resource\Translate\String', 'Magento\Translation\Model\Resource\String'], - ['Magento\Core\Model\Layout', 'Magento\View\Layout'], + ['Magento\Core\Model\Layout', 'Magento\Framework\View\Layout'], + ['Magento\Backup\Archive\Tar', 'Magento\Framework\Backup\Archive\Tar'], + ['Magento\Backup\Db\BackupDbInterface', 'Magento\Framework\Backup\Db\BackupDbInterface'], + ['Magento\Backup\Db\BackupFactory', 'Magento\Framework\Backup\Db\BackupFactory'], + ['Magento\Backup\Db\BackupInterface', 'Magento\Framework\Backup\Db\BackupInterface'], + ['Magento\Backup\Exception\CantLoadSnapshot', 'Magento\Framework\Backup\Exception\CantLoadSnapshot'], + ['Magento\Backup\Exception\FtpConnectionFailed', 'Magento\Framework\Backup\Exception\FtpConnectionFailed'], + ['Magento\Backup\Exception\FtpValidationFailed', 'Magento\Framework\Backup\Exception\FtpValidationFailed'], + ['Magento\Backup\Exception\NotEnoughFreeSpace', 'Magento\Framework\Backup\Exception\NotEnoughFreeSpace'], + ['Magento\Backup\Exception\NotEnoughPermissions', 'Magento\Framework\Backup\Exception\NotEnoughPermissions'], + ['Magento\Backup\Filesystem\Iterator\File', 'Magento\Framework\Backup\Filesystem\Iterator\File'], + ['Magento\Backup\Filesystem\Iterator\Filter', 'Magento\Framework\Backup\Filesystem\Iterator\Filter'], + [ + 'Magento\Backup\Filesystem\Rollback\AbstractRollback', + 'Magento\Framework\Backup\Filesystem\Rollback\AbstractRollback' + ], + ['Magento\Backup\Filesystem\Rollback\Fs', 'Magento\Framework\Backup\Filesystem\Rollback\Fs'], + ['Magento\Backup\Filesystem\Rollback\Ftp', 'Magento\Framework\Backup\Filesystem\Rollback\Ftp'], + ['Magento\Backup\Filesystem\Helper', 'Magento\Framework\Backup\Filesystem\Helper'], + ['Magento\Backup\AbstractBackup', 'Magento\Framework\Backup\AbstractBackup'], + ['Magento\Backup\BackupException', 'Magento\Framework\Backup\BackupException'], + ['Magento\Backup\BackupInterface', 'Magento\Framework\Backup\BackupInterface'], + ['Magento\Backup\Db', 'Magento\Framework\Backup\Db'], + ['Magento\Backup\Factory', 'Magento\Framework\Backup\Factory'], + ['Magento\Backup\Filesystem', 'Magento\Framework\Backup\Filesystem'], + ['Magento\Backup\Media', 'Magento\Framework\Backup\Media'], + ['Magento\Backup\Nomedia', 'Magento\Framework\Backup\Nomedia'], + ['Magento\Backup\Snapshot', 'Magento\Framework\Backup\Snapshot'], + ['Magento\Acl', 'Magento\Framework\Acl'], + ['Magento\AclFactory', 'Magento\Framework\AclFactory'], + ['Magento\AppInterface', 'Magento\Framework\AppInterface'], + ['Magento\Archive', 'Magento\Framework\Archive'], + ['Magento\Authorization', 'Magento\Framework\Authorization'], + ['Magento\AuthorizationInterface', 'Magento\Framework\AuthorizationInterface'], + ['Magento\Event', 'Magento\Framework\Event'], + ['Magento\EventFactory', 'Magento\Framework\EventFactory'], + ['Magento\Exception', 'Magento\Framework\Exception'], + ['Magento\Filesystem', 'Magento\Framework\Filesystem'], + ['Magento\ObjectManager', 'Magento\Framework\ObjectManager'], + ['Magento\Translate', 'Magento\Framework\Translate'], + ['Magento\TranslateInterface', 'Magento\Framework\TranslateInterface'], + ['Magento\Locale', 'Magento\Framework\Locale'], + ['Magento\LocaleFactory', 'Magento\Framework\LocaleFactory'], + ['Magento\LocaleInterface', 'Magento\Framework\LocaleInterface'], + ['Magento\Logger', 'Magento\Framework\Logger'], + ['Magento\Phrase', 'Magento\Framework\Phrase'], + ['Magento\Pear', 'Magento\Framework\Pear'], + ['Magento\Connect\Channel\Generator', 'Magento\Framework\Connect\Channel\Generator'], + ['Magento\Connect\Channel\VO', 'Magento\Framework\Connect\Channel\VO'], + ['Magento\Connect\Command\Channels', 'Magento\Framework\Connect\Command\Channels'], + ['Magento\Connect\Command\Config', 'Magento\Framework\Connect\Command\Config'], + ['Magento\Connect\Command\Install', 'Magento\Framework\Connect\Command\Install'], + ['Magento\Connect\Command\Package', 'Magento\Framework\Connect\Command\Package'], + ['Magento\Connect\Command\Registry', 'Magento\Framework\Connect\Command\Registry'], + ['Magento\Connect\Command\Remote', 'Magento\Framework\Connect\Command\Remote'], + ['Magento\Connect\Frontend\CLI', 'Magento\Framework\Connect\Frontend\CLI'], + ['Magento\Connect\Loader\Ftp', 'Magento\Framework\Connect\Loader\Ftp'], + ['Magento\Connect\Package\Hotfix', 'Magento\Framework\Connect\Package\Hotfix'], + ['Magento\Connect\Package\Reader', 'Magento\Framework\Connect\Package\Reader'], + ['Magento\Connect\Package\Target', 'Magento\Framework\Connect\Package\Target'], + ['Magento\Connect\Package\VO', 'Magento\Framework\Connect\Package\VO'], + ['Magento\Connect\Package\Writer', 'Magento\Framework\Connect\Package\Writer'], + ['Magento\Connect\Structures\Graph', 'Magento\Framework\Connect\Structures\Graph'], + ['Magento\Connect\Structures\Node', 'Magento\Framework\Connect\Structures\Node'], + ['Magento\Connect\Command', 'Magento\Framework\Connect\Command'], + ['Magento\Connect\Config', 'Magento\Framework\Connect\Config'], + ['Magento\Connect\Converter', 'Magento\Framework\Connect\Converter'], + ['Magento\Connect\Frontend', 'Magento\Framework\Connect\Frontend'], + ['Magento\Connect\Ftp', 'Magento\Framework\Connect\Ftp'], + ['Magento\Connect\Loader', 'Magento\Framework\Connect\Loader'], + ['Magento\Connect\Package', 'Magento\Framework\Connect\Package'], + ['Magento\Connect\Packager', 'Magento\Framework\Connect\Packager'], + ['Magento\Connect\Rest', 'Magento\Framework\Connect\Rest'], + ['Magento\Connect\Singleconfig', 'Magento\Framework\Connect\Singleconfig'], + ['Magento\Connect\Validator', 'Magento\Framework\Connect\Validator'], + ['Magento\Profiler', 'Magento\Framework\Profiler'], + ['Magento\Shell', 'Magento\Framework\Shell'], + ['Magento\Url', 'Magento\Framework\Url'], + ['Magento\UrlFactory', 'Magento\Framework\UrlFactory'], + ['Magento\UrlInterface', 'Magento\Framework\UrlInterface'], + ['Magento\Validator', 'Magento\Framework\Validator'], + ['Magento\ValidatorFactory', 'Magento\Framework\ValidatorFactory'], + ['Magento\Flag', 'Magento\Framework\Flag'], + ['Magento\FlagFactory', 'Magento\Framework\FlagFactory'], + ['Magento\Image', 'Magento\Framework\Image'], + ['Magento\Object', 'Magento\Framework\Object'], + ['Magento\Currency', 'Magento\Framework\Currency'], + ['Magento\CurrencyFactory', 'Magento\Framework\CurrencyFactory'], + ['Magento\CurrencyInterface', 'Magento\Framework\CurrencyInterface'], + ['Magento\Debug', 'Magento\Framework\Debug'], + ['Magento\Escaper', 'Magento\Framework\Escaper'], + ['Magento\OsInfo', 'Magento\Framework\OsInfo'], + ['Magento\Registry', 'Magento\Framework\Registry'], + ['Magento\Util', 'Magento\Framework\Util'], + ['Magento\BootstrapException', 'Magento\Framework\BootstrapException'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php index 65c92db0135b9..7eafbe4664640 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_config_nodes.php @@ -29,10 +29,10 @@ '/config/global/fieldsets' => '', '/config/global/cache/betatypes' => '', '/config/admin/fieldsets' => '', - '/config/general/locale' => 'This configuration moved to Di configuration of \Magento\Locale\ConfigInterface', + '/config/general/locale' => 'This configuration moved to Di configuration of \Magento\Framework\Locale\ConfigInterface', '/config/global/can_use_base_url' => 'This configuration moved to Di configuration of \Magento\Backend\App\Action\Context class', - '/config/global/locale/allow/codes' => 'This configuration moved to Di configuration of \Magento\Locale\ConfigInterface', - '/config/global/locale/allow/currencies' => 'This configuration moved to Di configuration of \Magento\Locale\ConfigInterface', + '/config/global/locale/allow/codes' => 'This configuration moved to Di configuration of \Magento\Framework\Locale\ConfigInterface', + '/config/global/locale/allow/currencies' => 'This configuration moved to Di configuration of \Magento\Framework\Locale\ConfigInterface', '/config/global/mime/types' => 'This configuration moved to Di configuration for \Magento\Downloadable\Helper\File class', '/config/global/models/*/deprecatedNode' => '', '/config/global/models/*/entities/*/table' => '', @@ -60,7 +60,7 @@ '/config/global/index' => 'This configuration moved to indexers.xml file', '/config/global/catalogrule' => 'This configuration moved to Di configuration of \Magento\CatalogRule\Model\Rule', '/config/global/salesrule' => 'This configuration moved to Di configuration of \Magento\SalesRule\Helper\Coupon', - '/config/global/session' => 'This configuration moved to Di configuration of \Magento\Session\Validator', + '/config/global/session' => 'This configuration moved to Di configuration of \Magento\Framework\Session\Validator', '/config/global/ignore_user_agents' => 'This configuration moved to Di configuration of \Magento\Log\Model\Visitor', '/config/global/request' => 'This configuration moved to Di configuration of \Magento\Framework\App\RequestInterface', '/config/global/secure_url' => 'This configuration moved to Di configuration of \Magento\Core\Model\Url\SecurityInfo', diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php index 55659da47abad..e3225da0afa98 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php @@ -34,10 +34,10 @@ array('CACHE_TAG', 'Magento\Framework\AppInterface'), array( 'CACHE_TAG', - 'Magento\Model\Resource\Db\Collection\AbstractCollection', + 'Magento\Framework\Model\Resource\Db\Collection\AbstractCollection', 'Magento_Core_Model_Cache_Type_Collection::CACHE_TAG' ), - array('CACHE_TAG', 'Magento\Translate', 'Magento_Core_Model_Cache_Type_Translate::CACHE_TAG'), + array('CACHE_TAG', 'Magento\Framework\Translate', 'Magento_Core_Model_Cache_Type_Translate::CACHE_TAG'), array('CACHE_TAG', 'Magento\Rss\Block\Catalog\NotifyStock'), array('CACHE_TAG', 'Magento\Rss\Block\Catalog\Review'), array('CACHE_TAG', 'Magento\Rss\Block\Order\NewOrder'), @@ -69,23 +69,23 @@ 'Mage_Core_Model_Resource', 'Magento_Core_Model_Config_Resource::DEFAULT_WRITE_CONNECTION' ), - array('DEFAULT_CURRENCY', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_CURRENCY'), + array('DEFAULT_CURRENCY', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_CURRENCY'), array('DEFAULT_READ_CONNECTION', 'Magento\Framework\App\Resource\Config'), array('DEFAULT_WRITE_CONNECTION', 'Magento\Framework\App\Resource\Config'), array('DEFAULT_ERROR_HANDLER', 'Mage'), - array('DEFAULT_LOCALE', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_LOCALE'), + array('DEFAULT_LOCALE', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_LOCALE'), array('DEFAULT_THEME_NAME', 'Magento\Core\Model\Design\PackageInterface'), array('DEFAULT_THEME_NAME', 'Magento\Core\Model\Design\Package'), - array('DEFAULT_TIMEZONE', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_TIMEZONE'), + array('DEFAULT_TIMEZONE', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::DEFAULT_TIMEZONE'), array('DEFAULT_STORE_ID', 'Magento\Catalog\Model\AbstractModel', 'Magento\Store\Model\Store::DEFAULT_STORE_ID'), array('DEFAULT_VALUE_TABLE_PREFIX'), array('ENTITY_PRODUCT', 'Magento\Review\Model\Review'), array('EXCEPTION_CODE_IS_GROUPED_PRODUCT'), array('FALLBACK_MAP_DIR', 'Magento\Core\Model\Design\PackageInterface'), - array('FORMAT_TYPE_FULL', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_FULL'), - array('FORMAT_TYPE_LONG', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_LONG'), - array('FORMAT_TYPE_MEDIUM', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_MEDIUM'), - array('FORMAT_TYPE_SHORT', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_SHORT'), + array('FORMAT_TYPE_FULL', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_FULL'), + array('FORMAT_TYPE_LONG', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_LONG'), + array('FORMAT_TYPE_MEDIUM', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_MEDIUM'), + array('FORMAT_TYPE_SHORT', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::FORMAT_TYPE_SHORT'), array('GALLERY_IMAGE_TABLE', 'Magento\Catalog\Model\Resource\Product\Attribute\Backend\Media'), array('HASH_ALGO'), array('INIT_OPTION_DIRS', 'Magento\Core\Model\App', 'Magento_Core_Model_App::PARAM_APP_DIRS'), @@ -113,23 +113,23 @@ 'Magento\Core\Model\Design\PackageInterface', 'Magento_Core_Model_Design_Package::PUBLIC_MODULE_DIR' ), - array('PUBLIC_MODULE_DIR', 'Magento\View\Publisher', 'Magento\View\Publisher\FileInterface::PUBLIC_MODULE_DIR'), + array('PUBLIC_MODULE_DIR', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\Publisher\FileInterface::PUBLIC_MODULE_DIR'), array( 'PUBLIC_THEME_DIR', 'Magento\Core\Model\Design\PackageInterface', 'Magento_Core_Model_Design_Package::PUBLIC_THEME_DIR' ), - array('PUBLIC_THEME_DIR', 'Magento\View\Publisher', 'Magento\View\Publisher\FileInterface::PUBLIC_THEME_DIR'), + array('PUBLIC_THEME_DIR', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\Publisher\FileInterface::PUBLIC_THEME_DIR'), array( 'PUBLIC_VIEW_DIR', 'Magento\Core\Model\Design\PackageInterface', 'Magento_Core_Model_Design_Package::PUBLIC_VIEW_DIR' ), - array('PUBLIC_VIEW_DIR', 'Magento\View\Publisher', 'Magento\View\Publisher\FileInterface::PUBLIC_VIEW_DIR'), + array('PUBLIC_VIEW_DIR', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\Publisher\FileInterface::PUBLIC_VIEW_DIR'), array('REGISTRY_FORM_PARAMS_KEY', null, 'direct value'), - array('RULE_PERM_ALLOW', '\Magento\Math\Random'), - array('RULE_PERM_DENY', '\Magento\Math\Random'), - array('RULE_PERM_INHERIT', '\Magento\Math\Random'), + array('RULE_PERM_ALLOW', '\Magento\Framework\Math\Random'), + array('RULE_PERM_DENY', '\Magento\Framework\Math\Random'), + array('RULE_PERM_INHERIT', '\Magento\Framework\Math\Random'), array('SCOPE_TYPE_GROUP', 'Magento\Core\Model\App', 'Magento\Store\Model\ScopeInterface::SCOPE_GROUP'), array('SCOPE_TYPE_STORE', 'Magento\Core\Model\App', 'Magento\Store\Model\ScopeInterface::SCOPE_STORE'), array( @@ -162,10 +162,10 @@ ), array( 'XML_PATH_ALLOW_CURRENCIES', - 'Magento\Locale', + 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::XML_PATH_ALLOW_CURRENCIES' ), - array('XML_PATH_ALLOW_CODES', 'Magento\LocaleInterface'), + array('XML_PATH_ALLOW_CODES', 'Magento\Framework\LocaleInterface'), array( 'XML_PATH_ALLOW_DUPLICATION', 'Magento\Core\Model\Design\PackageInterface', @@ -179,19 +179,19 @@ array('XML_PATH_COUNTRY_DEFAULT', 'Magento\Paypal\Model\System\Config\Backend\MerchantCountry'), array( 'XML_PATH_DEBUG_TEMPLATE_HINTS', - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', 'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS' ), array( 'XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS', - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', 'Magento\Core\Model\TemplateEngine\Plugin::XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS' ), - array('XML_PATH_DEFAULT_COUNTRY', 'Magento\Locale'), - array('XML_PATH_DEFAULT_LOCALE', 'Magento\Locale', 'Magento_Core_Model_LocaleInterface::XML_PATH_DEFAULT_LOCALE'), + array('XML_PATH_DEFAULT_COUNTRY', 'Magento\Framework\Locale'), + array('XML_PATH_DEFAULT_LOCALE', 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::XML_PATH_DEFAULT_LOCALE'), array( 'XML_PATH_DEFAULT_TIMEZONE', - 'Magento\Locale', + 'Magento\Framework\Locale', 'Magento_Core_Model_LocaleInterface::XML_PATH_DEFAULT_TIMEZONE' ), array('XML_PATH_INDEXER_DATA', 'Magento\Index\Model\Process'), @@ -331,27 +331,27 @@ array('XML_PATH_FRONT_NAME', 'Magento\DesignEditor\Helper\Data'), array('XML_PATH_DISABLED_CACHE_TYPES', 'Magento\DesignEditor\Helper\Data'), array('XML_PATH_ENCRYPTION_MODEL', 'Magento\Core\Helper\Data'), - array('CONFIG_KEY_PATH_TO_MAP_FILE', 'Magento\Module\Setup\Migration'), + array('CONFIG_KEY_PATH_TO_MAP_FILE', 'Magento\Framework\Module\Setup\Migration'), array('XML_PATH_SKIP_PROCESS_MODULES_UPDATES', 'Magento\Framework\App\UpdaterInterface'), - array('XML_PATH_IGNORE_DEV_MODE', 'Magento\Module\UpdaterInterface'), - array('XML_PATH_SKIP_PROCESS_MODULES_UPDATES', 'Magento\Module\UpdaterInterface'), + array('XML_PATH_IGNORE_DEV_MODE', 'Magento\Framework\Module\UpdaterInterface'), + array('XML_PATH_SKIP_PROCESS_MODULES_UPDATES', 'Magento\Framework\Module\UpdaterInterface'), array('XML_PATH_USE_CUSTOM_ADMIN_PATH', 'Magento\Backend\Helper\Data'), array('XML_PATH_CUSTOM_ADMIN_PATH', 'Magento\Backend\Helper\Data'), array('XML_PATH_BACKEND_AREA_FRONTNAME', 'Magento\Backend\Helper\Data'), array('PARAM_BACKEND_FRONT_NAME', 'Magento\Backend\Helper\Data'), - array('CHARS_LOWERS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_LOWERS'), - array('CHARS_UPPERS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_UPPERS'), - array('CHARS_DIGITS', '\Magento\Core\Helper\Data', '\Magento\Math\Random::CHARS_DIGITS'), + array('CHARS_LOWERS', '\Magento\Core\Helper\Data', '\Magento\Framework\Math\Random::CHARS_LOWERS'), + array('CHARS_UPPERS', '\Magento\Core\Helper\Data', '\Magento\Framework\Math\Random::CHARS_UPPERS'), + array('CHARS_DIGITS', '\Magento\Core\Helper\Data', '\Magento\Framework\Math\Random::CHARS_DIGITS'), array('CHARS_SPECIALS', '\Magento\Core\Helper\Data'), - array('CHARS_SPECIALS', '\Magento\Math\Random'), + array('CHARS_SPECIALS', '\Magento\Framework\Math\Random'), array('CHARS_PASSWORD_LOWERS', '\Magento\Core\Helper\Data'), - array('CHARS_PASSWORD_LOWERS', '\Magento\Math\Random'), + array('CHARS_PASSWORD_LOWERS', '\Magento\Framework\Math\Random'), array('CHARS_PASSWORD_UPPERS', '\Magento\Core\Helper\Data'), - array('CHARS_PASSWORD_UPPERS', '\Magento\Math\Random'), + array('CHARS_PASSWORD_UPPERS', '\Magento\Framework\Math\Random'), array('CHARS_PASSWORD_DIGITS', '\Magento\Core\Helper\Data'), - array('CHARS_PASSWORD_DIGITS', '\Magento\Math\Random'), + array('CHARS_PASSWORD_DIGITS', '\Magento\Framework\Math\Random'), array('CHARS_PASSWORD_SPECIALS', '\Magento\Core\Helper\Data'), - array('CHARS_PASSWORD_SPECIALS', '\Magento\Math\Random'), + array('CHARS_PASSWORD_SPECIALS', '\Magento\Framework\Math\Random'), array('XML_NODE_REMOTE_ADDR_HEADERS', '\Magento\Core\Helper\Http'), array( 'XML_PATH_EU_COUNTRIES_LIST', @@ -378,11 +378,11 @@ '\Magento\Core\Helper\Data', '\Magento\Catalog\Helper\Catalog::XML_PATH_PUBLIC_FILES_VALID_PATHS' ), - array('TYPE_PHYSICAL', '\Magento\Core\Model\Theme', '\Magento\View\Design\ThemeInterface::TYPE_PHYSICAL'), - array('TYPE_VIRTUAL', '\Magento\Core\Model\Theme', '\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL'), - array('TYPE_STAGING', '\Magento\Core\Model\Theme', '\Magento\View\Design\ThemeInterface::TYPE_STAGING'), - array('PATH_SEPARATOR', '\Magento\Core\Model\Theme', '\Magento\View\Design\ThemeInterface::PATH_SEPARATOR'), - array('CODE_SEPARATOR', '\Magento\Core\Model\Theme', '\Magento\View\Design\ThemeInterface::CODE_SEPARATOR'), + array('TYPE_PHYSICAL', '\Magento\Core\Model\Theme', '\Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL'), + array('TYPE_VIRTUAL', '\Magento\Core\Model\Theme', '\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL'), + array('TYPE_STAGING', '\Magento\Core\Model\Theme', '\Magento\Framework\View\Design\ThemeInterface::TYPE_STAGING'), + array('PATH_SEPARATOR', '\Magento\Core\Model\Theme', '\Magento\Framework\View\Design\ThemeInterface::PATH_SEPARATOR'), + array('CODE_SEPARATOR', '\Magento\Core\Model\Theme', '\Magento\Framework\View\Design\ThemeInterface::CODE_SEPARATOR'), array( 'XML_PATH_IMAGE_ADAPTER', '\Magento\Core\Model\Image\AdapterFactory', @@ -391,12 +391,12 @@ array( 'ADAPTER_IM', '\Magento\Core\Model\Image\AdapterFactory', - '\Magento\Image\Adapter\AdapterInterface::ADAPTER_IM' + '\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_IM' ), array( 'ADAPTER_GD2', '\Magento\Core\Model\Image\AdapterFactory', - '\Magento\Image\Adapter\AdapterInterface::ADAPTER_GD2' + '\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2' ), array('XML_PATH_IMAGE_TYPES', 'Magento\Adminhtml\Block\Catalog\Product\Frontend\Product\Watermark'), array('XML_PATH_WEBHOOK', 'Magento\Webhook\Model\Source\Hook'), @@ -405,31 +405,31 @@ array( 'XML_PATH_USE_FRONTEND_SID', '\Magento\Core\Model\Session\AbstractSession', - '\Magento\Session\SidResolver::XML_PATH_USE_FRONTEND_SID' + '\Magento\Framework\Session\SidResolver::XML_PATH_USE_FRONTEND_SID' ), array( 'SESSION_ID_QUERY_PARAM', '\Magento\Core\Model\Session\AbstractSession', - '\Magento\Session\SidResolverInterface::SESSION_ID_QUERY_PARAM' + '\Magento\Framework\Session\SidResolverInterface::SESSION_ID_QUERY_PARAM' ), array( 'XML_PATH_COOKIE_DOMAIN', - '\Magento\Stdlib\Cookie', + '\Magento\Framework\Stdlib\Cookie', '\Magento\Core\Model\Session\Config::XML_PATH_COOKIE_DOMAIN' ), array( 'XML_PATH_COOKIE_PATH', - '\Magento\Stdlib\Cookie', + '\Magento\Framework\Stdlib\Cookie', '\Magento\Core\Model\Session\Config::XML_PATH_COOKIE_PATH' ), array( 'XML_PATH_COOKIE_LIFETIME', - '\Magento\Stdlib\Cookie', + '\Magento\Framework\Stdlib\Cookie', '\Magento\Core\Model\Session\Config::XML_PATH_COOKIE_LIFETIME' ), array( 'XML_PATH_COOKIE_HTTPONLY', - '\Magento\Stdlib\Cookie', + '\Magento\Framework\Stdlib\Cookie', '\Magento\Core\Model\Session\Config::XML_PATH_COOKIE_HTTPONLY' ), array( @@ -465,22 +465,22 @@ ), array( 'XML_PATH_MERGE_CSS_FILES', - 'Magento\View\Asset\MergeService', + 'Magento\Framework\View\Asset\MergeService', 'Magento\Core\Model\Asset\Config::XML_PATH_MERGE_CSS_FILES' ), array( 'XML_PATH_MERGE_JS_FILES', - 'Magento\View\Asset\MergeService', + 'Magento\Framework\View\Asset\MergeService', 'Magento\Core\Model\Asset\Config::XML_PATH_MERGE_JS_FILES' ), array( 'XML_PATH_MINIFICATION_ENABLED', - 'Magento\View\Asset\MinifyService', + 'Magento\Framework\View\Asset\MinifyService', 'Magento\Core\Model\Asset\Config::XML_PATH_MINIFICATION_ENABLED' ), array( 'XML_PATH_MINIFICATION_ADAPTER', - 'Magento\View\Asset\MinifyService', + 'Magento\Framework\View\Asset\MinifyService', 'Magento\Core\Model\Asset\Config::XML_PATH_MINIFICATION_ADAPTER' ), array( @@ -503,23 +503,23 @@ 'Magento\GroupedProduct\Block\Cart\Item\Renderer\Grouped', 'Magento\GroupedProduct\Block\Cart\Item\Renderer\Grouped::CONFIG_THUMBNAIL_SOURCE' ), - array('TYPE_BLOCK', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_CONTAINER', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_ACTION', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_ARGUMENTS', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_ARGUMENT', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_REFERENCE_BLOCK', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_REFERENCE_CONTAINER', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_REMOVE', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('TYPE_MOVE', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('CONTAINER_OPT_HTML_TAG', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('CONTAINER_OPT_HTML_CLASS', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('CONTAINER_OPT_HTML_ID', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('CONTAINER_OPT_LABEL', 'Magento\View\Layout', '\Magento\View\Layout\Element'), - array('XML_PATH_THEME_ID', 'Magento\Core\Model\View\Design', '\Magento\View\DesignInterface::XML_PATH_THEME_ID'), + array('TYPE_BLOCK', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_CONTAINER', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_ACTION', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_ARGUMENTS', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_ARGUMENT', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_REFERENCE_BLOCK', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_REFERENCE_CONTAINER', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_REMOVE', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('TYPE_MOVE', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('CONTAINER_OPT_HTML_TAG', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('CONTAINER_OPT_HTML_CLASS', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('CONTAINER_OPT_HTML_ID', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('CONTAINER_OPT_LABEL', 'Magento\Framework\View\Layout', '\Magento\Framework\View\Layout\Element'), + array('XML_PATH_THEME_ID', 'Magento\Core\Model\View\Design', '\Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID'), array('UPLOAD_ROOT', 'Magento\Backend\Model\Config\Backend\Logo'), array('UPLOAD_ROOT', 'Magento\Backend\Model\Config\Backend\Favicon'), - array('DIRECTORY_SEPARATOR', 'Magento\Filesystem'), + array('DIRECTORY_SEPARATOR', 'Magento\Framework\Filesystem'), array( 'MAX_QTY_VALUE', '\Magento\Catalog\Controller\Adminhtml\Product', @@ -535,28 +535,28 @@ '\Magento\Catalog\Model\Product\Type', '\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED' ), - array('PARAM_APP_URIS', 'Magento\Filesystem'), - array('ROOT', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::ROOT_DIR'), - array('APP', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::APP_DIR'), - array('MODULES', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::MODULES_DIR'), - array('THEMES', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::THEMES_DIR'), - array('CONFIG', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::CONFIG_DIR'), - array('LIB', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::LIB_DIR'), - array('LOCALE', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::LOCALE_DIR'), - array('PUB', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::PUB_DIR'), - array('PUB_LIB', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::PUB_LIB_DIR'), - array('MEDIA', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::MEDIA_DIR'), - array('STATIC_VIEW', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'), - array('PUB_VIEW_CACHE', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR'), - array('VAR_DIR', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem'), - array('TMP', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::TMP_DIR'), - array('CACHE', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::CACHE_DIR'), - array('LOG', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::LOG_DIR'), - array('SESSION', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::SESSION_DIR'), - array('DI', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::DI_DIR'), - array('GENERATION', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::GENERATION_DIR'), - array('UPLOAD', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::UPLOAD_DIR'), - array('SYS_TMP', '\Magento\Filesystem', '\Magento\Framework\App\Filesystem::SYS_TMP_DIR'), + array('PARAM_APP_URIS', 'Magento\Framework\Filesystem'), + array('ROOT', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::ROOT_DIR'), + array('APP', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::APP_DIR'), + array('MODULES', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::MODULES_DIR'), + array('THEMES', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::THEMES_DIR'), + array('CONFIG', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::CONFIG_DIR'), + array('LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LIB_DIR'), + array('LOCALE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LOCALE_DIR'), + array('PUB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::PUB_DIR'), + array('PUB_LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::PUB_LIB_DIR'), + array('MEDIA', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::MEDIA_DIR'), + array('STATIC_VIEW', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'), + array('PUB_VIEW_CACHE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::PUB_VIEW_CACHE_DIR'), + array('VAR_DIR', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem'), + array('TMP', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::TMP_DIR'), + array('CACHE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::CACHE_DIR'), + array('LOG', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LOG_DIR'), + array('SESSION', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::SESSION_DIR'), + array('DI', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::DI_DIR'), + array('GENERATION', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::GENERATION_DIR'), + array('UPLOAD', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::UPLOAD_DIR'), + array('SYS_TMP', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::SYS_TMP_DIR'), array('LAYOUT_NAVIGATION_CLASS_NAME', 'Magento\DesignEditor\Model\State'), array( 'TYPE_CONFIGURABLE', @@ -593,10 +593,10 @@ '\Magento\Catalog\Helper\Category\Flat', '\Magento\Catalog\Model\Indexer\Category\Flat\Config::XML_PATH_IS_ENABLED_FLAT_CATALOG_CATEGORY' ), - array('CSV_SEPARATOR', 'Magento\Translate'), - array('SCOPE_SEPARATOR', 'Magento\Translate'), - array('CONFIG_KEY_AREA', 'Magento\Translate'), - array('CONFIG_KEY_LOCALE', 'Magento\Translate'), - array('CONFIG_KEY_SCOPE', 'Magento\Translate'), - array('CONFIG_KEY_DESIGN_THEME', 'Magento\Translate'), + array('CSV_SEPARATOR', 'Magento\Framework\Translate'), + array('SCOPE_SEPARATOR', 'Magento\Framework\Translate'), + array('CONFIG_KEY_AREA', 'Magento\Framework\Translate'), + array('CONFIG_KEY_LOCALE', 'Magento\Framework\Translate'), + array('CONFIG_KEY_SCOPE', 'Magento\Framework\Translate'), + array('CONFIG_KEY_DESIGN_THEME', 'Magento\Framework\Translate'), ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php index 58a7f88878eb3..919d33e33acef 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php @@ -26,13 +26,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ return array( - array('__get', 'Magento\Object'), - array('__set', 'Magento\Object'), + array('__get', 'Magento\Framework\Object'), + array('__set', 'Magento\Framework\Object'), array('_addItem', 'Magento\Theme\Block\Html\Head'), array('_addLink', 'Magento\Customer\Block\Account\Link'), array('_addMinimalPrice', 'Magento\Catalog\Model\Resource\Product\Collection'), array('_addTaxPercents', 'Magento\Catalog\Model\Resource\Product\Collection'), - array('_afterSaveCommit', 'Magento\Model\AbstractModel'), + array('_afterSaveCommit', 'Magento\Framework\Model\AbstractModel'), array('_afterSetConfig', 'Magento\Eav\Model\Entity\AbstractEntity'), array('_aggregateByOrderCreatedAt', 'Magento\SalesRule\Model\Resource\Report\Rule'), array('_amountByCookies', 'Magento\Sendfriend\Model\Sendfriend'), @@ -56,13 +56,13 @@ 'Magento\Store\Model\StorageFactory::_checkCookieStore'), array('_checkGetStore', 'Magento\Core\Model\App'), array('_checkGetStore', 'Magento\Core\Model\Store\Storage\Db', - 'Magento\Store\Model\StorageFactory::_checkGetStore'), + 'Magento\Store\Model\StorageFactory::_checkRequestStore'), array('_checkUrlSettings', 'Magento\Backend\Controller\Adminhtml\Action'), array('_collectOrigData', 'Magento\Catalog\Model\Resource\AbstractResource'), array('_decodeInput', 'Magento\Catalog\Controller\Adminhtml\Product'), array('_emailOrderConfirmation', 'Magento\Checkout\Model\Type\AbstractType'), array('_escapeValue', 'Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilter'), - array('_extractData', 'Magento\ObjectManager\Config\Reader\Dom'), + array('_extractData', 'Magento\Framework\ObjectManager\Config\Reader\Dom'), array('_filterPostData', 'Magento\Catalog\Controller\Adminhtml\Product\Attribute'), array('_generateCssHtml', 'Magento\Theme\Block\Html\Head'), array('_generateJsHtml', 'Magento\Theme\Block\Html\Head'), @@ -84,16 +84,16 @@ array('_getConnenctionType', 'Magento\Install\Model\Installer\Db'), array('_getDateFromToHtml', 'Magento\ImportExport\Block\Adminhtml\Export\Filter'), array('_getDeclaredModuleFiles', 'Magento\Core\Model\Config'), - array('_getDesignChange', 'Magento\Core\Model\App\Area'), + array('_getDesignChange', 'Magento\Framework\App\Area'), array('_getDom', 'Magento\Backend\Model\Menu\Config'), array('_getExistingBasePopularity'), array('_getFieldTableAlias', 'Magento\Newsletter\Model\Resource\Subscriber\Collection'), - array('_getForeignKeyName', 'Magento\DB\Adapter\Pdo\Mysql'), + array('_getForeignKeyName', 'Magento\Framework\DB\Adapter\Pdo\Mysql'), array('_getGiftmessageSaveModel', 'Magento\Sales\Block\Adminhtml\Order\Create\Search\Grid'), array('_getGlobalAggregation'), array('_getGroupByDateFormat', 'Magento\Log\Model\Resource\Visitor\Collection'), - array('_getIdAttributes', 'Magento\ObjectManager\Config\Reader\Dom'), - array('_getInitialXml', 'Magento\ObjectManager\Config\Reader\Dom'), + array('_getIdAttributes', 'Magento\Framework\ObjectManager\Config\Reader\Dom'), + array('_getInitialXml', 'Magento\Framework\ObjectManager\Config\Reader\Dom'), array('_getInputHtml', 'Magento\ImportExport\Block\Adminhtml\Export\Filter'), array('_getItemPriceBlock', 'Magento\Wishlist\Block\AbstractBlock'), array('_getLabelForStore', 'Magento\Catalog\Model\Resource\Eav\Attribute'), @@ -133,7 +133,7 @@ array('_isApplyDesign', 'Magento\Catalog\Model\Design'), array('_isApplyFor', 'Magento\Catalog\Model\Design'), array('_isPositiveDecimalNumber', 'Magento\OfflineShipping\Model\Resource\Carrier\Tablerate'), - array('_isRuntimeValidated', 'Magento\ObjectManager\Config\Reader\Dom'), + array('_isRuntimeValidated', 'Magento\Framework\ObjectManager\Config\Reader\Dom'), array('_loadCache', 'Magento\Backend\Model\Menu\Config'), array('_loadCache', 'Magento\Core\Model\Config'), array('_loadDeclaredModules', 'Magento\Core\Model\Config'), @@ -216,7 +216,7 @@ array('addColumnInputName', 'Magento\Backend\Block\Widget\Grid\Serializer'), array('addColumnRender', 'Magento\Sales\Block\Adminhtml\Items\AbstractItems', 'setColumnRenders'), array('addConfigField', 'Magento\Core\Model\Resource\Setup'), - array('addConstraint', 'Magento\DB\Adapter\Pdo\Mysql'), + array('addConstraint', 'Magento\Framework\DB\Adapter\Pdo\Mysql'), array('addCss', 'Magento\Theme\Block\Html\Head'), array('addCssIe', 'Magento\Theme\Block\Html\Head'), array('addCustomerData', 'Magento\Catalog\Model\Product\Item', 'setCustomerId'), @@ -229,7 +229,7 @@ array('addItemRender', 'Magento\Sales\Block\Items\AbstractItems'), array('addJs', 'Magento\Theme\Block\Html\Head'), array('addJsIe', 'Magento\Theme\Block\Html\Head'), - array('addKey', 'Magento\DB\Adapter\Pdo\Mysql'), + array('addKey', 'Magento\Framework\DB\Adapter\Pdo\Mysql'), array('addLinkRel', 'Magento\Theme\Block\Html\Head'), array('addLogInLink', 'Magento\Customer\Block\Account\Link'), array('addModule', 'Magento\Core\App\Router\Base'), @@ -278,9 +278,9 @@ array('asSimplexml', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'), array('asString', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'), array('authAdmin'), - array('authFailed', '', '\Magento\HTTP\Authentication::setAuthenticationFailed'), + array('authFailed', '', '\Magento\Framework\HTTP\Authentication::setAuthenticationFailed'), array('authFrontend'), - array('authValidate', '', '\Magento\HTTP\Authentication::getCredentials'), + array('authValidate', '', '\Magento\Framework\HTTP\Authentication::getCredentials'), array('bundlesAction', 'Magento\Catalog\Controller\Adminhtml\Product'), array('calcTaxAmount', 'Magento\Sales\Model\Quote\Item\AbstractItem'), array('callbackQueryHook', 'Magento\Core\Model\Resource\Setup'), @@ -299,14 +299,18 @@ array('chechAllowedExtension'), array('checkConfigurableProducts', 'Magento\Eav\Model\Resource\Entity\Attribute\Collection'), array('checkDatabase', 'Magento\Install\Model\Installer\Db'), - array('checkDateTime', 'Magento\Stdlib\DateTime\DateTime'), + array('checkDateTime', 'Magento\Framework\Stdlib\DateTime\DateTime'), array('chooseTemplate', 'Magento\Checkout\Block\Cart'), array('cleanCache', 'Magento\Core\Model\Config'), array('cleanDbRow', 'Magento\Framework\App\Resource'), - array('cleanMergedJsCss', 'Magento\Core\Model\Design\Package', 'Magento\View\Asset\MergeService'), - array('cleanMergedJsCss', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\View\Asset\MergeService'), - array('cleanMergedJsCss', 'Magento\Core\Model\Design\PackageInterface', 'Magento\View\Asset\MergeService'), - array('cleanVarFolder', '', 'Magento_Io_File::rmdirRecursive()'), + array('cleanMergedJsCss', 'Magento\Core\Model\Design\Package', 'Magento\Framework\View\Asset\MergeService'), + array('cleanMergedJsCss', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\Framework\View\Asset\MergeService'), + array( + 'cleanMergedJsCss', + 'Magento\Core\Model\Design\PackageInterface', + 'Magento\Framework\View\Asset\MergeService' + ), + array('cleanVarFolder', '', 'Magento\Framework\Io\File::rmdirRecursive()'), array( 'cleanVarSubFolders', '', @@ -326,16 +330,16 @@ array('createEntityTables', 'Magento\Eav\Model\Entity\Setup'), array('createOrderItem', 'Magento\CatalogInventory\Model\Observer'), array('debugRequest', 'Magento\Paypal\Model\Api\Standard'), - array('decorateArray', 'Magento\Core\Helper\Data', 'Magento\Stdlib\ArrayUtils::decorateArray'), + array('decorateArray', 'Magento\Core\Helper\Data', 'Magento\Framework\Stdlib\ArrayUtils::decorateArray'), array('deleteAction', 'Magento\Catalog\Controller\Adminhtml\Product'), array('deleteConfig', 'Magento\Core\Model\Config'), array('deleteProductPrices', 'Magento\Catalog\Model\Resource\Product\Attribute\Backend\Tierprice'), - array('display', 'Magento\Image\Adapter\AbstractAdapter', 'getImage()'), + array('display', 'Magento\Framework\Image\Adapter\AbstractAdapter', 'getImage()'), array('displayFullSummary', 'Magento\Tax\Model\Config'), array('displayTaxColumn', 'Magento\Tax\Model\Config'), array('displayZeroTax', 'Magento\Tax\Model\Config'), array('drawItem', 'Magento\Catalog\Block\Navigation'), - array('dropKey', 'Magento\DB\Adapter\Pdo\Mysql'), + array('dropKey', 'Magento\Framework\DB\Adapter\Pdo\Mysql'), array('escapeJs', 'Magento\Backend\Block\Catalog\Product\Edit\Tab\Super\Config'), array('eventClean', 'Magento\Reports\Model\Event\Observer'), array('exportOrderedCsvAction'), @@ -389,7 +393,7 @@ array('getConfigDataModel', 'Magento\Core\Model\Config'), array('getConnectionTypeInstance', 'Magento\Framework\App\Resource'), array('getContainers', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'), - array('getCurrentUrl', 'Magento\Core\Helper\Url', 'Magento\Url'), + array('getCurrentUrl', 'Magento\Core\Helper\Url', 'Magento\Framework\Url'), array('getCustomerData', 'Magento\Sales\Block\Adminhtml\Order\Create\Form\Account'), array('getDataForSave', 'Magento\Wishlist\Model\Item'), array('getDataMaxSize'), @@ -406,14 +410,14 @@ array('getDebug', 'Magento\Paypal\Model\Api\AbstractApi'), array('getDefaultBasePath', 'Magento\Store\Model\Store'), array('getDeleteUrl', 'Magento\Backend\Block\Catalog\Product\Edit'), - array('getDirectOutput', 'Magento\View\Element\Template'), - array('getDirectOutput', 'Magento\View\Layout'), - array('getDirectOutput', 'Magento\View\LayoutInterface'), + array('getDirectOutput', 'Magento\Framework\View\Element\Template'), + array('getDirectOutput', 'Magento\Framework\View\Layout'), + array('getDirectOutput', 'Magento\Framework\View\LayoutInterface'), array('getDistroServerVars', 'Magento\Core\Model\Config', 'getDistroBaseUrl'), array('getDuplicateButtonHtml', 'Magento\Catalog\Block\Adminhtml\Product\Edit'), array('getElementBackendConfig', 'Magento\Paypal\Helper\Data'), array('getElementClass', 'Magento\Core\Model\Layout\Update'), - array('getEngineFactory', 'Magento\View\Element\Template\Context', 'getEnginePool'), + array('getEngineFactory', 'Magento\Framework\View\Element\Template\Context', 'getEnginePool'), array('getEntityIdsToIncrementIds', 'Magento\Rss\Model\Resource\Order'), array('getEntityTypeIdsToTypes', 'Magento\Rss\Model\Resource\Order'), array('getEventConfig', 'Magento\Core\Model\Config'), @@ -442,14 +446,14 @@ ), array('getInstance', 'Magento\TestFramework\Bootstrap', 'Magento_TestFramework_Helper_Bootstrap::getInstance'), array('getIsActiveAanalytics', '', 'getOnsubmitJs'), - array('getIsAjaxRequest', 'Magento\Translate\Inline'), + array('getIsAjaxRequest', 'Magento\Framework\Translate\Inline'), array('getIsEngineAvailable'), array('getIsGlobal', 'Magento\Eav\Model\Entity\Attribute\AbstractAttribute'), array('getIsInStock', 'Magento\Checkout\Block\Cart\Item\Renderer'), array('getIsGrouped', 'Magento\Catalog\Block\Adminhtml\Product\Edit'), array('getItemRender', 'Magento\Checkout\Block\Cart\AbstractCart'), array('getItemRendererInfo', 'Magento\Checkout\Block\Cart\AbstractCart'), - array('getKeyList', 'Magento\DB\Adapter\Pdo\Mysql'), + array('getKeyList', 'Magento\Framework\DB\Adapter\Pdo\Mysql'), array('getLanguages', 'Magento\Install\Block\Begin'), array('getLanguageSelect', 'Magento\Backend\Block\Page\Footer'), array('getLayoutFilename', '', 'getFilename'), @@ -475,10 +479,10 @@ 'Magento\Shipping\Model\Order\Track::getNumberDetail()' ), array('getOneBalanceTotal'), - array('getOptimalCssUrls', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\View\Asset\Merged'), - array('getOptimalJsUrls', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\View\Asset\Merged'), - array('getOptimalCssUrls', 'Magento\Core\Model\Design\Package', 'Magento\View\Asset\Merged'), - array('getOptimalJsUrls', 'Magento\Core\Model\Design\Package', 'Magento\View\Asset\Merged'), + array('getOptimalCssUrls', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\Framework\View\Asset\Merged'), + array('getOptimalJsUrls', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\Framework\View\Asset\Merged'), + array('getOptimalCssUrls', 'Magento\Core\Model\Design\Package', 'Magento\Framework\View\Asset\Merged'), + array('getOptimalJsUrls', 'Magento\Core\Model\Design\Package', 'Magento\Framework\View\Asset\Merged'), array('getOption', 'Magento\Captcha\Helper\Data', 'Magento_Core_Model_Dir::getDir()'), array('getOptions', 'Magento\Core\Model\Config'), array( @@ -514,7 +518,7 @@ array('getProductCollection', 'Magento\Wishlist\Helper\Data'), array('getProductCollection', 'Magento\Wishlist\Model\Wishlist'), array('getProductsNotInStoreIds'), - array('getProfile', 'Magento\Convert\Container\AbstractContainer'), + array('getProfile', 'Magento\Framework\Convert\Container\AbstractContainer'), array('getQuoteItem', 'Magento\Catalog\Model\Product\Option\Type\DefaultType'), array('getQuoteItemOption', 'Magento\Catalog\Model\Product\Option\Type\DefaultType'), array('getQuoteOrdersHtml', 'Magento\GoogleAnalytics\Block\Ga'), @@ -531,19 +535,19 @@ array('getReorderUrl', 'Magento\Sales\Block\Order\Info'), array( 'getResourceConfig', - 'Magento\Config\Model\Config', + 'Magento\Framework\Config\Model\Config', 'Magento_Config_Model_Config_Resource::getResourceConfig' ), array('getResourceConfig', 'Magento\Core\Model\Config'), array( 'getResourceConnectionConfig', - 'Magento\Config\Model\Config', + 'Magento\Framework\Config\Model\Config', 'Magento_Config_Model_Config_Resource::getResourceConnectionConfig' ), array('getResourceConnectionConfig', 'Magento\Core\Model\Config'), array( 'getResourceConnectionModel', - 'Magento\Config\Model\Config', + 'Magento\Framework\Config\Model\Config', 'Magento_Config_Model_Config_Resource::getResourceConnectionModel' ), array('getResourceConnectionModel', 'Magento\Core\Model\Config'), @@ -551,7 +555,7 @@ array('getResourceModelClassName', 'Magento\Core\Model\Config'), array( 'getResourceTypeConfig', - 'Magento\Config\Model\Config', + 'Magento\Framework\Config\Model\Config', 'Magento_Config_Model_Config_Resource::getResourceTypeConfig' ), array('getResourceTypeConfig', 'Magento\Core\Model\Config'), @@ -566,24 +570,24 @@ array('getSafeStore', 'Magento\Core\Model\StoreManager', 'Magento\Store\Model\StoreManager::getStore'), array('getSectionNode', 'Magento\Core\Model\Config'), array('getSecure', 'Magento\Backend\Model\UrlInterface', 'isSecure'), - array('getSecure', 'Magento\Url', 'isSecure'), - array('_prepareSessionUrlWithParams', 'Magento\Url'), - array('_getQueryParams', 'Magento\Url'), - array('_setRouteFrontName', 'Magento\Url'), - array('setType', 'Magento\Url'), - array('purgeQueryParams', 'Magento\Url', 'Use setQueryParams([]) instead'), - array('purgeQueryParams', 'Magento\Url\QueryParamsResolver', 'Use setQueryParams([]) instead'), - array('purgeQueryParams', 'Magento\Url\QueryParamsResolverInterface', 'Use setQueryParams([]) instead'), - array('_getDefaultActionName', 'Magento\Url', 'Magento\UrlInterface::DEFAULT_ACTION_NAME'), - array('_getDefaultControllerName', 'Magento\Url', 'Magento\UrlInterface::DEFAULT_CONTROLLER_NAME'), - array('_getDefaultUrlType', 'Magento\Url', 'Magento\UrlInterface::DEFAULT_URL_TYPE'), + array('getSecure', 'Magento\Framework\Url', 'isSecure'), + array('_prepareSessionUrlWithParams', 'Magento\Framework\Url'), + array('_getQueryParams', 'Magento\Framework\Url'), + array('_setRouteFrontName', 'Magento\Framework\Url'), + array('setType', 'Magento\Framework\Url'), + array('purgeQueryParams', 'Magento\Framework\Url', 'Use setQueryParams([]) instead'), + array('purgeQueryParams', 'Magento\Framework\Url\QueryParamsResolver', 'Use setQueryParams([]) instead'), + array('purgeQueryParams', 'Magento\Framework\Url\QueryParamsResolverInterface', 'Use setQueryParams([]) instead'), + array('_getDefaultActionName', 'Magento\Framework\Url', 'Magento\Framework\UrlInterface::DEFAULT_ACTION_NAME'), + array('_getDefaultControllerName', 'Magento\Framework\Url', 'Magento\Framework\UrlInterface::DEFAULT_CONTROLLER_NAME'), + array('_getDefaultUrlType', 'Magento\Framework\Url', 'Magento\Framework\UrlInterface::DEFAULT_URL_TYPE'), array('getSelectionFinalPrice', 'Magento\Bundle\Model\Product\Price'), array('getShipId', 'Magento\Shipping\Block\Tracking\Popup'), array('getShippingCarrier', 'Magento\Sales\Model\Order', 'Magento\Shipping\Model\CarrierFactory::create'), - array('getShowTemplateHints', 'Magento\View\Element\Template'), + array('getShowTemplateHints', 'Magento\Framework\View\Element\Template'), array('getSortedChildBlocks', '', 'getChildNames() + $this->getLayout()->getBlock($name)'), array('getSortedChildren', '', 'getChildNames'), - array('getSortedElements', 'Magento\Data\Form\Element\Fieldset', 'getElements'), + array('getSortedElements', 'Magento\Framework\Data\Form\Element\Fieldset', 'getElements'), array('getStateModelClass', 'Magento\Centinel\Model\Config'), array('getStatrupPageUrl'), array('getStore', 'Magento\Captcha\Helper\Data'), @@ -669,6 +673,10 @@ array('initControllerRouters', 'Magento\Cms\Controller\Router'), array('initCurrentStore', 'Magento\Store\Model\Storage\Db', 'Magento\Store\Model\StorageFactory::_reinitStores'), + array('_checkGetStore', 'Magento\Store\Model\Storage\Db'), + array('_checkCookieStore', 'Magento\Store\Model\Storage\Db'), + array('_getStoreByGroup', 'Magento\Store\Model\Storage\Db'), + array('_getStoreByWebsite', 'Magento\Store\Model\Storage\Db'), array('initLabels', 'Magento\Catalog\Model\Resource\Eav\Attribute'), array('initLayoutMessages', 'Magento\Framework\App\Action\Action'), array('initSerializerBlock', 'Magento\Backend\Block\Catalog\Product\Edit\Tab\Ajax\Serializer'), @@ -679,8 +687,8 @@ array('isAllowedGuestCheckout', 'Magento\Sales\Model\Quote'), array('isApplicableToQuote', 'Magento\Payment\Model\Method\AbstractMethod'), array('isCheckoutAvailable', 'Magento\Multishipping\Model\Checkout\Type\Multishipping'), - array('isDirectOutput', 'Magento\View\Layout'), - array('isDirectOutput', 'Magento\View\LayoutInterface'), + array('isDirectOutput', 'Magento\Framework\View\Layout'), + array('isDirectOutput', 'Magento\Framework\View\LayoutInterface'), array('isFulAmountCovered'), array('isLeyeredNavigationAllowed'), array('isLocalConfigLoaded', 'Magento\Core\Model\Config'), @@ -691,7 +699,7 @@ array('isTemplateAllowedForApplication'), array('isThemeCompatible', 'Magento\Core\Model\Design\Package', 'Magento_Core_Model_Theme::isThemeCompatible'), array('isUserSavingAllowed', 'Magento\User\Model\Resource\User'), - array('isVerbose', 'Magento_Shell'), + array('isVerbose', 'Magento\Framework\Shell'), array('isWindowsOs', 'Magento\TestFramework\Helper\Memory'), array('load', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'), array('loadBaseContents', 'Magento\Email\Model\Template'), @@ -710,16 +718,16 @@ array('lockOrderInventoryData', 'Magento\CatalogInventory\Model\Observer'), array('logEncryptionKeySave'), array('logI' . 'nvitationSave'), - array('map', 'Magento\ObjectManager\Config\Mapper\Dom', 'Magento_ObjectManager_Config_Mapper_Dom::convert'), - array('mergeFiles', 'Magento\Core\Helper\Data', 'Magento\View\Asset\MergeStrategyInterface'), - array('mergeFiles', 'Magento\Core\Model\Design\Package', 'Magento\View\Asset\MergeStrategyInterface'), - array('mergeFiles', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\View\Asset\MergeStrategyInterface'), - array('mergeFiles', 'Magento\Core\Model\Design\PackageInterface', 'Magento\View\Asset\MergeStrategyInterface'), + array('map', 'Magento\Framework\ObjectManager\Config\Mapper\Dom', 'Magento_ObjectManager_Config_Mapper_Dom::convert'), + array('mergeFiles', 'Magento\Core\Helper\Data', 'Magento\Framework\View\Asset\MergeStrategyInterface'), + array('mergeFiles', 'Magento\Core\Model\Design\Package', 'Magento\Framework\View\Asset\MergeStrategyInterface'), + array('mergeFiles', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\Framework\View\Asset\MergeStrategyInterface'), + array('mergeFiles', 'Magento\Core\Model\Design\PackageInterface', 'Magento\Framework\View\Asset\MergeStrategyInterface'), array('order_success_page_view', 'Magento\GoogleAnalytics\Model\Observer'), array('orderedAction', 'Magento\Backend\Controller\Report\Product'), - array('output', 'Magento_Shell'), + array('output', 'Magento\Framework\Shell'), array('pageHandleExists', 'Magento\Core\Model\Layout\Update', 'Magento\Core\Model\Layout\Merge'), - array('parseDateTime', 'Magento\Stdlib\DateTime\DateTime'), + array('parseDateTime', 'Magento\Framework\Stdlib\DateTime\DateTime'), array('postDispatchMyAccountSave'), array('postDispatchSystemImportExportRun'), array('prepareAddressInfo', 'Magento\Sales\Block\Recurring\Profile\View'), @@ -747,7 +755,7 @@ array('processRequest', 'Magento\Framework\App\Cache'), array('processSubst', 'Magento\Store\Model\Store'), array('productEventAggregate'), - array('publishRelatedViewFile', 'Magento\View\Publisher', '_publishRelatedViewFile'), + array('publishRelatedViewFile', 'Magento\Framework\View\Publisher', '_publishRelatedViewFile'), array('push', 'Magento\Catalog\Model\Product\Image'), array('rebuildCategoryLevels', 'Magento\Catalog\Model\Resource\Setup'), array('refundOrderItem', 'Magento\CatalogInventory\Model\Observer'), @@ -783,9 +791,9 @@ array('setBlockAlias'), array('setConfig', 'Magento\Captcha\Helper\Data'), array('setCustomerId', 'Magento\Customer\Model\Resource\Address'), - array('setDirectOutput', 'Magento\View\Layout'), + array('setDirectOutput', 'Magento\Framework\View\Layout'), array('setInstance', 'Magento\TestFramework\Bootstrap', 'Magento_TestFramework_Helper_Bootstrap::setInstance'), - array('setIsAjaxRequest', 'Magento\Translate\Inline'), + array('setIsAjaxRequest', 'Magento\Framework\Translate\Inline'), array('setNeedUsePriceExcludeTax', '', 'Magento_Tax_Model_Config::setPriceIncludesTax()'), array('setOption', 'Magento\Captcha\Helper\Data'), array('setOptions', 'Magento\Core\Model\Config'), @@ -793,18 +801,18 @@ array('setPackageTheme', 'Magento\Widget\Model\Widget\Instance', 'setThemeId'), array('setParentBlock'), array('setProduct', 'Magento\Catalog\Model\Product\Type\AbstractType'), - array('setProfile', 'Magento\Convert\Container\AbstractContainer'), + array('setProfile', 'Magento\Framework\Convert\Container\AbstractContainer'), array('setResourceConfig', 'Magento\Framework\App\Resource'), array('setSaveTemplateFlag', 'Magento\Newsletter\Model\Queue'), array('setScriptPath'), - array('setScriptPath', 'Magento\View\Element\Template'), + array('setScriptPath', 'Magento\Framework\View\Element\Template'), array('setShipId', 'Magento\Shipping\Block\Tracking\Popup'), - array('setSortElementsByAttribute', 'Magento\Data\Form\Element\Fieldset'), + array('setSortElementsByAttribute', 'Magento\Framework\Data\Form\Element\Fieldset'), array('setStore', 'Magento\Captcha\Helper\Data'), array('setTaxGroupFilter'), array('setTrackId', 'Magento\Shipping\Block\Tracking\Popup'), array('setVarSubFolders'), - array('setVerbose', 'Magento_Shell'), + array('setVerbose', 'Magento\Framework\Shell'), array('setWatermarkHeigth', '', 'setWatermarkHeight'), array('setWebsite', 'Magento\Captcha\Helper\Data'), array('shaCrypt', '', 'Magento_Ogone_Model_Api::getHash'), @@ -820,7 +828,7 @@ array('superGroupGridOnlyAction', 'Magento\Catalog\Controller\Adminhtml\Product'), array('toOptionArray', 'Magento\Cms\Model\Resource\Page\Collection'), array('toOptionArray', 'Magento\Sendfriend\Model\Sendfriend'), - array('truncate', 'Magento\DB\Adapter\Pdo\Mysql'), + array('truncate', 'Magento\Framework\DB\Adapter\Pdo\Mysql'), array('unsetBlock'), array('updateCofigurableProductOptions', 'Magento\Weee\Model\Observer', 'updateConfigurableProductOptions'), array('updateTable', 'Magento\Core\Model\Resource\Setup'), @@ -829,7 +837,7 @@ array('useValidateHttpVia', 'Magento\Core\Model\Session\AbstractSession'), array('useValidateHttpXForwardedFor', 'Magento\Core\Model\Session\AbstractSession'), array('useValidateRemoteAddr', 'Magento\Core\Model\Session\AbstractSession'), - array('validateDataArray', 'Magento\Convert\Container\AbstractContainer'), + array('validateDataArray', 'Magento\Framework\Convert\Container\AbstractContainer'), array('validateFile', 'Magento\Core\Model\Design\Package'), array('validateOrder', 'Magento\Checkout\Model\Type\Onepage'), array('viewTrackAction', 'Magento\Sales\Controller\Adminhtml\Order\Shipment'), @@ -927,8 +935,8 @@ array('_getUsers', 'Magento\User\Block\Role\Grid\User', 'getUsers'), array('_getGridHtml', 'Magento\User\Block\Role\Tab\Users', 'getGridHtml'), array('_getSelectedRoles', 'Magento\User\Block\User\Edit\Tab\Roles', 'getSelectedRoles'), - array('_prepareSelect', 'Magento\Model\Resource\Db\Collection\AbstractCollection'), - array('_prepareSelect', 'Magento\Data\Collection\Db'), + array('_prepareSelect', 'Magento\Framework\Model\Resource\Db\Collection\AbstractCollection'), + array('_prepareSelect', 'Magento\Framework\Data\Collection\Db'), array('_createOrderFromAddress', 'Magento\Checkout\Model\Type\AbstractType'), array('_addLoadAttributesSelectFields', 'Magento\Catalog\Model\Resource\AbstractResource'), array('attributeSelectFields', 'Magento\Catalog\Model\Resource\Helper'), @@ -1000,7 +1008,7 @@ array('_getResourceModel', '\Magento\Webapi\Model\Source\Acl\Role', '$this->_resource'), array('_getSession', '\Magento\GiftMessage\Model\Save', '$this->_session'), array('run', '\Magento\Framework\AppInterface'), - array('setModuleDir', 'Magento\Module\Dir\Reader'), + array('setModuleDir', 'Magento\Framework\Module\Dir\Reader'), array('setModuleDir', 'Magento\Core\Model\Config'), array('getAreaConfig', 'Magento\Core\Model\Config'), array('getRandomString', '\Magento\Core\Helper\Data'), @@ -1011,33 +1019,33 @@ array('getHttpUserAcceptReferer', '\Magento\Core\Helper\Http'), array('getHttpUserRemoteAddr', '\Magento\Core\Helper\Http'), array('getHttpUserServerAddr', '\Magento\Core\Helper\Http'), - array('getEncryptor', '\Magento\Core\Helper\Data', '\Magento\Encryption\Encryptor'), + array('getEncryptor', '\Magento\Core\Helper\Data', '\Magento\Framework\Encryption\Encryptor'), array('getCoreData', '\Magento\Sales\Model\Resource\Setup'), array('encrypt', '\Magento\Core\Helper\Data'), array('decrypt', '\Magento\Core\Helper\Data'), - array('validateKey', '\Magento\Core\Helper\Data', '\Magento\Encryption\EncryptorInterface'), + array('validateKey', '\Magento\Core\Helper\Data', '\Magento\Framework\Encryption\EncryptorInterface'), array('validateHash', '\Magento\Core\Helper\Data'), array('getHash', '\Magento\Core\Helper\Data'), - array('escapeHtml', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Escaper::escapeHtml'), - array('escapeUrl', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Escaper::escapeUrl'), - array('jsQuoteEscape', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Escaper::escapeJsQuote'), - array('quoteEscape', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Escaper::escapeQuote'), - array('removeTags', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Filter\FilterManager'), - array('removeAccents', '\Magento\Core\Helper\Data', '\Magento\Filter\FilterManager'), - array('splitWords', '\Magento\Core\Helper\String', '\Magento\Filter\FilterManager'), - array('strlen', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::strlen'), - array('substr', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::substr'), - array('strrev', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::strrev'), - array('cleanString', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::cleanString'), - array('strpos', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::strpos'), - array('strSplit', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::split'), - array('splitInjection', '\Magento\Core\Helper\String', '\Magento\Stdlib\String::splitInjection'), - array('truncate', '\Magento\Core\Helper\String', '\Magento\Filter\Truncate'), + array('escapeHtml', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Framework\Escaper::escapeHtml'), + array('escapeUrl', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Framework\Escaper::escapeUrl'), + array('jsQuoteEscape', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Framework\Escaper::escapeJsQuote'), + array('quoteEscape', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Framework\Escaper::escapeQuote'), + array('removeTags', '\Magento\Framework\App\Helper\AbstractHelper', '\Magento\Framework\Filter\FilterManager'), + array('removeAccents', '\Magento\Core\Helper\Data', '\Magento\Framework\Filter\FilterManager'), + array('splitWords', '\Magento\Core\Helper\String', '\Magento\Framework\Filter\FilterManager'), + array('strlen', '\Magento\Core\Helper\String', '\Magento\Framework\Stdlib\String::strlen'), + array('substr', '\Magento\Core\Helper\String', '\Magento\Framework\Stdlib\String::substr'), + array('strrev', '\Magento\Core\Helper\String', '\Magento\Framework\Stdlib\String::strrev'), + array('cleanString', '\Magento\Core\Helper\String', '\Magento\Framework\Stdlib\String::cleanString'), + array('strpos', '\Magento\Core\Helper\String', '\Magento\Framework\Stdlib\String::strpos'), + array('strSplit', '\Magento\Core\Helper\String', '\Magento\Framework\Stdlib\String::split'), + array('splitInjection', '\Magento\Core\Helper\String', '\Magento\Framework\Stdlib\String::splitInjection'), + array('truncate', '\Magento\Core\Helper\String', '\Magento\Framework\Filter\Truncate'), array('ksortMultibyte', '\Magento\Core\Helper\String'), array('uc_words'), array('is_empty_date'), array('now'), - array('uniqHash', '\Magento\Core\Helper\Data', '\Magento\Math\Random::getUniqueHash'), + array('uniqHash', '\Magento\Core\Helper\Data', '\Magento\Framework\Math\Random::getUniqueHash'), array( 'getMerchantCountryCode', '\Magento\Core\Helper\Data', @@ -1048,47 +1056,52 @@ array('getCurrentCustomer', '\Magento\Core\Helper\Data'), array('getCustomerName', '\Magento\Core\Helper\Data'), array('_createForm', '\Magento\Core\Helper\Data'), - array('assocToXml', '\Magento\Core\Helper\Data', '\Magento\Convert\ConvertArray::assocToXml'), - array('xmlToAssoc', '\Magento\Core\Helper\Data', '\Magento\Convert\Xml::xmlToAssoc'), - array('checkLfiProtection', '\Magento\Core\Helper\Data', '\Magento\Filesystem::checkLfiProtection'), + array('assocToXml', '\Magento\Core\Helper\Data', '\Magento\Framework\Convert\ConvertArray::assocToXml'), + array('xmlToAssoc', '\Magento\Core\Helper\Data', '\Magento\Framework\Convert\Xml::xmlToAssoc'), + array('checkLfiProtection', '\Magento\Core\Helper\Data', '\Magento\Framework\Filesystem::checkLfiProtection'), array( 'getProtectedFileExtensions', '\Magento\Core\Helper\Data', '\Magento\Core\Model\File\Validator\NotProtectedExtension::getProtectedFileExtensions' ), array('getStoreId', '\Magento\Core\Helper\Data'), - array('getExactDivision', '\Magento\Core\Helper\Data', '\Magento\Math\Division::getExactDivision'), + array('getExactDivision', '\Magento\Core\Helper\Data', '\Magento\Framework\Math\Division::getExactDivision'), array('getPublicFilesValidPath', '\Magento\Core\Helper\Data'), array('getViewConfig', '\Magento\Core\Model\View\Config', 'get'), array('_getSession', '\Magento\Catalog\Helper\Product\Compare', '$this->_catalogSession'), - array('getEnginePool', '\Magento\View\Element\Template\Context', 'getEngineFactory'), - array('getHtml', 'Magento\View\Element\Messages'), + array('getEnginePool', '\Magento\Framework\View\Element\Template\Context', 'getEngineFactory'), + array('getHtml', 'Magento\Framework\View\Element\Messages'), array('is_dir_writeable'), array('destruct'), array('mageDebugBacktrace'), array('mageDelTree'), array('mageParseCsv'), - array('getHttpAuthCredentials', '\Magento\Core\Helper\Http', '\Magento\HTTP\Authentication::getCredentials'), + array('getHttpAuthCredentials', '\Magento\Core\Helper\Http', '\Magento\Framework\HTTP\Authentication::getCredentials'), array( 'failHttpAuthentication', '\Magento\Core\Helper\Http', - '\Magento\HTTP\Authentication::setAuthenticationFailed' + '\Magento\Framework\HTTP\Authentication::setAuthenticationFailed' + ), + array('getRequestUri', '\Magento\Core\Helper\Http', '\Magento\Framework\HTTP\Header::getRequestUri'), + array( + 'getRequiredAgreementIds', + '\Magento\Checkout\Helper\Data', + '\Magento\CheckoutAgreements\Model\AgreementsProvider::getRequiredAgreementIds' ), - array('getRequestUri', '\Magento\Core\Helper\Http', '\Magento\HTTP\Header::getRequestUri'), array('validateIpAddr', '\Magento\Core\Helper\Http', '\Zend_Validate_Ip::isValid'), - array('getRemoteAddr', '\Magento\Core\Helper\Http', 'Magento\HTTP\PhpEnvironment\RemoteAddress::getRemoteAddress'), - array('getServerAddr', '\Magento\Core\Helper\Http', 'Magento\HTTP\PhpEnvironment\ServerAddress::getServerAddress'), - array('formatDate', 'Magento\Model\Resource\AbstractResource', '\Magento\Stdlib\DateTime::formatDate'), - array('mktime', 'Magento\Model\Resource\AbstractResource', '\Magento\Stdlib\DateTime::toTimestamp'), + array('getRemoteAddr', '\Magento\Core\Helper\Http', 'Magento\Framework\HTTP\PhpEnvironment\RemoteAddress::getRemoteAddress'), + array('getServerAddr', '\Magento\Core\Helper\Http', 'Magento\Framework\HTTP\PhpEnvironment\ServerAddress::getServerAddress'), + array('formatDate', 'Magento\Framework\Model\Resource\AbstractResource', '\Magento\Framework\Stdlib\DateTime::formatDate'), + array('mktime', 'Magento\Framework\Model\Resource\AbstractResource', '\Magento\Framework\Stdlib\DateTime::toTimestamp'), array('getPlainTemplateMode', '\Magento\Email\Model\Template\Filter'), array('getMessage', '\Magento\Core\Model\Session\Context', 'getMessageFactory'), array('getMessageFactory', '\Magento\Core\Model\Session\Context', 'getMessagesFactory'), - array('copyFieldsetToTarget', 'Magento\Core\Helper\Data', 'Magento\Object\Copy::copyFieldsetToTarget'), + array('copyFieldsetToTarget', 'Magento\Core\Helper\Data', 'Magento\Framework\Object\Copy::copyFieldsetToTarget'), array('formatDate', '\Magento\Core\Helper\Data', '\Magento\Core\Model\Locale::formatDate'), array('formatTime', '\Magento\Core\Helper\Data', '\Magento\Core\Model\Locale::formatTime'), array('getCustomer', 'Magento\Backend\Model\Session\Quote', 'Magento\Backend\Model\Session\Quote::getCustomerId'), array('setCustomer', 'Magento\Backend\Model\Session\Quote', 'Magento\Backend\Model\Session\Quote::setCustomerId'), - array('_getConfigTimezone', '\Magento\Stdlib\DateTime\DateTime', '\Magento\Core\Model\Locale::getConfigTimezone'), + array('_getConfigTimezone', '\Magento\Framework\Stdlib\DateTime\DateTime', '\Magento\Core\Model\Locale::getConfigTimezone'), array('_filterPostData', '\Magento\Checkout\Controller\Onepage'), array('_filterPostData', '\Magento\Customer\Controller\Account'), array('_filterPostData', '\Magento\Customer\Controller\Adminhtml\Index'), @@ -1096,8 +1109,8 @@ array('noCookiesAction', '\Magento\Core\Controller\Varien\Action'), array('norouteAction', '\Magento\Core\Controller\Varien\Action'), array('getActionMethodName', '\Magento\Core\Controller\Varien\Action'), - array('initLayoutMessages', '\Magento\Core\Controller\Varien\Action', '\Magento\View\Layout::initMessages'), - array('_initLayoutMessages', '\Magento\Core\Controller\Varien\Action', '\Magento\View\Layout::initMessages'), + array('initLayoutMessages', '\Magento\Core\Controller\Varien\Action', '\Magento\Framework\View\Layout::initMessages'), + array('_initLayoutMessages', '\Magento\Core\Controller\Varien\Action', '\Magento\Framework\View\Layout::initMessages'), array('preDispatch', '\Magento\Core\Controller\Varien\Action'), array('postDispatch', '\Magento\Core\Controller\Varien\Action'), array('hasAction', '\Magento\Core\Controller\Varien\Action'), @@ -1136,9 +1149,9 @@ array( '_filterDateTime', '\Magento\Core\Controller\Varien\Action', - '\Magento\Stdlib\DateTime\Filter\DateTime::filter' + '\Magento\Framework\Stdlib\DateTime\Filter\DateTime::filter' ), - array('_filterDates', '\Magento\Core\Controller\Varien\Action', '\Magento\Stdlib\DateTime\Filter\Date::filter'), + array('_filterDates', '\Magento\Core\Controller\Varien\Action', '\Magento\Framework\Stdlib\DateTime\Filter\Date::filter'), array('_initDesign', '\Magento\Core\Controller\Varien\Action', '\Magento\Core\Model\DesignLoader::load'), array('_firePreDispatchEvents', '\Magento\Core\Controller\Varien\Action'), array('_prepareDownloadResponse', '\Magento\Core\Controller\Varien\Action'), @@ -1207,20 +1220,20 @@ '\Magento\Core\Model\Session\AbstractSession', '\Magento\Core\Model\Session\AbstractSession::clearStorage' ), - array('delete', '\Magento\Stdlib\Cookie', '\Magento\Stdlib\Cookie::set'), + array('delete', '\Magento\Framework\Stdlib\Cookie', '\Magento\Framework\Stdlib\Cookie::set'), array('setSkipSessionIdFlag', '\Magento\Core\Model\Session\AbstractSession'), array('getSkipSessionIdFlag', '\Magento\Core\Model\Session\AbstractSession'), - array('getConfigDomain', '\Magento\Stdlib\Cookie'), - array('getDomain', '\Magento\Stdlib\Cookie'), - array('getDefaultLifetime', '\Magento\Stdlib\Cookie'), - array('getPath', '\Magento\Stdlib\Cookie'), - array('getHttponly', '\Magento\Stdlib\Cookie'), - array('isSecure', '\Magento\Stdlib\Cookie'), - array('getStore', '\Magento\Stdlib\Cookie'), - array('setStore', '\Magento\Stdlib\Cookie'), - array('setLifetime', '\Magento\Stdlib\Cookie'), - array('_getResponse', '\Magento\Stdlib\Cookie'), - array('_getRequest', '\Magento\Stdlib\Cookie'), + array('getConfigDomain', '\Magento\Framework\Stdlib\Cookie'), + array('getDomain', '\Magento\Framework\Stdlib\Cookie'), + array('getDefaultLifetime', '\Magento\Framework\Stdlib\Cookie'), + array('getPath', '\Magento\Framework\Stdlib\Cookie'), + array('getHttponly', '\Magento\Framework\Stdlib\Cookie'), + array('isSecure', '\Magento\Framework\Stdlib\Cookie'), + array('getStore', '\Magento\Framework\Stdlib\Cookie'), + array('setStore', '\Magento\Framework\Stdlib\Cookie'), + array('setLifetime', '\Magento\Framework\Stdlib\Cookie'), + array('_getResponse', '\Magento\Framework\Stdlib\Cookie'), + array('_getRequest', '\Magento\Framework\Stdlib\Cookie'), array('init', '\Magento\Core\Model\Session\AbstractSession', '\Magento\Core\Model\Session\AbstractSession::start'), array('getCacheLimiter', '\Magento\Core\Model\Session\Context', '\Magento\Core\Model\Session\Config'), array('getSaveMethod', '\Magento\Core\Model\Session\Context', '\Magento\Core\Model\Session\Config'), @@ -1234,30 +1247,30 @@ array('getStoreManager', '\Magento\Core\Model\Session\Context'), array('getRequest', '\Magento\Core\Model\Session\Context'), array('getSessionSavePath', '\Magento\Core\Model\Session\AbstractSession', '\Magento\Core\Model\Session\Config'), - array('getCookie', 'Magento\View\Element\Js\Cookie'), + array('getCookie', 'Magento\Framework\View\Element\Js\Cookie'), array('setCopyright', 'Magento\Theme\Block\Html\Footer'), array('setLogo', 'Magento\Theme\Block\Html\Header'), - array('_beforeCacheUrl', 'Magento\View\Element\AbstractBlock'), - array('_afterCacheUrl', 'Magento\View\Element\AbstractBlock'), - array('_getGroupFor', 'Magento\View\Asset\GroupedCollection', 'getGroupFor'), - array('_composeMergedContent', 'Magento\View\Asset\MergeStrategy\Direct', 'composeMergedContent'), - array('_initialize', 'Magento\View\Asset\Merged', 'initialize'), - array('_getMergedAsset', 'Magento\View\Asset\Merged', 'getMergedAsset'), - array('_getPublicFilesToMerge', 'Magento\View\Asset\Merged', 'getPublicFilesToMerge'), - array('_getMergedFilePath', 'Magento\View\Asset\Merged', 'getMergedFilePath'), - array('_process', 'Magento\View\Asset\Minified', 'process'), - array('_getMinifier', 'Magento\View\Asset\MinifyService', 'getMinifier'), - array('_isEnabled', 'Magento\View\Asset\MinifyService', 'isEnabled'), - array('_getAdapter', 'Magento\View\Asset\MinifyService', 'getAdapter'), + array('_beforeCacheUrl', 'Magento\Framework\View\Element\AbstractBlock'), + array('_afterCacheUrl', 'Magento\Framework\View\Element\AbstractBlock'), + array('_getGroupFor', 'Magento\Framework\View\Asset\GroupedCollection', 'getGroupFor'), + array('_composeMergedContent', 'Magento\Framework\View\Asset\MergeStrategy\Direct', 'composeMergedContent'), + array('_initialize', 'Magento\Framework\View\Asset\Merged', 'initialize'), + array('_getMergedAsset', 'Magento\Framework\View\Asset\Merged', 'getMergedAsset'), + array('_getPublicFilesToMerge', 'Magento\Framework\View\Asset\Merged', 'getPublicFilesToMerge'), + array('_getMergedFilePath', 'Magento\Framework\View\Asset\Merged', 'getMergedFilePath'), + array('_process', 'Magento\Framework\View\Asset\Minified', 'process'), + array('_getMinifier', 'Magento\Framework\View\Asset\MinifyService', 'getMinifier'), + array('_isEnabled', 'Magento\Framework\View\Asset\MinifyService', 'isEnabled'), + array('_getAdapter', 'Magento\Framework\View\Asset\MinifyService', 'getAdapter'), array('getShowPerPage', 'Magento\Theme\Block\Html\Pager', 'isShowPerPage'), array('getPackageByUserAgent', '\Magento\Core\Model\View\Design'), - array('setFrameTags', 'Magento\View\Element\AbstractBlock'), - array('getMessagesBlock', 'Magento\View\Element\AbstractBlock'), - array('setMessagesBlock', 'Magento\View\Element\AbstractBlock'), - array('getUrlEncoded', 'Magento\View\Element\AbstractBlock'), - array('getUrlBase64', 'Magento\View\Element\AbstractBlock'), + array('setFrameTags', 'Magento\Framework\View\Element\AbstractBlock'), + array('getMessagesBlock', 'Magento\Framework\View\Element\AbstractBlock'), + array('setMessagesBlock', 'Magento\Framework\View\Element\AbstractBlock'), + array('getUrlEncoded', 'Magento\Framework\View\Element\AbstractBlock'), + array('getUrlBase64', 'Magento\Framework\View\Element\AbstractBlock'), array('getMessagesBlock', 'Magento\MultipleWishlist\Block\Info'), - array('helper', 'Magento\View\Element\AbstractBlock'), + array('helper', 'Magento\Framework\View\Element\AbstractBlock'), array('getDataHelperName', 'Magento\Backend\Block\Dashboard\AbstractDashboard'), array('setDataHelperName', 'Magento\Backend\Block\Dashboard\AbstractDashboard'), array('addStoresToCollection', '\Magento\Review\Model\Resource\Rating\Collection'), @@ -1265,20 +1278,20 @@ array('getLocalPackagesPathV1x', 'Magento\Connect\Helper\Data'), array('getSessionSaveMethod', '\Magento\Core\Model\Session\AbstractSession', '\Magento\Core\Model\Session\Config'), array('setSessionName', '\Magento\Core\Model\Session\AbstractSession', 'setName'), - array('getCode', '\Magento\Message\AbstractMessage', 'getText'), - array('setCode', '\Magento\Message\AbstractMessage', 'setText'), - array('setClass', '\Magento\Message\AbstractMessage'), - array('setMethod', '\Magento\Message\AbstractMessage'), - array('add', '\Magento\Message\Collection', 'addMessage'), - array('count', '\Magento\Message\Collection', 'getCountByType'), - array('error', '\Magento\Message\Factory', 'create'), - array('warning', '\Magento\Message\Factory', 'create'), - array('success', '\Magento\Message\Factory', 'create'), - array('notice', '\Magento\Message\Factory', 'create'), + array('getCode', '\Magento\Framework\Message\AbstractMessage', 'getText'), + array('setCode', '\Magento\Framework\Message\AbstractMessage', 'setText'), + array('setClass', '\Magento\Framework\Message\AbstractMessage'), + array('setMethod', '\Magento\Framework\Message\AbstractMessage'), + array('add', '\Magento\Framework\Message\Collection', 'addMessage'), + array('count', '\Magento\Framework\Message\Collection', 'getCountByType'), + array('error', '\Magento\Framework\Message\Factory', 'create'), + array('warning', '\Magento\Framework\Message\Factory', 'create'), + array('success', '\Magento\Framework\Message\Factory', 'create'), + array('notice', '\Magento\Framework\Message\Factory', 'create'), array('getDisplayMode', '\Magento\Catalog\Model\Session'), - array('setEscapeMessageFlag', 'Magento\View\Block\Messages'), - array('shouldEscapeMessage', 'Magento\View\Block\Messages'), - array('isPathInDirectory', 'Magento\Filesystem\Directory\ReadInterface'), + array('setEscapeMessageFlag', 'Magento\Framework\View\Block\Messages'), + array('shouldEscapeMessage', 'Magento\Framework\View\Block\Messages'), + array('isPathInDirectory', 'Magento\Framework\Filesystem\Directory\ReadInterface'), array('isSuper', '\Magento\Catalog\Model\Product'), array('isSuperGroup', '\Magento\Catalog\Model\Product'), array('isGrouped', '\Magento\Catalog\Model\Product'), @@ -1349,9 +1362,9 @@ array('getUpdateUrl', 'Magento\Wishlist\Helper\Data'), array('getItemRemoveUrl', 'Magento\Wishlist\Block\AbstractBlock'), array('_getUrlParams', 'Magento\Catalog\Helper\Product\Compare'), - array('getFileIdentifier', 'Magento\View\Layout\File\FileList', 'Magento\View\Layout\File'), - array('_getInitialXml', 'Magento\Config\Theme'), - array('_getIdAttributes', 'Magento\Config\Theme'), + array('getFileIdentifier', 'Magento\Framework\View\Layout\File\FileList', 'Magento\Framework\View\Layout\File'), + array('_getInitialXml', 'Magento\Framework\Config\Theme'), + array('_getIdAttributes', 'Magento\Framework\Config\Theme'), array( 'getAllPeriodUnits', 'Magento\Payment\Model\Recurring\Profile', @@ -1379,20 +1392,20 @@ array('getAttributeDisabledTypes', 'Magento\Catalog\Helper\Data'), array( '_processArrayNode', - 'Magento\ObjectManager\Config\Mapper\Dom', - 'Magento\Data\Argument\Interpreter\ArrayType' + 'Magento\Framework\ObjectManager\Config\Mapper\Dom', + 'Magento\Framework\Data\Argument\Interpreter\ArrayType' ), array( '_processValueNode', - 'Magento\ObjectManager\Config\Mapper\Dom', - 'Magento\Data\Argument\Interpreter\Composite' - ), - array('canSkipFilePublication', 'Magento\View\Publisher'), - array('_getExtension', 'Magento\View\Publisher'), - array('_buildPublishedFilePath', 'Magento\View\Publisher', 'Magento\View\Publisher\FileInterface'), - array('_buildPublicViewRedundantFilename', 'Magento\View\Publisher', 'Magento\View\Publisher\File'), - array('_buildPublicViewSufficientFilename', 'Magento\View\Publisher', 'Magento\View\Publisher\File'), - array('_buildPublicViewFilename', 'Magento\View\Publisher', 'Magento\View\Publisher\FileInterface'), + 'Magento\Framework\ObjectManager\Config\Mapper\Dom', + 'Magento\Framework\Data\Argument\Interpreter\Composite' + ), + array('canSkipFilePublication', 'Magento\Framework\View\Publisher'), + array('_getExtension', 'Magento\Framework\View\Publisher'), + array('_buildPublishedFilePath', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\Publisher\FileInterface'), + array('_buildPublicViewRedundantFilename', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\Publisher\File'), + array('_buildPublicViewSufficientFilename', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\Publisher\File'), + array('_buildPublicViewFilename', 'Magento\Framework\View\Publisher', 'Magento\Framework\View\Publisher\FileInterface'), array('cleanAction', 'Magento\PageCache\Controller\Adminhtml\PageCache'), array('_isAllowed', 'Magento\PageCache\Controller\Adminhtml\PageCache'), array('_downloadFileAction', 'Magento\Sales\Controller\Download', '\Magento\Sales\Model\Download::downloadFile'), @@ -1521,43 +1534,43 @@ array('googleCheckoutDiscoutItem', 'Magento\GiftCardAccount\Model\Observer'), array('googlecheckoutCheckoutBefore', 'Magento\GiftWrapping\Model\Observer'), array('injectAnalyticsInGoogleCheckoutLink', 'Magento\GoogleAnalytics\Model\Observer'), - array('setDefaultLocale', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('getDefaultLocale', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('setLocale', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('getLocale', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('getLocaleCode', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('setLocaleCode', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('emulate', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('revert', 'Magento\Core\Model\Locale', 'Magento\Locale\Resolver'), - array('getTimezone', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone::getDefaultTimezone'), - array('getDateFormat', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone'), - array('getDateFormatWithLongYear', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone'), - array('getTimeFormat', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone'), - array('getDateTimeFormat', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone'), - array('date', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone'), - array('storeDate', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone::scopeDate'), + array('setDefaultLocale', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('getDefaultLocale', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('setLocale', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('getLocale', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('getLocaleCode', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('setLocaleCode', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('emulate', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('revert', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Resolver'), + array('getTimezone', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone::getDefaultTimezone'), + array('getDateFormat', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone'), + array('getDateFormatWithLongYear', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone'), + array('getTimeFormat', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone'), + array('getDateTimeFormat', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone'), + array('date', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone'), + array('storeDate', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone::scopeDate'), array( 'storeDate', - 'Magento\Stdlib\DateTime\TimezoneInterface', - 'Magento\Stdlib\DateTime\TimezoneInterface::scopeDate' - ), - array('utcDate', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone'), - array('storeTimeStamp', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone::scopeTimeStamp'), - array('formatDate', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone'), - array('getTranslation', 'Magento\Core\Model\Locale', 'Magento\Stdlib\DateTime\Timezone::_getTranslation'), - array('getCurrency', 'Magento\Core\Model\Locale', 'Magento\Locale\Currency'), - array('currency', 'Magento\Core\Model\Locale', 'Magento\Locale\Currency::getCurrency'), - array('getNumber', 'Magento\Core\Model\Locale', 'Magento\Locale\Format'), - array('getJsPriceFormat', 'Magento\Core\Model\Locale', 'Magento\Locale\Format::getPriceFormat'), - array('getOptionLocales', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getTranslatedOptionLocales', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getOptionTimezones', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getOptionWeekdays', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getOptionCountries', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getOptionCurrencies', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getTranslationList', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getCountryTranslation', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), - array('getCountryTranslationList', 'Magento\Core\Model\Locale', 'Magento\Locale\Lists'), + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface', + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface::scopeDate' + ), + array('utcDate', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone'), + array('storeTimeStamp', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone::scopeTimeStamp'), + array('formatDate', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone'), + array('getTranslation', 'Magento\Core\Model\Locale', 'Magento\Framework\Stdlib\DateTime\Timezone::_getTranslation'), + array('getCurrency', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Currency'), + array('currency', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Currency::getCurrency'), + array('getNumber', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Format'), + array('getJsPriceFormat', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Format::getPriceFormat'), + array('getOptionLocales', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getTranslatedOptionLocales', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getOptionTimezones', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getOptionWeekdays', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getOptionCountries', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getOptionCurrencies', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getTranslationList', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getCountryTranslation', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), + array('getCountryTranslationList', 'Magento\Core\Model\Locale', 'Magento\Framework\Locale\Lists'), array('getAllowLocales', 'Magento\Core\Model\Locale'), array('getAllowCurrencies', 'Magento\Core\Model\Locale'), array('convertMeasureWeight', 'Magento\Usa\Helper\Data', 'Magento\Shipping\Helper\Carrier::convertMeasureWeight'), @@ -1575,14 +1588,14 @@ array('displayGirthValue', 'Magento\Usa\Helper\Data', 'Magento\Usps\Helper\Data::displayGirthValue'), array('reindexProductPrices', '\Magento\Catalog\Model\Observer'), array('getCustomer', 'Magento\Checkout\Block\Onepage\AbstractOnepage'), - ['getStoreConfig', 'Magento\View\Context', '\Magento\View\Context::getScopeConfig'], - ['getStoreConfig', 'Magento\View\Element\Context', '\Magento\View\Element\Context::getScopeConfig'], + ['getStoreConfig', 'Magento\Framework\View\Context', '\Magento\Framework\View\Context::getScopeConfig'], + ['getStoreConfig', 'Magento\Framework\View\Element\Context', '\Magento\Framework\View\Element\Context::getScopeConfig'], ['setConfig', 'Magento\Store\Model\Store'], ['getConfig', 'Magento\Store\Model\Store'], ['_compareSortOrder', 'Magento\Sales\Model\Config\Ordered'], [ '_toOptionHashOptimized', - 'Magento\Data\Collection\Db', + 'Magento\Framework\Data\Collection\Db', 'Magento\Tax\Model\Resource\Calculation\Rate\Collection::toOptionHashOptimized' ], array('getSwitchCurrencyUrl', 'Magento\Directory\Block\Currency'), @@ -1599,7 +1612,7 @@ array('addCustomerData', 'Magento\Log\Model\Visitor'), array('quoteSubmitAfter', 'Magento\Customer\Model\Observer'), array('loadByCustomer', 'Magento\Wishlist\Model\Wishlist'), - ['_sessionVarCallback', 'Magento\Url', 'Replaced with inlined closure'], + ['_sessionVarCallback', 'Magento\Framework\Url', 'Replaced with inlined closure'], array('processReinitConfig', 'Magento\Core\Model\Observer'), array( 'reviewsAction', @@ -1608,24 +1621,24 @@ ), ['_insertInlineScriptsHtml', 'Magento\DesignEditor\Model\Translate\Inline', 'addInlineScript'], ['initializeTranslation', 'Magento\Backend\Model\Observer'], - ['_isEmptyTranslateArg', 'Magento\Translate'], - ['_getTranslatedString', 'Magento\Translate'], - ['initLocale', 'Magento\Translate'], - ['_prepareDataString', 'Magento\Translate'], - ['getInlineObject', 'Magento\Translate'], - ['init', 'Magento\Translate', 'loadData'], - ['disable', 'Magento\Translate\Inline'], - ['_getAjaxUrl', 'Magento\Translate\Inline', 'getAjaxUrl'], - ['_stripInlineTranslations', 'Magento\Translate\Inline', 'stripInlineTranslations'], - ['isAllowed', 'Magento\Translate'], - ['translate', 'Magento\Translate'], + ['_isEmptyTranslateArg', 'Magento\Framework\Translate'], + ['_getTranslatedString', 'Magento\Framework\Translate'], + ['initLocale', 'Magento\Framework\Translate'], + ['_prepareDataString', 'Magento\Framework\Translate'], + ['getInlineObject', 'Magento\Framework\Translate'], + ['init', 'Magento\Framework\Translate', 'loadData'], + ['disable', 'Magento\Framework\Translate\Inline'], + ['_getAjaxUrl', 'Magento\Framework\Translate\Inline', 'getAjaxUrl'], + ['_stripInlineTranslations', 'Magento\Framework\Translate\Inline', 'stripInlineTranslations'], + ['isAllowed', 'Magento\Framework\Translate'], + ['translate', 'Magento\Framework\Translate'], ['_getStoreId', 'Magento\Translation\Model\Resource\Translate', 'getScope'], ['_getStoreId', 'Magento\Translation\Model\Resource\String', 'getScope'], ['getAvailableModes', 'Magento\DesignEditor\Helper\Data'], ['initializeTranslation', 'Magento\DesignEditor\Model\Observer'], ['filterByCustomer', 'Magento\Wishlist\Model\Resource\Wishlist\Collection'], - ['setConfigData', 'Magento\Module\Setup'], - ['deleteConfigData', 'Magento\Module\Setup'], + ['setConfigData', 'Magento\Framework\Module\Setup'], + ['deleteConfigData', 'Magento\Framework\Module\Setup'], array('getReservedAttributes', 'Magento\Catalog\Model\Product'), array( 'isReservedAttribute', @@ -1636,10 +1649,20 @@ 'getRatingSummary', 'Magento\Catalog\Model\Product' ), - ['_getThemeInstance', 'Magento\View\Layout'], - ['getArea', 'Magento\View\Layout'], - ['setArea', 'Magento\View\Layout'], + ['getCurrentStore', 'Magento\Store\Model\StoreManagerInterface'], + ['getAnyStoreView', 'Magento\Store\Model\StoreManagerInterface'], + ['throwStoreException', 'Magento\Store\Model\StoreManagerInterface'], + ['getCustomer', 'Magento\ProductAlert\Helper\Data'], + ['addCustomerFilter', 'Magento\ProductAlert\Model\Resource\Stock\Collection'], + ['addCustomerFilter', 'Magento\ProductAlert\Model\Resource\Price\Collection'], + ['setCustomer', 'Magento\ProductAlert\Model\Email'], + ['getCustomer', 'Magento\Persistent\Helper\Session'], + ['_getThemeInstance', 'Magento\Framework\View\Layout'], + ['getArea', 'Magento\Framework\View\Layout'], + ['setArea', 'Magento\Framework\View\Layout'], ['getCustomer', 'Magento\Tax\Model\Calculation', 'Magento\Tax\Model\Calculation::getCustomerData'], ['setCustomer', 'Magento\Tax\Model\Calculation', 'Magento\Tax\Model\Calculation::setCustomerData'], ['setCustomer', 'Magento\Checkout\Model\Session', 'Magento\Checkout\Model\Session::setCustomerData'], + ['getPersistentName', 'Magento\Persistent\Helper\Data'], + ['getCustomerDataObject', 'Magento\Persistent\Helper\Session'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php index 666bdd2140904..fbadab6220d1d 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php @@ -25,4 +25,61 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -return array(array('/app/code/core/Mage', '/app/code/Magento')); +return [ + ['Magento\App', 'Magento\Framework\App'], + ['Magento\Data', 'Magento\Framework\Data'], + ['Magento\Filesystem', 'Magento\Framework\Filesystem'], + ['Magento\Config', 'Magento\Framework\Config'], + ['Magento\Model', 'Magento\Framework\Model'], + ['Magento\View', 'Magento\Framework\View'], + ['Magento\DB', 'Magento\Framework\DB'], + ['Magento\Event', 'Magento\Framework\Event'], + ['Magento\Acl', 'Magento\Framework\Acl'], + ['Magento\Archive', 'Magento\Framework\Archive'], + ['Magento\Session', 'Magento\Framework\Session'], + ['Magento\Authorization', 'Magento\Framework\Authorization'], + ['Magento\Cache', 'Magento\Framework\Cache'], + ['Magento\ObjectManager', 'Magento\Framework\ObjectManager'], + ['Magento\Exception', 'Magento\Framework\Exception'], + ['Magento\Autoload', 'Magento\Framework\Autoload'], + ['Magento\Translate', 'Magento\Framework\Translate'], + ['Magento\Code', 'Magento\Framework\Code'], + ['Magento\Stdlib', 'Magento\Framework\Stdlib'], + ['Magento\Phrase', 'Magento\Framework\Phrase'], + ['Magento\Locale', 'Magento\Framework\Locale'], + ['Magento\Message', 'Magento\Framework\Message'], + ['Magento\Logger', 'Magento\Framework\Logger'], + ['Magento\Error', 'Magento\Framework\Error'], + ['Magento\Filter', 'Magento\Framework\Filter'], + ['Magento\DomDocument', 'Magento\Framework\DomDocument'], + ['Magento\Module', 'Magento\Framework\Module'], + ['Magento\Css', 'Magento\Framework\Css'], + ['Magento\Pear', 'Magento\Framework\Pear'], + ['Magento\Pricing', 'Magento\Framework\Pricing'], + ['Magento\Profiler', 'Magento\Framework\Profiler'], + ['Magento\Simplexml', 'Magento\Framework\Simplexml'], + ['Magento\Controller', 'Magento\Framework\Controller'], + ['Magento\Convert', 'Magento\Framework\Convert'], + ['Magento\Shell', 'Magento\Framework\Shell'], + ['Magento\Encryption', 'Magento\Framework\Encryption'], + ['Magento\Option', 'Magento\Framework\Option'], + ['Magento\Service', 'Magento\Framework\Service'], + ['Magento\System', 'Magento\Framework\System'], + ['Magento\Url', 'Magento\Framework\Url'], + ['Magento\Mview', 'Magento\Framework\Mview'], + ['Magento\Validator', 'Magento\Framework\Validator'], + ['Magento\Xml', 'Magento\Framework\Xml'], + ['Magento\Interception', 'Magento\Framework\Interception'], + ['Magento\Json', 'Magento\Framework\Json'], + ['Magento\Less', 'Magento\Framework\Less'], + ['Magento\File', 'Magento\Framework\File'], + ['Magento\Flag', 'Magento\Framework\Flag'], + ['Magento\Io', 'Magento\Framework\Io'], + ['Magento\Mail', 'Magento\Framework\Mail'], + ['Magento\HTTP', 'Magento\Framework\HTTP'], + ['Magento\Math', 'Magento\Framework\Math'], + ['Magento\Gdata', 'Magento\Framework\Gdata'], + ['Magento\Image', 'Magento\Framework\Image'], + ['Magento\Oauth', 'Magento\Framework\Oauth'], + ['Magento\Object', 'Magento\Framework\Object'], +]; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php new file mode 100644 index 0000000000000..4045a4e47971c --- /dev/null +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_paths.php @@ -0,0 +1,245 @@ +[, ]) + * + * 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. + * + * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +return [ + ['/app/code/core/Mage', '/app/code/Magento'], + ['/lib/Magento/App', '/lib/Magento/Framework/App'], + ['/dev/tests/integration/testsuite/Magento/App', '/dev/tests/integration/testsuite/Magento/Framework/App'], + ['/dev/tests/unit/testsuite/Magento/App', '/dev/tests/unit/testsuite/Magento/Framework/App'], + ['/lib/Magento/Data', '/lib/Magento/Framework/Data'], + ['/dev/tests/integration/testsuite/Magento/Data', '/dev/tests/integration/testsuite/Magento/Framework/Data'], + ['/dev/tests/unit/testsuite/Magento/Data', '/dev/tests/unit/testsuite/Magento/Framework/Data'], + ['/lib/Magento/Filesystem', '/lib/Magento/Framework/Filesystem'], + [ + '/dev/tests/integration/testsuite/Magento/Filesystem', + '/dev/tests/integration/testsuite/Magento/Framework/Filesystem' + ], + ['/dev/tests/unit/testsuite/Magento/Filesystem', '/dev/tests/unit/testsuite/Magento/Framework/Filesystem'], + ['/lib/Magento/Config', '/lib/Magento/Framework/Config'], + ['/dev/tests/integration/testsuite/Magento/Config', '/dev/tests/integration/testsuite/Magento/Framework/Config'], + ['/dev/tests/unit/testsuite/Magento/Config', '/dev/tests/unit/testsuite/Magento/Framework/Config'], + ['/lib/Magento/Model', '/lib/Magento/Framework/Model'], + ['/dev/tests/integration/testsuite/Magento/Model', '/dev/tests/integration/testsuite/Magento/Framework/Model'], + ['/dev/tests/unit/testsuite/Magento/Model', '/dev/tests/unit/testsuite/Magento/Framework/Model'], + ['/lib/Magento/View', '/lib/Magento/Framework/View'], + ['/dev/tests/integration/testsuite/Magento/View', '/dev/tests/integration/testsuite/Magento/Framework/View'], + ['/dev/tests/unit/testsuite/Magento/View', '/dev/tests/unit/testsuite/Magento/Framework/View'], + ['/lib/Magento/DB', '/lib/Magento/Framework/DB'], + ['/dev/tests/integration/testsuite/Magento/DB', '/dev/tests/integration/testsuite/Magento/Framework/DB'], + ['/dev/tests/unit/testsuite/Magento/DB', '/dev/tests/unit/testsuite/Magento/Framework/DB'], + ['/lib/Magento/Event', '/lib/Magento/Framework/Event'], + ['/dev/tests/integration/testsuite/Magento/Event', '/dev/tests/integration/testsuite/Magento/Framework/Event'], + ['/dev/tests/unit/testsuite/Magento/Event', '/dev/tests/unit/testsuite/Magento/Framework/Event'], + ['/lib/Magento/Acl', '/lib/Magento/Framework/Acl'], + ['/dev/tests/integration/testsuite/Magento/Acl', '/dev/tests/integration/testsuite/Magento/Framework/Acl'], + ['/dev/tests/unit/testsuite/Magento/Acl', '/dev/tests/unit/testsuite/Magento/Framework/Acl'], + ['/lib/Magento/Archive', '/lib/Magento/Framework/Archive'], + [ + '/dev/tests/integration/testsuite/Magento/Archive', + '/dev/tests/integration/testsuite/Magento/Framework/Archive' + ], + ['/dev/tests/unit/testsuite/Magento/Archive', '/dev/tests/unit/testsuite/Magento/Framework/Archive'], + ['/lib/Magento/Backup', '/lib/Magento/Framework/Backup'], + ['/lib/Magento/Session', '/lib/Magento/Framework/Session'], + [ + '/dev/tests/integration/testsuite/Magento/Session', + '/dev/tests/integration/testsuite/Magento/Framework/Session' + ], + ['/dev/tests/unit/testsuite/Magento/Session', '/dev/tests/unit/testsuite/Magento/Framework/Session'], + ['/lib/Magento/Authorization', '/lib/Magento/Framework/Authorization'], + [ + '/dev/tests/integration/testsuite/Magento/Authorization', + '/dev/tests/integration/testsuite/Magento/Framework/Authorization' + ], + ['/dev/tests/unit/testsuite/Magento/Authorization', '/dev/tests/unit/testsuite/Magento/Framework/Authorization'], + ['/lib/Magento/Cache', '/lib/Magento/Framework/Cache'], + ['/dev/tests/integration/testsuite/Magento/Cache', '/dev/tests/integration/testsuite/Magento/Framework/Cache'], + ['/dev/tests/unit/testsuite/Magento/Cache', '/dev/tests/unit/testsuite/Magento/Framework/Cache'], + ['/lib/Magento/ObjectManager', '/lib/Magento/Framework/ObjectManager'], + [ + '/dev/tests/integration/testsuite/Magento/ObjectManager', + '/dev/tests/integration/testsuite/Magento/Framework/ObjectManager' + ], + ['/dev/tests/unit/testsuite/Magento/ObjectManager', '/dev/tests/unit/testsuite/Magento/Framework/ObjectManager'], + ['/lib/Magento/Exception', '/lib/Magento/Framework/Exception'], + [ + '/dev/tests/integration/testsuite/Magento/Exception', + '/dev/tests/integration/testsuite/Magento/Framework/Exception' + ], + ['/dev/tests/unit/testsuite/Magento/Exception', '/dev/tests/unit/testsuite/Magento/Framework/Exception'], + ['/lib/Magento/Autoload', '/lib/Magento/Framework/Autoload'], + [ + '/dev/tests/integration/testsuite/Magento/Autoload', + '/dev/tests/integration/testsuite/Magento/Framework/Autoload' + ], + ['/dev/tests/unit/testsuite/Magento/Autoload', '/dev/tests/unit/testsuite/Magento/Framework/Autoload'], + ['/lib/Magento/Translate', '/lib/Magento/Framework/Translate'], + [ + '/dev/tests/integration/testsuite/Magento/Translate', + '/dev/tests/integration/testsuite/Magento/Framework/Translate' + ], + ['/dev/tests/unit/testsuite/Magento/Translate', '/dev/tests/unit/testsuite/Magento/Framework/Translate'], + ['/lib/Magento/Code', '/lib/Magento/Framework/Code'], + ['/dev/tests/integration/testsuite/Magento/Code', '/dev/tests/integration/testsuite/Magento/Framework/Code'], + ['/dev/tests/unit/testsuite/Magento/Code', '/dev/tests/unit/testsuite/Magento/Framework/Code'], + ['/lib/Magento/Stdlib', '/lib/Magento/Framework/Stdlib'], + ['/dev/tests/integration/testsuite/Magento/Stdlib', '/dev/tests/integration/testsuite/Magento/Framework/Stdlib'], + ['/dev/tests/unit/testsuite/Magento/Stdlib', '/dev/tests/unit/testsuite/Magento/Framework/Stdlib'], + ['/lib/Magento/Phrase', '/lib/Magento/Framework/Phrase'], + ['/dev/tests/integration/testsuite/Magento/Phrase', '/dev/tests/integration/testsuite/Magento/Framework/Phrase'], + ['/dev/tests/unit/testsuite/Magento/Phrase', '/dev/tests/unit/testsuite/Magento/Framework/Phrase'], + ['/lib/Magento/Locale', '/lib/Magento/Framework/Locale'], + ['/dev/tests/integration/testsuite/Magento/Locale', '/dev/tests/integration/testsuite/Magento/Framework/Locale'], + ['/dev/tests/unit/testsuite/Magento/Locale', '/dev/tests/unit/testsuite/Magento/Framework/Locale'], + ['/lib/Magento/Message', '/lib/Magento/Framework/Message'], + ['/dev/tests/integration/testsuite/Magento/Message', '/dev/tests/integration/testsuite/Magento/Framework/Message'], + ['/dev/tests/unit/testsuite/Magento/Message', '/dev/tests/unit/testsuite/Magento/Framework/Message'], + ['/lib/Magento/Logger', '/lib/Magento/Framework/Logger'], + ['/dev/tests/integration/testsuite/Magento/Logger', '/dev/tests/integration/testsuite/Magento/Framework/Logger'], + ['/dev/tests/unit/testsuite/Magento/Logger', '/dev/tests/unit/testsuite/Magento/Framework/Logger'], + ['/lib/Magento/Error', '/lib/Magento/Framework/Error'], + ['/dev/tests/integration/testsuite/Magento/Error', '/dev/tests/integration/testsuite/Magento/Framework/Error'], + ['/dev/tests/unit/testsuite/Magento/Error', '/dev/tests/unit/testsuite/Magento/Framework/Error'], + ['/lib/Magento/Filter', '/lib/Magento/Framework/Filter'], + ['/dev/tests/integration/testsuite/Magento/Filter', '/dev/tests/integration/testsuite/Magento/Framework/Filter'], + ['/dev/tests/unit/testsuite/Magento/Filter', '/dev/tests/unit/testsuite/Magento/Framework/Filter'], + ['/lib/Magento/DomDocument', '/lib/Magento/Framework/DomDocument'], + [ + '/dev/tests/integration/testsuite/Magento/DomDocument', + '/dev/tests/integration/testsuite/Magento/Framework/DomDocument' + ], + ['/dev/tests/unit/testsuite/Magento/DomDocument', '/dev/tests/unit/testsuite/Magento/Framework/DomDocument'], + ['/lib/Magento/Module', '/lib/Magento/Framework/Module'], + ['/dev/tests/integration/testsuite/Magento/Module', '/dev/tests/integration/testsuite/Magento/Framework/Module'], + ['/dev/tests/unit/testsuite/Magento/Module', '/dev/tests/unit/testsuite/Magento/Framework/Module'], + ['/lib/Magento/Css', '/lib/Magento/Framework/Css'], + ['/dev/tests/integration/testsuite/Magento/Css', '/dev/tests/integration/testsuite/Magento/Framework/Css'], + ['/dev/tests/unit/testsuite/Magento/Css', '/dev/tests/unit/testsuite/Magento/Framework/Css'], + ['/lib/Magento/Pear', '/lib/Magento/Framework/Pear'], + ['/dev/tests/integration/testsuite/Magento/Pear', '/dev/tests/integration/testsuite/Magento/Framework/Pear'], + ['/dev/tests/unit/testsuite/Magento/Pear', '/dev/tests/unit/testsuite/Magento/Framework/Pear'], + ['/lib/Magento/Pricing', '/lib/Magento/Framework/Pricing'], + ['/dev/tests/integration/testsuite/Magento/Pricing', '/dev/tests/integration/testsuite/Magento/Framework/Pricing'], + ['/dev/tests/unit/testsuite/Magento/Pricing', '/dev/tests/unit/testsuite/Magento/Framework/Pricing'], + ['/lib/Magento/Connect', '/lib/Magento/Framework/Connect'], + ['/lib/Magento/Profiler', '/lib/Magento/Framework/Profiler'], + ['/dev/tests/unit/testsuite/Magento/Profiler', '/dev/tests/unit/testsuite/Magento/Framework/Profiler'], + [ + '/dev/tests/integration/testsuite/Magento/Profiler', + '/dev/tests/integration/testsuite/Magento/Framework/Profiler' + ], + ['/lib/Magento/Simplexml', '/lib/Magento/Framework/Simplexml'], + ['/dev/tests/unit/testsuite/Magento/Simplexml', '/dev/tests/unit/testsuite/Magento/Framework/Simplexml'], + [ + '/dev/tests/integration/testsuite/Magento/Simplexml', + '/dev/tests/integration/testsuite/Magento/Framework/Simplexml' + ], + ['/lib/Magento/Controller', '/lib/Magento/Framework/Controller'], + [ + '/dev/tests/integration/testsuite/Magento/Controller', + '/dev/tests/integration/testsuite/Magento/Framework/Controller' + ], + ['/dev/tests/unit/testsuite/Magento/Controller', '/dev/tests/unit/testsuite/Magento/Framework/Controller'], + ['/lib/Magento/Convert', '/lib/Magento/Framework/Convert'], + ['/dev/tests/integration/testsuite/Magento/Convert', '/dev/tests/integration/testsuite/Magento/Framework/Convert'], + ['/dev/tests/unit/testsuite/Magento/Convert', '/dev/tests/unit/testsuite/Magento/Framework/Convert'], + ['/lib/Magento/Shell', '/lib/Magento/Framework/Shell'], + ['/dev/tests/unit/testsuite/Magento/Shell', '/dev/tests/unit/testsuite/Magento/Framework/Shell'], + ['/dev/tests/integration/testsuite/Magento/Shell', '/dev/tests/integration/testsuite/Magento/Framework/Shell'], + ['/lib/Magento/Encryption', '/lib/Magento/Framework/Encryption'], + [ + '/dev/tests/integration/testsuite/Magento/Encryption', + '/dev/tests/integration/testsuite/Magento/Framework/Encryption' + ], + ['/dev/tests/unit/testsuite/Magento/Encryption', '/dev/tests/unit/testsuite/Magento/Framework/Encryption'], + ['/lib/Magento/Option', '/lib/Magento/Framework/Option'], + ['/dev/tests/unit/testsuite/Magento/Option', '/dev/tests/unit/testsuite/Magento/Framework/Option'], + ['/dev/tests/integration/testsuite/Magento/Option', '/dev/tests/integration/testsuite/Magento/Framework/Option'], + ['/lib/Magento/Service', '/lib/Magento/Framework/Service'], + ['/dev/tests/unit/testsuite/Magento/Service', '/dev/tests/unit/testsuite/Magento/Framework/Service'], + ['/dev/tests/integration/testsuite/Magento/Service', '/dev/tests/integration/testsuite/Magento/Framework/Service'], + ['/lib/Magento/System', '/lib/Magento/Framework/System'], + ['/dev/tests/unit/testsuite/Magento/System', '/dev/tests/unit/testsuite/Magento/Framework/System'], + ['/dev/tests/integration/testsuite/Magento/System', '/dev/tests/integration/testsuite/Magento/Framework/System'], + ['/lib/Magento/Url', '/lib/Magento/Framework/Url'], + ['/dev/tests/unit/testsuite/Magento/Url', '/dev/tests/unit/testsuite/Magento/Framework/Url'], + ['/dev/tests/integration/testsuite/Magento/Url', '/dev/tests/integration/testsuite/Magento/Framework/Url'], + ['/lib/Magento/Mview', '/lib/Magento/Framework/Mview'], + ['/dev/tests/unit/testsuite/Magento/Mview', '/dev/tests/unit/testsuite/Magento/Framework/Mview'], + ['/dev/tests/integration/testsuite/Magento/Mview', '/dev/tests/integration/testsuite/Magento/Framework/Mview'], + ['/lib/Magento/Validator', '/lib/Magento/Framework/Validator'], + ['/dev/tests/unit/testsuite/Magento/Validator', '/dev/tests/unit/testsuite/Magento/Framework/Validator'], + [ + '/dev/tests/integration/testsuite/Magento/Validator', + '/dev/tests/integration/testsuite/Magento/Framework/Validator' + ], + ['/lib/Magento/Xml', '/lib/Magento/Framework/Xml'], + ['/dev/tests/unit/testsuite/Magento/Xml', '/dev/tests/unit/testsuite/Magento/Framework/Xml'], + ['/dev/tests/integration/testsuite/Magento/Xml', '/dev/tests/integration/testsuite/Magento/Framework/Xml'], + ['/lib/Magento/Interception', '/lib/Magento/Framework/Interception'], + ['/dev/tests/unit/testsuite/Magento/Interception', '/dev/tests/unit/testsuite/Magento/Framework/Interception'], + [ + '/dev/tests/integration/testsuite/Magento/Interception', + '/dev/tests/integration/testsuite/Magento/Framework/Interception' + ], + ['/lib/Magento/Json', '/lib/Magento/Framework/Json'], + ['/dev/tests/unit/testsuite/Magento/Json', '/dev/tests/unit/testsuite/Magento/Framework/Json'], + ['/dev/tests/integration/testsuite/Magento/Json', '/dev/tests/integration/testsuite/Magento/Framework/Json'], + ['/lib/Magento/Less', '/lib/Magento/Framework/Less'], + ['/dev/tests/unit/testsuite/Magento/Less', '/dev/tests/unit/testsuite/Magento/Framework/Less'], + ['/dev/tests/integration/testsuite/Magento/Less', '/dev/tests/integration/testsuite/Magento/Framework/Less'], + ['/lib/Magento/File', '/lib/Magento/Framework/File'], + ['/dev/tests/unit/testsuite/Magento/File', '/dev/tests/unit/testsuite/Magento/Framework/File'], + ['/dev/tests/integration/testsuite/Magento/File', '/dev/tests/integration/testsuite/Magento/Framework/File'], + ['/lib/Magento/Flag', '/lib/Magento/Framework/Flag'], + ['/dev/tests/unit/testsuite/Magento/Flag', '/dev/tests/unit/testsuite/Magento/Framework/Flag'], + ['/dev/tests/integration/testsuite/Magento/Flag', '/dev/tests/integration/testsuite/Magento/Framework/Flag'], + ['/lib/Magento/Io', '/lib/Magento/Framework/Io'], + ['/dev/tests/unit/testsuite/Magento/Io', '/dev/tests/unit/testsuite/Magento/Framework/Io'], + ['/dev/tests/integration/testsuite/Magento/Io', '/dev/tests/integration/testsuite/Magento/Framework/Io'], + ['/lib/Magento/Mail', '/lib/Magento/Framework/Mail'], + ['/dev/tests/unit/testsuite/Magento/Mail', '/dev/tests/unit/testsuite/Magento/Framework/Mail'], + ['/dev/tests/integration/testsuite/Magento/Mail', '/dev/tests/integration/testsuite/Magento/Framework/Mail'], + ['/lib/Magento/HTTP', '/lib/Magento/Framework/HTTP'], + ['/dev/tests/unit/testsuite/Magento/Http', '/dev/tests/unit/testsuite/Magento/Framework/HTTP'], + ['/dev/tests/integration/testsuite/Magento/HTTP', '/dev/tests/integration/testsuite/Magento/Framework/HTTP'], + ['/lib/Magento/Math', '/lib/Magento/Framework/Math'], + ['/dev/tests/unit/testsuite/Magento/Math', '/dev/tests/unit/testsuite/Magento/Framework/Math'], + ['/dev/tests/integration/testsuite/Magento/Math', '/dev/tests/integration/testsuite/Magento/Framework/Math'], + ['/lib/Magento/Gdata', '/lib/Magento/Framework/Gdata'], + ['/dev/tests/unit/testsuite/Magento/Gdata', '/dev/tests/unit/testsuite/Magento/Framework/Gdata'], + ['/dev/tests/integration/testsuite/Magento/Gdata', '/dev/tests/integration/testsuite/Magento/Framework/Gdata'], + ['/lib/Magento/Image', '/lib/Magento/Framework/Image'], + ['/dev/tests/unit/testsuite/Magento/Image', '/dev/tests/unit/testsuite/Magento/Framework/Image'], + ['/dev/tests/integration/testsuite/Magento/Image', '/dev/tests/integration/testsuite/Magento/Framework/Image'], + ['/lib/Magento/Oauth', '/lib/Magento/Framework/Oauth'], + ['/dev/tests/unit/testsuite/Magento/Oauth', '/dev/tests/unit/testsuite/Magento/Framework/Oauth'], + ['/dev/tests/integration/testsuite/Magento/Oauth', '/dev/tests/integration/testsuite/Magento/Framework/Oauth'], + ['/lib/Magento/Object', '/lib/Magento/Framework/Object'], + ['/dev/tests/unit/testsuite/Magento/Object', '/dev/tests/unit/testsuite/Magento/Framework/Object'], + ['/dev/tests/integration/testsuite/Magento/Object', '/dev/tests/integration/testsuite/Magento/Framework/Object'], +]; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php index 65eddcbe393d4..505951cccdf87 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php @@ -41,7 +41,7 @@ array('_childGroups', 'Magento\Core\Block\AbstractBlock'), array('_combineHistory'), array('_config', 'Magento\Core\Model\Design\Package'), - array('_config', 'Magento\Logger', '_dirs'), + array('_config', 'Magento\Framework\Logger', '_dirs'), array('_config', 'Magento\Core\Model\Resource\Setup'), array('_configModel', 'Magento\Backend\Model\Menu\AbstractDirector'), array('_configuration', 'Magento\Index\Model\Lock\Storage', '_dirs'), @@ -54,7 +54,7 @@ array('_customerFormFactory', '\Magento\Sales\Block\Adminhtml\Order\Create\Form\Account'), array('_defaultTemplates', 'Magento\Email\Model\Template'), array('_designProductSettingsApplied'), - array('_directOutput', 'Magento\View\Layout'), + array('_directOutput', 'Magento\Framework\View\Layout'), array('_dirs', 'Magento\Framework\App\Resource'), array('_distroServerVars'), array('_entityIdsToIncrementIds'), @@ -65,17 +65,17 @@ array('_isAnonymous'), array('_isFirstTimeProcessRun', 'Magento\SalesRule\Model\Validator'), array('_isGoogleCheckoutLinkAdded', 'Magento\GoogleAnalytics\Model\Observer'), - array('_isRuntimeValidated', 'Magento\ObjectManager\Config\Reader\Dom'), + array('_isRuntimeValidated', 'Magento\Framework\ObjectManager\Config\Reader\Dom'), array('_itemPriceBlockTypes'), array('_loadDefault', 'Magento\Store\Model\Resource\Store\Collection'), array('_loadDefault', 'Magento\Store\Model\Resource\Group\Collection'), array('_loadDefault', 'Magento\Store\Model\Resource\Website\Collection'), - array('_mapper', 'Magento\ObjectManager\Config\Reader\Dom'), + array('_mapper', 'Magento\Framework\ObjectManager\Config\Reader\Dom'), array('_menu', 'Magento\Backend\Model\Menu\Builder'), array('_modulesReader', 'Magento\Framework\App\ObjectManager\ConfigLoader'), array('_moduleReader', 'Magento\Backend\Model\Menu\Config'), array('_option', 'Magento\Captcha\Helper\Data', '_dirs'), - array('_options', 'Magento\Core\Model\Config', 'Magento\Filesystem'), + array('_options', 'Magento\Core\Model\Config', 'Magento\Framework\Filesystem'), array('_optionsMapping', null, '\Magento\Framework\App\Filesystem::getPath($nodeKey)'), array('_order', 'Magento\Checkout\Block\Onepage\Success'), array('_order_id'), @@ -96,12 +96,12 @@ array('_shipTable', 'Magento\OfflineShipping\Model\Resource\Carrier\Tablerate\Collection'), array( '_showTemplateHints', - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', 'Magento\Core\Model\TemplateEngine\Plugin\DebugHints' ), array( '_showTemplateHintsBlocks', - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', 'Magento\Core\Model\TemplateEngine\Plugin\DebugHints' ), array('_sortedChildren'), @@ -109,8 +109,8 @@ array('_storeFilter', 'Magento\Catalog\Model\Product\Type\AbstractType'), array('_substServerVars'), array('_track_id'), - array('_varSubFolders', null, 'Magento\Filesystem'), - array('_viewDir', 'Magento\View\Element\Template', '_dirs'), + array('_varSubFolders', null, 'Magento\Framework\Filesystem'), + array('_viewDir', 'Magento\Framework\View\Element\Template', '_dirs'), array('decoratedIsFirst', null, 'getDecoratedIsFirst'), array('decoratedIsEven', null, 'getDecoratedIsEven'), array('decoratedIsOdd', null, 'getDecoratedIsOdd'), @@ -123,18 +123,18 @@ array('_engine', 'Magento\CatalogSearch\Model\Resource\Fulltext'), array('_allowedAreas', 'Magento\Core\Model\Config'), array('_app', 'Magento\Core\Block\AbstractBlock'), - array('_app', 'Magento\View\Element\Template'), + array('_app', 'Magento\Framework\View\Element\Template'), array('_config', 'Magento\Backend\Helper\Data'), array('_defaultAreaFrontName', 'Magento\Backend\Helper\Data'), array('_areaFrontName', 'Magento\Backend\Helper\Data'), array('_backendFrontName', 'Magento\Backend\Helper\Data'), array('_app', 'Magento\Backend\Block\Widget\Grid\Column\Renderer\Currency'), - array('_enginePool', '\Magento\View\Element\Template\Context', '_engineFactory'), + array('_enginePool', '\Magento\Framework\View\Element\Template\Context', '_engineFactory'), array('_fileHandler', '\Magento\Sitemap\Model\Sitemap', '_stream'), array('_fileIo', '\Magento\Theme\Model\Uploader\Service', '_filesystem'), array('_streamFactory', '\Magento\Core\Model\File\Storage\Config', '_filesystem'), array('_streamFactory', '\Magento\Core\Model\File\Storage\Synchronization', '_filesystem'), - array('_allowedFormats', '\Magento\Core\Helper\Data', '\Magento\Locale'), + array('_allowedFormats', '\Magento\Core\Helper\Data', '\Magento\Framework\Locale'), array('types', '\Magento\Core\Model\Theme'), array('_collectionFactory', '\Magento\Install\Controller\Action', 'themeProvider'), array('_collectionFactory', '\Magento\Theme\Model\Config\Customization', 'themeProvider'), @@ -150,11 +150,11 @@ array('_skipSessionIdFlag', '\Magento\Core\Model\Session\AbstractSession'), array('_url', '\Magento\Core\Model\Session\AbstractSession'), array('_sidNameMap', '\Magento\Core\Model\Session\AbstractSession'), - array('_store', '\Magento\Stdlib\Cookie'), - array('_lifetime', '\Magento\Stdlib\Cookie'), - array('_httpResponse', '\Magento\Stdlib\Cookie'), - array('_storeManager', '\Magento\Stdlib\Cookie'), - array('_scopeConfig', '\Magento\Stdlib\Cookie'), + array('_store', '\Magento\Framework\Stdlib\Cookie'), + array('_lifetime', '\Magento\Framework\Stdlib\Cookie'), + array('_httpResponse', '\Magento\Framework\Stdlib\Cookie'), + array('_storeManager', '\Magento\Framework\Stdlib\Cookie'), + array('_scopeConfig', '\Magento\Framework\Stdlib\Cookie'), array('_savePath', '\Magento\Core\Model\Session\Context'), array('_cacheLimiter', '\Magento\Core\Model\Session\Context'), array('_dir', '\Magento\Core\Model\Session\Context'), @@ -196,7 +196,7 @@ array('_dir', 'Magento\Backup\Model\Fs\Collection'), array('_dir', 'Magento\Cms\Model\Wysiwyg\Images\Storage'), array('_dirs', 'Magento\Core\Helper\Theme'), - array('_dirs', 'Magento\Model\Resource\Type\Db\Pdo\Mysql'), + array('_dirs', 'Magento\Framework\Model\Resource\Type\Db\Pdo\Mysql'), array('_filesystem', 'Magento\GiftWrapping\Model\Wrapping'), array('_customer', 'Magento\Backend\Model\Session\Quote'), array('_customerFactory', 'Magento\Backend\Model\Session\Quote'), @@ -208,7 +208,7 @@ array('_dirs', 'Magento\Core\Block\Template'), array('_applicationDirs', 'Magento\Framework\App\Config\FileResolver'), array('_dir', 'Magento\Core\Model\File\Storage'), - array('_dir', 'Magento\Locale\Hierarchy\Config\FileResolver'), + array('_dir', 'Magento\Framework\Locale\Hierarchy\Config\FileResolver'), array('_dirs', 'Magento\Core\Block\Template\Context'), array('_dir', 'Magento\Core\Model\Page\Asset\MergeService'), array('_dir', 'Magento\Core\Model\Page\Asset\MinifyService'), @@ -216,7 +216,7 @@ array('_dir', 'Magento\Core\Model\Session\Context'), array('dir', 'Magento\Core\Model\Theme\Image\Path'), array('_dir', 'Magento\Install\App\Action\Plugin\Dir'), - array('_dirs', 'Magento\View\Block\Template\Context'), + array('_dirs', 'Magento\Framework\View\Block\Template\Context'), array('_coreDir', 'Magento\Sales\Model\Order\Pdf\AbstractItems', '_rootDirectory'), array('_dir', 'Magento\AdvancedCheckout\Model\Import', '_filesystem'), array('_dir', 'Magento\Backup\Helper\Data'), @@ -232,56 +232,56 @@ array('_dir', 'Magento\Install\Model\Installer\Filesystem'), array('_coreDir', 'Magento\Paypal\Model\Report\Settlement', '_filesystem'), array('_applicationDirs', 'Magento\Widget\Model\Config\FileResolver', '_filesystem'), - array('_formFields', 'Magento\View\Element\Redirect', 'formFields'), - array('_formFactory', 'Magento\View\Element\Redirect', 'formFactory'), + array('_formFields', 'Magento\Framework\View\Element\Redirect', 'formFields'), + array('_formFactory', 'Magento\Framework\View\Element\Redirect', 'formFactory'), array('_dispersion', 'Magento\Theme\Block\Html\Pager'), - array('_assets', 'Magento\View\Asset\Collection', 'assets'), - array('_objectManager', 'Magento\View\Asset\GroupedCollection', 'objectManager'), - array('_groups', 'Magento\View\Asset\GroupedCollection', 'groups'), - array('_objectManager', 'Magento\View\Asset\MergeService', 'objectManager'), - array('_scopeConfig', 'Magento\View\Asset\MergeService', 'config'), - array('_filesystem', 'Magento\View\Asset\MergeService', 'filesystem'), - array('_dirs', 'Magento\View\Asset\MergeService', 'dirs'), - array('_state', 'Magento\View\Asset\MergeService', 'state'), - array('_strategy', 'Magento\View\Asset\MergeStrategy\Checksum', 'strategy'), - array('_filesystem', 'Magento\View\Asset\MergeStrategy\Checksum', 'filesystem'), - array('_filesystem', 'Magento\View\Asset\MergeStrategy\Direct', 'filesystem'), - array('_dirs', 'Magento\View\Asset\MergeStrategy\Direct', 'dirs'), - array('_cssUrlResolver', 'Magento\View\Asset\MergeStrategy\Direct', 'cssUrlResolver'), - array('_strategy', 'Magento\View\Asset\MergeStrategy\FileExists', 'strategy'), - array('_filesystem', 'Magento\View\Asset\MergeStrategy\FileExists', 'filesystem'), - array('_objectManager', 'Magento\View\Asset\Merged', 'objectManager'), - array('_logger', 'Magento\View\Asset\Merged', 'logger'), - array('_mergeStrategy', 'Magento\View\Asset\Merged', 'mergeStrategy'), - array('_assets', 'Magento\View\Asset\Merged', 'assets'), - array('_contentType', 'Magento\View\Asset\Merged', 'contentType'), - array('_originalAsset', 'Magento\View\Asset\Minified', 'originalAsset'), - array('_minifier', 'Magento\View\Asset\Minified', 'minifier'), - array('_file', 'Magento\View\Asset\Minified', 'file'), - array('_url', 'Magento\View\Asset\Minified', 'url'), - array('_viewUrl', 'Magento\View\Asset\Minified', 'viewUrl'), - array('_logger', 'Magento\View\Asset\Minified', 'logger'), - array('_scopeConfig', 'Magento\View\Asset\MinifyService', 'сonfig'), - array('_objectManager', 'Magento\View\Asset\MinifyService', 'objectManager'), - array('_enabled', 'Magento\View\Asset\MinifyService', 'enabled'), - array('_minifiers', 'Magento\View\Asset\MinifyService', 'minifiers'), - array('_dirs', 'Magento\View\Asset\MinifyService', 'dirs'), - array('_appState', 'Magento\View\Asset\MinifyService', 'appState'), - array('_properties', 'Magento\View\Asset\PropertyGroup', 'properties'), - array('_viewUrl', 'Magento\View\Asset\PublicFile', 'viewUrl'), + array('_assets', 'Magento\Framework\View\Asset\Collection', 'assets'), + array('_objectManager', 'Magento\Framework\View\Asset\GroupedCollection', 'objectManager'), + array('_groups', 'Magento\Framework\View\Asset\GroupedCollection', 'groups'), + array('_objectManager', 'Magento\Framework\View\Asset\MergeService', 'objectManager'), + array('_scopeConfig', 'Magento\Framework\View\Asset\MergeService', 'config'), + array('_filesystem', 'Magento\Framework\View\Asset\MergeService', 'filesystem'), + array('_dirs', 'Magento\Framework\View\Asset\MergeService', 'dirs'), + array('_state', 'Magento\Framework\View\Asset\MergeService', 'state'), + array('_strategy', 'Magento\Framework\View\Asset\MergeStrategy\Checksum', 'strategy'), + array('_filesystem', 'Magento\Framework\View\Asset\MergeStrategy\Checksum', 'filesystem'), + array('_filesystem', 'Magento\Framework\View\Asset\MergeStrategy\Direct', 'filesystem'), + array('_dirs', 'Magento\Framework\View\Asset\MergeStrategy\Direct', 'dirs'), + array('_cssUrlResolver', 'Magento\Framework\View\Asset\MergeStrategy\Direct', 'cssUrlResolver'), + array('_strategy', 'Magento\Framework\View\Asset\MergeStrategy\FileExists', 'strategy'), + array('_filesystem', 'Magento\Framework\View\Asset\MergeStrategy\FileExists', 'filesystem'), + array('_objectManager', 'Magento\Framework\View\Asset\Merged', 'objectManager'), + array('_logger', 'Magento\Framework\View\Asset\Merged', 'logger'), + array('_mergeStrategy', 'Magento\Framework\View\Asset\Merged', 'mergeStrategy'), + array('_assets', 'Magento\Framework\View\Asset\Merged', 'assets'), + array('_contentType', 'Magento\Framework\View\Asset\Merged', 'contentType'), + array('_originalAsset', 'Magento\Framework\View\Asset\Minified', 'originalAsset'), + array('_minifier', 'Magento\Framework\View\Asset\Minified', 'minifier'), + array('_file', 'Magento\Framework\View\Asset\Minified', 'file'), + array('_url', 'Magento\Framework\View\Asset\Minified', 'url'), + array('_viewUrl', 'Magento\Framework\View\Asset\Minified', 'viewUrl'), + array('_logger', 'Magento\Framework\View\Asset\Minified', 'logger'), + array('_scopeConfig', 'Magento\Framework\View\Asset\MinifyService', 'сonfig'), + array('_objectManager', 'Magento\Framework\View\Asset\MinifyService', 'objectManager'), + array('_enabled', 'Magento\Framework\View\Asset\MinifyService', 'enabled'), + array('_minifiers', 'Magento\Framework\View\Asset\MinifyService', 'minifiers'), + array('_dirs', 'Magento\Framework\View\Asset\MinifyService', 'dirs'), + array('_appState', 'Magento\Framework\View\Asset\MinifyService', 'appState'), + array('_properties', 'Magento\Framework\View\Asset\PropertyGroup', 'properties'), + array('_viewUrl', 'Magento\Framework\View\Asset\PublicFile', 'viewUrl'), array('_productThumbnail', 'Magento\Checkout\Block\Cart\Item\Renderer'), - array('_file', 'Magento\View\Asset\PublicFile', 'file'), - array('_contentType', 'Magento\View\Asset\PublicFile', 'contentType'), - array('_url', 'Magento\View\Asset\Remote', 'url'), - array('_contentType', 'Magento\View\Asset\Remote', 'contentType'), - array('_viewUrl', 'Magento\View\Asset\ViewFile', 'viewUrl'), - array('_file', 'Magento\View\Asset\ViewFile', 'file'), - array('_contentType', 'Magento\View\Asset\ViewFile', 'contentType'), - array('_frameOpenTag', 'Magento\View\Element\AbstractBlock'), - array('_frameCloseTag', 'Magento\View\Element\AbstractBlock'), - array('_messagesBlock', 'Magento\View\Element\AbstractBlock'), + array('_file', 'Magento\Framework\View\Asset\PublicFile', 'file'), + array('_contentType', 'Magento\Framework\View\Asset\PublicFile', 'contentType'), + array('_url', 'Magento\Framework\View\Asset\Remote', 'url'), + array('_contentType', 'Magento\Framework\View\Asset\Remote', 'contentType'), + array('_viewUrl', 'Magento\Framework\View\Asset\ViewFile', 'viewUrl'), + array('_file', 'Magento\Framework\View\Asset\ViewFile', 'file'), + array('_contentType', 'Magento\Framework\View\Asset\ViewFile', 'contentType'), + array('_frameOpenTag', 'Magento\Framework\View\Element\AbstractBlock'), + array('_frameCloseTag', 'Magento\Framework\View\Element\AbstractBlock'), + array('_messagesBlock', 'Magento\Framework\View\Element\AbstractBlock'), array('_messagesBlock', 'Magento\Connect\Helper\Data'), - array('escapeMessageFlag', 'Magento\View\Block\Messages'), + array('escapeMessageFlag', 'Magento\Framework\View\Block\Messages'), array('_handlerFactory', 'Magento\Backend\Block\Widget\Grid\Massaction\Additional'), array('_flatResourceFactory', 'Magento\Catalog\Model\Observer'), array('_catalogCategoryFlat', 'Magento\Catalog\Model\Observer'), @@ -296,30 +296,30 @@ array('_columnsSql', 'Magento\Catalog\Model\Resource\Category\Flat'), array('_columns', 'Magento\Catalog\Model\Resource\Category\Flat'), array('fileIteratorFactory', 'Magento\Core\Model\Theme\Collection'), - array('_allowDuplication', 'Magento\View\Publisher'), - array('_modulesReader', 'Magento\View\Publisher'), + array('_allowDuplication', 'Magento\Framework\View\Publisher'), + array('_modulesReader', 'Magento\Framework\View\Publisher'), array('_directoryUrl', 'Magento\Directory\Block\Currency'), array('_pageVarName', 'Magento\Catalog\Block\Product\ProductList\Toolbar'), array('_orderVarName', 'Magento\Catalog\Block\Product\ProductList\Toolbar'), array('_directionVarName', 'Magento\Catalog\Block\Product\ProductList\Toolbar'), array('_modeVarName', 'Magento\Catalog\Block\Product\ProductList\Toolbar'), array('_limitVarName', 'Magento\Catalog\Block\Product\ProductList\Toolbar'), - array('_encryptedSessionId', 'Magento\Url'), - ['_tokenRegex', 'Magento\Translate\Inline'], - ['_translator', 'Magento\Translate\Inline'], - ['_appState', 'Magento\Translate\Inline'], - ['_translateInline', 'Magento\Translate'], - ['_inlineInterface', 'Magento\Translate'], - ['_translateFactory', 'Magento\Translate'], - ['_placeholderRender', 'Magento\Translate'], - ['_canUseInline', 'Magento\Translate'], - ['_eventManager', 'Magento\Translate'], + array('_encryptedSessionId', 'Magento\Framework\Url'), + ['_tokenRegex', 'Magento\Framework\Translate\Inline'], + ['_translator', 'Magento\Framework\Translate\Inline'], + ['_appState', 'Magento\Framework\Translate\Inline'], + ['_translateInline', 'Magento\Framework\Translate'], + ['_inlineInterface', 'Magento\Framework\Translate'], + ['_translateFactory', 'Magento\Framework\Translate'], + ['_placeholderRender', 'Magento\Framework\Translate'], + ['_canUseInline', 'Magento\Framework\Translate'], + ['_eventManager', 'Magento\Framework\Translate'], ['_inlineFactory', 'Magento\Framework\App\Helper\Context', 'translateInline'], ['_inlineFactory', 'Magento\Framework\App\Helper\AbstractHelper', 'translateInline'], ['_storeManager', 'Magento\Translation\Model\Resource\Translate'], ['_storeManager', 'Magento\Translation\Model\Resource\String'], ['_isVdeRequest', 'Magento\DesignEditor\Helper\Data'], - ['_translator', 'Magento\Phrase\Renderer\Translate', 'translator'], + ['_translator', 'Magento\Framework\Phrase\Renderer\Translate', 'translator'], ['_translator', 'Magento\Core\Model\Validator\Factory'], ['_configFactory', 'Magento\Core\Model\App\Emulation', 'inlineConfig'], ['_scopeConfig', 'Magento\Translation\Model\Inline\Config', 'config'], @@ -336,6 +336,6 @@ ['_translate', 'Magento\Rma\Model\Rma\Status\History'], ['_translate', 'Magento\Sales\Model\Order\Pdf\AbstractPdf'], ['_layout', 'Magento\Install\App\Action\Plugin\Design'], - ['_layout', 'Magento\View\DesignLoader'], - ['_area', 'Magento\View\Layout'], + ['_layout', 'Magento\Framework\View\DesignLoader'], + ['_area', 'Magento\Framework\View\Layout'], ); diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt index 04f530160613c..cff3d675e6653 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt @@ -19,12 +19,12 @@ app/code/Magento/RecurringPayment/view dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php dev/tests/integration/framework/Magento/TestFramework/Db/ConnectionAdapter.php -dev/tests/integration/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php +dev/tests/integration/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/TemplateFilesTest.php dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/TemplateFilesTest.php dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormStub.php -dev/tests/integration/testsuite/Magento/Interception/Fixture -dev/tests/integration/testsuite/Magento/Code/_expected +dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture +dev/tests/integration/testsuite/Magento/Framework/Code/_expected dev/tests/integration/tmp dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input @@ -33,89 +33,89 @@ dev/tests/static/testsuite/Magento/Test/Legacy/_files dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/MysqlStub.php dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueTest.php dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php -dev/tests/unit/testsuite/Magento/Session/ConfigTest.php -dev/tests/unit/testsuite/Magento/View/TemplateEngine/_files +dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php +dev/tests/unit/testsuite/Magento/Framework/View/TemplateEngine/_files dev/tools/Magento/Tools/I18n/Zend lib/Magento/Framework/App/Config/Element.php -lib/Magento/Archive -lib/Magento/Autoload/Simple.php -lib/Magento/Backup -lib/Magento/Cache/Backend/Database.php -lib/Magento/Cache/Backend/Eaccelerator.php -lib/Magento/Cache/Backend/Memcached.php -lib/Magento/Cache/Core.php -lib/Magento/Connect -lib/Magento/Data/Collection.php -lib/Magento/Data/Collection/Db.php -lib/Magento/Data/Collection/Db/FetchStrategy/Cache.php -lib/Magento/Data/Collection/Db/FetchStrategy/Query.php -lib/Magento/Data/Collection/Db/FetchStrategyInterface.php -lib/Magento/Data/Collection/Filesystem.php -lib/Magento/Data/Form.php -lib/Magento/Data/Form/AbstractForm.php -lib/Magento/Data/Form/Element/AbstractElement.php -lib/Magento/Data/Form/Element/Button.php -lib/Magento/Data/Form/Element/Checkbox.php -lib/Magento/Data/Form/Element/Checkboxes.php -lib/Magento/Data/Form/Element/Collection.php -lib/Magento/Data/Form/Element/Column.php -lib/Magento/Data/Form/Element/Date.php -lib/Magento/Data/Form/Element/Editablemultiselect.php -lib/Magento/Data/Form/Element/Editor.php -lib/Magento/Data/Form/Element/Fieldset.php -lib/Magento/Data/Form/Element/File.php -lib/Magento/Data/Form/Element/Gallery.php -lib/Magento/Data/Form/Element/Hidden.php -lib/Magento/Data/Form/Element/Image.php -lib/Magento/Data/Form/Element/Imagefile.php -lib/Magento/Data/Form/Element/Label.php -lib/Magento/Data/Form/Element/Link.php -lib/Magento/Data/Form/Element/Multiline.php -lib/Magento/Data/Form/Element/Multiselect.php -lib/Magento/Data/Form/Element/Note.php -lib/Magento/Data/Form/Element/Obscure.php -lib/Magento/Data/Form/Element/Password.php -lib/Magento/Data/Form/Element/Radio.php -lib/Magento/Data/Form/Element/Radios.php -lib/Magento/Data/Form/Element/Renderer/RendererInterface.php -lib/Magento/Data/Form/Element/Reset.php -lib/Magento/Data/Form/Element/Select.php -lib/Magento/Data/Form/Element/Submit.php -lib/Magento/Data/Form/Element/Text.php -lib/Magento/Data/Form/Element/Textarea.php -lib/Magento/Data/Form/Element/Time.php -lib/Magento/Data/Form/Filter/Date.php -lib/Magento/Data/Form/Filter/Escapehtml.php -lib/Magento/Data/Form/Filter/FilterInterface.php -lib/Magento/Data/Form/Filter/Striptags.php -lib/Magento/Data/Tree.php -lib/Magento/Data/Tree/Db.php -lib/Magento/Data/Tree/Dbp.php -lib/Magento/Data/Tree/Node.php -lib/Magento/Data/Tree/Node/Collection.php -lib/Magento/DB -lib/Magento/Stdlib/DateTime.php -lib/Magento/Debug.php -lib/Magento/Event.php -lib/Magento/Event -lib/Magento/File/Csv.php -lib/Magento/File/CsvMulty.php -lib/Magento/File/Transfer/Adapter/Http.php -lib/Magento/File/Uploader.php -lib/Magento/Gdata -lib/Magento/HTTP/Adapter/Curl.php -lib/Magento/HTTP/Client.php -lib/Magento/HTTP/Client/Curl.php -lib/Magento/HTTP/Client/Socket.php -lib/Magento/HTTP/IClient.php -lib/Magento/Image -lib/Magento/Image.php -lib/Magento/Io -lib/Magento/Object -lib/Magento/Object.php -lib/Magento/Pear -lib/Magento/Pear.php -lib/Magento/Simplexml -lib/Magento/System -lib/Magento/Util.php -lib/Magento/Xml +lib/Magento/Framework/Archive +lib/Magento/Framework/Autoload/Simple.php +lib/Magento/Framework/Backup +lib/Magento/Framework/Cache/Backend/Database.php +lib/Magento/Framework/Cache/Backend/Eaccelerator.php +lib/Magento/Framework/Cache/Backend/Memcached.php +lib/Magento/Framework/Cache/Core.php +lib/Magento/Framework/Connect +lib/Magento/Framework/Data/Collection.php +lib/Magento/Framework/Data/Collection/Db.php +lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Cache.php +lib/Magento/Framework/Data/Collection/Db/FetchStrategy/Query.php +lib/Magento/Framework/Data/Collection/Db/FetchStrategyInterface.php +lib/Magento/Framework/Data/Collection/Filesystem.php +lib/Magento/Framework/Data/Form.php +lib/Magento/Framework/Data/Form/AbstractForm.php +lib/Magento/Framework/Data/Form/Element/AbstractElement.php +lib/Magento/Framework/Data/Form/Element/Button.php +lib/Magento/Framework/Data/Form/Element/Checkbox.php +lib/Magento/Framework/Data/Form/Element/Checkboxes.php +lib/Magento/Framework/Data/Form/Element/Collection.php +lib/Magento/Framework/Data/Form/Element/Column.php +lib/Magento/Framework/Data/Form/Element/Date.php +lib/Magento/Framework/Data/Form/Element/Editablemultiselect.php +lib/Magento/Framework/Data/Form/Element/Editor.php +lib/Magento/Framework/Data/Form/Element/Fieldset.php +lib/Magento/Framework/Data/Form/Element/File.php +lib/Magento/Framework/Data/Form/Element/Gallery.php +lib/Magento/Framework/Data/Form/Element/Hidden.php +lib/Magento/Framework/Data/Form/Element/Image.php +lib/Magento/Framework/Data/Form/Element/Imagefile.php +lib/Magento/Framework/Data/Form/Element/Label.php +lib/Magento/Framework/Data/Form/Element/Link.php +lib/Magento/Framework/Data/Form/Element/Multiline.php +lib/Magento/Framework/Data/Form/Element/Multiselect.php +lib/Magento/Framework/Data/Form/Element/Note.php +lib/Magento/Framework/Data/Form/Element/Obscure.php +lib/Magento/Framework/Data/Form/Element/Password.php +lib/Magento/Framework/Data/Form/Element/Radio.php +lib/Magento/Framework/Data/Form/Element/Radios.php +lib/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php +lib/Magento/Framework/Data/Form/Element/Reset.php +lib/Magento/Framework/Data/Form/Element/Select.php +lib/Magento/Framework/Data/Form/Element/Submit.php +lib/Magento/Framework/Data/Form/Element/Text.php +lib/Magento/Framework/Data/Form/Element/Textarea.php +lib/Magento/Framework/Data/Form/Element/Time.php +lib/Magento/Framework/Data/Form/Filter/Date.php +lib/Magento/Framework/Data/Form/Filter/Escapehtml.php +lib/Magento/Framework/Data/Form/Filter/FilterInterface.php +lib/Magento/Framework/Data/Form/Filter/Striptags.php +lib/Magento/Framework/Data/Tree.php +lib/Magento/Framework/Data/Tree/Db.php +lib/Magento/Framework/Data/Tree/Dbp.php +lib/Magento/Framework/Data/Tree/Node.php +lib/Magento/Framework/Data/Tree/Node/Collection.php +lib/Magento/Framework/DB +lib/Magento/Framework/Stdlib/DateTime.php +lib/Magento/Framework/Debug.php +lib/Magento/Framework/Event.php +lib/Magento/Framework/Event +lib/Magento/Framework/File/Csv.php +lib/Magento/Framework/File/CsvMulty.php +lib/Magento/Framework/File/Transfer/Adapter/Http.php +lib/Magento/Framework/File/Uploader.php +lib/Magento/Framework/Gdata +lib/Magento/Framework/HTTP/Adapter/Curl.php +lib/Magento/Framework/HTTP/Client.php +lib/Magento/Framework/HTTP/Client/Curl.php +lib/Magento/Framework/HTTP/Client/Socket.php +lib/Magento/Framework/HTTP/IClient.php +lib/Magento/Framework/Image +lib/Magento/Framework/Image.php +lib/Magento/Framework/Io +lib/Magento/Framework/Object +lib/Magento/Framework/Object.php +lib/Magento/Framework/Pear +lib/Magento/Framework/Pear.php +lib/Magento/Framework/Simplexml +lib/Magento/Framework/System +lib/Magento/Framework/Util.php +lib/Magento/Framework/Xml diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt index 3f88a75c9c5b2..d9488feaba321 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt @@ -12,7 +12,7 @@ Zend downloader dev Mysql -lib/Magento/DB +lib/Magento/Framework/DB sql data Magento/Paypal @@ -97,13 +97,13 @@ Magento/Webapi/Model Magento/Widget/Model/Widget/Instance Magento/Wishlist/Block Magento/Wishlist/Model -lib/Magento/Archive -lib/Magento/Connect/Channel -lib/Magento/HTTP/Client -lib/Magento/Acl +lib/Magento/Framework/Archive +lib/Magento/Framework/Connect/Channel +lib/Magento/Framework/HTTP/Client +lib/Magento/Framework/Acl lib/PEAR lib/phpseclib -lib/Magento/Convert +lib/Magento/Framework/Convert lib/Magento/Framework/App/Config Magento/Cron/Model Magento/SalesRule/Model/Resource/Report/Rule @@ -118,7 +118,7 @@ Magento/Newsletter/Block/Adminhtml/Template/Grid/Renderer Magento/Newsletter/Model/Template/Filter Magento/Newsletter/Model/Resource/Subscriber Magento/CatalogInventory/Model/Resource/Stock/Item -lib/Magento/Filesystem/Driver +lib/Magento/Framework/Filesystem/Driver Magento/OfflineShipping/Model/Carrier Magento/Usps/Model/Carrier Magento/Dhl/Model diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt index 85dc1e4ba3ca4..8e47c335af433 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt @@ -35,11 +35,11 @@ dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeStyleTest/phpcs/input # Example files that are expected to fail code mess detector dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input # __ method for Translate cannot be in camelCase -lib/Magento/Translate/Adapter.php +lib/Magento/Framework/Translate/Adapter.php # __ method for Translate cannot be in camelCase -lib/Magento/Translate/AdapterInterface.php +lib/Magento/Framework/Translate/AdapterInterface.php # WrapperInterface methods cannot be camelCase as they follow method naming convention from framework classes -lib/Magento/Filesystem/WrapperInterface.php +lib/Magento/Framework/Filesystem/WrapperInterface.php # PSR-1 not applied to dev/tests/integration/testsuite/Magento # PSR-1 not applied to diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt index 2ab241d024d81..5f416545b492f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt @@ -56,6 +56,7 @@ app/code/Magento/Customer/Controller app/code/Magento/Customer/Helper app/code/Magento/Customer/Model/Address/Config app/code/Magento/Customer/Model/Address/Config.php +app/code/Magento/Customer/Model/ImportExport/Import/CustomerComposite.php app/code/Magento/Customer/Service app/code/Magento/Directory/Model/Currency/DefaultLocator.php app/code/Magento/Directory/Model/Resource/Region @@ -66,15 +67,14 @@ app/code/Magento/GoogleShopping/Model/AttributeFactory.php app/code/Magento/Eav/Model/Entity/Attribute/Config app/code/Magento/Eav/Model/Entity/Attribute/Config.php app/code/Magento/Email -app/code/Magento/ImportExport/Model/Import/Entity/CustomerComposite.php app/code/Magento/ImportExport/Model/Export/Config app/code/Magento/ImportExport/Model/Export/Config.php app/code/Magento/ImportExport/Model/Export/ConfigInterface.php app/code/Magento/ImportExport/Model/Import/Config app/code/Magento/ImportExport/Model/Import/Config.php app/code/Magento/ImportExport/Model/Import/ConfigInterface.php -app/code/Magento/ImportExport/Model/Resource/Customer/Storage.php -app/code/Magento/ImportExport/Model/Resource/Import/CustomerComposite/Data.php +app/code/Magento/Customer/Model/Resource/ImportExport/Import/Customer/Storage.php +app/code/Magento/Customer/Model/Resource/ImportExport/Import/CustomerComposite/Data.php app/code/Magento/ImportExport/Controller/Adminhtml/Import.php app/code/Magento/Index/Model/Indexer/Config app/code/Magento/Index/Model/Indexer/Config.php @@ -122,19 +122,19 @@ dev/tests/performance dev/tests/static dev/tests/unit dev/tools -lib/Magento/Backup/Db -lib/Magento/Backup/Factory.php -lib/Magento/Cache/Core.php -lib/Magento/Convert -lib/Magento/Exception -lib/Magento/Stdlib/DateTime.php -lib/Magento/Object.php +lib/Magento/Framework/Backup/Db +lib/Magento/Framework/Backup/Factory.php +lib/Magento/Framework/Cache/Core.php +lib/Magento/Framework/Convert +lib/Magento/Framework/Exception +lib/Magento/Framework/Stdlib/DateTime.php +lib/Magento/Framework/Object.php lib/Magento/Framework/App -lib/Magento/Data/Argument -lib/Magento/ObjectManager -lib/Magento/Service -lib/Magento/Url/SecurityInfoInterface.php -lib/Magento/View +lib/Magento/Framework/Data/Argument +lib/Magento/Framework/ObjectManager +lib/Magento/Framework/Service +lib/Magento/Framework/Url/SecurityInfoInterface.php +lib/Magento/Framework/View lib/Magento/Framework/App/AbstractShell.php -lib/Magento/Locale/Validator.php +lib/Magento/Framework/Locale/Validator.php lib/Magento/Framework/App/Config diff --git a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php index 87b052ccf0baf..1bb3b0b778daf 100644 --- a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php +++ b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php @@ -84,42 +84,42 @@ class Adminhtml extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Store\Model\StoreManager */ protected $_storeManagerMock; - /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Math\Random */ + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Math\Random */ protected $_mathMock; - /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Data\Form\FormKey */ + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Data\Form\FormKey */ protected $_formKey; protected function setUp() { // These mocks are accessed via context - $this->_designMock = $this->_makeMock('Magento\View\DesignInterface'); - $this->_sessionMock = $this->_makeMock('Magento\Session\Generic'); - $this->_sidResolver = $this->_makeMock('Magento\Session\SidResolver'); - $this->_translatorMock = $this->_makeMock('Magento\TranslateInterface'); - $this->_layoutMock = $this->_makeMock('Magento\View\Layout'); + $this->_designMock = $this->_makeMock('Magento\Framework\View\DesignInterface'); + $this->_sessionMock = $this->_makeMock('Magento\Framework\Session\Generic'); + $this->_sidResolver = $this->_makeMock('Magento\Framework\Session\SidResolver'); + $this->_translatorMock = $this->_makeMock('Magento\Framework\TranslateInterface'); + $this->_layoutMock = $this->_makeMock('Magento\Framework\View\Layout'); $this->_requestMock = $this->_makeMock('Magento\Framework\App\RequestInterface'); - $this->_messagesMock = $this->_makeMock('Magento\View\Element\Messages'); - $this->_urlMock = $this->_makeMock('Magento\UrlInterface'); - $this->_eventManagerMock = $this->_makeMock('Magento\Event\ManagerInterface'); + $this->_messagesMock = $this->_makeMock('Magento\Framework\View\Element\Messages'); + $this->_urlMock = $this->_makeMock('Magento\Framework\UrlInterface'); + $this->_eventManagerMock = $this->_makeMock('Magento\Framework\Event\ManagerInterface'); $this->_controllerMock = $this->_makeMock('Magento\Framework\App\FrontController'); - $this->_loggerMock = $this->_makeMock('Magento\Logger'); + $this->_loggerMock = $this->_makeMock('Magento\Framework\Logger'); $this->_filesystemMock = $this->_makeMock('Magento\Framework\App\Filesystem'); $this->_cacheMock = $this->_makeMock('Magento\Framework\App\CacheInterface'); $this->_scopeConfigMock = $this->_makeMock('Magento\Framework\App\Config\ScopeConfigInterface'); $this->_storeManagerMock = $this->_makeMock('Magento\Store\Model\StoreManager'); - $viewUrlMock = $this->_makeMock('Magento\View\Url'); - $viewConfigMock = $this->_makeMock('Magento\View\ConfigInterface'); - $viewFileSystemMock = $this->_makeMock('Magento\View\FileSystem'); - $templatePoolMock = $this->_makeMock('Magento\View\TemplateEnginePool'); - $authorizationMock = $this->_makeMock('Magento\AuthorizationInterface'); + $viewUrlMock = $this->_makeMock('Magento\Framework\View\Url'); + $viewConfigMock = $this->_makeMock('Magento\Framework\View\ConfigInterface'); + $viewFileSystemMock = $this->_makeMock('Magento\Framework\View\FileSystem'); + $templatePoolMock = $this->_makeMock('Magento\Framework\View\TemplateEnginePool'); + $authorizationMock = $this->_makeMock('Magento\Framework\AuthorizationInterface'); $cacheStateMock = $this->_makeMock('Magento\Framework\App\Cache\StateInterface'); - $escaperMock = $this->_makeMock('Magento\Escaper'); - $filterManagerMock = $this->_makeMock('Magento\Filter\FilterManager'); + $escaperMock = $this->_makeMock('Magento\Framework\Escaper'); + $filterManagerMock = $this->_makeMock('Magento\Framework\Filter\FilterManager'); $backendSessionMock = $this->_makeMock('Magento\Backend\Model\Session'); $appState = $this->_makeMock('Magento\Framework\App\State'); - $this->_mathMock = $this->_makeMock('Magento\Math\Random'); - $this->_formKey = $this->_makeMock('Magento\Data\Form\FormKey'); + $this->_mathMock = $this->_makeMock('Magento\Framework\Math\Random'); + $this->_formKey = $this->_makeMock('Magento\Framework\Data\Form\FormKey'); $appState->setAreaCode(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE); diff --git a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php index 0fba8a1596a81..4742a6c2daae9 100644 --- a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php +++ b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php @@ -37,8 +37,8 @@ class ObjectManager * @var array */ protected $_specialCases = array( - 'Magento\Model\Resource\AbstractResource' => '_getResourceModelMock', - 'Magento\TranslateInterface' => '_getTranslatorMock', + 'Magento\Framework\Model\Resource\AbstractResource' => '_getResourceModelMock', + 'Magento\Framework\TranslateInterface' => '_getTranslatorMock', ); /** @@ -88,7 +88,7 @@ protected function _processSpecialCases($className, $arguments) { $object = null; $interfaces = class_implements($className); - if (in_array('Magento\ObjectManager\ContextInterface', $interfaces)) { + if (in_array('Magento\Framework\ObjectManager\ContextInterface', $interfaces)) { $object = $this->getObject($className, $arguments); } elseif (isset($this->_specialCases[$className])) { $method = $this->_specialCases[$className]; @@ -101,7 +101,7 @@ protected function _processSpecialCases($className, $arguments) /** * Retrieve specific mock of core resource model * - * @return \Magento\Module\ResourceInterface|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Module\ResourceInterface|\PHPUnit_Framework_MockObject_MockObject */ protected function _getResourceModelMock() { @@ -127,7 +127,7 @@ protected function _getResourceModelMock() * Retrieve mock of core translator model * * @param string $className - * @return \Magento\TranslateInterface|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\TranslateInterface|\PHPUnit_Framework_MockObject_MockObject */ protected function _getTranslatorMock($className) { @@ -236,8 +236,10 @@ public function getConstructArguments($className, array $arguments = array()) */ public function getCollectionMock($className, array $data) { - if (!is_subclass_of($className, '\Magento\Data\Collection')) { - throw new \InvalidArgumentException($className . ' does not instance of \Magento\Data\Collection'); + if (!is_subclass_of($className, '\Magento\Framework\Data\Collection')) { + throw new \InvalidArgumentException( + $className . ' does not instance of \Magento\Framework\Data\Collection' + ); } $mock = $this->_testObject->getMock($className, array(), array(), '', false, false); $iterator = new \ArrayIterator($data); diff --git a/dev/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/bootstrap.php index 86e3d674946eb..146844c585325 100644 --- a/dev/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/bootstrap.php @@ -29,7 +29,7 @@ require BP . '/app/functions.php'; require BP . '/app/autoload.php'; -\Magento\Autoload\IncludePath::addIncludePath( +\Magento\Framework\Autoload\IncludePath::addIncludePath( array( __DIR__, realpath(__DIR__ . '/../testsuite'), @@ -39,12 +39,12 @@ ) ); if (is_dir(TESTS_TEMP_DIR)) { - $filesystemAdapter = new \Magento\Filesystem\Driver\File(); + $filesystemAdapter = new \Magento\Framework\Filesystem\Driver\File(); $filesystemAdapter->deleteDirectory(TESTS_TEMP_DIR); } mkdir(TESTS_TEMP_DIR); -\Magento\Phrase::setRenderer(new \Magento\Phrase\Renderer\Placeholder()); +\Magento\Framework\Phrase::setRenderer(new \Magento\Framework\Phrase\Renderer\Placeholder()); function tool_autoloader($className) { diff --git a/dev/tests/unit/framework/tests/unit/framework/bootstrap.php b/dev/tests/unit/framework/tests/unit/framework/bootstrap.php index dec5e35051df8..4fbac1ae7414c 100644 --- a/dev/tests/unit/framework/tests/unit/framework/bootstrap.php +++ b/dev/tests/unit/framework/tests/unit/framework/bootstrap.php @@ -27,6 +27,6 @@ $rootDir = realpath(__DIR__ . '/../../../../../../..'); require __DIR__ . '/../../../../../../../app/autoload.php'; -\Magento\Autoload\IncludePath::addIncludePath( +\Magento\Framework\Autoload\IncludePath::addIncludePath( array($rootDir . '/lib/', $rootDir . '/dev/tests/unit/framework/', $rootDir . '/app/code/', $rootDir . '/app') ); diff --git a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php index b2d89559203a5..ab132e3f9da37 100644 --- a/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php +++ b/dev/tests/unit/framework/tests/unit/testsuite/Magento/TestFramework/Helper/ObjectManagerTest.php @@ -35,12 +35,12 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase */ protected $_blockDependencies = array( 'request' => 'Magento\Framework\App\RequestInterface', - 'layout' => 'Magento\View\LayoutInterface', - 'eventManager' => 'Magento\Event\ManagerInterface', - 'translator' => 'Magento\TranslateInterface', + 'layout' => 'Magento\Framework\View\LayoutInterface', + 'eventManager' => 'Magento\Framework\Event\ManagerInterface', + 'translator' => 'Magento\Framework\TranslateInterface', 'cache' => 'Magento\Framework\App\CacheInterface', - 'design' => 'Magento\View\DesignInterface', - 'session' => 'Magento\Session\SessionManagerInterface', + 'design' => 'Magento\Framework\View\DesignInterface', + 'session' => 'Magento\Framework\Session\SessionManagerInterface', 'scopeConfig' => 'Magento\Framework\App\Config\ScopeConfigInterface' ); @@ -50,10 +50,10 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_modelDependencies = array( - 'eventManager' => 'Magento\Event\ManagerInterface', + 'eventManager' => 'Magento\Framework\Event\ManagerInterface', 'cacheManager' => 'Magento\Framework\App\CacheInterface', - 'resource' => 'Magento\Model\Resource\AbstractResource', - 'resourceCollection' => 'Magento\Data\Collection\Db' + 'resource' => 'Magento\Framework\Model\Resource\AbstractResource', + 'resourceCollection' => 'Magento\Framework\Data\Collection\Db' ); /** @@ -62,9 +62,9 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase public function testGetBlock() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var $template \Magento\View\Element\Template */ - $template = $objectManager->getObject('Magento\View\Element\Template'); - $this->assertInstanceOf('Magento\View\Element\Template', $template); + /** @var $template \Magento\Framework\View\Element\Template */ + $template = $objectManager->getObject('Magento\Framework\View\Element\Template'); + $this->assertInstanceOf('Magento\Framework\View\Element\Template', $template); foreach ($this->_blockDependencies as $propertyName => $propertyType) { $this->assertAttributeInstanceOf($propertyType, '_' . $propertyName, $template); } @@ -74,13 +74,13 @@ public function testGetBlock() $appStateMock = $this->getMock('Magento\Framework\App\State', array('getAreaCode'), array(), '', false); $appStateMock->expects($this->once())->method('getAreaCode')->will($this->returnValue($area)); - $context = $objectManager->getObject('Magento\View\Element\Template\Context'); - $appStateProperty = new \ReflectionProperty('Magento\View\Element\Template\Context', '_appState'); + $context = $objectManager->getObject('Magento\Framework\View\Element\Template\Context'); + $appStateProperty = new \ReflectionProperty('Magento\Framework\View\Element\Template\Context', '_appState'); $appStateProperty->setAccessible(true); $appStateProperty->setValue($context, $appStateMock); - /** @var $template \Magento\View\Element\Template */ - $template = $objectManager->getObject('Magento\View\Element\Template', array('context' => $context)); + /** @var $template \Magento\Framework\View\Element\Template */ + $template = $objectManager->getObject('Magento\Framework\View\Element\Template', array('context' => $context)); $this->assertEquals($area, $template->getArea()); } diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/NotificationServiceTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/NotificationServiceTest.php index 140119d4d7d5e..e0db812581cc9 100644 --- a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/NotificationServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/NotificationServiceTest.php @@ -79,7 +79,7 @@ public function testMarkAsRead() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Wrong notification ID specified. */ public function testMarkAsReadThrowsExceptionWhenNotificationIdIsInvalid() diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/BaseurlTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/BaseurlTest.php index 853acec24f0e2..81a55c740fa98 100644 --- a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/BaseurlTest.php +++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/BaseurlTest.php @@ -64,7 +64,7 @@ protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_configMock = $this->getMock('Magento\Framework\App\Config', array(), array(), '', false); - $this->_urlBuilderMock = $this->getMock('Magento\UrlInterface'); + $this->_urlBuilderMock = $this->getMock('Magento\Framework\UrlInterface'); $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); $configFactoryMock = $this->getMock( diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/CacheOutdatedTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/CacheOutdatedTest.php index 2037b86259f67..ea6447abedfa4 100644 --- a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/CacheOutdatedTest.php +++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/CacheOutdatedTest.php @@ -50,8 +50,8 @@ class CacheOutdatedTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_authorizationMock = $this->getMock('Magento\AuthorizationInterface'); - $this->_urlInterfaceMock = $this->getMock('Magento\UrlInterface'); + $this->_authorizationMock = $this->getMock('Magento\Framework\AuthorizationInterface'); + $this->_urlInterfaceMock = $this->getMock('Magento\Framework\UrlInterface'); $this->_cacheTypeListMock = $this->getMock('Magento\Framework\App\Cache\TypeListInterface'); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); diff --git a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php index 39d92ab5db2f1..76e52d96b6dc4 100644 --- a/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php +++ b/dev/tests/unit/testsuite/Magento/AdminNotification/Model/System/Message/SecurityTest.php @@ -56,7 +56,7 @@ protected function setUp() $this->_cacheMock = $this->getMock('Magento\Framework\App\CacheInterface'); $this->_scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $this->_curlFactoryMock = $this->getMock( - 'Magento\HTTP\Adapter\CurlFactory', + 'Magento\Framework\HTTP\Adapter\CurlFactory', array('create'), array(), '', @@ -88,7 +88,7 @@ public function testIsDisplayed($expectedResult, $cached, $response) $this->_cacheMock->expects($this->any())->method('load')->will($this->returnValue($cached)); $this->_cacheMock->expects($this->any())->method('save')->will($this->returnValue(null)); - $httpAdapterMock = $this->getMock('Magento\HTTP\Adapter\Curl', array(), array(), '', false); + $httpAdapterMock = $this->getMock('Magento\Framework\HTTP\Adapter\Curl', array(), array(), '', false); $httpAdapterMock->expects($this->any())->method('read')->will($this->returnValue($response)); $this->_curlFactoryMock->expects($this->any())->method('create')->will($this->returnValue($httpAdapterMock)); diff --git a/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Authorizenet/CardsTest.php b/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Authorizenet/CardsTest.php index 57d8e9e01813d..fad5c2f95fd00 100644 --- a/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Authorizenet/CardsTest.php +++ b/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Authorizenet/CardsTest.php @@ -44,7 +44,7 @@ protected function setUp() * @param string $cardId * @param array $cardsData * @param array $additionalInfo - * @param \Magento\Object $expectedResult + * @param \Magento\Framework\Object $expectedResult */ public function testSetPayment($cardId, $cardsData, $additionalInfo, $expectedResult) { @@ -83,19 +83,29 @@ public function setPaymentDataProvider() 'cardId', array('key' => 'value'), array('key' => 'value'), - new \Magento\Object(array('key' => 'value', 'additional_information' => array('key' => 'value'))) + new \Magento\Framework\Object( + array( + 'key' => 'value', + 'additional_information' => array('key' => 'value') + ) + ) ), array( 'cardId', array('key' => 'value'), array('key2' => 'value2'), - new \Magento\Object(array('key' => 'value', 'additional_information' => array('key2' => 'value2'))) + new \Magento\Framework\Object( + array( + 'key' => 'value', + 'additional_information' => array('key2' => 'value2') + ) + ) ), array( 'cardId', array('key' => 'value'), array(), - new \Magento\Object(array('key' => 'value', 'additional_information' => array())) + new \Magento\Framework\Object(array('key' => 'value', 'additional_information' => array())) ) ); } diff --git a/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Directpost/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Directpost/ObserverTest.php index 4700c80dda69d..9778cc6afbd5b 100644 --- a/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Directpost/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Directpost/ObserverTest.php @@ -31,7 +31,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $coreRegistry; @@ -44,7 +44,7 @@ protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $store = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false); - $this->coreRegistry = $this->getMock('Magento\Registry', array()); + $this->coreRegistry = $this->getMock('Magento\Framework\Registry', array()); $storeManager = $this->getMockForAbstractClass('Magento\Store\Model\StoreManagerInterface'); $storeManager->expects($this->any())->method('getStore')->will($this->returnValue($store)); $payment = $this->getMock('Magento\Authorizenet\Model\Directpost', null, array(), '', false); @@ -100,7 +100,7 @@ public function testAddAdditionalFieldsToResponseFrontend() $this->returnValue($order) ); - $request = new \Magento\Object(); + $request = new \Magento\Framework\Object(); $response = $this->getMock('Magento\Framework\App\Response\Http', array(), array(), '', false); $controller = $this->getMock( 'Magento\Checkout\Controller\Action', @@ -111,8 +111,8 @@ public function testAddAdditionalFieldsToResponseFrontend() ); $controller->expects($this->once())->method('getRequest')->will($this->returnValue($request)); $controller->expects($this->once())->method('getResponse')->will($this->returnValue($response)); - $observer = new \Magento\Event\Observer( - array('event' => new \Magento\Object(array('controller_action' => $controller))) + $observer = new \Magento\Framework\Event\Observer( + array('event' => new \Magento\Framework\Object(array('controller_action' => $controller))) ); $this->coreData->expects( diff --git a/dev/tests/unit/testsuite/Magento/Authz/Service/AuthorizationV1Test.php b/dev/tests/unit/testsuite/Magento/Authz/Service/AuthorizationV1Test.php index e90099f0caebc..988ed854ab6ee 100644 --- a/dev/tests/unit/testsuite/Magento/Authz/Service/AuthorizationV1Test.php +++ b/dev/tests/unit/testsuite/Magento/Authz/Service/AuthorizationV1Test.php @@ -43,14 +43,14 @@ protected function setUp() $roleFactoryMock->expects($this->any())->method('create')->will($this->returnValue($roleMock)); $this->_authzService = new AuthorizationV1( - $this->getMock('Magento\Acl\Builder', array(), array(), '', false), + $this->getMock('Magento\Framework\Acl\Builder', array(), array(), '', false), $this->getMock('Magento\Authz\Model\UserIdentifier', array(), array(), '', false), $roleFactoryMock, $this->getMock('Magento\User\Model\Resource\Role\CollectionFactory', array(), array(), '', false), $this->getMock('Magento\User\Model\RulesFactory', array(), array(), '', false), $this->getMock('Magento\User\Model\Resource\Rules\CollectionFactory', array(), array(), '', false), - $this->getMock('Magento\Logger', array(), array(), '', false), - $this->getMock('Magento\Acl\RootResource', array(), array(), '', false) + $this->getMock('Magento\Framework\Logger', array(), array(), '', false), + $this->getMock('Magento\Framework\Acl\RootResource', array(), array(), '', false) ); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/EditTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/EditTest.php index 49a203fae90f1..0966ef6d5fc57 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/EditTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/EditTest.php @@ -87,7 +87,7 @@ protected function setUp() $this->returnValue('test_section') ); - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false, false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false, false); $this->_urlModelMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false, false); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php index 7d97b0d1f0fd3..746b5f7036e6d 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/FieldArray/AbstractTest.php @@ -43,12 +43,12 @@ public function testGetArrayRows() $block->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $element = $objectManager->getObject('Magento\Data\Form\Element\Multiselect'); + $element = $objectManager->getObject('Magento\Framework\Data\Form\Element\Multiselect'); $element->setValue(array(array('test' => 'test', 'data1' => 'data1'))); $block->setElement($element); $this->assertEquals( array( - new \Magento\Object( + new \Magento\Framework\Object( array( 'test' => 'test', 'data1' => 'data1', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/Select/AllowspecificTest.php index 7939435282831..31b1630ab6fd6 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/Select/AllowspecificTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/Select/AllowspecificTest.php @@ -44,7 +44,7 @@ protected function setUp() $this->_object = $testHelper->getObject('Magento\Backend\Block\System\Config\Form\Field\Select\Allowspecific'); $this->_object->setData('html_id', 'spec_element'); $this->_formMock = $this->getMock( - 'Magento\Data\Form', + 'Magento\Framework\Data\Form', array('getHtmlIdPrefix', 'getHtmlIdSuffix', 'getElement'), array(), '', @@ -90,7 +90,7 @@ public function testGetHtmlWhenValueIsEmpty($value) $this->_object->setForm($this->_formMock); $elementMock = $this->getMock( - 'Magento\Data\Form\Element\Select', + 'Magento\Framework\Data\Form\Element\Select', array('setDisabled'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php index 5388f3f31be87..1f9228a75944f 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldTest.php @@ -79,7 +79,7 @@ protected function setUp() ); $this->_elementMock = $this->getMock( - 'Magento\Data\Form\Element\Text', + 'Magento\Framework\Data\Form\Element\Text', array( 'getHtmlId', 'getName', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php index 2c18e652043cc..24d8d417b15be 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/FieldsetTest.php @@ -79,7 +79,7 @@ protected function setUp() false ); $this->_urlModelMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false, false); - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false, false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false, false); $groupMock = $this->getMock( 'Magento\Backend\Model\Config\Structure\Element\Group', array(), @@ -89,7 +89,7 @@ protected function setUp() ); $groupMock->expects($this->once())->method('getFieldsetCss')->will($this->returnValue('test_fieldset_css')); - $this->_helperMock = $this->getMock('Magento\View\Helper\Js', array(), array(), '', false, false); + $this->_helperMock = $this->getMock('Magento\Framework\View\Helper\Js', array(), array(), '', false, false); $data = array( 'request' => $this->_requestMock, @@ -111,7 +111,7 @@ protected function setUp() ); $this->_elementMock = $this->getMock( - 'Magento\Data\Form\Element\Text', + 'Magento\Framework\Data\Form\Element\Text', array('getHtmlId', 'getName', 'getExpanded', 'getElements', 'getLegend', 'getComment'), array(), '', @@ -153,7 +153,7 @@ protected function setUp() public function testRenderWithoutStoredElements() { - $collection = $this->_testHelper->getObject('Magento\Data\Form\Element\Collection'); + $collection = $this->_testHelper->getObject('Magento\Framework\Data\Form\Element\Collection'); $this->_elementMock->expects($this->any())->method('getElements')->will($this->returnValue($collection)); $actualHtml = $this->_object->render($this->_elementMock); $this->assertContains($this->_testData['htmlId'], $actualHtml); @@ -166,7 +166,7 @@ public function testRenderWithStoredElements() $this->_helperMock->expects($this->any())->method('getScript')->will($this->returnArgument(0)); $fieldMock = $this->getMock( - 'Magento\Data\Form\Element\Text', + 'Magento\Framework\Data\Form\Element\Text', array('getId', 'getTooltip', 'toHtml'), array(), '', @@ -180,10 +180,19 @@ public function testRenderWithStoredElements() $fieldMock->expects($this->any())->method('toHtml')->will($this->returnValue('test_field_toHTML')); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $factory = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false); - $factoryColl = $this->getMock('Magento\Data\Form\Element\CollectionFactory', array(), array(), '', false); - $formMock = $this->getMock('Magento\Data\Form\AbstractForm', array(), array($factory, $factoryColl)); - $collection = $helper->getObject('Magento\Data\Form\Element\Collection', array('container' => $formMock)); + $factory = $this->getMock('Magento\Framework\Data\Form\Element\Factory', array(), array(), '', false); + $factoryColl = $this->getMock( + 'Magento\Framework\Data\Form\Element\CollectionFactory', + array(), + array(), + '', + false + ); + $formMock = $this->getMock('Magento\Framework\Data\Form\AbstractForm', array(), array($factory, $factoryColl)); + $collection = $helper->getObject( + 'Magento\Framework\Data\Form\Element\Collection', + array('container' => $formMock) + ); $collection->add($fieldMock); $this->_elementMock->expects($this->any())->method('getElements')->will($this->returnValue($collection)); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php index 303904a0a31fb..14d59b6d08d48 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/FormTest.php @@ -96,7 +96,7 @@ protected function setUp() ); $requestMock->expects($this->any())->method('getParam')->will($this->returnValueMap($requestParams)); - $layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false, false); + $layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false, false); $this->_urlModelMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false, false); $configFactoryMock = $this->getMock( @@ -108,7 +108,7 @@ protected function setUp() false ); $this->_formFactoryMock = $this->getMock( - 'Magento\Data\FormFactory', + 'Magento\Framework\Data\FormFactory', array('create'), array(), '', @@ -154,7 +154,7 @@ protected function setUp() ); $this->_formMock = $this->getMock( - 'Magento\Data\Form', + 'Magento\Framework\Data\Form', array('setParent', 'setBaseUrl', 'addFieldset'), array(), '', @@ -296,7 +296,11 @@ public function testInitGroup() $this->returnValue($sectionMock) ); - $formFieldsetMock = $this->getMock('Magento\Data\Form\Element\Fieldset', array(), array(), '', false, false); + $formFieldsetMock = $this->getMock( + 'Magento\Framework\Data\Form\Element\Fieldset', + array(), + array(), + '', false, false); $params = array( 'legend' => 'label', @@ -324,7 +328,14 @@ public function testInitGroup() public function testInitFields($backendConfigValue, $configValue, $configPath, $inherit, $expectedValue) { // Parameters initialization - $fieldsetMock = $this->getMock('Magento\Data\Form\Element\Fieldset', array(), array(), '', false, false); + $fieldsetMock = $this->getMock( + 'Magento\Framework\Data\Form\Element\Fieldset', + array(), + array(), + '', + false, + false + ); $groupMock = $this->getMock( 'Magento\Backend\Model\Config\Structure\Element\Group', array(), @@ -426,7 +437,7 @@ public function testInitFields($backendConfigValue, $configValue, $configPath, $ $sectionMock->expects($this->once())->method('getId')->will($this->returnValue('section1')); $formFieldMock = $this->getMockForAbstractClass( - 'Magento\Data\Form\Element\AbstractElement', + 'Magento\Framework\Data\Form\Element\AbstractElement', array(), '', false, diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php index 29ba3b5b6b3b9..1d082cfb0d326 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php @@ -54,7 +54,7 @@ class ButtonTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false, false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false, false); $arguments = array( 'urlBuilder' => $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false, false), diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php index 8a93809e56639..757ed2898af19 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Form/ContainerTest.php @@ -30,8 +30,8 @@ class ContainerTest extends \PHPUnit_Framework_TestCase { public function testSetDataObject() { - $form = new \Magento\Object(); - $dataObject = new \Magento\Object(); + $form = new \Magento\Framework\Object(); + $dataObject = new \Magento\Framework\Object(); // _prepateLayout() is blocked, because it is used by block to instantly add 'form' child $block = $this->getMock( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php index bbc279feabf60..4bb389262315f 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php @@ -64,14 +64,14 @@ class CurrencyTest extends \PHPUnit_Framework_TestCase protected $_currencyMock; /** - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_row; protected function setUp() { $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); - $this->_localeMock = $this->getMock('Magento\Locale\CurrencyInterface'); + $this->_localeMock = $this->getMock('Magento\Framework\Locale\CurrencyInterface'); $this->_requestMock = $this->getMock('Magento\Framework\App\RequestInterface'); $this->_curLocatorMock = $this->getMock( @@ -101,7 +101,7 @@ protected function setUp() ); $currencyFactoryMock->expects($this->any())->method('create')->will($this->returnValue($this->_currencyMock)); - $this->_row = new \Magento\Object(array('columnIndex' => '10')); + $this->_row = new \Magento\Framework\Object(array('columnIndex' => '10')); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_blockCurrency = $helper->getObject( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php index ab3f2f9cd1f9e..35d88a6a45d88 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/Radio/ExtendedTest.php @@ -73,7 +73,7 @@ public function testRender(array $rowData, $expectedResult) $this->_column->expects($this->once())->method('getIndex')->will($this->returnValue('label')); $this->_column->expects($this->once())->method('getHtmlName')->will($this->returnValue('test[]')); $this->_converter->expects($this->never())->method('toFlatArray'); - $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Object($rowData))); + $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\Object($rowData))); } public function renderDataProvider() diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/RadioTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/RadioTest.php index c7996a9ac2b35..56a5e406ad4e9 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/RadioTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/RadioTest.php @@ -82,7 +82,7 @@ public function testRender(array $rowData, $expectedResult) )->will( $this->returnValue($selectedFlatArray) ); - $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Object($rowData))); + $this->assertEquals($expectedResult, $this->_object->render(new \Magento\Framework\Object($rowData))); } public function renderDataProvider() diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php index 4aa6df81b8c34..755cfe5c93234 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnSetTest.php @@ -72,7 +72,7 @@ protected function setUp() '', false ); - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->_layoutMock->expects( $this->any() )->method( @@ -153,7 +153,7 @@ public function testGetRowUrl() { $generatorClass = 'Magento\Backend\Model\Widget\Grid\Row\UrlGenerator'; - $itemMock = $this->getMock('Magento\Object', array(), array(), '', false); + $itemMock = $this->getMock('Magento\Framework\Object', array(), array(), '', false); $rowUrlGenerator = $this->getMock( 'Magento\Backend\Model\Widget\Grid\Row\UrlGenerator', @@ -208,13 +208,13 @@ public function testGetRowUrl() public function testItemHasMultipleRows() { - $item = new \Magento\Object(); + $item = new \Magento\Framework\Object(); // prepare sub-collection - $subCollection = new \Magento\Data\Collection( + $subCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); - $subCollection->addItem(new \Magento\Object(array('test4' => '1', 'test5' => '2'))); - $subCollection->addItem(new \Magento\Object(array('test4' => '2', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '1', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '2', 'test5' => '2'))); $item->setChildren($subCollection); $this->assertTrue($this->_block->hasMultipleRows($item)); @@ -232,7 +232,7 @@ public function testShouldRenderTotalWithEmptyCollection() { $this->_prepareLayoutWithGrid( $this->_prepareGridMock( - new \Magento\Data\Collection( + new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ) ) @@ -251,24 +251,24 @@ public function testShouldRenderTotalWithFlagFalse() public function testShouldRenderSubtotalWithFlagFalse() { $this->_block->setCountSubTotals(false); - $this->assertFalse($this->_block->shouldRenderSubTotal(new \Magento\Object())); + $this->assertFalse($this->_block->shouldRenderSubTotal(new \Magento\Framework\Object())); } public function testShouldRenderSubtotalWithEmptySubData() { $this->_block->setCountSubTotals(true); - $this->assertFalse($this->_block->shouldRenderSubTotal(new \Magento\Object())); + $this->assertFalse($this->_block->shouldRenderSubTotal(new \Magento\Framework\Object())); } public function testShouldRenderSubtotalWithNotEmptySubData() { - $item = new \Magento\Object(); + $item = new \Magento\Framework\Object(); // prepare sub-collection - $subCollection = new \Magento\Data\Collection( + $subCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); - $subCollection->addItem(new \Magento\Object(array('test4' => '1', 'test5' => '2'))); - $subCollection->addItem(new \Magento\Object(array('test4' => '2', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '1', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '2', 'test5' => '2'))); $item->setChildren($subCollection); $this->_block->setCountSubTotals(true); @@ -277,16 +277,16 @@ public function testShouldRenderSubtotalWithNotEmptySubData() public function testUpdateItemByFirstMultiRow() { - $item = new \Magento\Object(array('test1' => '1')); + $item = new \Magento\Framework\Object(array('test1' => '1')); // prepare sub-collection - $subCollection = new \Magento\Data\Collection( + $subCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); - $subCollection->addItem(new \Magento\Object(array('test4' => '1', 'test5' => '2'))); - $subCollection->addItem(new \Magento\Object(array('test4' => '2', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '1', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '2', 'test5' => '2'))); $item->setChildren($subCollection); - $expectedItem = new \Magento\Object(array('test1' => '1')); + $expectedItem = new \Magento\Framework\Object(array('test1' => '1')); $expectedItem->addData(array('test4' => '1', 'test5' => '2')); $expectedItem->setChildren($subCollection); @@ -297,11 +297,11 @@ public function testUpdateItemByFirstMultiRow() public function testGetSubTotals() { // prepare sub-collection - $subCollection = new \Magento\Data\Collection( + $subCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); - $subCollection->addItem(new \Magento\Object(array('column' => '1'))); - $subCollection->addItem(new \Magento\Object(array('column' => '1'))); + $subCollection->addItem(new \Magento\Framework\Object(array('column' => '1'))); + $subCollection->addItem(new \Magento\Framework\Object(array('column' => '1'))); $this->_subtotalsMock->expects( $this->once() @@ -310,14 +310,14 @@ public function testGetSubTotals() )->with( $subCollection )->will( - $this->returnValue(new \Magento\Object(array('column' => '2'))) + $this->returnValue(new \Magento\Framework\Object(array('column' => '2'))) ); // prepare item - $item = new \Magento\Object(array('test1' => '1')); + $item = new \Magento\Framework\Object(array('test1' => '1')); $item->setChildren($subCollection); - $this->assertEquals(new \Magento\Object(array('column' => '2')), $this->_block->getSubTotals($item)); + $this->assertEquals(new \Magento\Framework\Object(array('column' => '2')), $this->_block->getSubTotals($item)); } public function testGetTotals() @@ -332,16 +332,18 @@ public function testGetTotals() )->with( $collection )->will( - $this->returnValue(new \Magento\Object(array('test1' => '3', 'test2' => '2'))) + $this->returnValue(new \Magento\Framework\Object(array('test1' => '3', 'test2' => '2'))) ); - $this->assertEquals(new \Magento\Object(array('test1' => '3', 'test2' => '2')), $this->_block->getTotals()); + $this->assertEquals( + new \Magento\Framework\Object(array('test1' => '3', 'test2' => '2')), $this->_block->getTotals() + ); } /** * Retrieve prepared mock for \Magento\Backend\Model\Widget\Grid with collection * - * @param \Magento\Data\Collection $collection + * @param \Magento\Framework\Data\Collection $collection * @return \PHPUnit_Framework_MockObject_MockObject */ protected function _prepareGridMock($collection) @@ -356,17 +358,17 @@ protected function _prepareGridMock($collection) /** * Retrieve test collection * - * @return \Magento\Data\Collection + * @return \Magento\Framework\Data\Collection */ protected function _getTestCollection() { - $collection = new \Magento\Data\Collection( + $collection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); $items = array( - new \Magento\Object(array('test1' => '1', 'test2' => '2')), - new \Magento\Object(array('test1' => '1', 'test2' => '2')), - new \Magento\Object(array('test1' => '1', 'test2' => '2')) + new \Magento\Framework\Object(array('test1' => '1', 'test2' => '2')), + new \Magento\Framework\Object(array('test1' => '1', 'test2' => '2')), + new \Magento\Framework\Object(array('test1' => '1', 'test2' => '2')) ); foreach ($items as $item) { $collection->addItem($item); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php index 2849f7253fccc..4999f523d1df5 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php @@ -49,9 +49,9 @@ class ColumnTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false, false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false, false); $this->_blockMock = $this->getMock( - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', array('setColumn', 'getHtml'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php index 33de6fc20d11b..2e59bb49c6d8d 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php @@ -68,7 +68,7 @@ protected function setUp() $this->_gridMock->expects($this->any())->method('getId')->will($this->returnValue('test_grid')); $this->_layoutMock = $this->getMock( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('getParentName', 'getBlock', 'helper'), array(), '', @@ -138,7 +138,7 @@ public function testMassactionDefaultValues() /** * @param $itemId * @param $item - * @param $expectedItem \Magento\Object + * @param $expectedItem \Magento\Framework\Object * @dataProvider itemsDataProvider */ public function testItemsProcessing($itemId, $item, $expectedItem) @@ -162,7 +162,7 @@ public function testItemsProcessing($itemId, $item, $expectedItem) $this->assertEquals(1, $this->_block->getCount()); $actualItem = $this->_block->getItem($itemId); - $this->assertInstanceOf('Magento\Object', $actualItem); + $this->assertInstanceOf('Magento\Framework\Object', $actualItem); $this->assertEquals($expectedItem->getData(), $actualItem->getData()); $this->_block->removeItem($itemId); @@ -176,7 +176,7 @@ public function itemsDataProvider() array( 'test_id1', array("label" => "Test Item One", "url" => "*/*/test1"), - new \Magento\Object( + new \Magento\Framework\Object( array( "label" => "Test Item One", "url" => "http://localhost/index.php/backend/admin/test/test1", @@ -186,8 +186,8 @@ public function itemsDataProvider() ), array( 'test_id2', - new \Magento\Object(array("label" => "Test Item Two", "url" => "*/*/test2")), - new \Magento\Object( + new \Magento\Framework\Object(array("label" => "Test Item Two", "url" => "*/*/test2")), + new \Magento\Framework\Object( array( "label" => "Test Item Two", "url" => "http://localhost/index.php/backend/admin/test/test2", diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/SerializerTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/SerializerTest.php index 79fe4442a09c7..6d18fd61026c8 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/SerializerTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/SerializerTest.php @@ -29,13 +29,13 @@ class SerializerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $_layoutMock; protected function setUp() { - $this->_layoutMock = $this->getMockBuilder('Magento\View\LayoutInterface')->getMockForAbstractClass(); + $this->_layoutMock = $this->getMockBuilder('Magento\Framework\View\LayoutInterface')->getMockForAbstractClass(); } public function testPrepareLayout() diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php index f9e422c9c6dc2..d2cfa28527a01 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/GridTest.php @@ -50,7 +50,7 @@ protected function setUp() */ public function testAddGetClearRss($isUseStoreInUrl) { - $urlMock = $this->getMock('Magento\Url', array(), array(), '', false); + $urlMock = $this->getMock('Magento\Framework\Url', array(), array(), '', false); $storeMock = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false); $storeMock->expects($this->any())->method('isUseStoreInUrl')->will($this->returnValue($isUseStoreInUrl)); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php index e43fd841aa564..bfd8d23014b5d 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/CacheTest.php @@ -31,7 +31,7 @@ public function testCleanMediaAction() $response = $this->getMock('Magento\Framework\App\Response\Http', array(), array(), '', false); $request = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); - $objectManager = $this->getMock('Magento\ObjectManager'); + $objectManager = $this->getMock('Magento\Framework\ObjectManager'); $backendHelper = $this->getMock('Magento\Backend\Helper\Data', array(), array(), '', false); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -41,9 +41,9 @@ public function testCleanMediaAction() $helper->getConstructArguments('Magento\Backend\Model\Session') ); $messageManager = $this->getMock( - 'Magento\Message\Manager', + 'Magento\Framework\Message\Manager', array('addSuccess'), - $helper->getConstructArguments('Magento\Message\Manager') + $helper->getConstructArguments('Magento\Framework\Message\Manager') ); $context = $this->getMock( 'Magento\Backend\App\Action\Context', @@ -67,7 +67,7 @@ public function testCleanMediaAction() $controller = $helper->getObject('Magento\Backend\Controller\Adminhtml\Cache', array('context' => $context)); // Setup expectations - $mergeService = $this->getMock('Magento\View\Asset\MergeService', array(), array(), '', false); + $mergeService = $this->getMock('Magento\Framework\View\Asset\MergeService', array(), array(), '', false); $mergeService->expects($this->once())->method('cleanMergedJsCss'); $messageManager->expects( @@ -81,8 +81,8 @@ public function testCleanMediaAction() $session->expects($this->once())->method('setIsUrlNotice')->will($this->returnSelf()); $valueMap = array( - array('Magento\View\Asset\MergeService', $mergeService), - array('Magento\Session\SessionManager', $session) + array('Magento\Framework\View\Asset\MergeService', $mergeService), + array('Magento\Framework\Session\SessionManager', $session) ); $objectManager->expects($this->any())->method('get')->will($this->returnValueMap($valueMap)); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php index 3323eee1ba5fe..6c486bce38021 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/DashboardTest.php @@ -44,7 +44,7 @@ protected function setUp() { $this->_request = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); $this->_response = $this->getMock('Magento\Framework\App\Response\Http', array(), array(), '', false); - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); } protected function tearDown() @@ -69,7 +69,7 @@ public function testTunnelAction() $this->_request->expects($this->at(1))->method('getParam')->with('h')->will($this->returnValue($fixture)); $tunnelResponse = $this->getMock('Magento\Framework\App\Response\Http', array(), array(), '', false); $httpClient = $this->getMock( - 'Magento\HTTP\ZendClient', + 'Magento\Framework\HTTP\ZendClient', array('setUri', 'setParameterGet', 'setConfig', 'request', 'getHeaders') ); /** @var $helper \Magento\Backend\Helper\Dashboard\Data|PHPUnit_Framework_MockObject_MockObject */ @@ -97,7 +97,7 @@ public function testTunnelAction() )->method( 'create' )->with( - 'Magento\HTTP\ZendClient' + 'Magento\Framework\HTTP\ZendClient' )->will( $this->returnValue($httpClient) ); @@ -195,18 +195,18 @@ public function testTunnelAction503() )->method( 'create' )->with( - 'Magento\HTTP\ZendClient' + 'Magento\Framework\HTTP\ZendClient' )->will( $this->throwException($exceptionMock) ); - $loggerMock = $this->getMock('Magento\Logger', array('logException'), array(), '', false); + $loggerMock = $this->getMock('Magento\Framework\Logger', array('logException'), array(), '', false); $loggerMock->expects($this->once())->method('logException')->with($exceptionMock); $this->_objectManager->expects( $this->at(2) )->method( 'get' )->with( - 'Magento\Logger' + 'Magento\Framework\Logger' )->will( $this->returnValue($loggerMock) ); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php index e951449e810d4..a9852efb2c8cb 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/AccountTest.php @@ -37,10 +37,10 @@ class AccountTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\ResponseInterface */ protected $_responseMock; - /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager\ObjectManager */ + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\ObjectManager\ObjectManager */ protected $_objectManagerMock; - /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Message\ManagerInterface */ + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Message\ManagerInterface */ protected $_messagesMock; /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Backend\Helper\Data */ @@ -52,13 +52,13 @@ class AccountTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\User\Model\User */ protected $_userMock; - /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Locale\Validator */ + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Locale\Validator */ protected $_validatorMock; /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Backend\Model\Locale\Manager */ protected $_managerMock; - /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\TranslateInterface */ + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\TranslateInterface */ protected $_translatorMock; protected function setUp() @@ -74,7 +74,7 @@ protected function setUp() array() )->getMock(); $this->_objectManagerMock = $this->getMockBuilder( - 'Magento\ObjectManager\ObjectManager' + 'Magento\Framework\ObjectManager\ObjectManager' )->disableOriginalConstructor()->setMethods( array('get', 'create') )->getMock(); @@ -88,7 +88,7 @@ protected function setUp() array('getUrl') )->getMock(); $this->_messagesMock = $this->getMockBuilder( - 'Magento\Message\Manager' + 'Magento\Framework\Message\Manager' )->disableOriginalConstructor()->setMethods( array('addSuccess') )->getMockForAbstractClass(); @@ -106,7 +106,7 @@ protected function setUp() )->getMock(); $this->_validatorMock = $this->getMockBuilder( - 'Magento\Locale\Validator' + 'Magento\Framework\Locale\Validator' )->disableOriginalConstructor()->setMethods( array('isValid') )->getMock(); @@ -118,7 +118,7 @@ protected function setUp() )->getMock(); $this->_translatorMock = $this->getMockBuilder( - 'Magento\TranslateInterface' + 'Magento\Framework\TranslateInterface' )->disableOriginalConstructor()->getMock(); $contextMock = $this->getMock('Magento\Backend\App\Action\Context', array(), array(), '', false); @@ -207,7 +207,7 @@ public function testSaveAction() )->method( 'get' )->with( - $this->equalTo('Magento\Locale\Validator') + $this->equalTo('Magento\Framework\Locale\Validator') )->will( $this->returnValue($this->_validatorMock) ); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php index d73e424d86ac0..ee3b863050280 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Controller/Adminhtml/System/Config/SaveTest.php @@ -102,7 +102,7 @@ protected function setUp() false ); $this->_eventManagerMock = $this->getMock( - 'Magento\Event\ManagerInterface', + 'Magento\Framework\Event\ManagerInterface', array(), array(), '', @@ -113,7 +113,7 @@ protected function setUp() $helperMock = $this->getMock('Magento\Backend\Helper\Data', array(), array(), '', false, false); $this->messageManagerMock = $this->getMock( - 'Magento\Message\Manager', + 'Magento\Framework\Message\Manager', array('addSuccess', 'addException'), array(), '', @@ -163,7 +163,7 @@ protected function setUp() $configStructureMock, $this->_configFactoryMock, $this->_cacheMock, - new \Magento\Stdlib\String() + new \Magento\Framework\Stdlib\String() ) ); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php index 1ffc04a25a840..9c16dfe7fcb5b 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Helper/DataTest.php @@ -50,11 +50,11 @@ protected function setUp() $this->_helper = new \Magento\Backend\Helper\Data( $this->getMock('Magento\Framework\App\Helper\Context', array(), array(), '', false, false), $this->getMock('\Magento\Framework\App\Route\Config', array(), array(), '', false), - $this->getMock('Magento\Locale\ResolverInterface'), + $this->getMock('Magento\Framework\Locale\ResolverInterface'), $this->getMock('\Magento\Backend\Model\Url', array(), array(), '', false), $this->getMock('\Magento\Backend\Model\Auth', array(), array(), '', false), $this->_frontResolverMock, - $this->getMock('\Magento\Math\Random', array(), array(), '', false), + $this->getMock('\Magento\Framework\Math\Random', array(), array(), '', false), $this->getMock('\Magento\Framework\App\RequestInterface') ); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Auth/SessionTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Auth/SessionTest.php index 66cf16e2b3d3f..51cb00bb097bd 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Auth/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Auth/SessionTest.php @@ -37,17 +37,17 @@ class SessionTest extends \PHPUnit_Framework_TestCase protected $config; /** - * @var \Magento\Session\Config | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Session\Config | \PHPUnit_Framework_MockObject_MockObject */ protected $sessionConfig; /** - * @var \Magento\Stdlib\Cookie | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\Cookie | \PHPUnit_Framework_MockObject_MockObject */ protected $cookie; /** - * @var \Magento\Session\Storage | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Session\Storage | \PHPUnit_Framework_MockObject_MockObject */ protected $storage; @@ -59,10 +59,10 @@ class SessionTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->config = $this->getMock('Magento\Backend\App\Config', ['getValue'], [], '', false); - $this->cookie = $this->getMock('Magento\Stdlib\Cookie', ['get', 'set'], [], '', false); - $this->storage = $this->getMock('Magento\Session\Storage', ['getUser'], [], '', false); + $this->cookie = $this->getMock('Magento\Framework\Stdlib\Cookie', ['get', 'set'], [], '', false); + $this->storage = $this->getMock('Magento\Framework\Session\Storage', ['getUser'], [], '', false); $this->sessionConfig = $this->getMock( - 'Magento\Session\Config', + 'Magento\Framework\Session\Config', ['getCookiePath', 'getCookieDomain', 'getCookieSecure', 'getCookieHttpOnly'], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/AuthTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/AuthTest.php index 2a80fa5afc72e..8653970342ec2 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/AuthTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/AuthTest.php @@ -53,7 +53,7 @@ class AuthTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_eventManagerMock = $this->getMock('\Magento\Event\ManagerInterface'); + $this->_eventManagerMock = $this->getMock('\Magento\Framework\Event\ManagerInterface'); $this->_credentialStorage = $this->getMock('\Magento\Backend\Model\Auth\Credential\StorageInterface'); $this->_modelFactoryMock = $this->getMock('\Magento\Core\Model\Factory', array(), array(), '', false); $objectManager= new ObjectManager($this); @@ -78,7 +78,7 @@ public function testLoginFailed() ->method('create') ->with('Magento\Backend\Model\Auth\Credential\StorageInterface') ->will($this->returnValue($this->_credentialStorage)); - $exceptionMock = new \Magento\Model\Exception; + $exceptionMock = new \Magento\Framework\Model\Exception; $this->_credentialStorage ->expects($this->once()) ->method('login') diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php index 766e1b4435412..922242cd516dc 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/BaseurlTest.php @@ -27,19 +27,19 @@ class BaseurlTest extends \PHPUnit_Framework_TestCase { public function testSaveMergedJsCssMustBeCleaned() { - $eventDispatcher = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventDispatcher = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); $cacheManager = $this->getMock('Magento\Framework\App\CacheInterface'); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $actionValidatorMock = $this->getMock( - 'Magento\Model\ActionValidator\RemoveAction', + 'Magento\Framework\Model\ActionValidator\RemoveAction', array(), array(), '', false ); - $context = new \Magento\Model\Context( + $context = new \Magento\Framework\Model\Context( $logger, $eventDispatcher, $cacheManager, @@ -49,9 +49,9 @@ public function testSaveMergedJsCssMustBeCleaned() $resource = $this->getMock('Magento\Core\Model\Resource\Config\Data', array(), array(), '', false); $resource->expects($this->any())->method('addCommitCallback')->will($this->returnValue($resource)); - $resourceCollection = $this->getMock('Magento\Data\Collection\Db', array(), array(), '', false); - $mergeService = $this->getMock('Magento\View\Asset\MergeService', array(), array(), '', false); - $coreRegistry = $this->getMock('Magento\Registry', array(), array(), '', false); + $resourceCollection = $this->getMock('Magento\Framework\Data\Collection\Db', array(), array(), '', false); + $mergeService = $this->getMock('Magento\Framework\View\Asset\MergeService', array(), array(), '', false); + $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $coreConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $model = $this->getMock( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php index 9f5e3cfd5398b..0e91913245f4f 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php @@ -41,8 +41,8 @@ protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventDispatcherMock = $this->getMock('Magento\Event\Manager', array(), array(), '', false); - $contextMock = $this->getMock('Magento\Model\Context', array(), array(), '', false); + $eventDispatcherMock = $this->getMock('Magento\Framework\Event\Manager', array(), array(), '', false); + $contextMock = $this->getMock('Magento\Framework\Model\Context', array(), array(), '', false); $contextMock->expects( $this->any() )->method( @@ -51,7 +51,7 @@ protected function setUp() $this->returnValue($eventDispatcherMock) ); $this->_resourceMock = $this->getMock( - 'Magento\Model\Resource\AbstractResource', + 'Magento\Framework\Model\Resource\AbstractResource', array( '_construct', '_getReadAdapter', @@ -68,7 +68,13 @@ protected function setUp() ); $this->_configMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $this->_helperMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $this->_encryptorMock = $this->getMock('Magento\Encryption\EncryptorInterface', array(), array(), '', false); + $this->_encryptorMock = $this->getMock( + 'Magento\Framework\Encryption\EncryptorInterface', + array(), + array(), + '', + false + ); $this->_model = $helper->getObject( 'Magento\Backend\Model\Config\Backend\Encrypted', array( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php index 07710dad57fe8..bbbf1685253c9 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/SecureTest.php @@ -27,18 +27,18 @@ class SecureTest extends \PHPUnit_Framework_TestCase { public function testSaveMergedJsCssMustBeCleaned() { - $eventDispatcher = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventDispatcher = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); $cacheManager = $this->getMock('Magento\Framework\App\CacheInterface'); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $actionValidatorMock = $this->getMock( - '\Magento\Model\ActionValidator\RemoveAction', + '\Magento\Framework\Model\ActionValidator\RemoveAction', array(), array(), '', false ); - $context = new \Magento\Model\Context( + $context = new \Magento\Framework\Model\Context( $logger, $eventDispatcher, $cacheManager, @@ -48,9 +48,9 @@ public function testSaveMergedJsCssMustBeCleaned() $resource = $this->getMock('Magento\Core\Model\Resource\Config\Data', array(), array(), '', false); $resource->expects($this->any())->method('addCommitCallback')->will($this->returnValue($resource)); - $resourceCollection = $this->getMock('Magento\Data\Collection\Db', array(), array(), '', false); - $mergeService = $this->getMock('Magento\View\Asset\MergeService', array(), array(), '', false); - $coreRegistry = $this->getMock('Magento\Registry', array(), array(), '', false); + $resourceCollection = $this->getMock('Magento\Framework\Data\Collection\Db', array(), array(), '', false); + $mergeService = $this->getMock('Magento\Framework\View\Asset\MergeService', array(), array(), '', false); + $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $coreConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $model = $this->getMock( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/LoaderTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/LoaderTest.php index d1e8794ceb324..5577e1cb6acf4 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/LoaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/LoaderTest.php @@ -95,7 +95,7 @@ protected function setUp() 'getItems' )->will( $this->returnValue( - array(new \Magento\Object(array('path' => 'section', 'value' => 10, 'config_id' => 20))) + array(new \Magento\Framework\Object(array('path' => 'section', 'value' => 10, 'config_id' => 20))) ) ); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php index 88679dafac9b8..ebf19b9eb041a 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/SchemaLocatorTest.php @@ -37,7 +37,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_moduleReaderMock = $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false); + $this->_moduleReaderMock = $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false); $this->_moduleReaderMock->expects( $this->any() diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php index 1a13f13b2873d..4666927bb789e 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Admin/PageTest.php @@ -54,7 +54,7 @@ class PageTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->_menuModel = new \Magento\Backend\Model\Menu($logger); $this->_menuSubModel = new \Magento\Backend\Model\Menu($logger); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php index 6d4b81004400b..37d9417bfb760 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Source/Email/TemplateTest.php @@ -31,7 +31,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $_coreRegistry; @@ -47,7 +47,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_coreRegistry = $this->getMock('Magento\Registry', array(), array(), '', false, false); + $this->_coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false, false); $this->_emailConfig = $this->getMock('Magento\Email\Model\Template\Config', array(), array(), '', false); $this->_templatesFactory = $this->getMock( 'Magento\Email\Model\Resource\Template\CollectionFactory', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php index 3fb088bd7199f..45f83027547bf 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php @@ -103,7 +103,13 @@ protected function setUp() '', false ); - $this->_blockFactoryMock = $this->getMock('Magento\View\Element\BlockFactory', array(), array(), '', false); + $this->_blockFactoryMock = $this->getMock( + 'Magento\Framework\View\Element\BlockFactory', + array(), + array(), + '', + false + ); $this->_depMapperMock = $this->getMock( 'Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper', array(), @@ -187,7 +193,7 @@ public function testGetTooltipRetunrsTranslatedAttributeIfNoBlockIsProvided() public function testGetTooltipCreatesTooltipBlock() { $this->_model->setData(array('tooltip_block' => 'Magento\Core\Block\Tooltip'), 'scope'); - $tooltipBlock = $this->getMock('Magento\View\Element\BlockInterface'); + $tooltipBlock = $this->getMock('Magento\Framework\View\Element\BlockInterface'); $tooltipBlock->expects($this->once())->method('toHtml')->will($this->returnValue('tooltip block')); $this->_blockFactoryMock->expects( $this->once() @@ -233,11 +239,11 @@ public function testGetBackendModelCreatesBackendModel() )->method( 'create' )->with( - 'Magento\Model\Name' + 'Magento\Framework\Model\Name' )->will( $this->returnValue('backend_model_object') ); - $this->_model->setData(array('backend_model' => 'Magento\Model\Name'), 'scope'); + $this->_model->setData(array('backend_model' => 'Magento\Framework\Model\Name'), 'scope'); $this->assertEquals('backend_model_object', $this->_model->getBackendModel()); } @@ -289,7 +295,13 @@ public function testPopulateInput() 'someArr' => array('testVar' => 'testVal') ); $this->_model->setData($params, 'scope'); - $elementMock = $this->getMock('Magento\Data\Form\Element\Text', array('setOriginalData'), array(), '', false); + $elementMock = $this->getMock( + 'Magento\Framework\Data\Form\Element\Text', + array('setOriginalData'), + array(), + '', + false + ); unset($params['someArr']); $elementMock->expects($this->once())->method('setOriginalData')->with($params); $this->_model->populateInput($elementMock); @@ -360,7 +372,7 @@ public function testGetOptionsWithConstantValOptions() public function testGetOptionsUsesOptionsInterfaceIfNoMethodIsProvided() { $this->_model->setData(array('source_model' => 'Source_Model_Name'), 'scope'); - $sourceModelMock = $this->getMock('Magento\Option\ArrayInterface'); + $sourceModelMock = $this->getMock('Magento\Framework\Option\ArrayInterface'); $this->_sourceFactoryMock->expects( $this->once() )->method( @@ -389,7 +401,7 @@ public function testGetOptionsUsesProvidedMethodOfSourceModel() array('source_model' => 'Source_Model_Name::retrieveElements', 'path' => 'path', 'type' => 'multiselect'), 'scope' ); - $sourceModelMock = $this->getMock('Magento\Object', array('setPath', 'retrieveElements')); + $sourceModelMock = $this->getMock('Magento\Framework\Object', array('setPath', 'retrieveElements')); $this->_sourceFactoryMock->expects( $this->once() )->method( @@ -411,7 +423,7 @@ public function testGetOptionsParsesResultOfProvidedMethodOfSourceModelIfTypeIsN array('source_model' => 'Source_Model_Name::retrieveElements', 'path' => 'path', 'type' => 'select'), 'scope' ); - $sourceModelMock = $this->getMock('Magento\Object', array('setPath', 'retrieveElements')); + $sourceModelMock = $this->getMock('Magento\Framework\Object', array('setPath', 'retrieveElements')); $this->_sourceFactoryMock->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FlyweightFactoryTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FlyweightFactoryTest.php index c086d9856d6ad..816024f2e6d32 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FlyweightFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FlyweightFactoryTest.php @@ -40,7 +40,7 @@ class FlyweightFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new \Magento\Backend\Model\Config\Structure\Element\FlyweightFactory( $this->_objectManagerMock ); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/Group/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/Group/ProxyTest.php index 9177c3437a485..23c775bd4d195 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/Group/ProxyTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/Group/ProxyTest.php @@ -40,7 +40,7 @@ class ProxyTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new \Magento\Backend\Model\Config\Structure\Element\Group\Proxy($this->_objectManagerMock); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/GroupTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/GroupTest.php index 4a4a914efbd7c..56f6d21ab3fca 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/GroupTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/GroupTest.php @@ -107,7 +107,7 @@ public function testShouldCloneFields() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception */ public function testGetCloneModelThrowsExceptionIfNoSourceModelIsSet() { @@ -140,7 +140,7 @@ public function testGetCloneModelCreatesCloneModel() public function testGetFieldsetSetsOnlyNonArrayValuesToFieldset() { $fieldsetMock = $this->getMock( - 'Magento\Data\Form\Element\Fieldset', + 'Magento\Framework\Data\Form\Element\Fieldset', array('setOriginalData'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/SectionTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/SectionTest.php index 889c8d13f59a6..55650f33c48cf 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/SectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/SectionTest.php @@ -58,7 +58,7 @@ protected function setUp() false ); $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false); - $this->_authorizationMock = $this->getMock('Magento\AuthorizationInterface'); + $this->_authorizationMock = $this->getMock('Magento\Framework\AuthorizationInterface'); $this->_model = new \Magento\Backend\Model\Config\Structure\Element\Section( $this->_storeManagerMock, diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php index 9106793a44246..79ec2669bf3e5 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/ConfigTest.php @@ -80,7 +80,13 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $this->_eventManagerMock = $this->getMock( + 'Magento\Framework\Event\ManagerInterface', + array(), + array(), + '', + false + ); $this->_structureReaderMock = $this->getMock( 'Magento\Backend\Model\Config\Structure\Reader', array(), @@ -105,7 +111,7 @@ protected function setUp() ); $this->_transFactoryMock = $this->getMock( - 'Magento\DB\TransactionFactory', + 'Magento\Framework\DB\TransactionFactory', array('create'), array(), '', @@ -160,7 +166,7 @@ public function testSaveEmptiesNonSetArguments() public function testSaveToCheckAdminSystemConfigChangedSectionEvent() { - $transactionMock = $this->getMock('Magento\DB\Transaction', array(), array(), '', false); + $transactionMock = $this->getMock('Magento\Framework\DB\Transaction', array(), array(), '', false); $this->_transFactoryMock->expects($this->any())->method('create')->will($this->returnValue($transactionMock)); @@ -190,7 +196,7 @@ public function testSaveToCheckAdminSystemConfigChangedSectionEvent() public function testSaveToCheckScopeDataSet() { - $transactionMock = $this->getMock('Magento\DB\Transaction', array(), array(), '', false); + $transactionMock = $this->getMock('Magento\Framework\DB\Transaction', array(), array(), '', false); $this->_transFactoryMock->expects($this->any())->method('create')->will($this->returnValue($transactionMock)); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php index 28f6a69618c64..1029ca75e92bc 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php @@ -34,7 +34,7 @@ class ManagerTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\TranslateInterface + * @var \Magento\Framework\TranslateInterface */ protected $_translator; @@ -60,11 +60,11 @@ protected function setUp() false ); - $userMock = new \Magento\Object(); + $userMock = new \Magento\Framework\Object(); $this->_authSession->expects($this->any())->method('getUser')->will($this->returnValue($userMock)); - $this->_translator = $this->getMock('Magento\TranslateInterface', array(), array(), '', false); + $this->_translator = $this->getMock('Magento\Framework\TranslateInterface', array(), array(), '', false); $this->_translator->expects($this->any())->method('setLocale')->will($this->returnValue($this->_translator)); @@ -108,7 +108,7 @@ public function testGetUserInterfaceLocaleDefault() { $locale = $this->_model->getUserInterfaceLocale(); - $this->assertEquals($locale, \Magento\Locale\ResolverInterface::DEFAULT_LOCALE); + $this->assertEquals($locale, \Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE); } /** diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php index 6d279ceec77e3..d37645afd44f2 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/BuilderTest.php @@ -49,7 +49,7 @@ protected function setUp() $this->_menuMock = $this->getMock( 'Magento\Backend\Model\Menu', array(), - array($this->getMock('Magento\Logger', array(), array(), '', false)) + array($this->getMock('Magento\Framework\Logger', array(), array(), '', false)) ); $this->_model = new \Magento\Backend\Model\Menu\Builder($this->_factoryMock, $this->_menuMock); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php index ca1935e89c63c..799bae61b9636 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Config/SchemaLocatorTest.php @@ -37,7 +37,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_moduleReaderMock = $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false); + $this->_moduleReaderMock = $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false); $this->_moduleReaderMock->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php index 86d37720cd5d9..b6f15f35deeec 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ConfigTest.php @@ -108,7 +108,7 @@ protected function setUp() ); $this->_eventManagerMock = $this->getMock( - 'Magento\Event\ManagerInterface', + 'Magento\Framework\Event\ManagerInterface', array(), array(), '', @@ -117,7 +117,7 @@ protected function setUp() ); $this->_logger = $this->getMock( - 'Magento\Logger', + 'Magento\Framework\Logger', array('addStoreLog', 'log', 'logException'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php index 131ad76b352d0..5fb982ce59d2d 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Director/DirectorTest.php @@ -61,7 +61,7 @@ protected function setUp() { $this->_builderMock = $this->getMock('Magento\Backend\Model\Menu\Builder', array(), array(), '', false); $this->_logger = $this->getMock( - 'Magento\Logger', + 'Magento\Framework\Logger', array('addStoreLog', 'log', 'logException'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php index c6e1428016fc9..7512d8e2bed5a 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/Filter/IteratorTest.php @@ -60,7 +60,7 @@ protected function setUp() $this->_items['item3']->expects($this->any())->method('isDisabled')->will($this->returnValue(false)); $this->_items['item3']->expects($this->any())->method('isAllowed')->will($this->returnValue(false)); - $loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->_menuModel = new \Magento\Backend\Model\Menu($loggerMock); $this->_filterIteratorModel = new \Magento\Backend\Model\Menu\Filter\Iterator( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php index 2bf217d5332c0..febc37a4cbd39 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Menu/ItemTest.php @@ -83,7 +83,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_aclMock = $this->getMock('Magento\AuthorizationInterface'); + $this->_aclMock = $this->getMock('Magento\Framework\AuthorizationInterface'); $this->_scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $this->_menuFactoryMock = $this->getMock( 'Magento\Backend\Model\MenuFactory', @@ -93,10 +93,10 @@ protected function setUp() false ); $this->_urlModelMock = $this->getMock('Magento\Backend\Model\Url', array(), array(), '', false); - $this->_moduleManager = $this->getMock('Magento\Module\Manager', array(), array(), '', false); + $this->_moduleManager = $this->getMock('Magento\Framework\Module\Manager', array(), array(), '', false); $this->_validatorMock = $this->getMock('Magento\Backend\Model\Menu\Item\Validator'); $this->_validatorMock->expects($this->any())->method('validate'); - $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface'); + $this->_moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface'); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_model = $helper->getObject( @@ -247,7 +247,7 @@ public function testIsAllowedReturnsFalseIfResourceIsNotAvailable() )->with( 'Magento_Backend::config' )->will( - $this->throwException(new \Magento\Exception()) + $this->throwException(new \Magento\Framework\Exception()) ); $this->assertFalse($this->_model->isAllowed()); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php index ae60a01ca9b4f..ed574fe575c54 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/MenuTest.php @@ -34,7 +34,7 @@ class MenuTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $_logger; @@ -54,7 +54,7 @@ protected function setUp() $this->_items['item3'] = $this->getMock('Magento\Backend\Model\Menu\Item', array(), array(), '', false); $this->_items['item3']->expects($this->any())->method('getId')->will($this->returnValue('item3')); - $this->_logger = $this->getMock('Magento\Logger', array('log'), array(), '', false); + $this->_logger = $this->getMock('Magento\Framework\Logger', array('log'), array(), '', false); $this->_model = new \Magento\Backend\Model\Menu($this->_logger); } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php index 14d68ac1db26e..afb47eafe3ddf 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/UrlTest.php @@ -86,7 +86,7 @@ class UrlTest extends \PHPUnit_Framework_TestCase protected $_paramsResolverMock; /** - * @var \Magento\Encryption\EncryptorInterface + * @var \Magento\Framework\Encryption\EncryptorInterface */ protected $_encryptor; @@ -101,7 +101,12 @@ protected function setUp() $this->_menuConfigMock = $this->getMock('Magento\Backend\Model\Menu\Config', array(), array(), '', false); $this->_menuConfigMock->expects($this->any())->method('getMenu')->will($this->returnValue($this->_menuMock)); - $this->_formKey = $this->getMock('Magento\Data\Form\FormKey', array('getFormKey'), array(), '', false); + $this->_formKey = $this->getMock( + 'Magento\Framework\Data\Form\FormKey', + array('getFormKey'), + array(), + '', false + ); $this->_formKey->expects($this->any())->method('getFormKey')->will($this->returnValue('salt')); $mockItem = $this->getMock('Magento\Backend\Model\Menu\Item', array(), array(), '', false); @@ -157,9 +162,9 @@ protected function setUp() false ); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_encryptor = $this->getMock('Magento\Encryption\Encryptor', null, array(), '', false); + $this->_encryptor = $this->getMock('Magento\Framework\Encryption\Encryptor', null, array(), '', false); $this->_paramsResolverMock = $this->getMock( - 'Magento\Url\RouteParamsResolverFactory', + 'Magento\Framework\Url\RouteParamsResolverFactory', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php index fcf0bef026a1c..1d17bd32b4d64 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/ViewTest.php @@ -39,9 +39,9 @@ protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $aclFilter = $this->getMock('Magento\Backend\Model\Layout\Filter\Acl', array(), array(), '', false); - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); - $layoutProcessor = $this->getMock('Magento\View\Layout\ProcessorInterface'); - $node = new \Magento\Simplexml\Element(''); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); + $layoutProcessor = $this->getMock('Magento\Framework\View\Layout\ProcessorInterface'); + $node = new \Magento\Framework\Simplexml\Element(''); $this->_layoutMock->expects($this->once())->method('getNode')->will($this->returnValue($node)); $this->_layoutMock->expects($this->any())->method('getUpdate')->will($this->returnValue($layoutProcessor)); $this->_view = $helper->getObject( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/AbstractTotalsTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/AbstractTotalsTest.php index 6af06c61c3885..1c84751c0a3ad 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/AbstractTotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/AbstractTotalsTest.php @@ -80,14 +80,14 @@ protected function tearDown() /** * Retrieve test collection * - * @return \Magento\Data\Collection + * @return \Magento\Framework\Data\Collection */ protected function _getTestCollection() { - $collection = new \Magento\Data\Collection( + $collection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); - $items = array(new \Magento\Object(array('test1' => '1', 'test2' => '2'))); + $items = array(new \Magento\Framework\Object(array('test1' => '1', 'test2' => '2'))); foreach ($items as $item) { $collection->addItem($item); } @@ -164,7 +164,7 @@ protected function _prepareParserMock() protected function _prepareFactoryMock() { $this->_factoryMock = $this->getMock( - 'Magento\Object\Factory', + 'Magento\Framework\Object\Factory', array('create'), array(), '', @@ -184,7 +184,7 @@ protected function _prepareFactoryMock() 'test6' => 1, 'test7' => 0 ), - new \Magento\Object( + new \Magento\Framework\Object( array( 'test1' => 2, 'test2' => 2, @@ -196,7 +196,7 @@ protected function _prepareFactoryMock() ) ) ), - array(array(), new \Magento\Object()) + array(array(), new \Magento\Framework\Object()) ); $this->_factoryMock->expects($this->any())->method('create')->will($this->returnValueMap($createValueMap)); } @@ -218,7 +218,7 @@ public function testColumns() public function testCountTotals() { - $expected = new \Magento\Object( + $expected = new \Magento\Framework\Object( array('test1' => 2, 'test2' => 2, 'test3' => 4, 'test4' => 0, 'test5' => 4, 'test6' => 1, 'test7' => 0) ); $this->assertEquals($expected, $this->_model->countTotals($this->_getTestCollection())); @@ -229,7 +229,7 @@ public function testReset() $this->_model->countTotals($this->_getTestCollection()); $this->_model->reset(); - $this->assertEquals(new \Magento\Object(), $this->_model->getTotals()); + $this->assertEquals(new \Magento\Framework\Object(), $this->_model->getTotals()); $this->assertNotEmpty($this->_model->getColumns()); } @@ -238,7 +238,7 @@ public function testResetFull() $this->_model->countTotals($this->_getTestCollection()); $this->_model->reset(true); - $this->assertEquals(new \Magento\Object(), $this->_model->getTotals()); + $this->assertEquals(new \Magento\Framework\Object(), $this->_model->getTotals()); $this->assertEmpty($this->_model->getColumns()); } } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/Row/UrlGeneratorTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/Row/UrlGeneratorTest.php index 958eb7fd847f5..a3038f4e3e0a0 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/Row/UrlGeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/Row/UrlGeneratorTest.php @@ -34,7 +34,7 @@ public function testGetUrl() $itemId = 3; $urlPath = 'mng/item/edit'; - $itemMock = $this->getMock('Magento\Object', array('getItemId'), array(), '', false); + $itemMock = $this->getMock('Magento\Framework\Object', array('getItemId'), array(), '', false); $itemMock->expects($this->once())->method('getItemId')->will($this->returnValue($itemId)); $urlModelMock = $this->getMock( diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/SubTotalsTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/SubTotalsTest.php index 0ecec85b794bd..0ae82cb0804ef 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/SubTotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/SubTotalsTest.php @@ -56,7 +56,7 @@ protected function setUp() ); $this->_factoryMock = $this->getMock( - 'Magento\Object\Factory', + 'Magento\Framework\Object\Factory', array('create'), array(), '', @@ -71,7 +71,7 @@ protected function setUp() )->with( array('sub_test1' => 3, 'sub_test2' => 2) )->will( - $this->returnValue(new \Magento\Object(array('sub_test1' => 3, 'sub_test2' => 2))) + $this->returnValue(new \Magento\Framework\Object(array('sub_test1' => 3, 'sub_test2' => 2))) ); $arguments = array('factory' => $this->_factoryMock, 'parser' => $this->_parserMock); @@ -94,24 +94,24 @@ protected function tearDown() public function testCountTotals() { - $expected = new \Magento\Object(array('sub_test1' => 3, 'sub_test2' => 2)); + $expected = new \Magento\Framework\Object(array('sub_test1' => 3, 'sub_test2' => 2)); $this->assertEquals($expected, $this->_model->countTotals($this->_getTestCollection())); } /** * Retrieve test collection * - * @return \Magento\Data\Collection + * @return \Magento\Framework\Data\Collection */ protected function _getTestCollection() { - $collection = new \Magento\Data\Collection( + $collection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); $items = array( - new \Magento\Object(array('sub_test1' => '1', 'sub_test2' => '2')), - new \Magento\Object(array('sub_test1' => '1', 'sub_test2' => '2')), - new \Magento\Object(array('sub_test1' => '1', 'sub_test2' => '2')) + new \Magento\Framework\Object(array('sub_test1' => '1', 'sub_test2' => '2')), + new \Magento\Framework\Object(array('sub_test1' => '1', 'sub_test2' => '2')), + new \Magento\Framework\Object(array('sub_test1' => '1', 'sub_test2' => '2')) ); foreach ($items as $item) { $collection->addItem($item); diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/TotalsTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/TotalsTest.php index f80512d6610c2..ff5e8f492f5c0 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/TotalsTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Widget/Grid/TotalsTest.php @@ -57,7 +57,7 @@ protected function setUp() ); $this->_factoryMock = $this->getMock( - 'Magento\Object\Factory', + 'Magento\Framework\Object\Factory', array('create'), array(), '', @@ -67,8 +67,8 @@ protected function setUp() ); $createValueMap = array( - array(array('test1' => 3, 'test2' => 2), new \Magento\Object(array('test1' => 3, 'test2' => 2))), - array(array('test4' => 9, 'test5' => 2), new \Magento\Object(array('test4' => 9, 'test5' => 2))) + array(array('test1' => 3, 'test2' => 2), new \Magento\Framework\Object(array('test1' => 3, 'test2' => 2))), + array(array('test4' => 9, 'test5' => 2), new \Magento\Framework\Object(array('test4' => 9, 'test5' => 2))) ); $this->_factoryMock->expects($this->any())->method('create')->will($this->returnValueMap($createValueMap)); @@ -93,19 +93,19 @@ protected function tearDown() public function testCountTotals() { // prepare collection - $collection = new \Magento\Data\Collection( + $collection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); $items = array( - new \Magento\Object(array('test1' => '1', 'test2' => '2')), - new \Magento\Object(array('test1' => '1', 'test2' => '2')), - new \Magento\Object(array('test1' => '1', 'test2' => '2')) + new \Magento\Framework\Object(array('test1' => '1', 'test2' => '2')), + new \Magento\Framework\Object(array('test1' => '1', 'test2' => '2')), + new \Magento\Framework\Object(array('test1' => '1', 'test2' => '2')) ); foreach ($items as $item) { $collection->addItem($item); } - $expected = new \Magento\Object(array('test1' => 3, 'test2' => 2)); + $expected = new \Magento\Framework\Object(array('test1' => 3, 'test2' => 2)); $this->assertEquals($expected, $this->_model->countTotals($collection)); } @@ -116,25 +116,37 @@ public function testCountTotalsWithSubItems() $this->_model->setColumn('test5', 'avg'); // prepare collection - $collection = new \Magento\Data\Collection( + $collection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); $items = array( - new \Magento\Object(array('children' => new \Magento\Object(array('test4' => '1', 'test5' => '2')))), - new \Magento\Object(array('children' => new \Magento\Object(array('test4' => '1', 'test5' => '2')))), - new \Magento\Object(array('children' => new \Magento\Object(array('test4' => '1', 'test5' => '2')))) + new \Magento\Framework\Object( + array( + 'children' => new \Magento\Framework\Object(array('test4' => '1', 'test5' => '2')) + ) + ), + new \Magento\Framework\Object( + array( + 'children' => new \Magento\Framework\Object(array('test4' => '1', 'test5' => '2')) + ) + ), + new \Magento\Framework\Object( + array( + 'children' => new \Magento\Framework\Object(array('test4' => '1', 'test5' => '2')) + ) + ) ); foreach ($items as $item) { // prepare sub-collection - $subCollection = new \Magento\Data\Collection( + $subCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); - $subCollection->addItem(new \Magento\Object(array('test4' => '1', 'test5' => '2'))); - $subCollection->addItem(new \Magento\Object(array('test4' => '2', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '1', 'test5' => '2'))); + $subCollection->addItem(new \Magento\Framework\Object(array('test4' => '2', 'test5' => '2'))); $item->setChildren($subCollection); $collection->addItem($item); } - $expected = new \Magento\Object(array('test4' => 9, 'test5' => 2)); + $expected = new \Magento\Framework\Object(array('test4' => 9, 'test5' => 2)); $this->assertEquals($expected, $this->_model->countTotals($collection)); } } diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml index 4f88470874828..16f12bf73bc32 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml index 53533ca4b7dfe..a275b93b93977 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_1.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml index 513f6215202dc..055de66489c2b 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_2.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml index 54f6a50626e27..0d5dce55b55ef 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/acl_merged.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/session_backend_mock.php b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/session_backend_mock.php index 928f3f8e6d588..25d90d3587f0a 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/_files/session_backend_mock.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/_files/session_backend_mock.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Session; +namespace Magento\Framework\Session; use \Magento\Backend\Model\SessionTest; diff --git a/dev/tests/unit/testsuite/Magento/Backup/Model/BackupFactoryTest.php b/dev/tests/unit/testsuite/Magento/Backup/Model/BackupFactoryTest.php index b8bdb68093e36..778d386ae2899 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/Model/BackupFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Backup/Model/BackupFactoryTest.php @@ -34,7 +34,7 @@ class BackupFactoryTest extends \PHPUnit_Framework_TestCase protected $_instance; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; @@ -68,12 +68,12 @@ protected function setUp() )->method( 'getIterator' )->will( - $this->returnValue(new \ArrayIterator(array(new \Magento\Object($this->_data)))) + $this->returnValue(new \ArrayIterator(array(new \Magento\Framework\Object($this->_data)))) ); $this->_backupModel = $this->getMock('Magento\Backup\Model\Backup', array(), array(), '', false); - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_objectManager->expects( $this->at(0) )->method( diff --git a/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php index d1e3d47197859..3002ae582ebc3 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php @@ -35,7 +35,7 @@ public function testConstructor() ->disableOriginalConstructor() ->getMock(); $directoryWrite = $this->getMockBuilder( - '\Magento\Filesystem\Directory\WriteInterface' + '\Magento\Framework\Filesystem\Directory\WriteInterface' )->disableOriginalConstructor()->getMock(); $filesystem->expects($this->any())->method('getDirectoryWrite')->will($this->returnValue($directoryWrite)); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/OptionTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/OptionTest.php index 7a3ed390a1de1..ceb1b0ec9c6d8 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/OptionTest.php @@ -30,9 +30,9 @@ class OptionTest extends \PHPUnit_Framework_TestCase { public function testGetAddButtonId() { - $button = new \Magento\Object(); + $button = new \Magento\Framework\Object(); - $itemsBlock = $this->getMock('Magento\Object', array('getChildBlock')); + $itemsBlock = $this->getMock('Magento\Framework\Object', array('getChildBlock')); $itemsBlock->expects( $this->atLeastOnce() )->method( @@ -43,7 +43,7 @@ public function testGetAddButtonId() $this->returnValue($button) ); - $layout = $this->getMock('Magento\Object', array('getBlock')); + $layout = $this->getMock('Magento\Framework\Object', array('getBlock')); $layout->expects( $this->atLeastOnce() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php index a67802b8ab1dc..ee87e8a321ffd 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/OptionTest.php @@ -36,7 +36,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase protected $product; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $layout; @@ -47,7 +47,7 @@ protected function setUp() ->setMethods(['getPriceInfo', 'hasPreconfiguredValues', 'getPreconfiguredValues', '__wakeup']) ->getMock(); - $registry = $this->getMockBuilder('Magento\Registry') + $registry = $this->getMockBuilder('Magento\Framework\Registry') ->disableOriginalConstructor() ->getMock(); @@ -57,9 +57,9 @@ protected function setUp() ->will($this->returnValue($this->product)); - $this->layout = $this->getMock('Magento\View\LayoutInterface'); + $this->layout = $this->getMock('Magento\Framework\View\LayoutInterface'); - $context = $this->getMockBuilder('Magento\View\Element\Template\Context') + $context = $this->getMockBuilder('Magento\Framework\View\Element\Template\Context') ->disableOriginalConstructor() ->getMock(); $context->expects($this->atLeastOnce()) @@ -81,7 +81,9 @@ public function testSetOption() ->will($this->returnValue(true)); $this->product->expects($this->atLeastOnce()) ->method('getPreconfiguredValues') - ->will($this->returnValue(new \Magento\Object(array('bundle_option' => array(15 => 315, 16 => 316))))); + ->will($this->returnValue( + new \Magento\Framework\Object(array('bundle_option' => array(15 => 315, 16 => 316)))) + ); $option = $this->getMock('\Magento\Bundle\Model\Option', array(), array(), '', false); $option->expects($this->any())->method('getId')->will($this->returnValue(15)); @@ -120,10 +122,10 @@ public function testRenderPriceString() ->disableOriginalConstructor() ->getMock(); - $priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface'); - $amount = $this->getMock('Magento\Pricing\Amount\AmountInterface'); + $priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface'); + $amount = $this->getMock('Magento\Framework\Pricing\Amount\AmountInterface'); - $priceRenderBlock = $this->getMockBuilder('Magento\Pricing\Render') + $priceRenderBlock = $this->getMockBuilder('Magento\Framework\Pricing\Render') ->disableOriginalConstructor() ->setMethods(['renderAmount']) ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php index 5384aeb10ba62..07e1d0974e7b2 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Block/Catalog/Product/View/Type/BundleTest.php @@ -67,7 +67,13 @@ public function testGetOptionHtml() $optionBlock->expects($this->any())->method('setOption')->will($this->returnValue($optionBlock)); $optionBlock->expects($this->any())->method('getPriceBlockTypes')->will($this->returnValue(array())); $optionBlock->expects($this->any())->method('toHtml')->will($this->returnValue('option html')); - $layout = $this->getMock('Magento\View\Layout', array('getChildName', 'getBlock'), array(), '', false); + $layout = $this->getMock( + 'Magento\Framework\View\Layout', + array('getChildName', 'getBlock'), + array(), + '', + false + ); $layout->expects($this->any())->method('getChildName')->will($this->returnValue('name')); $layout->expects($this->any())->method('getBlock')->will($this->returnValue($optionBlock)); $this->_bundleBlock->setLayout($layout); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/CatalogPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/CatalogPriceTest.php index d27232919f8c7..81bfb88cce58c 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/CatalogPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/CatalogPriceTest.php @@ -65,7 +65,7 @@ protected function setUp() '', false ); - $this->coreRegistryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->coreRegistryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $methods = array('getStoreId', 'getWebsiteId', 'getCustomerGroupId', 'getPriceModel', '__wakeup'); $this->productMock = $this->getMock('Magento\Catalog\Model\Product', $methods, array(), '', false); $this->priceModelMock = $this->getMock( diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php index 44aa48703b82f..bf1e2fc5a4ccd 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php @@ -71,9 +71,9 @@ protected function setUp() '\Magento\CatalogRule\Model\Resource\RuleFactory', array(), array(), '', false ); $this->storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface'); - $this->localeDateMock = $this->getMock('\Magento\Stdlib\DateTime\TimezoneInterface'); + $this->localeDateMock = $this->getMock('\Magento\Framework\Stdlib\DateTime\TimezoneInterface'); $this->customerSessionMock = $this->getMock('\Magento\Customer\Model\Session', array(), array(), '', false); - $this->eventManagerMock = $this->getMock('\Magento\Event\ManagerInterface'); + $this->eventManagerMock = $this->getMock('\Magento\Framework\Event\ManagerInterface'); $this->taxHelperMock = $this->getMock('\Magento\Tax\Helper\Data', array(), array(), '', false); $this->storeMock = $this->getMock('\Magento\Store\Model\Store', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php index f8fa38d2d6da8..ac3c56e5dfed2 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Adjustment/CalculatorTest.php @@ -35,12 +35,12 @@ class CalculatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleableItem; /** - * @var \Magento\Pricing\Price\PriceInterface[]|\PHPUnit_Framework_MockObject_MockObject[] + * @var \Magento\Framework\Pricing\Price\PriceInterface[]|\PHPUnit_Framework_MockObject_MockObject[] */ protected $priceMocks = []; @@ -50,7 +50,7 @@ class CalculatorTest extends \PHPUnit_Framework_TestCase protected $baseAmount = 50.; /** - * @var \Magento\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject */ protected $baseCalculator; @@ -72,7 +72,7 @@ class CalculatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->saleableItem = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); - $priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface', [], [], '', true); + $priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface', [], [], '', true); $priceInfo->expects($this->any())->method('getPrice')->will($this->returnCallback(function ($type) { if (!isset($this->priceMocks[$type])) { throw new \PHPUnit_Framework_ExpectationFailedException('Unexpected type of price model'); @@ -82,8 +82,8 @@ protected function setUp() $this->saleableItem->expects($this->any())->method('getPriceInfo')->will($this->returnValue($priceInfo)); - $this->baseCalculator = $this->getMock('Magento\Pricing\Adjustment\Calculator', [], [], '', false); - $this->amountFactory = $this->getMock('Magento\Pricing\Amount\AmountFactory', [], [], '', false); + $this->baseCalculator = $this->getMock('Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', false); + $this->amountFactory = $this->getMock('Magento\Framework\Pricing\Amount\AmountFactory', [], [], '', false); $this->selectionFactory = $this->getMockBuilder('Magento\Bundle\Pricing\Price\BundleSelectionFactory') ->disableOriginalConstructor() ->getMock(); @@ -142,12 +142,12 @@ public function testGetterAmount($amountForBundle, $optionList, $expectedResult) * Create amount mock * * @param array $amountData - * @return \Magento\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject */ protected function createAmountMock($amountData) { - /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Pricing\Amount\Base $amount */ - $amount = $this->getMock('Magento\Pricing\Amount\Base', [], [], '', false); + /** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Pricing\Amount\Base $amount */ + $amount = $this->getMock('Magento\Framework\Pricing\Amount\Base', [], [], '', false); $amount->expects($this->any())->method('getAdjustmentAmounts') ->will($this->returnValue($amountData['adjustmentsAmounts'])); $amount->expects($this->any())->method('getValue')->will($this->returnValue($amountData['amount'])); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BasePriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BasePriceTest.php index af80adb77332e..87fd8fc893774 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BasePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BasePriceTest.php @@ -34,12 +34,12 @@ class BasePriceTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleable; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfo; @@ -56,7 +56,7 @@ public function setUp() ->disableOriginalConstructor() ->getMock(); - $this->priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface'); + $this->priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface'); $this->saleable->expects($this->once()) ->method('getPriceInfo') @@ -83,7 +83,7 @@ public function testGetValue() $pricesIncludedInBase = []; foreach ($priceValues as $priceValue) { - $price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $price->expects($this->atLeastOnce()) ->method('getValue') ->will($this->returnValue($priceValue)); @@ -94,17 +94,17 @@ public function testGetValue() ->method('getPricesIncludedInBase') ->will($this->returnValue($pricesIncludedInBase)); - $tearPrice = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $tearPrice = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $tearPrice->expects($this->atLeastOnce()) ->method('getValue') ->will($this->returnValue($tearPriceValue)); - $groupPrice = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $groupPrice = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $groupPrice->expects($this->atLeastOnce()) ->method('getValue') ->will($this->returnValue($groupPriceValue)); - $specialPrice = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $specialPrice = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $specialPrice->expects($this->atLeastOnce()) ->method('getValue') ->will($this->returnValue($specialPriceValue)); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionFactoryTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionFactoryTest.php index b7588d60731cb..e933d44975cef 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionFactoryTest.php @@ -34,21 +34,21 @@ class BundleSelectionFactoryTest extends \PHPUnit_Framework_TestCase /** @var ObjectManagerHelper */ protected $objectManagerHelper; - /** @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; - /** @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $bundleMock; - /** @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $selectionMock; protected function setUp() { - $this->bundleMock = $this->getMock('Magento\Pricing\Object\SaleableInterface'); - $this->selectionMock = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $this->bundleMock = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); + $this->selectionMock = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); - $this->objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->objectManagerHelper = new ObjectManagerHelper($this); $this->bundleSelectionFactory = $this->objectManagerHelper->getObject( diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php index c264bfa0dd70e..8bcf2ae9ea970 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/BundleSelectionPriceTest.php @@ -42,22 +42,22 @@ class BundleSelectionPriceTest extends \PHPUnit_Framework_TestCase /** @var ObjectManagerHelper */ protected $objectManagerHelper; - /** @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleableInterfaceMock; /** @var float */ protected $quantity = 1.; - /** @var \Magento\Pricing\Adjustment\CalculatorInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Pricing\Adjustment\CalculatorInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $calculatorInterfaceMock; /** @var \Magento\Catalog\Model\Product|\PHPUnit_Framework_MockObject_MockObject */ protected $productMock; - /** @var \Magento\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $managerInterfaceMock; - /** @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfoMock; /** @var \Magento\Catalog\Pricing\Price\BasePrice|\PHPUnit_Framework_MockObject_MockObject */ @@ -93,7 +93,7 @@ protected function prepare() '', false ); - $this->calculatorInterfaceMock = $this->getMock('Magento\Pricing\Adjustment\CalculatorInterface'); + $this->calculatorInterfaceMock = $this->getMock('Magento\Framework\Pricing\Adjustment\CalculatorInterface'); $this->productMock = $this->getMock( 'Magento\Catalog\Model\Product', ['getPriceType', 'setFinalPrice', 'getQty', 'getData', 'getPriceInfo', '__wakeup', '__sleep'], @@ -103,9 +103,9 @@ protected function prepare() false ); - $this->managerInterfaceMock = $this->getMock('Magento\Event\ManagerInterface'); + $this->managerInterfaceMock = $this->getMock('Magento\Framework\Event\ManagerInterface'); - $this->priceInfoMock = $this->getMock('\Magento\Pricing\PriceInfoInterface'); + $this->priceInfoMock = $this->getMock('\Magento\Framework\Pricing\PriceInfoInterface'); $this->priceInfoMock->expects($this->atLeastOnce()) ->method('getPrice') ->will($this->returnCallback(array($this, 'getPriceCallback'))); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/FinalPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/FinalPriceTest.php index fc0a036850fb1..6eca9f3929cd7 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/FinalPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/FinalPriceTest.php @@ -34,7 +34,7 @@ class FinalPriceTest extends \PHPUnit_Framework_TestCase /** @var ObjectManagerHelper */ protected $objectManagerHelper; - /** @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleableInterfaceMock; /** @var float */ @@ -46,7 +46,7 @@ class FinalPriceTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $bundleCalculatorMock; - /** @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfoMock; /** @var \Magento\Bundle\Pricing\Price\BasePrice|\PHPUnit_Framework_MockObject_MockObject */ @@ -60,7 +60,7 @@ class FinalPriceTest extends \PHPUnit_Framework_TestCase */ protected function prepareMock() { - $this->saleableInterfaceMock = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $this->saleableInterfaceMock = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); $this->bundleCalculatorMock = $this->getMock('Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface'); $this->basePriceMock = $this->getMock('Magento\Bundle\Pricing\Price\BasePrice', [], [], '', false); @@ -72,7 +72,7 @@ protected function prepareMock() ->disableOriginalConstructor() ->getMock(); - $this->priceInfoMock = $this->getMock('\Magento\Pricing\PriceInfoInterface'); + $this->priceInfoMock = $this->getMock('\Magento\Framework\Pricing\PriceInfoInterface'); $this->priceInfoMock->expects($this->atLeastOnce()) ->method('getPrice') ->will($this->returnValueMap([ diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php index 9a736111234c5..08bbf7794567a 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/GroupPriceTest.php @@ -34,12 +34,12 @@ class GroupPriceTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleable; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfo; @@ -50,7 +50,7 @@ public function setUp() ->disableOriginalConstructor() ->getMock(); - $this->priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface'); + $this->priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface'); $this->saleable->expects($this->once()) ->method('getPriceInfo') @@ -82,7 +82,7 @@ public function testGetValue($basePrice, $storedGroupPrice, $value) ->will($this->returnValue($storedGroupPrice)); if (!empty($storedGroupPrice)) { - $price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $this->priceInfo->expects($this->once()) ->method('getPrice') ->with(\Magento\Catalog\Pricing\Price\BasePrice::PRICE_TYPE_BASE_PRICE, null) diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/SpecialPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/SpecialPriceTest.php index d5a835892ab3a..7f701ca511553 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/SpecialPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/SpecialPriceTest.php @@ -34,17 +34,17 @@ class SpecialPriceTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleable; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfo; /** - * @var \Magento\Stdlib\DateTime\TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $localeDate; @@ -54,8 +54,8 @@ public function setUp() ->disableOriginalConstructor() ->getMock(); - $this->localeDate = $this->getMock('Magento\Stdlib\DateTime\TimezoneInterface'); - $this->priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface'); + $this->localeDate = $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface'); + $this->priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface'); $this->saleable->expects($this->once()) ->method('getPriceInfo') @@ -103,7 +103,7 @@ public function testGetValue($basePrice, $specialPrice, $isScopeDateInInterval, ->will($this->returnValue($isScopeDateInInterval)); if ($isScopeDateInInterval) { - $price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $this->priceInfo->expects($this->once()) ->method('getPrice') ->with(\Magento\Catalog\Pricing\Price\BasePrice::PRICE_TYPE_BASE_PRICE, null) diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php index 12ba15f38cc45..50261155e18ae 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php @@ -54,7 +54,7 @@ class TierPriceTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface'); + $this->priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface'); $this->product = $this->getMockBuilder('Magento\Catalog\Model\Product') ->setMethods(['getPriceInfo', 'hasCustomerGroupId', 'getCustomerGroupId', 'getResource', '__wakeup']) @@ -65,7 +65,7 @@ protected function setUp() ->method('getPriceInfo') ->will($this->returnValue($this->priceInfo)); - $this->calculator = $this->getMock('Magento\Pricing\Adjustment\Calculator', [], [], '', false); + $this->calculator = $this->getMock('Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', false); $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $objectHelper->getObject('Magento\Bundle\Pricing\Price\TierPrice', [ @@ -82,7 +82,7 @@ public function testGetterTierPriceList($tierPrices, $basePrice, $expectedResult { $this->product->setData(TierPrice::PRICE_TYPE_TIER, $tierPrices); - $price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $price->expects($this->any()) ->method('getValue') ->will($this->returnValue($basePrice)); diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Render/FinalPriceBoxTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Render/FinalPriceBoxTest.php index e8369e8e3baad..946774a100a4e 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Render/FinalPriceBoxTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Render/FinalPriceBoxTest.php @@ -36,13 +36,13 @@ class FinalPriceBoxTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleableItem; public function setUp() { - $this->saleableItem = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $this->saleableItem = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $objectHelper->getObject('Magento\Bundle\Pricing\Render\FinalPriceBox', [ @@ -55,7 +55,7 @@ public function setUp() */ public function testShowRangePrice($value, $maxValue, $result) { - $priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface'); + $priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface'); $optionPrice = $this->getMockBuilder('Magento\Bundle\Pricing\Price\BundleOptionPrice') ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php index b3a1c280a8002..6de7cd015524a 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php @@ -54,7 +54,7 @@ protected function setUp() ); $filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $directoryMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false); + $directoryMock = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false); $filesystemMock->expects($this->any())->method('getDirectoryWrite')->will($this->returnValue($directoryMock)); $directoryMock->expects($this->any())->method('getAbsolutePath')->will($this->returnArgument(0)); diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php index 86bc1ce2e2e89..2a2176d1c8f20 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php @@ -78,7 +78,7 @@ public function testGetCaptcha() )->will( $this->returnValue( new \Magento\Captcha\Model\DefaultModel( - $this->getMock('Magento\Session\SessionManager', array(), array(), '', false), + $this->getMock('Magento\Framework\Session\SessionManager', array(), array(), '', false), $this->getMock('Magento\Captcha\Helper\Data', array(), array(), '', false), $this->getMock('Magento\Captcha\Model\Resource\LogFactory', array(), array(), '', false), 'user_create' @@ -161,7 +161,7 @@ public function testGetImgDir() $factoryMock = $this->getMock('Magento\Captcha\Model\CaptchaFactory', array(), array(), '', false); $dirWriteMock = $this->getMock( - 'Magento\Filesystem\Directory\Write', + 'Magento\Framework\Filesystem\Directory\Write', array('changePermissions', 'create', 'getAbsolutePath'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/CaptchaFactoryTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/CaptchaFactoryTest.php index f67b08ae0fa00..db185840e7ca4 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Model/CaptchaFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/CaptchaFactoryTest.php @@ -33,7 +33,7 @@ class CaptchaFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $this->_model = new \Magento\Captcha\Model\CaptchaFactory($this->_objectManagerMock); } diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php index 513a79ebb165f..98064085c17bd 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php @@ -45,12 +45,12 @@ class CronTest extends \PHPUnit_Framework_TestCase protected $_adminHelper; /** - * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ protected $_filesystem; /** - * @var \Magento\Filesystem\DirectoryWriteInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\DirectoryWriteInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_directory; @@ -77,7 +77,7 @@ public function setUp() $this->_helper = $this->getMock('Magento\Captcha\Helper\Data', array(), array(), '', false); $this->_adminHelper = $this->getMock('Magento\Captcha\Helper\Adminhtml\Data', array(), array(), '', false); $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_directory = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false); + $this->_directory = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false); $this->_storeManager = $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false); $this->_filesystem->expects( diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php index 04e74bcb294bb..63dca91e7b392 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php @@ -116,7 +116,7 @@ protected function setUp() ); // \Magento\Customer\Model\Session - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_objectManager->expects( $this->any() )->method( @@ -261,7 +261,7 @@ protected function _getSessionStub() $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $sessionArgs = $helper->getConstructArguments( 'Magento\Customer\Model\Session', - array('storage' => new \Magento\Session\Storage()) + array('storage' => new \Magento\Framework\Session\Storage()) ); $session = $this->getMock( 'Magento\Customer\Model\Session', diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php index 4f85e754e4932..707e5f42fb297 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/ObserverTest.php @@ -116,14 +116,20 @@ protected function setUp() $this->returnValue($this->_getResourceModelStub()) ); - $this->_session = $this->getMock('Magento\Session\SessionManager', array(), array(), '', false); + $this->_session = $this->getMock('Magento\Framework\Session\SessionManager', array(), array(), '', false); $this->_typeOnepage = $this->getMock('Magento\Checkout\Model\Type\Onepage', array(), array(), '', false); $this->_coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); $this->_customerData = $this->getMock('Magento\Customer\Helper\Data', array(), array(), '', false); $this->_helper = $this->getMock('Magento\Captcha\Helper\Data', array(), array(), '', false); - $this->_urlManager = $this->getMock('Magento\Url', array(), array(), '', false); + $this->_urlManager = $this->getMock('Magento\Framework\Url', array(), array(), '', false); $this->_actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', array(), array(), '', false); - $this->_messageManager = $this->getMock('\Magento\Message\ManagerInterface', array(), array(), '', false); + $this->_messageManager = $this->getMock( + '\Magento\Framework\Message\ManagerInterface', + array(), + array(), + '', + false + ); $this->redirect = $this->getMock( '\Magento\Framework\App\Response\RedirectInterface', array(), @@ -189,7 +195,9 @@ public function testCheckContactUsFormWhenCaptchaIsRequiredAndValid() ); $this->_session->expects($this->never())->method('addError'); - $this->_observer->checkContactUsForm(new \Magento\Event\Observer(array('controller_action' => $controller))); + $this->_observer->checkContactUsForm( + new \Magento\Framework\Event\Observer(array('controller_action' => $controller)) + ); } public function testCheckContactUsFormRedirectsCustomerWithWarningMessageWhenCaptchaIsRequiredAndInvalid() @@ -258,7 +266,9 @@ public function testCheckContactUsFormRedirectsCustomerWithWarningMessageWhenCap true ); - $this->_observer->checkContactUsForm(new \Magento\Event\Observer(array('controller_action' => $controller))); + $this->_observer->checkContactUsForm( + new \Magento\Framework\Event\Observer(array('controller_action' => $controller)) + ); } public function testCheckContactUsFormDoesNotCheckCaptchaWhenItIsNotRequired() @@ -275,7 +285,7 @@ public function testCheckContactUsFormDoesNotCheckCaptchaWhenItIsNotRequired() $this->_captcha->expects($this->any())->method('isRequired')->will($this->returnValue(false)); $this->_captcha->expects($this->never())->method('isCorrect'); - $this->_observer->checkContactUsForm(new \Magento\Event\Observer()); + $this->_observer->checkContactUsForm(new \Magento\Framework\Event\Observer()); } public function testCheckForgotpasswordRedirects() @@ -344,7 +354,9 @@ public function testCheckForgotpasswordRedirects() true ); - $this->_observer->checkForgotpassword(new \Magento\Event\Observer(array('controller_action' => $controller))); + $this->_observer->checkForgotpassword( + new \Magento\Framework\Event\Observer(array('controller_action' => $controller)) + ); } public function testCheckUserCreateRedirectsError() @@ -424,7 +436,9 @@ public function testCheckUserCreateRedirectsError() true ); - $this->_observer->checkUserCreate(new \Magento\Event\Observer(array('controller_action' => $controller))); + $this->_observer->checkUserCreate( + new \Magento\Framework\Event\Observer(array('controller_action' => $controller)) + ); } /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php index 084ed65de5538..77b5e648461f1 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php @@ -35,7 +35,7 @@ public function testGetRowUrl() $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $urlBuilder = $this->getMock('Magento\UrlInterface', array(), array(), '', false); + $urlBuilder = $this->getMock('Magento\Framework\UrlInterface', array(), array(), '', false); $urlBuilder->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php index 26a67c53eef4f..4fd0198b168ea 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/OptionsTest.php @@ -63,14 +63,14 @@ protected function setUp() public function testGetOptionHtml() { $layout = $this->getMock( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('getChildName', 'getBlock', 'renderElement'), array(), '', false ); $context = $this->_objectHelper->getObject( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array('layout' => $layout) ); $optionFactoryMock = $this->getMock( @@ -137,7 +137,7 @@ public function testGetOptionHtml() 'Magento\Catalog\Model\Product', array( 'collectionFactory' => $this->getMock( - 'Magento\Data\CollectionFactory', + 'Magento\Framework\Data\CollectionFactory', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php index 37aad8bbe7ce6..b1895340b6e14 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/WeightTest.php @@ -36,7 +36,7 @@ class WeightTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Data\Form\Element\Checkbox + * @var \Magento\Framework\Data\Form\Element\Checkbox */ protected $_virtual; @@ -44,18 +44,18 @@ public function testSetForm() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $factory = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false); + $factory = $this->getMock('Magento\Framework\Data\Form\Element\Factory', array(), array(), '', false); $collectionFactory = $this->getMock( - 'Magento\Data\Form\Element\CollectionFactory', + 'Magento\Framework\Data\Form\Element\CollectionFactory', array('create'), array(), '', false ); - $formKey = $this->getMock('Magento\Data\Form\FormKey', array(), array(), '', false); + $formKey = $this->getMock('Magento\Framework\Data\Form\FormKey', array(), array(), '', false); - $form = new \Magento\Data\Form($factory, $collectionFactory, $formKey); + $form = new \Magento\Framework\Data\Form($factory, $collectionFactory, $formKey); $helper = $this->getMock( 'Magento\Catalog\Helper\Product', @@ -74,7 +74,7 @@ public function testSetForm() ); $this->_virtual = $this->getMock( - 'Magento\Data\Form\Element\Checkbox', + 'Magento\Framework\Data\Form\Element\Checkbox', array('setId', 'setName', 'setLabel', 'setForm'), array(), '', @@ -94,7 +94,7 @@ public function testSetForm() $this->returnSelf() ); - $factory = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false); + $factory = $this->getMock('Magento\Framework\Data\Form\Element\Factory', array(), array(), '', false); $factory->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php index e6c2c26fd2b4c..5596224618baf 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Layer/ViewTest.php @@ -30,7 +30,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase { public function testGetClearUrl() { - $childBlock = new \Magento\Object(); + $childBlock = new \Magento\Framework\Object(); $block = $this->getMock( 'Magento\LayeredNavigation\Block\Navigation', array('getChildBlock'), array(), '', false diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php index 58ea2ffc4d1c4..f9a99c1f22a43 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php @@ -39,7 +39,7 @@ class AbstractProductTest extends \PHPUnit_Framework_TestCase protected $productContextMock; /** - * @var \Magento\View\LayoutInterface + * @var \Magento\Framework\View\LayoutInterface */ protected $layoutMock; @@ -56,8 +56,8 @@ public function setUp() '', false ); - $arrayUtilsMock = $this->getMock('Magento\Stdlib\ArrayUtils', [], [], '', false); - $this->layoutMock = $this->getMock('Magento\View\Layout', ['getBlock'], [], '', false); + $arrayUtilsMock = $this->getMock('Magento\Framework\Stdlib\ArrayUtils', [], [], '', false); + $this->layoutMock = $this->getMock('Magento\Framework\View\Layout', ['getBlock'], [], '', false); $this->productContextMock->expects($this->once()) ->method('getLayout') @@ -78,7 +78,7 @@ public function setUp() public function testGetProductPrice() { $expectedPriceHtml = 'Expected Price html with price $30'; - $priceRenderBlock = $this->getMock('Magento\Pricing\Render', ['render'], [], '', false); + $priceRenderBlock = $this->getMock('Magento\Framework\Pricing\Render', ['render'], [], '', false); $product = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); $this->layoutMock->expects($this->once()) @@ -99,7 +99,7 @@ public function testGetProductPrice() public function testGetProductPriceHtml() { $expectedPriceHtml = 'Expected Price html with price $30'; - $priceRenderBlock = $this->getMock('Magento\Pricing\Render', ['render'], [], '', false); + $priceRenderBlock = $this->getMock('Magento\Framework\Pricing\Render', ['render'], [], '', false); $product = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); $this->layoutMock->expects($this->once()) diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Compare/ListCompareTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Compare/ListCompareTest.php index 494f81371bd28..227c525fbdfd5 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Compare/ListCompareTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Compare/ListCompareTest.php @@ -35,13 +35,13 @@ class ListCompareTest extends \PHPUnit_Framework_TestCase protected $block; /** - * @var \Magento\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $layout; protected function setUp() { - $this->layout = $this->getMock('Magento\View\Layout', ['getBlock'], [], '', false); + $this->layout = $this->getMock('Magento\Framework\View\Layout', ['getBlock'], [], '', false); $context = $this->getMock('Magento\Catalog\Block\Product\Context', ['getLayout'], [], '', false); $context->expects($this->any()) @@ -73,7 +73,7 @@ public function testGetProductPrice() ->method('getId') ->will($this->returnValue($productId)); - $blockMock = $this->getMock('Magento\Pricing\Render', ['render'], [], '', false); + $blockMock = $this->getMock('Magento\Framework\Pricing\Render', ['render'], [], '', false); $blockMock->expects($this->once()) ->method('render') ->with( @@ -82,7 +82,7 @@ public function testGetProductPrice() [ 'price_id' => 'product-price-' . $productId . '-compare-list-top', 'display_minimal_price' => true, - 'zone' => \Magento\Pricing\Render::ZONE_ITEM_LIST + 'zone' => \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST ] ) ->will($this->returnValue($expectedResult)); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php index ac7225b0013d6..2388774e61bd1 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListProductTest.php @@ -31,7 +31,7 @@ class ListProductTest extends \PHPUnit_Framework_TestCase protected $block; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $registryMock; @@ -63,7 +63,7 @@ class ListProductTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->layerMock = $this->getMock('Magento\Catalog\Model\Layer', array(), array(), '', false); $this->postDataHelperMock = $this->getMock( 'Magento\Core\Helper\PostData', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListTest.php index d2b99bb337e18..db42a2cc449ac 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ListTest.php @@ -30,7 +30,7 @@ class ListTest extends \PHPUnit_Framework_TestCase { public function testGetMode() { - $childBlock = new \Magento\Object(); + $childBlock = new \Magento\Framework\Object(); $block = $this->getMock( 'Magento\Catalog\Block\Product\ListProduct', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php index b37463354f246..174538a55f773 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ProductList/ToolbarTest.php @@ -37,7 +37,7 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Url | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Url | \PHPUnit_Framework_MockObject_MockObject */ protected $urlBuilder; @@ -75,7 +75,7 @@ protected function setUp() '', false ); - $this->urlBuilder = $this->getMock('Magento\Url', array('getUrl'), array(), '', false); + $this->urlBuilder = $this->getMock('Magento\Framework\Url', array('getUrl'), array(), '', false); $this->scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $scopeConfig = array( @@ -102,7 +102,7 @@ protected function setUp() ->will($this->returnValue(array('name' => array(), 'price' => array()))); $context = $this->getMock( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array('getUrlBuilder', 'getStoreConfig'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php index dc36dad8a8830..169e706b9d143 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php @@ -67,14 +67,14 @@ protected function setUp() public function testGetOptionHtml() { $layout = $this->getMock( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('getChildName', 'getBlock', 'renderElement'), array(), '', false ); $context = $this->_objectHelper->getObject( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array('layout' => $layout) ); @@ -140,7 +140,7 @@ public function testGetOptionHtml() 'Magento\Catalog\Model\Product', array( 'collectionFactory' => $this->getMock( - 'Magento\Data\CollectionFactory', + 'Magento\Framework\Data\CollectionFactory', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php index 6df490f34204a..94702b277a612 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/View/TabsTest.php @@ -27,10 +27,10 @@ class TabsTest extends \PHPUnit_Framework_TestCase { public function testAddTab() { - $tabBlock = $this->getMock('Magento\View\Element\Template', array(), array(), '', false); + $tabBlock = $this->getMock('Magento\Framework\View\Element\Template', array(), array(), '', false); $tabBlock->expects($this->once())->method('setTemplate')->with('template')->will($this->returnSelf()); - $layout = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $layout = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $layout->expects($this->once())->method('createBlock')->with('block')->will($this->returnValue($tabBlock)); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php index 2c9df7eb07c31..a00cca9362e4e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php @@ -46,7 +46,7 @@ protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->productTypeConfig = $this->getMock('Magento\Catalog\Model\ProductTypes\ConfigInterface'); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->view = $helper->getObject( 'Magento\Catalog\Block\Product\View', array('productTypeConfig' => $this->productTypeConfig, 'registry' => $this->registryMock) diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Widget/NewWidgetTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Widget/NewWidgetTest.php index 69b05c89e6b40..22a0563334b89 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Widget/NewWidgetTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/Widget/NewWidgetTest.php @@ -31,7 +31,7 @@ class NewWidgetTest extends \PHPUnit_Framework_TestCase protected $block; /** - * @var \Magento\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $layout; @@ -39,7 +39,7 @@ protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $contextMock = $this->getMock('Magento\Catalog\Block\Product\Context', [], [], '', false, false); - $this->layout = $this->getMock('Magento\View\Layout', [], [], '', false); + $this->layout = $this->getMock('Magento\Framework\View\Layout', [], [], '', false); $contextMock->expects($this->once()) ->method('getLayout') @@ -76,10 +76,10 @@ public function testGetProductPriceHtml() 'price_id' => 'old-price-' . $id . '-' . $type, 'display_minimal_price' => true, 'include_container' => true, - 'zone' => \Magento\Pricing\Render::ZONE_ITEM_LIST + 'zone' => \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST ]; - $priceBoxMock = $this->getMock('Magento\Pricing\Render', ['render'], [], '', false, false); + $priceBoxMock = $this->getMock('Magento\Framework\Pricing\Render', ['render'], [], '', false, false); $this->layout->expects($this->once()) ->method('getBlock') diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/BuilderTest.php index 42aaa5a35090a..b7b357ca813f9 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/BuilderTest.php @@ -62,9 +62,9 @@ class BuilderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array('create')); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->wysiwygConfigMock = $this->getMock( 'Magento\Cms\Model\Wysiwyg\Config', array('setStoreId'), diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/HandlerFactoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/HandlerFactoryTest.php index 3488855a41acb..f786f5b720f55 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/HandlerFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/HandlerFactoryTest.php @@ -37,7 +37,7 @@ class HandlerFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('\Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('\Magento\Framework\ObjectManager'); $this->_model = new HandlerFactory($this->_objectManagerMock); } @@ -45,11 +45,11 @@ public function testCreateWithInvalidType() { $this->setExpectedException( '\InvalidArgumentException', - 'Magento\Object does not implement ' . + 'Magento\Framework\Object does not implement ' . 'Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\HandlerInterface' ); $this->_objectManagerMock->expects($this->never())->method('create'); - $this->_model->create('Magento\Object'); + $this->_model->create('Magento\Framework\Object'); } public function testCreateWithValidType() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php index 3f12ef965d4cf..61678570b61ab 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php @@ -42,7 +42,7 @@ public function setUp() { $productActionMock = $this->getMock('Magento\Catalog\Model\Product\Action', array(), array(), '', false); $objectManagerMock = $this->getMockForAbstractClass( - '\Magento\ObjectManager', + '\Magento\Framework\ObjectManager', array(), '', true, @@ -63,7 +63,13 @@ public function setUp() 'Magento\Framework\App\ResponseInterface', array('setRedirect', 'sendResponse') ); - $managerInterfaceMock = $this->getMock('Magento\Message\ManagerInterface', array(), array(), '', false); + $managerInterfaceMock = $this->getMock( + 'Magento\Framework\Message\ManagerInterface', + array(), + array(), + '', + false + ); $sessionMock = $this->getMock('Magento\Backend\Model\Session', array(), array(), '', false); $actionFlagMock = $this->getMock('Magento\Framework\App\ActionFlag', array(), array(), '', false); $helperDataMock = $this->getMock('Magento\Backend\Helper\Data', array(), array(), '', false); @@ -93,8 +99,8 @@ public function setUp() $contextMock->expects($this->any())->method('getHelper')->will($this->returnValue($helperDataMock)); $this->_controller = new \Magento\Catalog\Controller\Adminhtml\Product( $contextMock, - $this->getMock('Magento\Registry', array(), array(), '', false), - $this->getMock('Magento\Stdlib\DateTime\Filter\Date', array(), array(), '', false), + $this->getMock('Magento\Framework\Registry', array(), array(), '', false), + $this->getMock('Magento\Framework\Stdlib\DateTime\Filter\Date', array(), array(), '', false), $this->getMock( 'Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper', array(), diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/CategoryTest.php index 5c1bd7e84ccff..db3995f8de399 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/CategoryTest.php @@ -51,22 +51,22 @@ class CategoryTest extends \PHPUnit_Framework_TestCase protected $categoryHelper; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManager; /** - * @var \Magento\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $eventManager; /** - * @var \Magento\View\Layout|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Layout|\PHPUnit_Framework_MockObject_MockObject */ protected $layout; /** - * @var \Magento\View\Layout\ProcessorInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Layout\ProcessorInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $update; @@ -121,11 +121,11 @@ public function setUp() $this->response = $this->getMock('Magento\Framework\App\ResponseInterface'); $this->categoryHelper = $this->getMock('Magento\Catalog\Helper\Category', [], [], '', false); - $this->objectManager = $this->getMock('Magento\ObjectManager', [], [], '', false); - $this->eventManager = $this->getMock('Magento\Event\ManagerInterface'); + $this->objectManager = $this->getMock('Magento\Framework\ObjectManager', [], [], '', false); + $this->eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface'); - $this->update = $this->getMock('Magento\View\Layout\ProcessorInterface'); - $this->layout = $this->getMock('Magento\View\Layout', [], [], '', false); + $this->update = $this->getMock('Magento\Framework\View\Layout\ProcessorInterface'); + $this->layout = $this->getMock('Magento\Framework\View\Layout', [], [], '', false); $this->layout->expects($this->any())->method('getUpdate')->will($this->returnValue($this->update)); $this->view = $this->getMock('Magento\Framework\App\ViewInterface'); $this->view->expects($this->any())->method('getLayout')->will($this->returnValue($this->layout)); @@ -177,7 +177,7 @@ public function testApplyCustomLayoutUpdate() $this->categoryHelper->expects($this->any())->method('canShow')->will($this->returnValue(true)); - $settings = $this->getMock('Magento\Object', ['getPageLayout'], [], '', false); + $settings = $this->getMock('Magento\Framework\Object', ['getPageLayout'], [], '', false); $settings->expects($this->atLeastOnce())->method('getPageLayout')->will($this->returnValue($pageLayout)); $this->catalogDesign->expects($this->any())->method('getDesignSettings')->will($this->returnValue($settings)); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/CompareTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/CompareTest.php index 147ec85092545..602e35c6969fe 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/CompareTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/CompareTest.php @@ -44,7 +44,7 @@ class CompareTest extends \PHPUnit_Framework_TestCase protected $context; /** - * @var \Magento\Url | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Url | \PHPUnit_Framework_MockObject_MockObject */ protected $urlBuilder; @@ -62,7 +62,7 @@ public function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->urlBuilder = $this->getMock('Magento\Url', array('getUrl'), array(), '', false); + $this->urlBuilder = $this->getMock('Magento\Framework\Url', array('getUrl'), array(), '', false); $this->request = $this->getMock('Magento\Framework\App\Request\Http', array('getServer'), array(), '', false); /** @var \Magento\Framework\App\Helper\Context $context */ $this->context = $this->getMock( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/Flat/IndexerTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/Flat/IndexerTest.php index 3d464d9a736de..f8c70e06c0d39 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/Flat/IndexerTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Helper/Product/Flat/IndexerTest.php @@ -46,12 +46,12 @@ class IndexerTest extends \PHPUnit_Framework_TestCase protected $_resourceMock; /** - * @var \Magento\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject */ protected $_connectionMock; /** - * @var \Magento\Mview\View\Changelog|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\View\Changelog|\PHPUnit_Framework_MockObject_MockObject */ protected $_changelogMock; @@ -94,17 +94,20 @@ public function setUp() $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); $this->_connectionMock = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('getTables', 'dropTable'), array(), '', false ); - $this->_changelogMock = $this->getMock('Magento\Mview\View\Changelog', array('getName'), array(), '', false); - - - + $this->_changelogMock = $this->getMock( + 'Magento\Framework\Mview\View\Changelog', + array('getName'), + array(), + '', + false + ); $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_model = $this->_objectManager->getObject( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php index 5eaeb295bb71e..c590656ec649b 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/ReaderTest.php @@ -31,7 +31,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Config\FileResolverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\FileResolverInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_fileResolverMock; @@ -46,13 +46,13 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_schemaLocator; /** - * @var \Magento\Config\ValidationStateInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\ValidationStateInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_validationState; protected function setUp() { - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $this->_fileResolverMock->expects( $this->once() )->method( @@ -71,7 +71,13 @@ protected function setUp() $this->_converter = $this->getMock('Magento\Catalog\Model\Attribute\Config\Converter', array('convert')); - $moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $moduleReader = $this->getMock( + 'Magento\Framework\Module\Dir\Reader', + array('getModuleDir'), + array(), + '', + false + ); $moduleReader->expects( $this->once() )->method( @@ -84,7 +90,7 @@ protected function setUp() ); $this->_schemaLocator = new \Magento\Catalog\Model\Attribute\Config\SchemaLocator($moduleReader); - $this->_validationState = $this->getMock('Magento\Config\ValidationStateInterface'); + $this->_validationState = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $this->_validationState->expects($this->once())->method('isValidated')->will($this->returnValue(false)); $this->_model = new \Magento\Catalog\Model\Attribute\Config\Reader( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php index eb3eda1819647..50ef9c26ab5fe 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/SchemaLocatorTest.php @@ -31,13 +31,19 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */ protected $_moduleReader; protected function setUp() { - $this->_moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $this->_moduleReader = $this->getMock( + 'Magento\Framework\Module\Dir\Reader', + array('getModuleDir'), + array(), + '', + false + ); $this->_moduleReader->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/XsdTest.php index 9823a922573e4..c49ed46eef257 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/Config/XsdTest.php @@ -44,7 +44,7 @@ protected function setUp() */ public function testExemplarXml($fixtureXml, array $expectedErrors) { - $dom = new \Magento\Config\Dom($fixtureXml, array(), null, null, '%message%'); + $dom = new \Magento\Framework\Config\Dom($fixtureXml, array(), null, null, '%message%'); $actualResult = $dom->validate($this->_schemaFile, $actualErrors); $this->assertEquals(empty($expectedErrors), $actualResult); $this->assertEquals($expectedErrors, $actualErrors); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/LockValidatorCompositeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/LockValidatorCompositeTest.php index f821a4f5e296c..790d8b1166bb7 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/LockValidatorCompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Attribute/LockValidatorCompositeTest.php @@ -38,7 +38,7 @@ class LockValidatorCompositeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->objectManagerMock = $this->getMock('\Magento\ObjectManager'); + $this->objectManagerMock = $this->getMock('\Magento\Framework\ObjectManager'); } /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php index 7b9decb10a25f..03219a91530e7 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Category/Attribute/Backend/SortbyTest.php @@ -70,7 +70,7 @@ protected function tearDown() */ public function testBeforeSave($data, $expected) { - $object = new \Magento\Object($data); + $object = new \Magento\Framework\Object($data); $this->_model->beforeSave($object); $this->assertTrue($object->hasData(self::DEFAULT_ATTRIBUTE_CODE)); $this->assertSame($expected, $object->getData(self::DEFAULT_ATTRIBUTE_CODE)); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php index e260ac4bfc350..04c86cb11bd3c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/CategoryTest.php @@ -39,13 +39,13 @@ class CategoryTest extends \PHPUnit_Framework_TestCase protected $objectManager; /** - * @var \Magento\Filter\FilterManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filter\FilterManager|\PHPUnit_Framework_MockObject_MockObject */ protected $filter; protected function setUp() { - $this->filter = $this->getMock('Magento\Filter\FilterManager', ['translitUrl'], [], '', false); + $this->filter = $this->getMock('Magento\Framework\Filter\FilterManager', ['translitUrl'], [], '', false); $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $this->objectManager->getObject('Magento\Catalog\Model\Category', ['filter' => $this->filter]); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewStateTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewStateTest.php index ba3f415c99d2d..b177453a7e22d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewStateTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Category/Product/Plugin/MviewStateTest.php @@ -45,7 +45,7 @@ public function testAfterSetStatusSuspend($stateStatus, $relatedStatus) $relatedVersion = 'related_version'; $state = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMockForAbstractClass(); $state->expects($this->exactly(2))->method('getViewId')->will($this->returnValue($stateViewId)); @@ -53,7 +53,7 @@ public function testAfterSetStatusSuspend($stateStatus, $relatedStatus) $state->expects($this->any())->method('getStatus')->will($this->returnValue($stateStatus)); $relatedViewState = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMock(); $relatedViewState->expects( @@ -93,7 +93,7 @@ public function testAfterSetStatusSuspend($stateStatus, $relatedStatus) ); $relatedViewChangelog = $this->getMockBuilder( - 'Magento\Mview\View\ChangelogInterface' + 'Magento\Framework\Mview\View\ChangelogInterface' )->disableOriginalConstructor()->getMock(); $relatedViewChangelog->expects( @@ -112,7 +112,7 @@ public function testAfterSetStatusSuspend($stateStatus, $relatedStatus) $relatedViewState, $relatedViewChangelog ); - $this->assertInstanceOf('\Magento\Mview\View\StateInterface', $model->afterSetStatus($state)); + $this->assertInstanceOf('\Magento\Framework\Mview\View\StateInterface', $model->afterSetStatus($state)); } /** @@ -134,7 +134,7 @@ public function testAfterSetStatusResume($stateStatus, $relatedStatus) $relatedViewId = \Magento\Catalog\Model\Indexer\Category\Product::INDEXER_ID; $state = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMockForAbstractClass(); $state->expects($this->exactly(2))->method('getViewId')->will($this->returnValue($stateViewId)); @@ -142,7 +142,7 @@ public function testAfterSetStatusResume($stateStatus, $relatedStatus) $state->expects($this->any())->method('getStatus')->will($this->returnValue($stateStatus)); $relatedViewState = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMock(); $relatedViewState->expects( @@ -174,14 +174,14 @@ public function testAfterSetStatusResume($stateStatus, $relatedStatus) ); $relatedViewChangelog = $this->getMockBuilder( - 'Magento\Mview\View\ChangelogInterface' + 'Magento\Framework\Mview\View\ChangelogInterface' )->disableOriginalConstructor()->getMock(); $model = new \Magento\Catalog\Model\Indexer\Category\Product\Plugin\MviewState( $relatedViewState, $relatedViewChangelog ); - $this->assertInstanceOf('\Magento\Mview\View\StateInterface', $model->afterSetStatus($state)); + $this->assertInstanceOf('\Magento\Framework\Mview\View\StateInterface', $model->afterSetStatus($state)); } /** @@ -209,7 +209,7 @@ public function testAfterSetStatusSkip($stateStatus, $relatedStatus) $relatedViewId = \Magento\Catalog\Model\Indexer\Category\Product::INDEXER_ID; $state = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMockForAbstractClass(); $state->expects($this->exactly(2))->method('getViewId')->will($this->returnValue($stateViewId)); @@ -217,7 +217,7 @@ public function testAfterSetStatusSkip($stateStatus, $relatedStatus) $state->expects($this->any())->method('getStatus')->will($this->returnValue($stateStatus)); $relatedViewState = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMock(); $relatedViewState->expects( @@ -241,14 +241,14 @@ public function testAfterSetStatusSkip($stateStatus, $relatedStatus) $relatedViewState->expects($this->never())->method('setStatus'); $relatedViewChangelog = $this->getMockBuilder( - 'Magento\Mview\View\ChangelogInterface' + 'Magento\Framework\Mview\View\ChangelogInterface' )->disableOriginalConstructor()->getMock(); $model = new \Magento\Catalog\Model\Indexer\Category\Product\Plugin\MviewState( $relatedViewState, $relatedViewChangelog ); - $this->assertInstanceOf('\Magento\Mview\View\StateInterface', $model->afterSetStatus($state)); + $this->assertInstanceOf('\Magento\Framework\Mview\View\StateInterface', $model->afterSetStatus($state)); } /** @@ -269,7 +269,7 @@ public function testAfterSetStatusDisabled($stateStatus) $relatedViewId = \Magento\Catalog\Model\Indexer\Category\Product::INDEXER_ID; $state = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMockForAbstractClass(); $state->expects($this->exactly(2))->method('getViewId')->will($this->returnValue($stateViewId)); @@ -277,7 +277,7 @@ public function testAfterSetStatusDisabled($stateStatus) $state->expects($this->any())->method('getStatus')->will($this->returnValue($stateStatus)); $relatedViewState = $this->getMockBuilder( - 'Magento\Mview\View\StateInterface' + 'Magento\Framework\Mview\View\StateInterface' )->disableOriginalConstructor()->getMock(); $relatedViewState->expects( @@ -301,13 +301,13 @@ public function testAfterSetStatusDisabled($stateStatus) $relatedViewState->expects($this->never())->method('setStatus'); $relatedViewChangelog = $this->getMockBuilder( - 'Magento\Mview\View\ChangelogInterface' + 'Magento\Framework\Mview\View\ChangelogInterface' )->disableOriginalConstructor()->getMock(); $model = new \Magento\Catalog\Model\Indexer\Category\Product\Plugin\MviewState( $relatedViewState, $relatedViewChangelog ); - $this->assertInstanceOf('\Magento\Mview\View\StateInterface', $model->afterSetStatus($state)); + $this->assertInstanceOf('\Magento\Framework\Mview\View\StateInterface', $model->afterSetStatus($state)); } } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php index 02864d14eb437..7587adbf284f7 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowTest.php @@ -42,7 +42,7 @@ public function setUp() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Could not rebuild index for undefined product */ public function testEmptyId() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php index 1d3da46059a7c..11943e2e4c8e4 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/Rows/TableDataTest.php @@ -29,7 +29,7 @@ class TableDataTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_connectionMock; @@ -51,7 +51,7 @@ class TableDataTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_connectionMock = $this->getMock('Magento\DB\Adapter\AdapterInterface'); + $this->_connectionMock = $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface'); $this->_resourceMock = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false); $this->_productIndexerHelper = $this->getMock( 'Magento\Catalog\Helper\Product\Flat\Indexer', @@ -123,7 +123,7 @@ public function testMoveWithExistentFlatTable() 'column_3' => 'column_definition' ); - $selectMock = $this->getMock('Magento\DB\Select', array(), array(), '', false); + $selectMock = $this->getMock('Magento\Framework\DB\Select', array(), array(), '', false); $selectMock->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php index 37a3a3c3aaa3c..226f0f9e106e5 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/Action/RowsTest.php @@ -42,7 +42,7 @@ public function setUp() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Bad value was supplied. */ public function testEmptyIds() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/TableDataTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/TableDataTest.php index 8c29eb278bc47..13b3f1dfaaca6 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/TableDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Flat/TableDataTest.php @@ -29,7 +29,7 @@ class TableDataTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_connectionMock; @@ -46,7 +46,7 @@ class TableDataTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_connectionMock = $this->getMock('Magento\DB\Adapter\AdapterInterface'); + $this->_connectionMock = $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface'); $this->_resourceMock = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/ObserverTest.php index 18354bee60682..9ab67d9ba082a 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/ObserverTest.php @@ -49,12 +49,12 @@ class ObserverTest extends \PHPUnit_Framework_TestCase protected $_resourceMock; /** - * @var \Magento\Stdlib\DateTime|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\DateTime|\PHPUnit_Framework_MockObject_MockObject */ protected $_dateTimeMock; /** - * @var \Magento\Stdlib\DateTime\TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_localeDateMock; @@ -80,8 +80,8 @@ protected function setUp() false ); $this->_resourceMock = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false); - $this->_dateTimeMock = $this->getMock('Magento\Stdlib\DateTime', array(), array(), '', false); - $this->_localeDateMock = $this->getMock('Magento\Stdlib\DateTime\TimezoneInterface'); + $this->_dateTimeMock = $this->getMock('Magento\Framework\Stdlib\DateTime', array(), array(), '', false); + $this->_localeDateMock = $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface'); $this->_eavConfigMock = $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false); $this->_priceProcessorMock = $this->getMock( 'Magento\Catalog\Model\Indexer\Product\Price\Processor', @@ -108,11 +108,11 @@ public function testRefreshSpecialPrices() { $idsToProcess = array(1, 2, 3); - $selectMock = $this->getMock('Magento\DB\Select', array(), array(), '', false); + $selectMock = $this->getMock('Magento\Framework\DB\Select', array(), array(), '', false); $selectMock->expects($this->any())->method('from')->will($this->returnSelf()); $selectMock->expects($this->any())->method('where')->will($this->returnSelf()); - $connectionMock = $this->getMock('Magento\DB\Adapter\AdapterInterface', array(), array(), '', false); + $connectionMock = $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface', array(), array(), '', false); $connectionMock->expects($this->any())->method('select')->will($this->returnValue($selectMock)); $connectionMock->expects( $this->any() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/System/Config/PriceScopeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/System/Config/PriceScopeTest.php index 3ed0e730705d5..8689c9035bc77 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/System/Config/PriceScopeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Indexer/Product/Price/System/Config/PriceScopeTest.php @@ -56,8 +56,8 @@ public function setUp() ); $this->_indexerMock->expects($this->any())->method('load')->will($this->returnValue($this->_indexerMock)); - $contextMock = $this->getMock('Magento\Model\Context', array(), array(), '', false); - $registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $contextMock = $this->getMock('Magento\Framework\Model\Context', array(), array(), '', false); + $registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface', array(), array(), '', false); $configMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/FactoryTest.php index e155bce18780c..2c5e0b18d6090 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Filter/FactoryTest.php @@ -26,7 +26,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $_objectManagerMock; @@ -37,7 +37,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_factory = $objectManagerHelper->getObject( @@ -86,7 +86,7 @@ public function testCreateWithArguments() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage WrongClass doesn't extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter */ public function testWrongTypeException() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php index c30132034cb11..98b8b42bf585c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php @@ -53,7 +53,7 @@ class FilterListTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->objectManagerMock = $this->getMock('\Magento\ObjectManager'); + $this->objectManagerMock = $this->getMock('\Magento\Framework\ObjectManager'); $this->attributeListMock = $this->getMock( 'Magento\Catalog\Model\Layer\Category\FilterableAttributeList', array(), array(), '', false ); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Observer/ReindexTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Observer/ReindexTest.php index 13f8a01d83855..5e01fe5abcda1 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Observer/ReindexTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Observer/ReindexTest.php @@ -58,7 +58,13 @@ public function testFulltextReindex() $this->logicalOr($this->equalTo(null), $this->equalTo($affectedProduct)) ); - $objectManager = $this->getMock('Magento\ObjectManager\ObjectManager', array('get'), array(), '', false); + $objectManager = $this->getMock( + 'Magento\Framework\ObjectManager\ObjectManager', + array('get'), + array(), + '', + false + ); $objectManager->expects( $this->once() )->method( @@ -69,11 +75,11 @@ public function testFulltextReindex() $this->returnValue($fulltextReindex) ); - $observer = new \Magento\Event\Observer( - array('data_object' => new \Magento\Object(array('affected_product_ids' => $affectedProduct))) + $observer = new \Magento\Framework\Event\Observer( + array('data_object' => new \Magento\Framework\Object(array('affected_product_ids' => $affectedProduct))) ); - /** @var $objectManager \Magento\ObjectManager */ + /** @var $objectManager \Magento\Framework\ObjectManager */ $object = new \Magento\Catalog\Model\Observer\Reindex($objectManager); $this->assertInstanceOf('Magento\Catalog\Model\Observer\Reindex', $object->fulltextReindex($observer)); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php index 9199aed2cdeb3..151a829f21aab 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/CategoryTest.php @@ -32,12 +32,12 @@ public function testAfterLoad() { $categoryIds = array(1, 2, 3, 4, 5); - $product = $this->getMock('Magento\Object', array('getCategoryIds', 'setData')); + $product = $this->getMock('Magento\Framework\Object', array('getCategoryIds', 'setData')); $product->expects($this->once())->method('getCategoryIds')->will($this->returnValue($categoryIds)); $product->expects($this->once())->method('setData')->with('category_ids', $categoryIds); - $categoryAttribute = $this->getMock('Magento\Object', array('getAttributeCode')); + $categoryAttribute = $this->getMock('Magento\Framework\Object', array('getAttributeCode')); $categoryAttribute->expects( $this->once() )->method( @@ -46,7 +46,7 @@ public function testAfterLoad() $this->returnValue('category_ids') ); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $model = new \Magento\Catalog\Model\Product\Attribute\Backend\Category($logger); $model->setAttribute($categoryAttribute); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php index 77719c74269f1..096660b94c93a 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/Groupprice/AbstractTest.php @@ -45,7 +45,7 @@ protected function setUp() $this->_helper = $this->getMock('Magento\Catalog\Helper\Data', array('isPriceGlobal'), array(), '', false); $this->_helper->expects($this->any())->method('isPriceGlobal')->will($this->returnValue(true)); - $loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $currencyFactoryMock = $this->getMock('Magento\Directory\Model\CurrencyFactory', array(), array(), '', false); $storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface', array(), array(), '', false); $productTypeMock = $this->getMock('Magento\Catalog\Model\Product\Type', array(), array(), '', false); @@ -90,7 +90,7 @@ public function testGetAffectedFields() $this->_model->setAttribute($attribute); - $object = new \Magento\Object(); + $object = new \Magento\Framework\Object(); $object->setGroupPrice(array(array('price_id' => 10))); $object->setId(555); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php index b6e9f848fb504..0a80307c04079 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php @@ -41,7 +41,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $fileStorageDb = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false); $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); @@ -56,7 +56,7 @@ protected function setUp() $mediaConfig = $this->getMock('Magento\Catalog\Model\Product\Media\Config', array(), array(), '', false); $directory = $this->getMockBuilder( - 'Magento\Filesystem\Directory\Write' + 'Magento\Framework\Filesystem\Directory\Write' )->disableOriginalConstructor()->getMock(); $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem') ->disableOriginalConstructor() @@ -98,7 +98,7 @@ public function testGetAffectedFields() $this->_model->setAttribute($attribute); - $object = new \Magento\Object(); + $object = new \Magento\Framework\Object(); $object->setImage(array('images' => array(array('value_id' => $valueId)))); $object->setId(555); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php index 12ca8eecb7f5d..da045f7d75034 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php @@ -68,7 +68,7 @@ protected function setUp() 'Magento\Catalog\Model\Product\Attribute\Backend\Stock', array('data' => array('inventory' => $this->_inventory), 'stockItemFactory' => $stockItemFactory) ); - $attribute = $this->getMock('Magento\Object', array('getAttributeCode')); + $attribute = $this->getMock('Magento\Framework\Object', array('getAttributeCode')); $attribute->expects( $this->atLeastOnce() )->method( @@ -83,7 +83,7 @@ public function testAfterLoad() { $this->_inventory->expects($this->once())->method('getIsInStock')->will($this->returnValue(1)); $this->_inventory->expects($this->once())->method('getQty')->will($this->returnValue(5)); - $object = new \Magento\Object(); + $object = new \Magento\Framework\Object(); $this->_model->afterLoad($object); $data = $object->getData(); $this->assertEquals(1, $data[self::ATTRIBUTE_NAME]['is_in_stock']); @@ -92,7 +92,7 @@ public function testAfterLoad() public function testBeforeSave() { - $object = new \Magento\Object( + $object = new \Magento\Framework\Object( array( self::ATTRIBUTE_NAME => array('is_in_stock' => 1, 'qty' => 5), 'stock_data' => array('is_in_stock' => 2, 'qty' => 2) @@ -113,7 +113,7 @@ public function testBeforeSave() public function testBeforeSaveQtyIsEmpty() { - $object = new \Magento\Object( + $object = new \Magento\Framework\Object( array( self::ATTRIBUTE_NAME => array('is_in_stock' => 1, 'qty' => ''), 'stock_data' => array('is_in_stock' => 2, 'qty' => '') @@ -128,7 +128,7 @@ public function testBeforeSaveQtyIsEmpty() public function testBeforeSaveQtyIsZero() { - $object = new \Magento\Object( + $object = new \Magento\Framework\Object( array( self::ATTRIBUTE_NAME => array('is_in_stock' => 1, 'qty' => 0), 'stock_data' => array('is_in_stock' => 2, 'qty' => 0) diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructorFactoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructorFactoryTest.php index 9e5b0c34e67a0..b22d0eea2b5a9 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructorFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructorFactoryTest.php @@ -37,7 +37,7 @@ class CopyConstructorFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('\Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('\Magento\Framework\ObjectManager'); $this->_model = new CopyConstructorFactory($this->_objectManagerMock); } @@ -45,10 +45,10 @@ public function testCreateWithInvalidType() { $this->setExpectedException( '\InvalidArgumentException', - 'Magento\Object does not implement \Magento\Catalog\Model\Product\CopyConstructorInterface' + 'Magento\Framework\Object does not implement \Magento\Catalog\Model\Product\CopyConstructorInterface' ); $this->_objectManagerMock->expects($this->never())->method('create'); - $this->_model->create('Magento\Object'); + $this->_model->create('Magento\Framework\Object'); } public function testCreateWithValidType() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Type/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Type/FactoryTest.php index 65c38b3536ef0..ebb6e64756fed 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Type/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Option/Type/FactoryTest.php @@ -26,7 +26,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $_objectManagerMock; @@ -37,7 +37,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_factory = $objectManagerHelper->getObject( @@ -86,7 +86,7 @@ public function testCreateWithArguments() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage WrongClass doesn't extends \Magento\Catalog\Model\Product\Option\Type\DefaultType */ public function testWrongTypeException() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifier/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifier/CompositeTest.php index d43e69c8e0e86..0665d3aabaacb 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifier/CompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/PriceModifier/CompositeTest.php @@ -47,7 +47,7 @@ class CompositeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->productMock = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false); $this->priceModifierMock = $this->getMock('Magento\Catalog\Model\Product\PriceModifierInterface'); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ProductList/ToolbarTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ProductList/ToolbarTest.php index 58d8508cf4176..d19ffccee4bb6 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ProductList/ToolbarTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ProductList/ToolbarTest.php @@ -32,7 +32,7 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase protected $toolbarModel; /** - * @var \Magento\Stdlib\Cookie |\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\Cookie |\PHPUnit_Framework_MockObject_MockObject */ protected $cookie; @@ -46,7 +46,7 @@ class ToolbarTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->cookie = $this->getMock('Magento\Stdlib\Cookie', array('get'), array(), '', false); + $this->cookie = $this->getMock('Magento\Framework\Stdlib\Cookie', array('get'), array(), '', false); $this->request = $this->getMock('Magento\Framework\App\Request\Http', array('getParam'), array(), '', false); $this->toolbarModel = new Toolbar($this->cookie, $this->request); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php index b7c42aac63e5d..c61af0e0976c9 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php @@ -36,14 +36,14 @@ class SimpleTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false); $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem') ->disableOriginalConstructor() ->getMock(); - $coreRegistry = $this->getMock('Magento\Registry', array(), array(), '', false); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false); $this->_model = $objectHelper->getObject( 'Magento\Catalog\Model\Product\Type\Simple', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php index 19b7e6fab12e7..cf14c0f4c2036 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php @@ -36,14 +36,14 @@ class VirtualTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $coreRegistryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $coreRegistryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false); $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem') ->disableOriginalConstructor() ->getMock(); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false); $this->_model = $objectHelper->getObject( 'Magento\Catalog\Model\Product\Type\Virtual', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php index b70054fa9f3a6..f97b6aef4806b 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php @@ -34,14 +34,14 @@ class UrlTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Filter\FilterManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filter\FilterManager|\PHPUnit_Framework_MockObject_MockObject */ protected $filter; protected function setUp() { $this->filter = $this->getMockBuilder( - 'Magento\Filter\FilterManager' + 'Magento\Framework\Filter\FilterManager' )->disableOriginalConstructor()->setMethods( array('translitUrl') )->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ValidatorTest.php index 57f802ca10c9d..657c0a527c754 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ValidatorTest.php @@ -30,7 +30,7 @@ public function testValidator() $validator = new \Magento\Catalog\Model\Product\Validator(); $productMock = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false); $requestMock = $this->getMock('Magento\Framework\App\RequestInterface'); - $responseMock = $this->getMock('Magento\Object'); + $responseMock = $this->getMock('Magento\Framework\Object'); $productMock->expects($this->once())->method('validate')->will($this->returnValue(true)); $this->assertEquals(true, $validator->validate($productMock, $requestMock, $responseMock)); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php index dd88df3bb3ebb..8672f4cbbdbbe 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTest.php @@ -59,7 +59,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase protected $productTypeMock; /** - * @var \Magento\Pricing\PriceInfo\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfo\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $_priceInfoMock; @@ -81,7 +81,7 @@ public function setUp() false ); - $this->_priceInfoMock = $this->getMock('Magento\Pricing\PriceInfo\Base', [], [], '', false); + $this->_priceInfoMock = $this->getMock('Magento\Framework\Pricing\PriceInfo\Base', [], [], '', false); $this->productTypeMock = $this->getMock('Magento\Catalog\Model\Product\Type', [], [], '', false); $this->productPriceProcessor = $this->getMock( 'Magento\Catalog\Model\Indexer\Product\Price\Processor', @@ -96,13 +96,19 @@ public function setUp() ->method('getAreaCode') ->will($this->returnValue(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)); - $eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); - $actionValidatorMock = $this->getMock('\Magento\Model\ActionValidator\RemoveAction', [], [], '', false); + $eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); + $actionValidatorMock = $this->getMock( + '\Magento\Framework\Model\ActionValidator\RemoveAction', + [], + [], + '', + false + ); $actionValidatorMock->expects($this->any())->method('isAllowed')->will($this->returnValue(true)); $cacheInterfaceMock = $this->getMock('Magento\Framework\App\CacheInterface', array(), array(), '', false); $contextMock = $this->getMock( - '\Magento\Model\Context', + '\Magento\Framework\Model\Context', array('getEventDispatcher', 'getCacheManager', 'getAppState', 'getActionValidator'), array(), '', false ); $contextMock->expects($this->any())->method('getAppState')->will($this->returnValue($stateMock)); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php index b56361347c419..cf79aa240478d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/Config/SchemaLocatorTest.php @@ -37,7 +37,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_moduleReaderMock = $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false); + $this->_moduleReaderMock = $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false); $this->_moduleReaderMock->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php index 17da9ae06fc2c..65139635cdbba 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php @@ -49,7 +49,7 @@ protected function setUp() '', false ); - $this->cacheMock = $this->getMock('Magento\Config\CacheInterface'); + $this->cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); } /** diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php index 58cb2e73b448b..8a1df6f42267e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/AbstractTest.php @@ -69,7 +69,7 @@ public function testWalkAttributes() $object->setData(array('test_attr' => 'test_attr', 'attribute_set_id' => $set)); - $entityType = new \Magento\Object(); + $entityType = new \Magento\Framework\Object(); $entityType->setEntityTypeCode('test'); $entityType->setEntityTypeId(0); $entityType->setEntityTable('table'); @@ -106,9 +106,9 @@ public function testWalkAttributes() $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false, false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false, false), $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', array(), array(), '', false, false), - $this->getMock('Magento\Locale\FormatInterface'), + $this->getMock('Magento\Framework\Locale\FormatInterface'), $this->getMock('Magento\Eav\Model\Resource\Helper', array(), array(), '', false, false), - $this->getMock('Magento\Validator\UniversalFactory', array(), array(), '', false, false), + $this->getMock('Magento\Framework\Validator\UniversalFactory', array(), array(), '', false, false), $this->getMock('Magento\Store\Model\StoreManagerInterface', array(), array(), '', false), $this->getMock('Magento\Catalog\Model\Factory', array(), array(), '', false), array() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/Collection/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/Collection/FactoryTest.php index bbd91aa1cf0c0..fc35754588bff 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/Collection/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/Collection/FactoryTest.php @@ -37,7 +37,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new \Magento\Catalog\Model\Resource\Category\Collection\Factory($this->_objectManager); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php index 6792ee5d1a524..b6c1f554cebe6 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php @@ -50,7 +50,7 @@ protected function setUp() $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); $select->expects($this->once())->method('from')->with('catalog_category_entity'); - $connection = $this->getMock('Magento\DB\Adapter\AdapterInterface'); + $connection = $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface'); $connection->expects($this->once())->method('select')->will($this->returnValue($select)); $this->_resource = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false); $this->_resource->expects( @@ -71,7 +71,7 @@ protected function setUp() )->will( $this->returnArgument(0) ); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $this->_attributeConfig = $this->getMock( 'Magento\Catalog\Model\Attribute\Config', array(), diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php index 93034a5c7a6c6..c15568bf6af7d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Eav/AttributeTest.php @@ -48,17 +48,17 @@ public function setUp() false ); - $eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $cacheInterfaceMock = $this->getMock('Magento\Framework\App\CacheInterface', array(), array(), '', false); $actionValidatorMock = $this->getMock( - '\Magento\Model\ActionValidator\RemoveAction', array(), array(), '', false + '\Magento\Framework\Model\ActionValidator\RemoveAction', array(), array(), '', false ); $actionValidatorMock->expects($this->any())->method('isAllowed')->will($this->returnValue(true)); $contextMock = $this->getMock( - '\Magento\Model\Context', + '\Magento\Framework\Model\Context', array('getEventDispatcher', 'getCacheManager', 'getActionValidator'), array(), '', false ); @@ -67,12 +67,12 @@ public function setUp() $contextMock->expects($this->any())->method('getActionValidator') ->will($this->returnValue($actionValidatorMock)); - $dbAdapterMock = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array(), array(), '', false); + $dbAdapterMock = $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', array(), array(), '', false); $dbAdapterMock->expects($this->any())->method('getTransactionLevel')->will($this->returnValue(1)); $resourceMock = $this->getMock( - 'Magento\Model\Resource\AbstractResource', + 'Magento\Framework\Model\Resource\AbstractResource', array('_construct', '_getReadAdapter', '_getWriteAdapter', 'getIdFieldName', 'save', 'saveInSetIncluding', 'isUsedBySuperProducts', 'delete'), array(), '', false @@ -82,22 +82,22 @@ public function setUp() $this->_model = new \Magento\Catalog\Model\Resource\Eav\Attribute( $contextMock, - $this->getMock('Magento\Registry', array(), array(), '', false), + $this->getMock('Magento\Framework\Registry', array(), array(), '', false), $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Entity\TypeFactory', array(), array(), '', false), $this->getMock('Magento\Store\Model\StoreManagerInterface', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Resource\Helper', array(), array(), '', false), - $this->getMock('Magento\Validator\UniversalFactory', array(), array(), '', false), - $this->getMock('Magento\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false), + $this->getMock('Magento\Framework\Validator\UniversalFactory', array(), array(), '', false), + $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false), $this->getMock('Magento\Catalog\Model\Product\ReservedAttributeList', array(), array(), '', false), - $this->getMock('Magento\Locale\ResolverInterface', array(), array(), '', false), + $this->getMock('Magento\Framework\Locale\ResolverInterface', array(), array(), '', false), $this->getMock('Magento\Index\Model\Indexer', array(), array(), '', false), $this->_processor, $this->getMock('\Magento\Catalog\Helper\Product\Flat\Indexer', array(), array(), '', false), $this->getMock('\Magento\Catalog\Model\Attribute\LockValidatorInterface'), $resourceMock, - $this->getMock('\Magento\Data\Collection\Db', array(), array(), '', false), + $this->getMock('\Magento\Framework\Data\Collection\Db', array(), array(), '', false), array('id' => 1) ); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/LinkTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/LinkTest.php index 452b4477239d0..421df4973eae8 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/LinkTest.php @@ -54,8 +54,10 @@ protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->resource = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false); - $this->readAdapter = $this->getMock('\Magento\DB\Adapter\AdapterInterface', array(), array(), '', false); - $this->writeAdapter = $this->getMock('\Magento\DB\Adapter\AdapterInterface', array(), array(), '', false); + $this->readAdapter = + $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface', array(), array(), '', false); + $this->writeAdapter = + $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface', array(), array(), '', false); $this->model = $objectManager->getObject( 'Magento\Catalog\Model\Resource\Product\Link', array('resource' => $this->resource) @@ -64,7 +66,7 @@ protected function setUp() protected function prepareReadAdapter() { - $this->dbSelect = $this->getMock('Magento\DB\Select', array(), array(), '', false); + $this->dbSelect = $this->getMock('Magento\Framework\DB\Select', array(), array(), '', false); // method flow $this->resource->expects( diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php index 65ff10da99e90..3a0a0bdfe1e15 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/CollectionTest.php @@ -31,7 +31,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase protected $collection; /** - * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject */ protected $loggerMock; @@ -41,12 +41,12 @@ class CollectionTest extends \PHPUnit_Framework_TestCase protected $entityFactoryMock; /** - * @var \Magento\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $fetchStrategyMock; /** - * @var \Magento\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $eventManagerMock; @@ -66,7 +66,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase protected $resourceMock; /** - * @var \Magento\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $adapterMock; @@ -80,11 +80,11 @@ protected function setUp() $this->entityFactoryMock = $this->getMock( 'Magento\Core\Model\EntityFactory', array('create'), array(), '', false ); - $this->loggerMock = $this->getMock('Magento\Logger', array('log'), array(), '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array('log'), array(), '', false); $this->fetchStrategyMock = $this->getMock( - 'Magento\Data\Collection\Db\FetchStrategy\Query', array('fetchAll'), array(), '', false + 'Magento\Framework\Data\Collection\Db\FetchStrategy\Query', array('fetchAll'), array(), '', false ); - $this->eventManagerMock = $this->getMock('Magento\Event\Manager', array(), array(), '', false); + $this->eventManagerMock = $this->getMock('Magento\Framework\Event\Manager', array(), array(), '', false); $this->optionsFactoryMock = $this->getMock( 'Magento\Catalog\Model\Resource\Product\Option\Value\CollectionFactory', array('create'), @@ -101,7 +101,8 @@ protected function setUp() false ); $this->selectMock = $this->getMock('Zend_Db_Select', array('from', 'reset'), array(), '', false); - $this->adapterMock = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array('select'), array(), '', false); + $this->adapterMock = + $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', array('select'), array(), '', false); $this->adapterMock->expects($this->once()) ->method('select') ->will($this->returnValue($this->selectMock)); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/MysqlStub.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/MysqlStub.php index aee42c47ca7e5..baf0ace464b2c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/MysqlStub.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/MysqlStub.php @@ -27,9 +27,9 @@ namespace Magento\Catalog\Model\Resource\Product\Option; /** - * Extend \Magento\DB\Adapter\Pdo\Mysql and stub needed methods + * Extend \Magento\Framework\DB\Adapter\Pdo\Mysql and stub needed methods */ -class MysqlStub extends \Magento\DB\Adapter\Pdo\Mysql +class MysqlStub extends \Magento\Framework\DB\Adapter\Pdo\Mysql { /** * Disable parent constructor diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/Stub.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/Stub.php index 082910be1074d..a2ecc8c9e2281 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/Stub.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/Stub.php @@ -26,6 +26,6 @@ */ namespace Magento\Catalog\Model\Resource\Product\Option; -class Stub extends \Magento\Model\AbstractModel +class Stub extends \Magento\Framework\Model\AbstractModel { } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueStub.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueStub.php index 44b78557f1486..d705b3a791eec 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueStub.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueStub.php @@ -39,9 +39,9 @@ public function __construct() /** * Save option value price data * - * @param \Magento\Model\AbstractModel $object + * @param \Magento\Framework\Model\AbstractModel $object */ - public function saveValueTitles(\Magento\Model\AbstractModel $object) + public function saveValueTitles(\Magento\Framework\Model\AbstractModel $object) { $this->_saveValueTitles($object); } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueTest.php index bd8d022c30f03..2688134e030a2 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/Option/ValueTest.php @@ -29,7 +29,7 @@ class ValueTest extends \PHPUnit_Framework_TestCase { /** - * @var Stub\UnitTest\Magento\Catalog\Model\Resource\Product\Option\Value + * @var \Magento\Catalog\Model\Resource\Product\Option\ValueStub */ protected $_object; @@ -62,8 +62,8 @@ protected function tearDown() public function testSaveValueTitles() { $object = new Stub( - $this->getMock('Magento\Model\Context', array(), array(), '', false), - $this->getMock('Magento\Registry', array(), array(), '', false), + $this->getMock('Magento\Framework\Model\Context', array(), array(), '', false), + $this->getMock('Magento\Framework\Registry', array(), array(), '', false), null, null, self::$valueTitleData diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Template/Filter/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Template/Filter/FactoryTest.php index 29c7adf6aecb9..5f71aa8f74310 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Template/Filter/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Template/Filter/FactoryTest.php @@ -26,7 +26,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $_objectManagerMock; @@ -37,7 +37,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_factory = $objectManagerHelper->getObject( @@ -48,7 +48,7 @@ protected function setUp() public function testCreate() { - $className = 'Magento\Filter\Template'; + $className = 'Magento\Framework\Filter\Template'; $filterMock = $this->getMock($className, array(), array(), '', false); $this->_objectManagerMock->expects( @@ -67,7 +67,7 @@ public function testCreate() public function testCreateWithArguments() { - $className = 'Magento\Filter\Template'; + $className = 'Magento\Framework\Filter\Template'; $arguments = array('foo', 'bar'); $filterMock = $this->getMock($className, array(), array(), '', false); @@ -86,8 +86,8 @@ public function testCreateWithArguments() } /** - * @expectedException \Magento\Model\Exception - * @expectedExceptionMessage WrongClass doesn't extends \Magento\Filter\Template + * @expectedException \Magento\Framework\Model\Exception + * @expectedExceptionMessage WrongClass doesn't extends \Magento\Framework\Filter\Template */ public function testWrongTypeException() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php index 8eda2757898cd..a8255cd56ce73 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/BasePriceTest.php @@ -34,7 +34,7 @@ class BasePriceTest extends \PHPUnit_Framework_TestCase protected $basePrice; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfoMock; @@ -44,7 +44,7 @@ class BasePriceTest extends \PHPUnit_Framework_TestCase protected $salableItemMock; /** - * @var \Magento\Pricing\Adjustment\Calculator + * @var \Magento\Framework\Pricing\Adjustment\Calculator */ protected $calculatorMock; @@ -75,11 +75,11 @@ public function setUp() { $qty = 1; $this->salableItemMock = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); - $this->priceInfoMock = $this->getMock('Magento\Pricing\PriceInfo\Base', [], [], '', false); + $this->priceInfoMock = $this->getMock('Magento\Framework\Pricing\PriceInfo\Base', [], [], '', false); $this->regularPriceMock = $this->getMock('Magento\Catalog\Pricing\Price\RegularPrice', [], [], '', false); $this->groupPriceMock = $this->getMock('Magento\Catalog\Pricing\Price\GroupPrice', [], [], '', false); $this->specialPriceMock= $this->getMock('Magento\Catalog\Pricing\Price\SpecialPrice', [], [], '', false); - $this->calculatorMock = $this->getMock('Magento\Pricing\Adjustment\Calculator', [], [], '', false); + $this->calculatorMock = $this->getMock('Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', false); $this->salableItemMock->expects($this->once()) ->method('getPriceInfo') diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/FinalPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/FinalPriceTest.php index f66b69602fa30..123a108585e88 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/FinalPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/FinalPriceTest.php @@ -34,7 +34,7 @@ class FinalPriceTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfoMock; @@ -44,12 +44,12 @@ class FinalPriceTest extends \PHPUnit_Framework_TestCase protected $basePriceMock; /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleableMock; /** - * @var \Magento\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject */ protected $calculatorMock; @@ -59,7 +59,7 @@ class FinalPriceTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->saleableMock = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); - $this->priceInfoMock = $this->getMockForAbstractClass('Magento\Pricing\PriceInfoInterface'); + $this->priceInfoMock = $this->getMockForAbstractClass('Magento\Framework\Pricing\PriceInfoInterface'); $this->basePriceMock = $this->getMock( 'Magento\Catalog\Pricing\Price\BasePrice', [], @@ -75,7 +75,7 @@ public function setUp() ->method('getPrice') ->with($this->equalTo(\Magento\Catalog\Pricing\Price\BasePrice::PRICE_TYPE_BASE_PRICE)) ->will($this->returnValue($this->basePriceMock)); - $this->calculatorMock = $this->getMockBuilder('Magento\Pricing\Adjustment\Calculator') + $this->calculatorMock = $this->getMockBuilder('Magento\Framework\Pricing\Adjustment\Calculator') ->disableOriginalConstructor() ->getMock(); $this->model = new \Magento\Catalog\Pricing\Price\FinalPrice($this->saleableMock, 1, $this->calculatorMock); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php index 9759768773fb7..82c225547fd3e 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/GroupPriceTest.php @@ -125,7 +125,7 @@ protected function prepareSalableItem($groupPrice) ->will($this->returnValue($this->prepareSalableItemResource())); $priceInfo = $this->getMockBuilder( - 'Magento\Pricing\PriceInfoInterface' + 'Magento\Framework\Pricing\PriceInfoInterface' )->disableOriginalConstructor()->getMockForAbstractClass(); $priceInfo->expects($this->any()) @@ -149,7 +149,7 @@ protected function prepareSalableItemResource() )->disableOriginalConstructor()->setMethods(['getAttribute', '__wakeup'])->getMock(); $attributeMock = $this->getMock( - 'Magento\Object', + 'Magento\Framework\Object', ['getBackend', 'afterLoad'], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/MsrpPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/MsrpPriceTest.php index e4019e857e026..a434ebb9221f5 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/MsrpPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/MsrpPriceTest.php @@ -24,7 +24,7 @@ namespace Magento\Catalog\Pricing\Price; -use \Magento\Pricing\PriceInfoInterface; +use \Magento\Framework\Pricing\PriceInfoInterface; /** * Class MsrpPriceTest @@ -51,12 +51,12 @@ class MsrpPriceTest extends \PHPUnit_Framework_TestCase */ protected $price; /** - * @var \Magento\Pricing\PriceInfo\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfo\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfo; /** - * @var \Magento\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject */ protected $calculator; @@ -70,7 +70,7 @@ protected function setUp() false ); - $this->priceInfo = $this->getMock('Magento\Pricing\PriceInfo\Base', [], [], '', false); + $this->priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfo\Base', [], [], '', false); $this->price = $this->getMock('Magento\Catalog\Pricing\Price\BasePrice', [], [], '', false); $this->priceInfo->expects($this->any()) @@ -86,7 +86,7 @@ protected function setUp() ->with($this->equalTo('base_price')) ->will($this->returnValue($this->price)); - $this->calculator = $this->getMockBuilder('Magento\Pricing\Adjustment\Calculator') + $this->calculator = $this->getMockBuilder('Magento\Framework\Pricing\Adjustment\Calculator') ->disableOriginalConstructor() ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/OptionPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/OptionPriceTest.php index 01bec7999e350..cad83d025ba33 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/OptionPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/OptionPriceTest.php @@ -26,7 +26,7 @@ */ namespace Magento\Catalog\Pricing\Price; -use Magento\Pricing\PriceInfoInterface; +use Magento\Framework\Pricing\PriceInfoInterface; /** * Class OptionPriceTest @@ -44,17 +44,17 @@ class OptionPriceTest extends \PHPUnit_Framework_TestCase protected $product; /** - * @var \Magento\Pricing\PriceInfo\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfo\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfo; /** - * @var \Magento\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject */ protected $calculator; /** - * @var \Magento\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $amount; @@ -72,7 +72,7 @@ protected function setUp() ); $this->priceInfo = $this->getMock( - 'Magento\Pricing\PriceInfo\Base', + 'Magento\Framework\Pricing\PriceInfo\Base', [], [], '', @@ -84,7 +84,7 @@ protected function setUp() ->will($this->returnValue($this->priceInfo)); $this->calculator = $this->getMock( - 'Magento\Pricing\Adjustment\Calculator', + 'Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', @@ -92,7 +92,7 @@ protected function setUp() ); $this->amount = $this->getMock( - 'Magento\Pricing\Amount\Base', + 'Magento\Framework\Pricing\Amount\Base', [], [], '', @@ -152,7 +152,7 @@ public function testGetValue() $optionValueMock->expects($this->once()) ->method('getValue') ->will($this->returnValue($optionValue)); - $optionIds = new \Magento\Object(['value' => '1']); + $optionIds = new \Magento\Framework\Object(['value' => '1']); $customOptions = ['option_ids' => $optionIds, 'option_1' => $optionValueMock]; $this->product->setCustomOptions($customOptions); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/RegularPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/RegularPriceTest.php index 9a9b9988fb5bf..3a5e51b77435d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/RegularPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/RegularPriceTest.php @@ -35,12 +35,12 @@ class RegularPriceTest extends \PHPUnit_Framework_TestCase protected $regularPrice; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfoMock; /** - * @var \Magento\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $amountMock; @@ -50,7 +50,7 @@ class RegularPriceTest extends \PHPUnit_Framework_TestCase protected $salableItemMock; /** - * @var \Magento\Pricing\Adjustment\Calculator + * @var \Magento\Framework\Pricing\Adjustment\Calculator */ protected $calculatorMock; @@ -61,9 +61,9 @@ protected function setUp() { $qty = 1; $this->salableItemMock = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); - $this->priceInfoMock = $this->getMock('Magento\Pricing\PriceInfo\Base', [], [], '', false); - $this->amountMock = $this->getMock('Magento\Pricing\Amount', [], [], '', false); - $this->calculatorMock = $this->getMock('Magento\Pricing\Adjustment\Calculator', [], [], '', false); + $this->priceInfoMock = $this->getMock('Magento\Framework\Pricing\PriceInfo\Base', [], [], '', false); + $this->amountMock = $this->getMock('Magento\Framework\Pricing\Amount', [], [], '', false); + $this->calculatorMock = $this->getMock('Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', false); $this->salableItemMock->expects($this->once()) ->method('getPriceInfo') diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/SpecialPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/SpecialPriceTest.php index 70bbc4866a23e..9ae61efe3e02a 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/SpecialPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/SpecialPriceTest.php @@ -75,7 +75,7 @@ protected function prepareSalebleItem($specialPrice) ->will($this->returnValue($specialPrice)); $priceInfo = $this->getMockBuilder( - 'Magento\Pricing\PriceInfoInterface' + 'Magento\Framework\Pricing\PriceInfoInterface' )->disableOriginalConstructor()->getMockForAbstractClass(); $priceInfo->expects($this->any()) @@ -91,12 +91,12 @@ protected function prepareSalebleItem($specialPrice) /** * @param bool $isValidInterval - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Stdlib\DateTime\TimezoneInterface + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Stdlib\DateTime\TimezoneInterface */ protected function prepareLocaleDate($isValidInterval) { $localeDate = $this->getMockBuilder( - 'Magento\Stdlib\DateTime\TimezoneInterface' + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' )->disableOriginalConstructor()->getMockForAbstractClass(); $localeDate->expects($this->any()) diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php index d9b45e54f4287..c8ca757b05cbd 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php @@ -73,7 +73,7 @@ class TierPriceTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface', [], [], '', false); + $this->priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface', [], [], '', false); $this->product = $this->getMock( 'Magento\Catalog\Model\Product', @@ -88,7 +88,7 @@ protected function setUp() $this->session->expects($this->any())->method('getCustomerGroupId') ->will($this->returnValue($this->customerGroup)); - $this->calculator = $this->getMock('Magento\Pricing\Adjustment\Calculator', [], [], '', false); + $this->calculator = $this->getMock('Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', false); $this->model = new TierPrice($this->product, $this->quantity, $this->calculator, $this->session); } @@ -181,7 +181,7 @@ public function testGetterTierPriceList($tierPrices, $basePrice, $expectedResult { $this->product->setData(TierPrice::PRICE_TYPE_TIER, $tierPrices); - $price = $this->getMock('Magento\Pricing\Price\PriceInterface', [], [], '', false); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface', [], [], '', false); $price->expects($this->any())->method('getValue')->will($this->returnValue($basePrice)); $this->priceInfo->expects($this->atLeastOnce())->method('getPrice')->will($this->returnValue($price)); @@ -268,7 +268,7 @@ public function providerForGetterTierPriceList() */ public function testGetSavePercent($basePrice, $tierPrice, $savedPercent) { - $price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $price->expects($this->any()) ->method('getValue') ->will($this->returnValue($basePrice)); @@ -277,7 +277,7 @@ public function testGetSavePercent($basePrice, $tierPrice, $savedPercent) ->method('getPrice') ->will($this->returnValue($price)); - $amount = $this->getMock('Magento\Pricing\Amount\AmountInterface'); + $amount = $this->getMock('Magento\Framework\Pricing\Amount\AmountInterface'); $amount->expects($this->atLeastOnce()) ->method('getBaseAmount') ->will($this->returnValue($tierPrice)); diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/FinalPriceBoxTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/FinalPriceBoxTest.php index fa613a71853cd..1560127a30b44 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/FinalPriceBoxTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/FinalPriceBoxTest.php @@ -50,7 +50,7 @@ class FinalPriceBoxTest extends \PHPUnit_Framework_TestCase protected $priceBox; /** - * @var \Magento\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $layout; @@ -60,24 +60,24 @@ class FinalPriceBoxTest extends \PHPUnit_Framework_TestCase protected $product; /** - * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; /** - * @var \Magento\Pricing\Render\RendererPool|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Render\RendererPool|\PHPUnit_Framework_MockObject_MockObject */ protected $rendererPool; /** - * @var \Magento\Pricing\Price\PriceInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Price\PriceInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $price; protected function setUp() { $this->product = $this->getMockForAbstractClass( - 'Magento\Pricing\Object\SaleableInterface', + 'Magento\Framework\Pricing\Object\SaleableInterface', [], '', true, @@ -91,7 +91,7 @@ protected function setUp() ->setMethods(['isShowPriceOnGesture', 'getMsrpPriceMessage', 'canApplyMsrp']) ->getMock(); - $this->priceInfo = $this->getMockBuilder('Magento\Pricing\PriceInfo') + $this->priceInfo = $this->getMockBuilder('Magento\Framework\Pricing\PriceInfo') ->disableOriginalConstructor() ->setMethods(['getPrice']) ->getMock(); @@ -100,12 +100,12 @@ protected function setUp() ->method('getPriceInfo') ->will($this->returnValue($this->priceInfo)); - $eventManager = $this->getMock('Magento\Event\ManagerStub', [], [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerStub', [], [], '', false); $config = $this->getMock('Magento\Store\Model\Store\Config', [], [], '', false); - $this->layout = $this->getMock('Magento\View\Layout', [], [], '', false); + $this->layout = $this->getMock('Magento\Framework\View\Layout', [], [], '', false); - $this->priceBox = $this->getMock('Magento\Pricing\Render\PriceBox', [], [], '', false); - $this->logger = $this->getMock('Magento\Logger', [], [], '', false); + $this->priceBox = $this->getMock('Magento\Framework\Pricing\Render\PriceBox', [], [], '', false); + $this->logger = $this->getMock('Magento\Framework\Logger', [], [], '', false); $this->layout->expects($this->any()) @@ -113,7 +113,7 @@ protected function setUp() ->will($this->returnValue($this->priceBox)); $scopeConfigMock = $this->getMockForAbstractClass('Magento\Framework\App\Config\ScopeConfigInterface'); - $context = $this->getMock('Magento\View\Element\Template\Context', [], [], '', false); + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); $context->expects($this->any()) ->method('getEventManager') ->will($this->returnValue($eventManager)); @@ -130,11 +130,11 @@ protected function setUp() ->method('getScopeConfig') ->will($this->returnValue($scopeConfigMock)); - $this->rendererPool = $this->getMockBuilder('Magento\Pricing\Render\RendererPool') + $this->rendererPool = $this->getMockBuilder('Magento\Framework\Pricing\Render\RendererPool') ->disableOriginalConstructor() ->getMock(); - $this->price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $this->price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $this->price->expects($this->any()) ->method('getPriceType') ->will($this->returnValue(\Magento\Catalog\Pricing\Price\FinalPriceInterface::PRICE_TYPE_FINAL)); @@ -183,7 +183,7 @@ public function testRenderMsrpEnabled() ->with($this->equalTo($this->product)) ->will($this->returnValue(true)); - $priceBoxRender = $this->getMockBuilder('Magento\Pricing\Render\PriceBox') + $priceBoxRender = $this->getMockBuilder('Magento\Framework\Pricing\Render\PriceBox') ->disableOriginalConstructor() ->getMock(); $priceBoxRender->expects($this->once()) diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/PriceBoxTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/PriceBoxTest.php index 21662859a9163..b54ab9c06dfb3 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/PriceBoxTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Render/PriceBoxTest.php @@ -40,7 +40,7 @@ class PriceBoxTest extends \PHPUnit_Framework_TestCase protected $coreHelper; /** - * @var \Magento\Math\Random|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Math\Random|\PHPUnit_Framework_MockObject_MockObject */ protected $mathRandom; @@ -48,7 +48,7 @@ class PriceBoxTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->coreHelper = $this->getMock('Magento\Core\Helper\Data', ['jsonEncode'], [], '', false); - $this->mathRandom = $this->getMock('Magento\Math\Random', [], [], '', false); + $this->mathRandom = $this->getMock('Magento\Framework\Math\Random', [], [], '', false); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->object = $objectManager->getObject( @@ -101,7 +101,7 @@ public function testGetRandomString() public function testGetCanDisplayQty($typeCode, $expected) { $product = $this->getMockForAbstractClass( - 'Magento\Pricing\Object\SaleableInterface', + 'Magento\Framework\Pricing\Object\SaleableInterface', [], '', true, diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/RenderTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/RenderTest.php index c1abccd10c8c1..7caa25db78f95 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/RenderTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/RenderTest.php @@ -35,12 +35,12 @@ class RenderTest extends \PHPUnit_Framework_TestCase protected $object; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $registry; /** - * @var \Magento\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $layout; @@ -51,16 +51,16 @@ class RenderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->registry = $this->getMock('Magento\Registry', ['registry'], [], '', false); + $this->registry = $this->getMock('Magento\Framework\Registry', ['registry'], [], '', false); - $this->pricingRenderBlock = $this->getMock('Magento\Pricing\Render', [], [], '', false); + $this->pricingRenderBlock = $this->getMock('Magento\Framework\Pricing\Render', [], [], '', false); - $this->layout = $this->getMock('Magento\View\Layout', [], [], '', false); + $this->layout = $this->getMock('Magento\Framework\View\Layout', [], [], '', false); - $eventManager = $this->getMock('Magento\Event\ManagerStub', [], [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerStub', [], [], '', false); $config = $this->getMock('Magento\Store\Model\Store\Config', [], [], '', false); $scopeConfigMock = $this->getMockForAbstractClass('Magento\Framework\App\Config\ScopeConfigInterface'); - $context = $this->getMock('Magento\View\Element\Template\Context', [], [], '', false); + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); $context->expects($this->any()) ->method('getEventManager') ->will($this->returnValue($eventManager)); @@ -125,7 +125,7 @@ public function testToHtmlProductFromParentBlock() $this->registry->expects($this->never()) ->method('registry'); - $block = $this->getMock('Magento\Pricing\Render', ['getProductItem', 'render'], [], '', false); + $block = $this->getMock('Magento\Framework\Pricing\Render', ['getProductItem', 'render'], [], '', false); $block->expects($this->any()) ->method('render') diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php index c1a436c9f43c0..ca2719f8d50ac 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Adminhtml/Form/Field/StockTest.php @@ -36,22 +36,22 @@ class StockTest extends \PHPUnit_Framework_TestCase protected $_coreHelperMock; /** - * @var \Magento\Data\Form\Element\Factory|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Form\Element\Factory|PHPUnit_Framework_MockObject_MockObject */ protected $_factoryElementMock; /** - * @var \Magento\Data\Form\Element\CollectionFactory|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Form\Element\CollectionFactory|PHPUnit_Framework_MockObject_MockObject */ protected $_collectionFactoryMock; /** - * @var \Magento\Data\Form\Element\Text|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Form\Element\Text|PHPUnit_Framework_MockObject_MockObject */ protected $_qtyMock; /** - * @var \Magento\Data\Form\Element\TextFactory|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Form\Element\TextFactory|PHPUnit_Framework_MockObject_MockObject */ protected $_factoryTextMock; @@ -62,22 +62,28 @@ class StockTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_factoryElementMock = $this->getMock('Magento\Data\Form\Element\Factory', array(), array(), '', false); + $this->_factoryElementMock = $this->getMock( + 'Magento\Framework\Data\Form\Element\Factory', + array(), + array(), + '', + false + ); $this->_collectionFactoryMock = $this->getMock( - 'Magento\Data\Form\Element\CollectionFactory', + 'Magento\Framework\Data\Form\Element\CollectionFactory', array(), array(), '', false ); $this->_qtyMock = $this->getMock( - 'Magento\Data\Form\Element\Text', + 'Magento\Framework\Data\Form\Element\Text', array('setForm', 'setValue', 'setName'), array(), '', false ); - $this->_factoryTextMock = $this->getMock('Magento\Data\Form\Element\TextFactory', array('create')); + $this->_factoryTextMock = $this->getMock('Magento\Framework\Data\Form\Element\TextFactory', array('create')); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_block = $objectManagerHelper->getObject( @@ -98,13 +104,13 @@ public function testSetForm() )->method( 'setForm' )->with( - $this->isInstanceOf('Magento\Data\Form\Element\AbstractElement') + $this->isInstanceOf('Magento\Framework\Data\Form\Element\AbstractElement') ); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_block->setForm( $objectManager->getObject( - 'Magento\Data\Form\Element\Text', + 'Magento\Framework\Data\Form\Element\Text', array( 'factoryElement' => $this->_factoryElementMock, 'factoryCollection' => $this->_collectionFactoryMock diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/QtyincrementsTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/QtyincrementsTest.php index c93614ca967df..413eb2afe692d 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/QtyincrementsTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/QtyincrementsTest.php @@ -31,14 +31,14 @@ class QtyincrementsTest extends \PHPUnit_Framework_TestCase protected $block; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $registryMock; protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->block = $objectManager->getObject( 'Magento\CatalogInventory\Block\Qtyincrements', diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php index 9b9fe5f58b9be..45f0f5d309786 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php @@ -31,14 +31,14 @@ class DefaultStockqtyTest extends \PHPUnit_Framework_TestCase protected $block; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $registryMock; protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->block = $objectManager->getObject( 'Magento\CatalogInventory\Block\Stockqty\DefaultStockqty', diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Adminhtml/Stock/ItemTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Adminhtml/Stock/ItemTest.php index 780eaa6cca05a..f16b812476f8c 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Adminhtml/Stock/ItemTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Adminhtml/Stock/ItemTest.php @@ -36,7 +36,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase protected function setUp() { $resourceMock = $this->getMock( - 'Magento\Model\Resource\AbstractResource', + 'Magento\Framework\Model\Resource\AbstractResource', array('_construct', '_getReadAdapter', '_getWriteAdapter', 'getIdFieldName'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php index 937181def82f8..0f16a19be3cb5 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/OptionTest.php @@ -112,7 +112,7 @@ protected function setUp() 'getItemBackorders', '__wakeup' ); - $this->resultMock = $this->getMock('Magento\Object', $resultMethods, array(), '', false); + $this->resultMock = $this->getMock('Magento\Framework\Object', $resultMethods, array(), '', false); $this->validator = new \Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\Option( $this->qtyItemListMock ); @@ -244,7 +244,7 @@ public function testInitializeWhenResultNotDecimalGetBackordersMessageHasOptionQ } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage The stock item for Product in option is not valid. */ public function testInitializeWithInvalidOptionQty() diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php index 3958571f35ee8..8f34bce0e6e93 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php @@ -40,7 +40,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase protected $resource; /** - * @var \Magento\Event\Manager | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\Manager | \PHPUnit_Framework_MockObject_MockObject */ protected $eventManager; @@ -54,14 +54,14 @@ protected function setUp() false ); $this->eventManager = $this->getMock( - 'Magento\Event\Manager', + 'Magento\Framework\Event\Manager', ['dispatch'], [], '', false ); $context = $this->getMock( - '\Magento\Model\Context', + '\Magento\Framework\Model\Context', ['getEventDispatcher'], [], '', diff --git a/dev/tests/unit/testsuite/Magento/CatalogRule/Model/Rule/JobTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Model/Rule/JobTest.php index d429ebefa0a60..a169032d5b704 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Model/Rule/JobTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Model/Rule/JobTest.php @@ -34,7 +34,7 @@ public function testApplyAll() { $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $eventManager->expects($this->once())->method('dispatch')->with($this->equalTo('catalogrule_apply_all')); /** @var $jobModel \Magento\CatalogRule\Model\Rule\Job */ diff --git a/dev/tests/unit/testsuite/Magento/CatalogRule/Pricing/Price/CatalogRulePriceTest.php b/dev/tests/unit/testsuite/Magento/CatalogRule/Pricing/Price/CatalogRulePriceTest.php index c82fe9117269b..f4a117e4e5836 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogRule/Pricing/Price/CatalogRulePriceTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogRule/Pricing/Price/CatalogRulePriceTest.php @@ -37,12 +37,12 @@ class CatalogRulePriceTest extends \PHPUnit_Framework_TestCase protected $object; /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $salableItemMock; /** - * @var \Magento\Stdlib\DateTime\TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $dataTimeMock; @@ -57,7 +57,7 @@ class CatalogRulePriceTest extends \PHPUnit_Framework_TestCase protected $customerSessionMock; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfoMock; @@ -82,7 +82,7 @@ class CatalogRulePriceTest extends \PHPUnit_Framework_TestCase protected $coreStoreMock; /** - * @var \Magento\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject */ protected $calculator; @@ -99,7 +99,7 @@ public function setUp() false ); $this->dataTimeMock = $this->getMockForAbstractClass( - 'Magento\Stdlib\DateTime\TimezoneInterface', + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface', [], '', false, @@ -115,7 +115,13 @@ public function setUp() ->will($this->returnValue($this->coreStoreMock)); $this->customerSessionMock = $this->getMock('Magento\Customer\Model\Session', [], [], '', false); - $this->priceInfoMock = $this->getMock('\Magento\Pricing\PriceInfo', ['getAdjustments'], [], '', false); + $this->priceInfoMock = $this->getMock( + '\Magento\Framework\Pricing\PriceInfo', + ['getAdjustments'], + [], + '', + false + ); $this->catalogRuleResourceFactoryMock = $this->getMock( '\Magento\CatalogRule\Model\Resource\RuleFactory', ['create'], @@ -144,7 +150,7 @@ public function setUp() ->method('create') ->will($this->returnValue($this->catalogRuleResourceMock)); - $this->calculator = $this->getMockBuilder('Magento\Pricing\Adjustment\Calculator') + $this->calculator = $this->getMockBuilder('Magento\Framework\Pricing\Adjustment\Calculator') ->disableOriginalConstructor() ->getMock(); $qty = 1; diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Block/ResultTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Block/ResultTest.php index 0d9fb5fbfb695..5ea11893ac203 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Block/ResultTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Block/ResultTest.php @@ -31,7 +31,7 @@ class ResultTest extends \PHPUnit_Framework_TestCase /** @var \Magento\CatalogSearch\Block\Result */ protected $model; - /** @var \Magento\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject */ protected $contextMock; /** @var \Magento\Catalog\Model\Layer|\PHPUnit_Framework_MockObject_MockObject */ @@ -47,7 +47,7 @@ class ResultTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->contextMock = $this->getMock('Magento\View\Element\Template\Context', [], [], '', false); + $this->contextMock = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); $this->layerMock = $this->getMock('Magento\Catalog\Model\Layer\Search', [], [], '', false); $this->dataMock = $this->getMock('Magento\CatalogSearch\Helper\Data', [], [], '', false); $this->model = new Result($this->contextMock, $this->layerMock, $this->dataMock); diff --git a/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php b/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php index 1b8dd48c225ad..2536dc9b5cb50 100644 --- a/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php @@ -35,7 +35,7 @@ class ServiceTest extends \PHPUnit_Framework_TestCase */ public function testGetAuthenticationStartUrl() { - $url = $this->getMock('Magento\Url', array('getUrl'), array(), '', false); + $url = $this->getMock('Magento\Framework\Url', array('getUrl'), array(), '', false); $url->expects( $this->once() )->method( @@ -59,7 +59,7 @@ public function testGetAuthenticationStartUrl() public function testLookup() { $centinelSession = $this->getMock( - 'Magento\Session\SessionManager', + 'Magento\Framework\Session\SessionManager', array('setData', 'getData'), array(), '', @@ -148,7 +148,7 @@ public function testLookup() ) ); - $data = new \Magento\Object(array('card_type' => 'cardType')); + $data = new \Magento\Framework\Object(array('card_type' => 'cardType')); $model->lookup($data); } diff --git a/dev/tests/unit/testsuite/Magento/Centinel/Model/State/JcbTest.php b/dev/tests/unit/testsuite/Magento/Centinel/Model/State/JcbTest.php index 7f3648d3fdc9e..dd47d91e7731c 100644 --- a/dev/tests/unit/testsuite/Magento/Centinel/Model/State/JcbTest.php +++ b/dev/tests/unit/testsuite/Magento/Centinel/Model/State/JcbTest.php @@ -42,7 +42,7 @@ class JcbTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_model = new \Magento\Centinel\Model\State\Jcb(); - $this->_model->setDataStorage(new \Magento\Object()); + $this->_model->setDataStorage(new \Magento\Framework\Object()); } /** @@ -53,8 +53,8 @@ protected function setUp() */ public function testIsAuthenticateAllowed($result, $lookupResults, $params) { - $this->_model->setLookupResult(new \Magento\Object($lookupResults)); - $this->_model->setAuthenticateResult(new \Magento\Object($params)); + $this->_model->setLookupResult(new \Magento\Framework\Object($lookupResults)); + $this->_model->setAuthenticateResult(new \Magento\Framework\Object($params)); $this->assertEquals($result, $this->_model->isAuthenticateAllowed()); } @@ -89,7 +89,7 @@ public function testIsAuthenticateAllowedDataProvider() public function testIsAuthenticateSuccessfulWithSoftLookup() { $lookupResults = array('enrolled' => '', 'acs_url' => '', 'payload' => '', 'error_no' => '0'); - $this->_model->setLookupResult(new \Magento\Object($lookupResults)); + $this->_model->setLookupResult(new \Magento\Framework\Object($lookupResults)); $this->_model->setIsModeStrict(true); $this->assertEquals(false, $this->_model->isAuthenticateSuccessful()); @@ -115,8 +115,8 @@ public function testIsAuthenticateSuccessful($result, $strictMode, $params) 'payload' => 'no empty value', 'error_no' => '0' ); - $this->_model->setLookupResult(new \Magento\Object($lookupResult)); - $this->_model->setAuthenticateResult(new \Magento\Object($params)); + $this->_model->setLookupResult(new \Magento\Framework\Object($lookupResult)); + $this->_model->setAuthenticateResult(new \Magento\Framework\Object($params)); $this->assertEquals($result, $this->_model->isAuthenticateSuccessful()); } @@ -677,7 +677,7 @@ protected function _getProcessingAttemptsPerformedData() */ public function testIsLookupSuccessful($result, $strictMode, $params) { - $this->_model->setLookupResult(new \Magento\Object($params)); + $this->_model->setLookupResult(new \Magento\Framework\Object($params)); $this->_model->setIsModeStrict($strictMode); $this->assertEquals($result, $this->_model->isLookupSuccessful()); } diff --git a/dev/tests/unit/testsuite/Magento/Centinel/Model/StateFactoryTest.php b/dev/tests/unit/testsuite/Magento/Centinel/Model/StateFactoryTest.php index 998e0ada39466..10a9ff80df792 100644 --- a/dev/tests/unit/testsuite/Magento/Centinel/Model/StateFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Centinel/Model/StateFactoryTest.php @@ -32,7 +32,7 @@ class StateFactoryTest extends \PHPUnit_Framework_TestCase { public function testCreateState() { - $objectManager = $this->getMock('Magento\ObjectManager'); + $objectManager = $this->getMock('Magento\Framework\ObjectManager'); $objectManager->expects( $this->at(0) )->method( @@ -88,7 +88,7 @@ public function testCreateState() public function testCreateStateMapIsEmpty() { - $objectManager = $this->getMock('Magento\ObjectManager'); + $objectManager = $this->getMock('Magento\Framework\ObjectManager'); $factory = new \Magento\Centinel\Model\StateFactory($objectManager); $this->assertFalse($factory->createState('VI')); $this->assertFalse($factory->createState('MC')); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php index faa103bfd891b..053e96ba16af1 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/AbstractTest.php @@ -42,7 +42,7 @@ protected function setUp() */ public function testGetItemRenderer($type, $expectedType) { - $renderer = $this->getMock('Magento\View\Element\RendererList', array(), array(), '', false); + $renderer = $this->getMock('Magento\Framework\View\Element\RendererList', array(), array(), '', false); $renderer->expects( $this->once() @@ -55,7 +55,13 @@ public function testGetItemRenderer($type, $expectedType) $this->returnValue('rendererObject') ); - $layout = $this->getMock('Magento\View\Layout', array('getChildName', 'getBlock'), array(), '', false); + $layout = $this->getMock( + 'Magento\Framework\View\Layout', + array('getChildName', 'getBlock'), + array(), + '', + false + ); $layout->expects($this->once())->method('getChildName')->will($this->returnValue('renderer.list')); @@ -97,7 +103,13 @@ public function getItemRendererDataProvider() */ public function testGetItemRendererThrowsExceptionForNonexistentRenderer() { - $layout = $this->getMock('Magento\View\Layout', array('getChildName', 'getBlock'), array(), '', false); + $layout = $this->getMock( + 'Magento\Framework\View\Layout', + array('getChildName', 'getBlock'), + array(), + '', + false + ); $layout->expects($this->once())->method('getChildName')->will($this->returnValue(null)); /** @var $block \Magento\Checkout\Block\Cart\AbstractCart */ diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php index 1c5264f0d5c25..922c1ffd4922d 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/LinkTest.php @@ -40,13 +40,13 @@ public function testGetUrl() $path = 'checkout/cart'; $url = 'http://example.com/'; - $urlBuilder = $this->getMockForAbstractClass('Magento\UrlInterface'); + $urlBuilder = $this->getMockForAbstractClass('Magento\Framework\UrlInterface'); $urlBuilder->expects($this->once())->method('getUrl')->with($path)->will($this->returnValue($url . $path)); $helper = $this->getMockBuilder('Magento\Core\Helper\Data')->disableOriginalConstructor()->getMock(); $context = $this->_objectManagerHelper->getObject( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array('urlBuilder' => $urlBuilder) ); $link = $this->_objectManagerHelper->getObject( @@ -59,7 +59,7 @@ public function testGetUrl() public function testToHtml() { $moduleManager = $this->getMockBuilder( - 'Magento\Module\Manager' + 'Magento\Framework\Module\Manager' )->disableOriginalConstructor()->setMethods( array('isOutputEnabled') )->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php index d09b17e333ebd..ffc859d2ea0ac 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/SidebarTest.php @@ -35,10 +35,10 @@ protected function setUp() public function testDeserializeRenders() { - $childBlock = $this->getMock('Magento\View\Element\AbstractBlock', array(), array(), '', false); - /** @var $layout \Magento\View\LayoutInterface */ + $childBlock = $this->getMock('Magento\Framework\View\Element\AbstractBlock', array(), array(), '', false); + /** @var $layout \Magento\Framework\View\LayoutInterface */ $layout = $this->getMock( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array('createBlock', 'getChildName', 'setChild'), array(), '', @@ -59,7 +59,7 @@ public function testDeserializeRenders() )->method( 'createBlock' )->with( - 'Magento\View\Element\RendererList' + 'Magento\Framework\View\Element\RendererList' )->will( $this->returnValue($rendererList) ); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php index d048179894445..46e95181f8973 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/LinkTest.php @@ -40,11 +40,11 @@ public function testGetUrl() $path = 'checkout'; $url = 'http://example.com/'; - $urlBuilder = $this->getMockForAbstractClass('Magento\UrlInterface'); + $urlBuilder = $this->getMockForAbstractClass('Magento\Framework\UrlInterface'); $urlBuilder->expects($this->once())->method('getUrl')->with($path)->will($this->returnValue($url . $path)); $context = $this->_objectManagerHelper->getObject( - 'Magento\View\Element\Template\Context', + 'Magento\Framework\View\Element\Template\Context', array('urlBuilder' => $urlBuilder) ); $link = $this->_objectManagerHelper->getObject('Magento\Checkout\Block\Link', array('context' => $context)); @@ -63,7 +63,7 @@ public function testToHtml($canOnepageCheckout, $isOutputEnabled) )->getMock(); $moduleManager = $this->getMockBuilder( - 'Magento\Module\Manager' + 'Magento\Framework\Module\Manager' )->disableOriginalConstructor()->setMethods( array('isOutputEnabled') )->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php index 1e74fb03cbdd4..803546b47aa08 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Onepage/SuccessTest.php @@ -39,7 +39,7 @@ public function testGetAdditionalInfoHtml() { /** @var \Magento\Checkout\Block\Onepage\Success $block */ $block = $this->objectManager->getObject('Magento\Checkout\Block\Onepage\Success'); - $layout = $this->getMock('Magento\View\LayoutInterface', array(), array(), '', false); + $layout = $this->getMock('Magento\Framework\View\LayoutInterface', array(), array(), '', false); $layout->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php index 4f61be0d65fb4..6d94596ae1e68 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/DataTest.php @@ -23,6 +23,9 @@ */ namespace Magento\Checkout\Helper; +use Magento\TestFramework\Helper\ObjectManager; +use Magento\Store\Model\ScopeInterface; + class DataTest extends \PHPUnit_Framework_TestCase { /** @@ -40,95 +43,127 @@ class DataTest extends \PHPUnit_Framework_TestCase */ private $_translator; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_checkoutSession; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_scopeConfig; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_collectionFactory; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_storeManager; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_eventManager; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $_context; + protected function setUp() { - $this->_translator = $this->getMock('Magento\Translate\Inline\StateInterface', array(), array(), '', false); - $context = $this->getMock('\Magento\Framework\App\Helper\Context', array(), array(), '', false); - - $scopeConfig = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface'); - $scopeConfig->expects( - $this->any() - )->method( - 'getValue' - )->will( - $this->returnValueMap( - array( - array( - 'checkout/payment_failed/template', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - 8, - 'fixture_email_template_payment_failed' - ), + $this->_translator = $this->getMockBuilder('Magento\Framework\Translate\Inline\StateInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->_context = $this->getMock('\Magento\Framework\App\Helper\Context', array(), array(), '', false); + $this->_eventManager = $this->getMockForAbstractClass('\Magento\Framework\Event\ManagerInterface'); + $this->_context->expects($this->once()) + ->method('getEventManager') + ->will($this->returnValue($this->_eventManager)); + $this->_scopeConfig = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface'); + $this->_scopeConfig->expects($this->any()) + ->method('getValue') + ->will( + $this->returnValueMap( array( - 'checkout/payment_failed/receiver', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - 8, - 'sysadmin' - ), - array( - 'trans_email/ident_sysadmin/email', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - 8, - 'sysadmin@example.com' - ), - array( - 'trans_email/ident_sysadmin/name', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - 8, - 'System Administrator' - ), - array( - 'checkout/payment_failed/identity', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - 8, - 'noreply@example.com' - ), - array( - 'carriers/ground/title', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - null, - 'Ground Shipping' - ), - array( - 'payment/fixture-payment-method/title', - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - null, - 'Check Money Order' + array( + 'checkout/payment_failed/template', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + 8, + 'fixture_email_template_payment_failed' + ), + array( + 'checkout/payment_failed/receiver', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + 8, + 'sysadmin' + ), + array( + 'trans_email/ident_sysadmin/email', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + 8, + 'sysadmin@example.com' + ), + array( + 'trans_email/ident_sysadmin/name', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + 8, + 'System Administrator' + ), + array( + 'checkout/payment_failed/identity', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + 8, + 'noreply@example.com' + ), + array( + 'carriers/ground/title', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + null, + 'Ground Shipping' + ), + array( + 'payment/fixture-payment-method/title', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + null, + 'Check Money Order' + ), + array( + 'checkout/options/onepage_checkout_enabled', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE, + null, + 'One Page Checkout' + ) ) ) - ) - ); + ); - $storeManager = $this->getMock('\Magento\Store\Model\StoreManagerInterface', array(), array(), '', false); - - $checkoutSession = $this->getMock('\Magento\Checkout\Model\Session', array(), array(), '', false); + $this->_storeManager = $this->getMockForAbstractClass('\Magento\Store\Model\StoreManagerInterface'); - $localeDate = $this->getMock('\Magento\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false); - $localeDate->expects($this->any())->method('date')->will($this->returnValue('Oct 02, 2013')); + $this->_checkoutSession = $this->getMock('\Magento\Checkout\Model\Session', array(), array(), '', false); - $collectionFactory = $this->getMock( - '\Magento\Checkout\Model\Resource\Agreement\CollectionFactory', + $localeDate = $this->getMock( + '\Magento\Framework\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false ); + $localeDate->expects($this->any())->method('date')->will($this->returnValue('Oct 02, 2013')); - $this->_transportBuilder = $this->getMock( - '\Magento\Mail\Template\TransportBuilder', - array(), - array(), - '', - false - ); + $this->_transportBuilder = $this->getMockBuilder('Magento\Framework\Mail\Template\TransportBuilder') + ->disableOriginalConstructor() + ->getMock(); $this->_helper = new Data( - $context, - $scopeConfig, - $storeManager, - $checkoutSession, + $this->_context, + $this->_scopeConfig, + $this->_storeManager, + $this->_checkoutSession, $localeDate, - $collectionFactory, $this->_transportBuilder, $this->_translator ); @@ -140,15 +175,15 @@ protected function setUp() */ public function testSendPaymentFailedEmail() { - $shippingAddress = new \Magento\Object(array('shipping_method' => 'ground_transportation')); - $billingAddress = new \Magento\Object(array('street' => 'Fixture St')); + $shippingAddress = new \Magento\Framework\Object(array('shipping_method' => 'ground_transportation')); + $billingAddress = new \Magento\Framework\Object(array('street' => 'Fixture St')); $this->_transportBuilder->expects( $this->once() )->method( 'setTemplateOptions' )->with( - array('area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => 8) + array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => 8) )->will( $this->returnSelf() ); @@ -212,7 +247,7 @@ public function testSendPaymentFailedEmail() )->method( 'getTransport' )->will( - $this->returnValue($this->getMock('Magento\Mail\TransportInterface')) + $this->returnValue($this->getMock('Magento\Framework\Mail\TransportInterface')) ); $this->_translator->expects($this->at(1))->method('suspend'); @@ -226,7 +261,7 @@ public function testSendPaymentFailedEmail() $productTwo->expects($this->once())->method('getName')->will($this->returnValue('Product Two')); $productTwo->expects($this->once())->method('getFinalPrice')->with(3)->will($this->returnValue(60)); - $quote = new \Magento\Object( + $quote = new \Magento\Framework\Object( array( 'store_id' => 8, 'store_currency_code' => 'USD', @@ -236,13 +271,215 @@ public function testSendPaymentFailedEmail() 'customer_email' => 'john.doe@example.com', 'billing_address' => $billingAddress, 'shipping_address' => $shippingAddress, - 'payment' => new \Magento\Object(array('method' => 'fixture-payment-method')), + 'payment' => new \Magento\Framework\Object(array('method' => 'fixture-payment-method')), 'all_visible_items' => array( - new \Magento\Object(array('product' => $productOne, 'qty' => 2)), - new \Magento\Object(array('product' => $productTwo, 'qty' => 3)) + new \Magento\Framework\Object(array('product' => $productOne, 'qty' => 2)), + new \Magento\Framework\Object(array('product' => $productTwo, 'qty' => 3)) ) ) ); $this->assertSame($this->_helper, $this->_helper->sendPaymentFailedEmail($quote, 'test message')); } + + /** + * @return \PHPUnit_Framework_MockObject_MockObject + */ + public function testGetCheckout() + { + $this->assertEquals($this->_checkoutSession, $this->_helper->getCheckout()); + } + + public function testGetQuote() + { + $quoteMock = $this->getMock('\Magento\Sales\Model\Quote', array(), array(), '', false); + $this->_checkoutSession->expects($this->once())->method('getQuote')->will($this->returnValue($quoteMock)); + $this->assertEquals($quoteMock, $this->_helper->getQuote()); + } + + public function testFormatPrice() + { + $price = 5.5; + $quoteMock = $this->getMock('\Magento\Sales\Model\Quote', array(), array(), '', false); + $storeMock = $this->getMock('\Magento\Core\Model\Store', array('formatPrice'), array(), '', false); + $this->_checkoutSession->expects($this->once())->method('getQuote')->will($this->returnValue($quoteMock)); + $quoteMock->expects($this->once())->method('getStore')->will($this->returnValue($storeMock)); + $storeMock->expects($this->once())->method('formatPrice')->will($this->returnValue('5.5')); + $this->assertEquals('5.5', $this->_helper->formatPrice($price)); + } + + public function testConvertPrice() + { + $price = 5.5; + $quoteMock = $this->getMock('\Magento\Sales\Model\Quote', array(), array(), '', false); + $storeMock = $this->getMock('\Magento\Core\Model\Store', array('convertPrice'), array(), '', false); + $this->_checkoutSession->expects($this->once())->method('getQuote')->will($this->returnValue($quoteMock)); + $quoteMock->expects($this->once())->method('getStore')->will($this->returnValue($storeMock)); + $storeMock->expects($this->once())->method('convertPrice')->will($this->returnValue('5.5')); + $this->assertEquals(5.5, $this->_helper->convertPrice($price)); + } + + public function testCanOnepageCheckout() + { + $this->_scopeConfig->expects($this->once())->method('getValue')->with( + 'checkout/options/onepage_checkout_enabled', + 'store' + )->will($this->returnValue(true)); + $this->assertTrue($this->_helper->canOnepageCheckout()); + } + + public function testIsContextCheckout() + { + $objectManagerHelper = new ObjectManager($this); + $context = $objectManagerHelper->getObject( + 'Magento\Framework\App\Helper\Context' + ); + $helper = $objectManagerHelper->getObject( + 'Magento\Checkout\Helper\Data', + ['context' => $context] + ); + $context->getRequest()->expects($this->once())->method('getParam')->with('context')->will( + $this->returnValue('checkout') + ); + $this->assertTrue($helper->isContextCheckout()); + } + + public function testIsCustomerMustBeLogged() + { + $this->_scopeConfig->expects($this->once())->method('isSetFlag')->with( + 'checkout/options/customer_must_be_logged', + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + )->will($this->returnValue(true)); + $this->assertTrue($this->_helper->isCustomerMustBeLogged()); + } + + public function testGetPriceInclTax() + { + $itemMock = $this->getMock('Magento\Framework\Object', array('getPriceInclTax'), array(), '', false); + $itemMock->expects($this->exactly(2))->method('getPriceInclTax')->will($this->returnValue(5.5)); + $this->assertEquals(5.5, $this->_helper->getPriceInclTax($itemMock)); + } + + public function testGetPriceInclTaxWithoutTax() + { + $qty = 1; + $taxAmount = 1; + $discountTaxCompensation = 1; + $rowTotal = 15; + $roundPrice = 17; + $expected = 17; + $storeManager = $this->getMock('\Magento\Store\Model\StoreManagerInterface', array(), array(), '', false); + $objectManagerHelper = new ObjectManager($this); + $helper = $objectManagerHelper->getObject( + '\Magento\Checkout\Helper\Data', + ['storeManager' => $storeManager] + ); + $storeMock = $this->getMock('Magento\Core\Model\Store', array('roundPrice'), array(), '', false); + $itemMock = $this->getMock( + 'Magento\Framework\Object', + array('getPriceInclTax', 'getQty', 'getTaxAmount', 'getDiscountTaxCompensation', 'getRowTotal'), + array(), + '', + false + ); + $itemMock->expects($this->once())->method('getPriceInclTax')->will($this->returnValue(false)); + $itemMock->expects($this->exactly(2))->method('getQty')->will($this->returnValue($qty)); + $itemMock->expects($this->never())->method('getQtyOrdered'); + $itemMock->expects($this->once())->method('getTaxAmount')->will($this->returnValue($taxAmount)); + $itemMock->expects($this->once()) + ->method('getDiscountTaxCompensation')->will($this->returnValue($discountTaxCompensation)); + $itemMock->expects($this->once())->method('getRowTotal')->will($this->returnValue($rowTotal)); + $storeManager->expects($this->once())->method('getStore')->will($this->returnValue($storeMock)); + $storeMock->expects($this->once()) + ->method('roundPrice')->with($roundPrice)->will($this->returnValue($roundPrice)); + $this->assertEquals($expected, $helper->getPriceInclTax($itemMock)); + } + + public function testGetSubtotalInclTax() + { + $rowTotalInclTax = 5.5; + $expected = 5.5; + $itemMock = $this->getMock('Magento\Framework\Object', array('getRowTotalInclTax'), array(), '', false); + $itemMock->expects($this->exactly(2))->method('getRowTotalInclTax')->will($this->returnValue($rowTotalInclTax)); + $this->assertEquals($expected, $this->_helper->getSubtotalInclTax($itemMock)); + } + + public function testGetSubtotalInclTaxNegative() + { + $taxAmount = 1; + $discountTaxCompensation = 1; + $rowTotal = 15; + $expected = 17; + $itemMock = $this->getMock( + 'Magento\Framework\Object', + array('getRowTotalInclTax', 'getTaxAmount', 'getDiscountTaxCompensation', 'getRowTotal'), + array(), + '', + false + ); + $itemMock->expects($this->once())->method('getRowTotalInclTax')->will($this->returnValue(false)); + $itemMock->expects($this->once())->method('getTaxAmount')->will($this->returnValue($taxAmount)); + $itemMock->expects($this->once()) + ->method('getDiscountTaxCompensation')->will($this->returnValue($discountTaxCompensation)); + $itemMock->expects($this->once())->method('getRowTotal')->will($this->returnValue($rowTotal)); + $this->assertEquals($expected, $this->_helper->getSubtotalInclTax($itemMock)); + } + + public function testGetBasePriceInclTaxWithoutQty() + { + $storeManager = $this->getMock('\Magento\Store\Model\StoreManagerInterface', array(), array(), '', false); + $objectManagerHelper = new ObjectManager($this); + $helper = $objectManagerHelper->getObject( + '\Magento\Checkout\Helper\Data', + ['storeManager' => $storeManager] + ); + $itemMock = $this->getMock('Magento\Framework\Object', array('getQty'), array(), '', false); + $itemMock->expects($this->once())->method('getQty'); + $storeMock = $this->getMock('Magento\Core\Model\Store', array('roundPrice'), array(), '', false); + $storeManager->expects($this->once())->method('getStore')->will($this->returnValue($storeMock)); + $storeMock->expects($this->once())->method('roundPrice'); + $helper->getPriceInclTax($itemMock); + } + + public function testGetBasePriceInclTax() + { + $storeManager = $this->getMock('\Magento\Store\Model\StoreManagerInterface', array(), array(), '', false); + $objectManagerHelper = new ObjectManager($this); + $helper = $objectManagerHelper->getObject( + '\Magento\Checkout\Helper\Data', + ['storeManager' => $storeManager] + ); + $itemMock = $this->getMock('Magento\Framework\Object', array('getQty', 'getQtyOrdered'), array(), '', false); + $itemMock->expects($this->once())->method('getQty')->will($this->returnValue(false)); + $itemMock->expects($this->exactly(2))->method('getQtyOrdered')->will($this->returnValue(5.5)); + $storeMock = $this->getMock('Magento\Core\Model\Store', array('roundPrice'), array(), '', false); + $storeManager->expects($this->once())->method('getStore')->will($this->returnValue($storeMock)); + $storeMock->expects($this->once())->method('roundPrice'); + $helper->getBasePriceInclTax($itemMock); + } + + public function testGetBaseSubtotalInclTax() + { + $itemMock = $this->getMock( + 'Magento\Framework\Object', + array('getBaseTaxAmount', 'getBaseDiscountTaxCompensation', 'getBaseRowTotal'), + array(), + '', + false + ); + $itemMock->expects($this->once())->method('getBaseTaxAmount'); + $itemMock->expects($this->once())->method('getBaseDiscountTaxCompensation'); + $itemMock->expects($this->once())->method('getBaseRowTotal'); + $this->_helper->getBaseSubtotalInclTax($itemMock); + } + + public function testIsAllowedGuestCheckoutWithoutStore() + { + $quoteMock = $this->getMock('\Magento\Sales\Model\Quote', array(), array(), '', false); + $store = null; + $quoteMock->expects($this->once())->method('getStoreId')->will($this->returnValue(1)); + $this->_scopeConfig->expects($this->once()) + ->method('isSetFlag') + ->will($this->returnValue(true)); + $this->assertTrue($this->_helper->isAllowedGuestCheckout($quoteMock, $store)); + } } diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Helper/ExpressRedirectTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Helper/ExpressRedirectTest.php index 6f5ebc69414cd..24942c146e41e 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Helper/ExpressRedirectTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Helper/ExpressRedirectTest.php @@ -61,7 +61,7 @@ public function setUp() )->getMock(); $this->_objectManager = $this->getMockBuilder( - 'Magento\ObjectManager' + 'Magento\Framework\ObjectManager' )->disableOriginalConstructor()->setMethods( array('get', 'setFactory', 'create', 'configure') )->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Agreements/AgreementsValidatorTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Agreements/AgreementsValidatorTest.php new file mode 100644 index 0000000000000..1f0f222a3bb4a --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Agreements/AgreementsValidatorTest.php @@ -0,0 +1,99 @@ +objectManagerHelper = new ObjectManagerHelper($this); + } + + /** + * @return array + */ + public static function isValidDataProvider() + { + return [ + [[], true], + [[1], true] + ]; + } + + /** + * @dataProvider isValidDataProvider + * @param $data + * @param $result + */ + public function testIsValid($data, $result) + { + $this->object = $this->objectManagerHelper->getObject( + 'Magento\Checkout\Model\Agreements\AgreementsValidator', + [] + ); + $this->assertEquals($result, $this->object->isValid($data)); + } + + /** + * @return array + */ + public static function notIsValidDataProvider() + { + return [ + [[1, 3, '4'], true], + [[1, '4', 3,], true], + [[1, 3, 4], true], + [[1, 3, 4, 5], true], + [[], false], + [[1], false], + ]; + } + + /** + * @dataProvider notIsValidDataProvider + * @param $data + * @param $result + */ + public function testNotIsValid($data, $result) + { + $provider = $this->getMockForAbstractClass('Magento\Checkout\Model\Agreements\AgreementsProviderInterface'); + $provider->expects($this->once()) + ->method('getRequiredAgreementIds') + ->will($this->returnValue([1, 3, '4'])); + + $this->object = $this->objectManagerHelper->getObject( + 'Magento\Checkout\Model\Agreements\AgreementsValidator', + ['list' => [$provider]] + ); + $this->assertEquals($result, $this->object->isValid($data)); + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Config/Source/Cart/SummaryTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Config/Source/Cart/SummaryTest.php deleted file mode 100644 index 456c760ec8ea5..0000000000000 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Config/Source/Cart/SummaryTest.php +++ /dev/null @@ -1,52 +0,0 @@ -objectManager = new ObjectManager($this); - $this->object = $this->objectManager->getObject('Magento\Checkout\Model\Config\Source\Cart\Summary'); - } - - public function testToOptionArray() - { - $this->assertEquals( - [ - ['value' => 0, 'label' => 'Display number of items in cart'], - ['value' => 1, 'label' => 'Display item quantities'], - ], - $this->object->toOptionArray() - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php index d53c427e018cd..3a83732b072b1 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Layout/DepersonalizePluginTest.php @@ -37,7 +37,7 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase protected $plugin; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $layoutMock; @@ -52,7 +52,7 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase protected $requestMock; /** - * @var \Magento\Module\Manager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $moduleManagerMock; @@ -66,9 +66,9 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->checkoutSessionMock = $this->getMock( - 'Magento\Session\Generic', + 'Magento\Framework\Session\Generic', array('clearStorage', 'setData', 'getData'), array(), '', @@ -81,7 +81,7 @@ public function setUp() false ); $this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); - $this->moduleManagerMock = $this->getMock('Magento\Module\Manager', array(), array(), '', false); + $this->moduleManagerMock = $this->getMock('Magento\Framework\Module\Manager', array(), array(), '', false); $this->cacheConfigMock = $this->getMock('Magento\PageCache\Model\Config', array(), array(), '', false); $this->plugin = new \Magento\Checkout\Model\Layout\DepersonalizePlugin( @@ -97,7 +97,7 @@ public function setUp() */ public function testAfterGenerateXml() { - $expectedResult = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $expectedResult = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->moduleManagerMock->expects($this->once()) ->method('isEnabled') ->with($this->equalTo('Magento_PageCache')) diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/ObserverTest.php index b5b66f0dc3bb1..d735bf29245b0 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/ObserverTest.php @@ -36,14 +36,14 @@ class ObserverTest extends \PHPUnit_Framework_TestCase /** @var Session|\PHPUnit_Framework_MockObject_MockObject */ protected $checkoutSession; - /** @var Magento\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $messageManager; protected function setUp() { $this->objectManager = new ObjectManager($this); $this->checkoutSession = $this->getMock('Magento\Checkout\Model\Session', [], [], '', false); - $this->messageManager = $this->getMock('Magento\Message\ManagerInterface', [], [], '', false); + $this->messageManager = $this->getMock('Magento\Framework\Message\ManagerInterface', [], [], '', false); $this->object = $this->objectManager->getObject('Magento\Checkout\Model\Observer', [ 'checkoutSession' => $this->checkoutSession, 'messageManager' => $this->messageManager, @@ -61,7 +61,7 @@ public function testUnsetAll() public function testLoadCustomerQuoteThrowingCoreException() { $this->checkoutSession->expects($this->once())->method('loadCustomerQuote')->will( - $this->throwException(new \Magento\Model\Exception('Message')) + $this->throwException(new \Magento\Framework\Model\Exception('Message')) ); $this->messageManager->expects($this->once())->method('addError')->with('Message'); @@ -82,10 +82,10 @@ public function testLoadCustomerQuoteThrowingException() public function testSalesQuoteSaveAfter() { - $observer = $this->getMock('Magento\Event\Observer', [], [], '', false); + $observer = $this->getMock('Magento\Framework\Event\Observer', [], [], '', false); $observer->expects($this->once())->method('getEvent')->will( - $this->returnValue(new \Magento\Object( - ['quote' => new \Magento\Object(['is_checkout_cart' => 1, 'id' => 7])] + $this->returnValue(new \Magento\Framework\Object( + ['quote' => new \Magento\Framework\Object(['is_checkout_cart' => 1, 'id' => 7])] )) ); $this->checkoutSession->expects($this->once())->method('getQuoteId')->with(7); diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php index 87ac519884e79..4c86ada75aa41 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php @@ -34,6 +34,11 @@ class SessionTest extends \PHPUnit_Framework_TestCase */ protected $_helper; + /** + * @var \Magento\Checkout\Model\Session + */ + protected $_session; + public function setUp() { $this->_helper = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -55,7 +60,7 @@ public function testGetLastRealOrder($orderId, $incrementId, $orderMock) $orderFactory->expects($this->once())->method('create')->will($this->returnValue($orderMock)); $messageCollectionFactory = $this->getMockBuilder( - 'Magento\Message\CollectionFactory' + 'Magento\Framework\Message\CollectionFactory' )->disableOriginalConstructor()->getMock(); $quoteFactory = $this->getMockBuilder( 'Magento\Sales\Model\QuoteFactory' @@ -74,16 +79,15 @@ public function testGetLastRealOrder($orderId, $incrementId, $orderMock) 'orderFactory' => $orderFactory, 'messageCollectionFactory' => $messageCollectionFactory, 'quoteFactory' => $quoteFactory, - 'storage' => new \Magento\Session\Storage() + 'storage' => new \Magento\Framework\Session\Storage() ) ); - /** @var \Magento\Checkout\Model\Session $session */ - $session = $this->_helper->getObject('Magento\Checkout\Model\Session', $constructArguments); - $session->setLastRealOrderId($orderId); + $this->_session = $this->_helper->getObject('Magento\Checkout\Model\Session', $constructArguments); + $this->_session->setLastRealOrderId($orderId); - $this->assertSame($orderMock, $session->getLastRealOrder()); + $this->assertSame($orderMock, $this->_session->getLastRealOrder()); if ($orderId == $incrementId) { - $this->assertSame($orderMock, $session->getLastRealOrder()); + $this->assertSame($orderMock, $this->_session->getLastRealOrder()); } } @@ -132,12 +136,11 @@ protected function _getOrderMock($incrementId, $orderId) */ public function testClearHelperData($paramToClear) { - $storage = new \Magento\Session\Storage('default', array($paramToClear => 'test_data')); - /** @var \Magento\Checkout\Model\Session $session */ - $session = $this->_helper->getObject('Magento\Checkout\Model\Session', array('storage' => $storage)); + $storage = new \Magento\Framework\Session\Storage('default', array($paramToClear => 'test_data')); + $this->_session = $this->_helper->getObject('Magento\Checkout\Model\Session', array('storage' => $storage)); - $session->clearHelperData(); - $this->assertNull($session->getData($paramToClear)); + $this->_session->clearHelperData(); + $this->assertNull($this->_session->getData($paramToClear)); } /** @@ -172,11 +175,11 @@ public function testRestoreQuote($hasOrderId, $hasQuoteId) $orderFactory = $this->getMock('Magento\Sales\Model\OrderFactory', array('create'), array(), '', false); $orderFactory->expects($this->once())->method('create')->will($this->returnValue($order)); $quoteFactory = $this->getMock('Magento\Sales\Model\QuoteFactory', array('create'), array(), '', false); - $storage = $this->getMock('Magento\Session\Storage', null); + $storage = $this->getMock('Magento\Framework\Session\Storage', null); $store = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false); $storeManager = $this->getMockForAbstractClass('Magento\Store\Model\StoreManagerInterface'); $storeManager->expects($this->any())->method('getStore')->will($this->returnValue($store)); - $eventManager = $this->getMockForAbstractClass('Magento\Event\ManagerInterface'); + $eventManager = $this->getMockForAbstractClass('Magento\Framework\Event\ManagerInterface'); /** @var Session $session */ $session = $this->_helper->getObject( @@ -273,4 +276,84 @@ public function restoreQuoteDataProvider() { return array(array(true, true), array(true, false), array(false, true), array(false, false)); } + + public function testHasQuote() + { + $quote = $this->getMockBuilder('Magento\Sales\Model\Quote') + ->disableOriginalConstructor() + ->getMock(); + $session = $this->_helper->getObject('Magento\Checkout\Model\Session', array('quote' => $quote)); + $this->assertFalse($session->hasQuote()); + } + + public function testReplaceQuote() + { + $replaceQuoteId = 3; + $websiteId = 1; + + $store = $this->getMockBuilder('Magento\Store\Model\Store') + ->disableOriginalConstructor() + ->setMethods(['getWebsiteId', '__wakeup']) + ->getMock(); + $store->expects($this->exactly(2)) + ->method('getWebsiteId') + ->will($this->returnValue($websiteId)); + + $storeManager = $this->getMockForAbstractClass('Magento\Store\Model\StoreManagerInterface'); + $storeManager->expects($this->any()) + ->method('getStore') + ->will($this->returnValue($store)); + + $quote = $this->getMockBuilder('Magento\Sales\Model\Quote') + ->disableOriginalConstructor() + ->getMock(); + $quote->expects($this->once()) + ->method('getId') + ->will($this->returnValue($replaceQuoteId)); + + $storage = $this->getMockBuilder('Magento\Framework\Session\Storage') + ->disableOriginalConstructor() + ->setMethods(['setData', 'getData']) + ->getMock(); + $storage->expects($this->once()) + ->method('setData') + ->with('quote_id_' . $websiteId, $replaceQuoteId); + $storage->expects($this->once()) + ->method('getData') + ->with('quote_id_' . $websiteId) + ->will($this->returnValue($replaceQuoteId));; + + $session = $this->_helper->getObject( + 'Magento\Checkout\Model\Session', + [ + 'storeManager' => $storeManager, + 'storage' => $storage + ] + ); + + $session->replaceQuote($quote); + + $this->assertSame($quote, $session->getQuote()); + $this->assertEquals($replaceQuoteId, $session->getQuoteId()); + } + + public function testClearStorage() + { + $storage = $this->getMockBuilder('Magento\Framework\Session\Storage') + ->disableOriginalConstructor() + ->setMethods(['unsetData']) + ->getMock(); + $storage->expects($this->once()) + ->method('unsetData'); + + $session = $this->_helper->getObject( + 'Magento\Checkout\Model\Session', + [ + 'storage' => $storage + ] + ); + + $this->assertInstanceOf('Magento\Checkout\Model\Session', $session->clearStorage()); + $this->assertFalse($session->hasQuote()); + } } diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php new file mode 100644 index 0000000000000..dd38363a390df --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php @@ -0,0 +1,472 @@ +eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface'); + $this->checkoutHelperMock = $this->getMock('Magento\Checkout\Helper\Data', [], [], '', false); + $this->customerHelperMock = $this->getMock('Magento\Customer\Helper\Data', [], [], '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', [], [], '', false); + $this->checkoutSessionMock = $this->getMock('Magento\Checkout\Model\Session', [], [], '', false); + $this->customerSessionMock = $this->getMock('Magento\Customer\Model\Session', [], [], '', false); + $this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface'); + $this->requestMock = $this->getMock( + 'Magento\Framework\App\RequestInterface', + ['isAjax', 'getModuleName', 'setModuleName', 'getActionName', 'setActionName', 'getParam'] + ); + $this->addressFactoryMock = $this->getMock('Magento\Customer\Model\AddressFactory'); + $this->formFactoryMock = $this->getMock('Magento\Customer\Model\FormFactory'); + $this->customerFactoryMock = $this->getMock('Magento\Customer\Model\CustomerFactory'); + $this->quoteFactoryMock = $this->getMock('Magento\Sales\Model\Service\QuoteFactory'); + $this->orderFactoryMock = $this->getMock('Magento\Sales\Model\OrderFactory'); + $this->copyMock = $this->getMock('Magento\Framework\Object\Copy', [], [], '', false); + $this->messageManagerMock = $this->getMock('Magento\Framework\Message\ManagerInterface'); + + $this->customerFormFactoryMock = $this->getMock( + 'Magento\Customer\Model\Metadata\FormFactory', + [], + [], + '', + false + ); + + $this->customerBuilderMock = $this->getMock( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + [], + [], + '', + false + ); + + $this->addressBuilderMock = $this->getMock( + 'Magento\Customer\Service\V1\Data\AddressBuilder', + [], + [], + '', + false + ); + + $this->randomMock = $this->getMock('Magento\Framework\Math\Random'); + $this->encryptorMock = $this->getMock('Magento\Framework\Encryption\EncryptorInterface'); + + $this->customerAddressServiceMock = $this->getMock( + 'Magento\Customer\Service\V1\CustomerAddressServiceInterface' + ); + + $this->customerAccountServiceMock = $this->getMock( + 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' + ); + + $this->objectManagerHelper = new ObjectManagerHelper($this); + $this->onepage = $this->objectManagerHelper->getObject( + 'Magento\Checkout\Model\Type\Onepage', + [ + 'eventManager' => $this->eventManagerMock, + 'helper' => $this->checkoutHelperMock, + 'customerData' => $this->customerHelperMock, + 'logger' => $this->loggerMock, + 'checkoutSession' => $this->checkoutSessionMock, + 'customerSession' => $this->customerSessionMock, + 'storeManager' => $this->storeManagerMock, + 'request' => $this->requestMock, + 'customrAddrFactory' => $this->addressFactoryMock, + 'customerFormFactory' => $this->formFactoryMock, + 'customerFactory' => $this->customerFactoryMock, + 'serviceQuoteFactory' => $this->quoteFactoryMock, + 'orderFactory' => $this->orderFactoryMock, + 'objectCopyService' => $this->copyMock, + 'messageManager' => $this->messageManagerMock, + 'formFactory' => $this->customerFormFactoryMock, + 'customerBuilder' => $this->customerBuilderMock, + 'addressBuilder' => $this->addressBuilderMock, + 'mathRandom' => $this->randomMock, + 'encryptor' => $this->encryptorMock, + 'customerAddressService' => $this->customerAddressServiceMock, + 'accountService' => $this->customerAccountServiceMock + ] + ); + } + + public function testGetQuote() + { + $returnValue = 'ababagalamaga'; + $this->checkoutSessionMock->expects($this->once())->method('getQuote')->will($this->returnValue($returnValue)); + $this->assertEquals($returnValue, $this->onepage->getQuote()); + } + + public function testSetQuote() + { + /** @var \Magento\Sales\Model\Quote $quoteMock */ + $quoteMock = $this->getMock('Magento\Sales\Model\Quote', [], [], '', false); + $this->onepage->setQuote($quoteMock); + $this->assertEquals($quoteMock, $this->onepage->getQuote()); + } + + /** + * @dataProvider initCheckoutDataProvider + */ + public function testInitCheckout($stepData, $isLoggedIn, $isSetStepDataCalled) + { + $customer = 'customer'; + /** @var \Magento\Sales\Model\Quote|\PHPUnit_Framework_MockObject_MockObject $quoteMock */ + $quoteMock = $this->getMock('Magento\Sales\Model\Quote', [], [], '', false); + $quoteMock->expects($this->once())->method('isMultipleShippingAddresses')->will($this->returnValue(true)); + $quoteMock->expects($this->once())->method('removeAllAddresses'); + $quoteMock->expects($this->once())->method('save'); + $quoteMock->expects($this->once())->method('assignCustomer')->with($customer); + + $this->customerSessionMock + ->expects($this->once()) + ->method('getCustomerDataObject') + ->will($this->returnValue($customer)); + $this->customerSessionMock->expects($this->any())->method('isLoggedIn')->will($this->returnValue($isLoggedIn)); + $this->checkoutSessionMock->expects($this->once())->method('getQuote')->will($this->returnValue($quoteMock)); + $this->checkoutSessionMock->expects($this->any())->method('getStepData')->will($this->returnValue($stepData)); + + if ($isSetStepDataCalled) { + $this->checkoutSessionMock + ->expects($this->once()) + ->method('setStepData') + ->with(key($stepData), 'allow', false); + } else { + $this->checkoutSessionMock->expects($this->never())->method('setStepData'); + } + + $this->onepage->initCheckout(); + } + + public function initCheckoutDataProvider() + { + return [ + [['login' => ''], false, false], + [['someStep' => ''], true, true], + [['billing' => ''], true, false], + ]; + } + + /** + * @dataProvider getCheckoutMethodDataProvider + */ + public function testGetCheckoutMethod($isLoggedIn, $quoteCheckoutMethod, $isAllowedGuestCheckout, $expected) + { + $this->customerSessionMock->expects($this->once())->method('isLoggedIn')->will($this->returnValue($isLoggedIn)); + /** @var \Magento\Sales\Model\Quote|\PHPUnit_Framework_MockObject_MockObject $quoteMock */ + $quoteMock = $this->getMock('Magento\Sales\Model\Quote', [], [], '', false); + $quoteMock->expects($this->any())->method('setCheckoutMethod')->with($expected); + + $quoteMock + ->expects($this->any()) + ->method('getCheckoutMethod') + ->will($this->returnValue($quoteCheckoutMethod)); + + $this->checkoutHelperMock + ->expects($this->any()) + ->method('isAllowedGuestCheckout') + ->will($this->returnValue($isAllowedGuestCheckout)); + + $this->onepage->setQuote($quoteMock); + $this->assertEquals($expected, $this->onepage->getCheckoutMethod()); + } + + public function getCheckoutMethodDataProvider() + { + return [ + // isLoggedIn(), getQuote()->getCheckoutMethod(), isAllowedGuestCheckout(), expected + [true, null, false, Onepage::METHOD_CUSTOMER], + [false, 'something else', false, 'something else'], + [false, Onepage::METHOD_GUEST, true, Onepage::METHOD_GUEST], + [false, Onepage::METHOD_REGISTER, false, Onepage::METHOD_REGISTER], + ]; + } + + public function testSaveCheckoutMethod() + { + $this->assertEquals(['error' => -1, 'message' => 'Invalid data'], $this->onepage->saveCheckoutMethod(null)); + /** @var \Magento\Sales\Model\Quote|\PHPUnit_Framework_MockObject_MockObject $quoteMock */ + $quoteMock = $this->getMock( + 'Magento\Sales\Model\Quote', + ['setCheckoutMethod', 'save', '__wakeup'], + [], + '', + false + ); + $quoteMock->expects($this->once())->method('save'); + $quoteMock->expects($this->once())->method('setCheckoutMethod')->with('someMethod')->will($this->returnSelf()); + $this->checkoutSessionMock->expects($this->once())->method('setStepData')->with('billing', 'allow', true); + $this->onepage->setQuote($quoteMock); + $this->assertEquals([], $this->onepage->saveCheckoutMethod('someMethod')); + } + + public function testSaveBillingInvalidData() + { + $this->assertEquals(['error' => -1, 'message' => 'Invalid data'], $this->onepage->saveBilling([], 0)); + } + + /** + * @dataProvider saveBillingDataProvider + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ + public function testSaveBilling( + $data, + $customerAddressId, + $quoteCustomerId, + $addressCustomerId, + $isAddress, + $validateDataResult, + $validateResult, + $checkoutMethod, + $customerPassword, + $confirmPassword, + $validationResultMessages, + $isEmailAvailable, + $isVirtual, + $getStepDataResult, + $expected + ) { + $passwordHash = 'password hash'; + $this->requestMock->expects($this->any())->method('isAjax')->will($this->returnValue(false)); + $customerValidationResultMock = $this->getMock( + 'Magento\Customer\Service\V1\Data\CustomerValidationResults', [], [], '', false + ); + $customerValidationResultMock + ->expects($this->any()) + ->method('isValid') + ->will($this->returnValue(empty($validationResultMessages))); + $customerValidationResultMock + ->expects($this->any()) + ->method('getMessages') + ->will($this->returnValue($validationResultMessages)); + $this->customerAccountServiceMock + ->expects($this->any()) + ->method('getPasswordHash') + ->with($customerPassword) + ->will($this->returnValue($passwordHash)); + $this->customerAccountServiceMock + ->expects($this->any()) + ->method('validateCustomerData') + ->will($this->returnValue($customerValidationResultMock)); + $this->customerAccountServiceMock + ->expects($this->any()) + ->method('isEmailAvailable') + ->will($this->returnValue($isEmailAvailable)); + /** @var \Magento\Sales\Model\Quote|\PHPUnit_Framework_MockObject_MockObject $quoteMock */ + $quoteMock = $this->getMock( + 'Magento\Sales\Model\Quote', + [ + 'getCustomerId', + '__wakeup', + 'getBillingAddress', + 'setPasswordHash', + 'getCheckoutMethod', + 'isVirtual', + 'getShippingAddress', + 'getCustomerData', + 'collectTotals', + 'save', + ], + [], + '', + false + ); + $shippingAddressMock = $this->getMock( + 'Magento\Sales\Model\Quote\Address', + ['setSameAsBilling', '__wakeup', 'unserialize'], + [], + '', + false + ); + $shippingAddressMock->expects($this->any())->method('setSameAsBilling')->with((int)$data['use_for_shipping']); + $quoteMock->expects($this->any())->method('setPasswordHash')->with($passwordHash); + $quoteMock->expects($this->any())->method('getCheckoutMethod')->will($this->returnValue($checkoutMethod)); + $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue($isVirtual)); + $quoteMock->expects($this->any())->method('getShippingAddress')->will($this->returnValue($shippingAddressMock)); + $addressMock = $this->getMock( + 'Magento\Sales\Model\Quote\Address', + ['setSaveInAddressBook', 'getData', 'setEmail', '__wakeup', 'importCustomerAddressData', 'validate'], + [], + '', + false + ); + $addressMock->expects($this->any())->method('importCustomerAddressData')->will($this->returnSelf()); + $addressMock->expects($this->atLeastOnce())->method('validate')->will($this->returnValue($validateResult)); + $addressMock->expects($this->any())->method('getData')->will($this->returnValue([])); + $quoteMock->expects($this->any())->method('getBillingAddress')->will($this->returnValue($addressMock)); + $quoteMock->expects($this->any())->method('getCustomerId')->will($this->returnValue($quoteCustomerId)); + $formMock = $this->getMock('Magento\Customer\Model\Metadata\Form', [], [], '', false); + $formMock->expects($this->atLeastOnce())->method('validateData')->will($this->returnValue($validateDataResult)); + $this->requestMock + ->expects($this->any()) + ->method('getParam') + ->will( + $this->returnValueMap( + [['customer_password', $customerPassword], ['confirm_password', $confirmPassword]] + ) + ); + $formMock->expects($this->any())->method('prepareRequest')->will($this->returnValue($this->requestMock)); + $this->customerFormFactoryMock->expects($this->any())->method('create')->will($this->returnValue($formMock)); + $customerDataMock = $this->getMock('Magento\Customer\Service\V1\Data\Customer', [], [], '', false); + $customerDataMock->expects($this->any())->method('__toArray')->will($this->returnValue([])); + $this->customerBuilderMock + ->expects($this->any()) + ->method('create') + ->will($this->returnValue($customerDataMock)); + $quoteMock + ->expects($this->atLeastOnce()) + ->method('getCustomerData') + ->will($this->returnValue($customerDataMock)); + $this->checkoutSessionMock->expects($this->any())->method('getQuote')->will($this->returnValue($quoteMock)); + $this->checkoutSessionMock + ->expects($this->any()) + ->method('getStepData') + ->will($this->returnValue((int)$data['use_for_shipping'] === 1 ? true : $getStepDataResult)); + $this->checkoutSessionMock->expects($this->any())->method('setStepData')->will($this->returnSelf()); + $customerAddressMock = $this->getMock('Magento\Customer\Service\V1\Data\Address', [], [], '', false); + $customerAddressMock + ->expects($this->any()) + ->method('getCustomerId') + ->will($this->returnValue($addressCustomerId)); + $this->customerAddressServiceMock + ->expects($this->any()) + ->method('getAddress') + ->will($isAddress ? $this->returnValue($customerAddressMock) : $this->throwException(new \Exception())); + + $this->customerBuilderMock + ->expects($checkoutMethod === Onepage::METHOD_REGISTER ? $this->never() : $this->once()) + ->method('populate'); + $this->customerBuilderMock + ->expects($checkoutMethod === Onepage::METHOD_REGISTER ? $this->never() : $this->once()) + ->method('setGroupId'); + + $websiteMock = $this->getMock('Magento\Store\Model\Website', [], [], '', false); + $this->storeManagerMock->expects($this->any())->method('getWebsite')->will($this->returnValue($websiteMock)); + $this->assertEquals($expected, $this->onepage->saveBilling($data, $customerAddressId)); + } + + public function saveBillingDataProvider() + { + return [ + [ + ['use_for_shipping' => 0], // $data + 1, // $customerAddressId + 1, // $quoteCustomerId + 1, // $addressCustomerId + true, //$isAddress + true, // $validateDataResult + true, // $validateResult + Onepage::METHOD_REGISTER, // $checkoutMethod + 'password', // $customerPassword + 'password', // $confirmPassword + [], // $validationResultMessages + true, // $isEmailAvailable + false, // $isVirtual + false, // $getStepDataResult + [] // $expected + ] + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Cms/Controller/NorouteTest.php b/dev/tests/unit/testsuite/Magento/Cms/Controller/NorouteTest.php index bdf0d5fe9335d..a30693834b879 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Controller/NorouteTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Controller/NorouteTest.php @@ -43,7 +43,7 @@ class NorouteTest extends \PHPUnit_Framework_TestCase protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $objectManagerMock = $this->getMock('Magento\ObjectManager'); + $objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $responseMock = $this->getMock('Magento\Framework\App\Response\Http', array(), array(), '', false); $responseMock->expects( $this->at(0) diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Page/UrlrewriteTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Page/UrlrewriteTest.php index 39bbc0820c2de..7087378e26434 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Page/UrlrewriteTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Page/UrlrewriteTest.php @@ -38,7 +38,7 @@ class UrlrewriteTest extends \PHPUnit_Framework_TestCase protected $_model = null; /** - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_cmsPage = null; @@ -52,7 +52,7 @@ protected function setUp() )->setMethods( array('getResourceModelInstance', '__wakeup') )->disableOriginalConstructor()->getMock(); - $this->_cmsPage = new \Magento\Object(array('id' => 3, 'identifier' => 'cms-page')); + $this->_cmsPage = new \Magento\Framework\Object(array('id' => 3, 'identifier' => 'cms-page')); } /** diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php index e5563bc01cb1f..14016a2893c19 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php @@ -43,7 +43,7 @@ class FilterProviderTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_filterMock = $this->getMock('Magento\Cms\Model\Template\Filter', array(), array(), '', false); - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_objectManagerMock->expects($this->any())->method('get')->will($this->returnValue($this->_filterMock)); $this->_model = new \Magento\Cms\Model\Template\FilterProvider($this->_objectManagerMock); } @@ -81,7 +81,7 @@ public function testGetPageFilterInnerCache() public function testGetPageWrongInstance() { $someClassMock = $this->getMock('SomeClass'); - $objectManagerMock = $this->getMock('Magento\ObjectManager'); + $objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $objectManagerMock->expects($this->once())->method('get')->will($this->returnValue($someClassMock)); $model = new \Magento\Cms\Model\Template\FilterProvider($objectManagerMock, 'SomeClass', 'SomeClass'); $model->getPageFilter(); diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php index 944c6e4c370d6..433d3e6f584a4 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php @@ -101,12 +101,12 @@ class StorageTest extends \PHPUnit_Framework_TestCase protected $_backendUrlMock; /** - * @var \Magento\Filesystem\Directory\Write|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Write|PHPUnit_Framework_MockObject_MockObject */ protected $_directoryMock; /** - * @var \Magento\Filesystem\DriverInterface|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\DriverInterface|PHPUnit_Framework_MockObject_MockObject */ protected $_driverMock; @@ -118,7 +118,7 @@ protected function setUp() { $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); $this->_driverMock = $this->getMockForAbstractClass( - 'Magento\Filesystem\DriverInterface', + 'Magento\Framework\Filesystem\DriverInterface', array(), '', false, @@ -129,7 +129,7 @@ protected function setUp() $this->_driverMock->expects($this->any())->method('getRealPath')->will($this->returnArgument(0)); $this->_directoryMock = $this->getMock( - 'Magento\Filesystem\Directory\Write', + 'Magento\Framework\Filesystem\Directory\Write', array('delete', 'getDriver'), array(), '', @@ -160,8 +160,14 @@ protected function setUp() $this->returnValue($this->_directoryMock) ); - $this->_adapterFactoryMock = $this->getMock('Magento\Image\AdapterFactory', array(), array(), '', false); - $this->_viewUrlMock = $this->getMock('Magento\View\Url', array(), array(), '', false); + $this->_adapterFactoryMock = $this->getMock( + 'Magento\Framework\Image\AdapterFactory', + array(), + array(), + '', + false + ); + $this->_viewUrlMock = $this->getMock('Magento\Framework\View\Url', array(), array(), '', false); $this->_imageHelperMock = $this->getMock( 'Magento\Cms\Helper\Wysiwyg\Images', array('getStorageRoot'), @@ -240,7 +246,7 @@ public function testGetResizeHeight() public function testDeleteDirectoryOverRoot() { $this->setExpectedException( - '\Magento\Model\Exception', + '\Magento\Framework\Model\Exception', sprintf('Directory %s is not under storage root path.', self::INVALID_DIRECTORY_OVER_ROOT) ); $this->_model->deleteDirectory(self::INVALID_DIRECTORY_OVER_ROOT); @@ -252,7 +258,7 @@ public function testDeleteDirectoryOverRoot() public function testDeleteRootDirectory() { $this->setExpectedException( - '\Magento\Model\Exception', + '\Magento\Framework\Model\Exception', sprintf('We cannot delete root directory %s.', self::STORAGE_ROOT_DIR) ); $this->_model->deleteDirectory(self::STORAGE_ROOT_DIR); diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php index 5ad09d91df221..0724023b0218b 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Tab/Super/Config/MatrixTest.php @@ -35,7 +35,7 @@ class MatrixTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject */ protected $_appConfig; - /** @var \Magento\Locale\CurrencyInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Locale\CurrencyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_locale; protected function setUp() @@ -46,11 +46,11 @@ protected function setUp() 'Magento\Backend\Block\Template\Context', array('scopeConfig' => $this->_appConfig) ); - $this->_locale = $this->getMock('Magento\Locale\CurrencyInterface', array(), array(), '', false); + $this->_locale = $this->getMock('Magento\Framework\Locale\CurrencyInterface', array(), array(), '', false); $data = array( 'context' => $context, 'localeCurrency' => $this->_locale, - 'formFactory' => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false), + 'formFactory' => $this->getMock('Magento\Framework\Data\FormFactory', array(), array(), '', false), 'productFactory' => $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false) ); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/ConfigurableTest.php index 56f5064026467..767a098883488 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/ConfigurableTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/ConfigurableTest.php @@ -28,7 +28,7 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\View\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\View\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_configManager; /** @var \Magento\Catalog\Helper\Image|\PHPUnit_Framework_MockObject_MockObject */ @@ -47,7 +47,7 @@ protected function setUp() { parent::setUp(); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_configManager = $this->getMock('Magento\View\ConfigInterface', array(), array(), '', false); + $this->_configManager = $this->getMock('Magento\Framework\View\ConfigInterface', array(), array(), '', false); $this->_imageHelper = $this->getMock( 'Magento\Catalog\Helper\Image', array('init', 'resize', '__toString'), @@ -79,7 +79,7 @@ public function testGetProductThumbnailUrl() $url = 'pub/media/catalog/product/cache/1/thumbnail/75x/9df78eab33525d08d6e5fb8d27136e95/_/_/__green.gif'; $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $configView = $this->getMock('Magento\Config\View', array('getVarValue'), array(), '', false); + $configView = $this->getMock('Magento\Framework\Config\View', array('getVarValue'), array(), '', false); $configView->expects($this->any())->method('getVarValue')->will($this->returnValue(75)); $this->_configManager->expects($this->any())->method('getViewConfig')->will($this->returnValue($configView)); diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AttributeSelectorTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AttributeSelectorTest.php index f5987f67c7a9c..54817034e6d9c 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AttributeSelectorTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Block/Product/Configurable/AttributeSelectorTest.php @@ -38,7 +38,7 @@ class AttributeSelectorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->urlBuilder = $this->getMock('Magento\UrlInterface'); + $this->urlBuilder = $this->getMock('Magento\Framework\UrlInterface'); $this->attributeSelector = $helper->getObject( 'Magento\ConfigurableProduct\Block\Product\Configurable\AttributeSelector', array('urlBuilder' => $this->urlBuilder) diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php index a7deb1b8c1f71..71043e2a78261 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php @@ -43,14 +43,14 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false); $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem') ->disableOriginalConstructor() ->getMock(); - $coreRegistry = $this->getMock('Magento\Registry', array(), array(), '', false); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false); $confFactoryMock = $this->getMock( 'Magento\ConfigurableProduct\Model\Resource\Product\Type\ConfigurableFactory', diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php index ddd3ae77fcc9d..981864ee48c06 100644 --- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php +++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Validator/PluginTest.php @@ -82,7 +82,7 @@ class PluginTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->eventManagerMock = $this->getMock('Magento\Event\Manager', array(), array(), '', false); + $this->eventManagerMock = $this->getMock('Magento\Framework\Event\Manager', array(), array(), '', false); $this->productFactoryMock = $this->getMock( 'Magento\Catalog\Model\ProductFactory', array('create'), @@ -100,7 +100,7 @@ protected function setUp() false ); $this->responseMock = $this->getMock( - 'Magento\Object', + 'Magento\Framework\Object', array('setError', 'setMessage', 'setAttributes'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/FormKeyValidatorTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/FormKeyValidatorTest.php index ed9b43d4523bf..fcea2eb5bbd16 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/Action/FormKeyValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/FormKeyValidatorTest.php @@ -42,7 +42,13 @@ class FormKeyValidatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_formKeyMock = $this->getMock('\Magento\Data\Form\FormKey', array('getFormKey'), array(), '', false); + $this->_formKeyMock = $this->getMock( + '\Magento\Framework\Data\Form\FormKey', + array('getFormKey'), + array(), + '', + false + ); $this->_requestMock = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); $this->_model = new \Magento\Core\App\Action\FormKeyValidator($this->_formKeyMock); } diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/DesignTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/DesignTest.php index da1a875322fb2..324b0cf391fe0 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/DesignTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/DesignTest.php @@ -28,7 +28,7 @@ class DesignTest extends \PHPUnit_Framework_TestCase public function testAroundDispatch() { $subjectMock = $this->getMock('Magento\Framework\App\Action\Action', array(), array(), '', false); - $designLoaderMock = $this->getMock('Magento\View\DesignLoader', array(), array(), '', false); + $designLoaderMock = $this->getMock('Magento\Framework\View\DesignLoader', array(), array(), '', false); $closureMock = function () { return 'Expected'; }; diff --git a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/LastUrlTest.php b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/LastUrlTest.php index 8c52c6e8ffa66..4eb9e045e8868 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/LastUrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/Action/Plugin/LastUrlTest.php @@ -27,13 +27,13 @@ class LastUrlTest extends \PHPUnit_Framework_TestCase { public function testAfterDispatch() { - $session = $this->getMock('\Magento\Session\Generic', array('setLastUrl'), array(), '', false); + $session = $this->getMock('\Magento\Framework\Session\Generic', array('setLastUrl'), array(), '', false); $subjectMock = $this->getMock('Magento\Framework\App\Action\Action', array(), array(), '', false); $closureMock = function () { return 'result'; }; $requestMock = $this->getMock('Magento\Framework\App\RequestInterface'); - $url = $this->getMock('\Magento\Url', array(), array(), '', false); + $url = $this->getMock('\Magento\Framework\Url', array(), array(), '', false); $plugin = new \Magento\Core\App\Action\Plugin\LastUrl($session, $url); $session->expects($this->once())->method('setLastUrl')->with('http://example.com'); $url->expects( diff --git a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php index 2b27d06e1d065..03ef891c9ea15 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/InstallTest.php @@ -26,7 +26,7 @@ class InstallTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\FrontController\Plugin\Install + * @var \Magento\Framework\Module\FrontController\Plugin\Install */ protected $_model; @@ -63,14 +63,14 @@ class InstallTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_appStateMock = $this->getMock('\Magento\Framework\App\State', array(), array(), '', false); - $this->_cacheMock = $this->getMock('\Magento\Cache\FrontendInterface'); - $this->_dbUpdaterMock = $this->getMock('\Magento\Module\UpdaterInterface'); + $this->_cacheMock = $this->getMock('\Magento\Framework\Cache\FrontendInterface'); + $this->_dbUpdaterMock = $this->getMock('\Magento\Framework\Module\UpdaterInterface'); $this->closureMock = function () { return 'Expected'; }; $this->requestMock = $this->getMock('Magento\Framework\App\RequestInterface'); $this->subjectMock = $this->getMock('Magento\Framework\App\FrontController', array(), array(), '', false); - $this->_model = new \Magento\Module\FrontController\Plugin\Install( + $this->_model = new \Magento\Framework\Module\FrontController\Plugin\Install( $this->_appStateMock, $this->_cacheMock, $this->_dbUpdaterMock diff --git a/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php index 8c64d3a680d6f..d2e8053308ba5 100644 --- a/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php @@ -81,7 +81,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase protected $filesystemMock; /** - * @var \Magento\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject */ protected $directoryReadMock; @@ -91,7 +91,7 @@ protected function setUp() $this->_closure = function () { return true; }; - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); $this->_configMock = $this->getMock('Magento\Core\Model\File\Storage\Config', array(), array(), '', false); $this->_sync = $this->getMock('Magento\Core\Model\File\Storage\Synchronization', array(), array(), '', false); @@ -104,7 +104,13 @@ protected function setUp() ); $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->directoryReadMock = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false); + $this->directoryReadMock = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Read', + array(), + array(), + '', + false + ); $this->filesystemMock->expects( $this->any() diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/NorouteTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/NorouteTest.php index 07e9f73633e36..6b384715d0831 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Controller/NorouteTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Controller/NorouteTest.php @@ -50,7 +50,7 @@ protected function setUp() $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_requestMock = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); $this->_viewMock = $this->getMock('\Magento\Framework\App\ViewInterface'); - $this->_statusMock = $this->getMock('Magento\Object', array('getLoaded'), array(), '', false); + $this->_statusMock = $this->getMock('Magento\Framework\Object', array('getLoaded'), array(), '', false); $this->_controller = $helper->getObject( 'Magento\Core\Controller\Noroute', array('request' => $this->_requestMock, 'view' => $this->_viewMock) diff --git a/dev/tests/unit/testsuite/Magento/Core/Controller/Response/HttpTest.php b/dev/tests/unit/testsuite/Magento/Core/Controller/Response/HttpTest.php index 5194bcb1e5617..14619f658bef3 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Controller/Response/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Controller/Response/HttpTest.php @@ -41,7 +41,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase */ public function testGetHeaderExists($header) { - $cookieMock = $this->getMock('\Magento\Stdlib\Cookie', array(), array(), '', false); + $cookieMock = $this->getMock('\Magento\Framework\Stdlib\Cookie', array(), array(), '', false); $contextMock = $this->getMock('Magento\Framework\App\Http\Context', array(), array(), '', false); $response = new \Magento\Framework\App\Response\Http($cookieMock, $contextMock); $response->headersSentThrowsException = false; @@ -69,7 +69,7 @@ public function headersDataProvider() */ public function testGetHeaderNotExists() { - $cookieMock = $this->getMock('\Magento\Stdlib\Cookie', array(), array(), '', false); + $cookieMock = $this->getMock('\Magento\Framework\Stdlib\Cookie', array(), array(), '', false); $contextMock = $this->getMock('Magento\Framework\App\Http\Context', array(), array(), '', false); $response = new \Magento\Framework\App\Response\Http($cookieMock, $contextMock); $response->headersSentThrowsException = false; diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/DataTest.php index 84a8237fed5c5..c9cb52046a2f7 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/DataTest.php @@ -26,7 +26,7 @@ */ namespace Magento\Core\Helper; -use Magento\Pricing\PriceCurrencyInterface; +use Magento\Framework\Pricing\PriceCurrencyInterface; class DataTest extends \PHPUnit_Framework_TestCase { @@ -36,13 +36,13 @@ class DataTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceCurrency; public function setUp() { - $this->priceCurrency = $this->getMock('Magento\Pricing\PriceCurrencyInterface'); + $this->priceCurrency = $this->getMock('Magento\Framework\Pricing\PriceCurrencyInterface'); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $objectManager->getObject('Magento\Core\Helper\Data', array( diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/PostDataTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/PostDataTest.php index 71ef7cbfe242d..138f00eefcd85 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/PostDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/PostDataTest.php @@ -31,11 +31,11 @@ class PostDataTest extends \PHPUnit_Framework_TestCase public function testGetPostData() { $url = '/controller/sample/action/url/'; - $product = ['product' => new \Magento\Object(['id' => 1])]; + $product = ['product' => new \Magento\Framework\Object(['id' => 1])]; $expected = json_encode([ 'action' => $url, 'data' => [ - 'product' => new \Magento\Object(['id' => 1]), + 'product' => new \Magento\Framework\Object(['id' => 1]), \Magento\Framework\App\Action\Action::PARAM_NAME_URL_ENCODED => strtr(base64_encode($url . 'for_uenc'), '+/=', '-_,') ] @@ -49,7 +49,7 @@ public function testGetPostData() false ); $urlBuilderMock = $this->getMockForAbstractClass( - 'Magento\UrlInterface', + 'Magento\Framework\UrlInterface', array(), '', true, diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php index 935c83073f7af..5ab1d52b187ff 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php @@ -55,7 +55,13 @@ public function testGetCssFiles($layoutStr, $expectedResult) // 3. Get filesystem model $filesystem = $this->_getFilesystem(); - $directory = $this->getMock('Magento\Filesystem\Directory\Read', array('getRelativePath'), array(), '', false); + $directory = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Read', + array('getRelativePath'), + array(), + '', + false + ); $directory->expects( $this->any() )->method( @@ -419,13 +425,13 @@ protected function _getTheme($themeId, $themeArea) /** * @param array $map - * @return \Magento\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ protected function _getFileSystemView($map) { - /** @var $fileSystem \Magento\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ + /** @var $fileSystem \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ $fileSystem = $this->getMockBuilder( - 'Magento\View\FileSystem', + 'Magento\Framework\View\FileSystem', array() )->disableOriginalConstructor()->getMock(); $fileSystem->expects($this->any())->method('getViewFile')->will($this->returnValueMap($map)); @@ -435,12 +441,13 @@ protected function _getFileSystemView($map) /** * @param string $layoutStr - * @return \Magento\View\Layout\ProcessorFactory|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\View\Layout\ProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ protected function _getLayoutMergeFactory($layoutStr) { - /** @var $layoutProcessor \Magento\View\Layout\ProcessorInterface */ - $layoutProcessor = $this->getMockBuilder('Magento\View\Layout\ProcessorInterface')->getMockForAbstractClass(); + /** @var $layoutProcessor \Magento\Framework\View\Layout\ProcessorInterface */ + $layoutProcessor = $this->getMockBuilder('Magento\Framework\View\Layout\ProcessorInterface') + ->getMockForAbstractClass(); $xml = '' . $layoutStr . ''; $layoutElement = simplexml_load_string($xml); $layoutProcessor->expects( @@ -451,9 +458,9 @@ protected function _getLayoutMergeFactory($layoutStr) $this->returnValue($layoutElement) ); - /** @var $processorFactory \Magento\View\Layout\ProcessorFactory */ + /** @var $processorFactory \Magento\Framework\View\Layout\ProcessorFactory */ $processorFactory = $this->getMock( - 'Magento\View\Layout\ProcessorFactory', + 'Magento\Framework\View\Layout\ProcessorFactory', array('create'), array(), '', @@ -545,9 +552,10 @@ protected function _getHelper($files) $dirs = $this->_getFileSystem(); // 5. Get layout merge model and factory - /** @var $processorFactory \Magento\View\Layout\ProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var $processorFactory \Magento\Framework\View\Layout\ProcessorFactory + * |\PHPUnit_Framework_MockObject_MockObject */ $processorFactory = $this->getMock( - 'Magento\View\Layout\ProcessorFactory', + 'Magento\Framework\View\Layout\ProcessorFactory', array('create'), array(), '', @@ -557,9 +565,9 @@ protected function _getHelper($files) /** @var $context \Magento\Framework\App\Helper\Context */ $context = $this->getMock('Magento\Framework\App\Helper\Context', null, array(), '', false); - /** @var $fileSystem \Magento\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ + /** @var $fileSystem \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ $fileSystem = $this->getMockBuilder( - 'Magento\View\FileSystem', + 'Magento\Framework\View\FileSystem', array() )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php index 5fc1b18b503e1..c3c6c7579a7d3 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/App/StateTest.php @@ -40,7 +40,7 @@ class StateTest extends \PHPUnit_Framework_TestCase public function testConstructor($mode) { $model = new \Magento\Framework\App\State( - $this->getMockForAbstractClass('Magento\Config\ScopeInterface', array(), '', false), + $this->getMockForAbstractClass('Magento\Framework\Config\ScopeInterface', array(), '', false), time(), $mode ); @@ -66,7 +66,7 @@ public static function constructorDataProvider() public function testConstructorException() { new \Magento\Framework\App\State( - $this->getMockForAbstractClass('Magento\Config\ScopeInterface', array(), '', false), + $this->getMockForAbstractClass('Magento\Framework\Config\ScopeInterface', array(), '', false), time(), "unknown mode" ); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DesignLoaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DesignLoaderTest.php index 77aefa67fea8a..99d2949cc2009 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/DesignLoaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/DesignLoaderTest.php @@ -26,7 +26,7 @@ class DesignLoaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\View\DesignLoader + * @var \Magento\Framework\View\DesignLoader */ protected $_model; @@ -50,7 +50,7 @@ protected function setUp() $this->_areaListMock = $this->getMock('\Magento\Framework\App\AreaList', array(), array(), '', false); $this->_requestMock = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); $this->appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->_model = new \Magento\View\DesignLoader( + $this->_model = new \Magento\Framework\View\DesignLoader( $this->_requestMock, $this->_areaListMock, $this->appState @@ -59,13 +59,13 @@ protected function setUp() public function testLoad() { - $area = $this->getMock('Magento\Core\Model\App\Area', array(), array(), '', false); + $area = $this->getMock('Magento\Framework\App\Area', array(), array(), '', false); $this->appState->expects($this->once())->method('getAreaCode')->will($this->returnValue('area')); $this->_areaListMock->expects($this->once())->method('getArea')->with('area')->will($this->returnValue($area)); $area->expects($this->at(0))->method('load') - ->with(\Magento\Core\Model\App\Area::PART_DESIGN)->will($this->returnValue($area)); + ->with(\Magento\Framework\App\Area::PART_DESIGN)->will($this->returnValue($area)); $area->expects($this->at(1))->method('load') - ->with(\Magento\Core\Model\App\Area::PART_TRANSLATE)->will($this->returnValue($area)); + ->with(\Magento\Framework\App\Area::PART_TRANSLATE)->will($this->returnValue($area)); $this->_model->load($this->_requestMock); } } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php index aeaef17c5da28..05e198b2d0500 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php @@ -35,7 +35,7 @@ public function testSave() $fileStorageMock->expects($this->once())->method('getScriptConfig')->will($this->returnValue($config)); $file = $this->getMock( - 'Magento\Filesystem\File\Write', + 'Magento\Framework\Filesystem\File\Write', array('lock', 'write', 'unlock', 'close'), array(), '', @@ -46,7 +46,7 @@ public function testSave() $file->expects($this->once())->method('unlock'); $file->expects($this->once())->method('close'); $directory = $this->getMock( - 'Magento\Filesystem\Direcoty\Write', + 'Magento\Framework\Filesystem\Direcoty\Write', array('openFile', 'getRelativePath'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/Directory/DatabaseTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/Directory/DatabaseTest.php index cb6e75d057518..c45622368e15d 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/Directory/DatabaseTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/Directory/DatabaseTest.php @@ -37,12 +37,12 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase protected $directoryDatabase; /** - * @var \Magento\Model\Context |\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Model\Context |\PHPUnit_Framework_MockObject_MockObject */ protected $contextMock; /** - * @var \Magento\Registry |\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry |\PHPUnit_Framework_MockObject_MockObject */ protected $registryMock; @@ -52,7 +52,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase protected $helperStorageDatabase; /** - * @var \Magento\Stdlib\DateTime\DateTime |\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\DateTime\DateTime |\PHPUnit_Framework_MockObject_MockObject */ protected $dateModelMock; @@ -77,7 +77,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase protected $resourceDirectoryDatabaseMock; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $loggerMock; @@ -91,8 +91,8 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->contextMock = $this->getMock('Magento\Model\Context', array(), array(), '', false); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->contextMock = $this->getMock('Magento\Framework\Model\Context', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->helperStorageDatabase = $this->getMock( 'Magento\Core\Helper\File\Storage\Database', array(), @@ -100,7 +100,13 @@ protected function setUp() '', false ); - $this->dateModelMock = $this->getMock('Magento\Stdlib\DateTime\DateTime', array(), array(), '', false); + $this->dateModelMock = $this->getMock( + 'Magento\Framework\Stdlib\DateTime\DateTime', + array(), + array(), + '', + false + ); $this->directoryMock = $this->getMock( 'Magento\Core\Model\File\Storage\Directory\Database', array('setPath', 'setName', '__wakeup', 'save', 'getParentId'), @@ -122,7 +128,7 @@ protected function setUp() '', false ); - $this->loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->directoryFactoryMock->expects( $this->any() diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php index 3e4c4fdbb6c8b..f6faf757c7ddc 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/MediaTest.php @@ -44,7 +44,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase protected $_storageHelperMock; /** - * @var \Magento\Stdlib\DateTime\DateTime + * @var \Magento\Framework\Stdlib\DateTime\DateTime */ protected $_mediaHelperMock; @@ -55,7 +55,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->_loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->_storageHelperMock = $this->getMock( 'Magento\Core\Helper\File\Storage\Database', array(), diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php index 2c438254094f8..877baf80c9932 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php @@ -55,7 +55,7 @@ public function testSynchronize() $storageMock->expects($this->once())->method('loadByFilename'); $file = $this->getMock( - 'Magento\Filesystem\File\Write', + 'Magento\Framework\Filesystem\File\Write', array('lock', 'write', 'unlock', 'close'), array(), '', @@ -66,7 +66,7 @@ public function testSynchronize() $file->expects($this->once())->method('unlock'); $file->expects($this->once())->method('close'); $directory = $this->getMock( - 'Magento\Filesystem\Direcoty\Write', + 'Magento\Framework\Filesystem\Direcoty\Write', array('openFile', 'getRelativePath'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php index 8b4f1bdfe99ba..1895937d8f8db 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/DepersonalizePluginTest.php @@ -35,7 +35,7 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase protected $plugin; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $layoutMock; @@ -45,12 +45,12 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase protected $requestMock; /** - * @var \Magento\Module\Manager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $moduleManagerMock; /** - * @var \Magento\Event\Manager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $eventManagerMock; @@ -60,7 +60,7 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase protected $cacheConfigMock; /** - * @var \Magento\Message\Session|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Message\Session|\PHPUnit_Framework_MockObject_MockObject */ protected $messageSessionMock; @@ -69,12 +69,12 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); - $this->moduleManagerMock = $this->getMock('Magento\Module\Manager', array(), array(), '', false); - $this->eventManagerMock = $this->getMock('Magento\Event\Manager', array(), array(), '', false); + $this->moduleManagerMock = $this->getMock('Magento\Framework\Module\Manager', array(), array(), '', false); + $this->eventManagerMock = $this->getMock('Magento\Framework\Event\Manager', array(), array(), '', false); $this->cacheConfigMock = $this->getMock('Magento\PageCache\Model\Config', array(), array(), '', false); - $this->messageSessionMock = $this->getMock('Magento\Message\Session', + $this->messageSessionMock = $this->getMock('Magento\Framework\Message\Session', array('clearStorage'), array(), '', @@ -94,7 +94,7 @@ public function setUp() */ public function testAfterGenerateXmlPageCacheEnabled() { - $expectedResult = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $expectedResult = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->cacheConfigMock->expects($this->once()) ->method('isEnabled') ->will($this->returnValue(true)); @@ -124,7 +124,7 @@ public function testAfterGenerateXmlPageCacheEnabled() */ public function testAfterGenerateXmlPageCacheDisabled() { - $expectedResult = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $expectedResult = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->moduleManagerMock->expects($this->once()) ->method('isEnabled') ->with($this->equalTo('Magento_PageCache')) diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php index 074d2fabe6875..eab618b95c7eb 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php @@ -28,7 +28,7 @@ class MergeTest extends \PHPUnit_Framework_TestCase /** * Fixture XML instruction(s) to be used in tests */ - const FIXTURE_LAYOUT_XML = ''; + const FIXTURE_LAYOUT_XML = ''; /** * @var \Magento\Core\Model\Layout\Merge @@ -74,12 +74,12 @@ protected function setUp() { $files = array(); foreach (glob(__DIR__ . '/_files/layout/*.xml') as $filename) { - $files[] = new \Magento\View\Layout\File($filename, 'Magento_Core'); + $files[] = new \Magento\Framework\View\Layout\File($filename, 'Magento_Core'); } - $fileSource = $this->getMockForAbstractClass('Magento\View\Layout\File\SourceInterface'); + $fileSource = $this->getMockForAbstractClass('Magento\Framework\View\Layout\File\SourceInterface'); $fileSource->expects($this->any())->method('getFiles')->will($this->returnValue($files)); - $design = $this->getMockForAbstractClass('Magento\View\DesignInterface'); + $design = $this->getMockForAbstractClass('Magento\Framework\View\DesignInterface'); $this->_store = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false); $this->_store->expects($this->any())->method('getId')->will($this->returnValue(20)); @@ -90,7 +90,7 @@ protected function setUp() $this->_appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->_logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->_logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->_layoutValidator = $this->getMock( 'Magento\Core\Model\Layout\Update\Validator', @@ -100,7 +100,7 @@ protected function setUp() false ); - $this->_cache = $this->getMockForAbstractClass('Magento\Cache\FrontendInterface'); + $this->_cache = $this->getMockForAbstractClass('Magento\Framework\Cache\FrontendInterface'); $this->_theme = $this->getMock('Magento\Core\Model\Theme', array(), array(), '', false, false); $this->_theme->expects($this->any())->method('isPhysical')->will($this->returnValue(true)); @@ -110,10 +110,10 @@ protected function setUp() $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false, false); - $directory = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false, false); + $directory = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false, false); $directory->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); - $fileDriver = $objectHelper->getObject('Magento\Filesystem\Driver\File'); + $fileDriver = $objectHelper->getObject('Magento\Framework\Filesystem\Driver\File'); $directory->expects($this->any())->method('readFile')->will( $this->returnCallback( function ($filename) use ($fileDriver) { @@ -225,8 +225,8 @@ public function testLoadFileSystem() $this->assertEquals($handles, $this->_model->getHandles()); $expectedResult = ' - - + + '; $actualResult = '' . $this->_model->asString() . ''; @@ -296,7 +296,7 @@ public function testGetFileLayoutUpdatesXml() )->with( $this->stringStartsWith($errorString), \Zend_Log::ERR, - \Magento\Logger::LOGGER_SYSTEM + \Magento\Framework\Logger::LOGGER_SYSTEM ); $actualXml = $this->_model->getFileLayoutUpdatesXml(); @@ -377,7 +377,7 @@ public function testIsCustomDesignAbstractions() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Invalid layout update handle */ public function testLoadWithInvalidArgumentThrowsException() diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php index 751b7aaa08319..b4f2233483e65 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php @@ -64,7 +64,7 @@ protected function setUp() XML; - $this->_xmlDocument = simplexml_load_string($string, 'Magento\Simplexml\Element'); + $this->_xmlDocument = simplexml_load_string($string, 'Magento\Framework\Simplexml\Element'); $this->_object = new \Magento\Core\Model\Layout\Translator(); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Update/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Update/ValidatorTest.php index ce35931dc0b28..9556068a42766 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Update/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Update/ValidatorTest.php @@ -45,7 +45,9 @@ public function setUp() */ protected function _createValidator($layoutUpdate, $isSchemaValid = true) { - $modulesReader = $this->getMockBuilder('Magento\Module\Dir\Reader')->disableOriginalConstructor()->getMock(); + $modulesReader = $this->getMockBuilder('Magento\Framework\Module\Dir\Reader') + ->disableOriginalConstructor() + ->getMock(); $modulesReader->expects( $this->exactly(2) )->method( @@ -58,7 +60,7 @@ protected function _createValidator($layoutUpdate, $isSchemaValid = true) ); $domConfigFactory = $this->getMockBuilder( - 'Magento\Config\DomFactory' + 'Magento\Framework\Config\DomFactory' )->disableOriginalConstructor()->getMock(); $params = array( @@ -77,7 +79,7 @@ protected function _createValidator($layoutUpdate, $isSchemaValid = true) $this->equalTo($params) )->will( $isSchemaValid ? $this->returnSelf() : $this->throwException( - new \Magento\Config\Dom\ValidationException($exceptionMessage) + new \Magento\Framework\Config\Dom\ValidationException($exceptionMessage) ) ); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php index 977d5a1734ef6..0656065f1eb7b 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/UpdateTest.php @@ -51,7 +51,7 @@ public function testBeforeSave() false ); $resourceModel->expects($this->once())->method('addCommitCallback')->will($this->returnSelf()); - $dateTime = $this->getMock('\Magento\Stdlib\DateTime', array(), array()); + $dateTime = $this->getMock('\Magento\Framework\Stdlib\DateTime', array(), array()); $dateTime->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/arguments.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/arguments.xml index 27f648f31b9bd..9d461813625a6 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/arguments.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/arguments.xml @@ -58,7 +58,7 @@ - Magento\View\Layout\Argument\Handler\TestObject + Magento\Framework\View\Layout\Argument\Handler\TestObject Magento_Test_UpdaterMagento\Core\Model\Layout\Argument\Handler\TestObject diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml index 8adcc1592587a..f608276e38f43 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_one.xml @@ -24,5 +24,5 @@ */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml index c9807034b1398..00c056242b1fd 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/layout/fixture_handle_two.xml @@ -24,5 +24,5 @@ */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml index 13b2b71bc579d..5ca264fe2334f 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/_files/merged.xml @@ -41,10 +41,10 @@ - + - + diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php index f95fe91ec60d3..6b0107fc91c00 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/NoRouteHandlerListTest.php @@ -26,7 +26,7 @@ class NoRouteHandlerListTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManagerMock; @@ -37,7 +37,7 @@ class NoRouteHandlerListTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $handlersList = array( 'default_handler' => array('class' => 'Magento\Core\App\Router\NoRouteHandler', 'sortOrder' => 100), 'backend_handler' => array('class' => 'Magento\Backend\App\Router\NoRouteHandler', 'sortOrder' => 10) diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php index 6f4d4e25c06be..2db5964ef72b2 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/ObserverTest.php @@ -57,7 +57,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_cacheFrontendMock = $this->getMockForAbstractClass('Magento\Cache\FrontendInterface'); + $this->_cacheFrontendMock = $this->getMockForAbstractClass('Magento\Framework\Cache\FrontendInterface'); $this->_frontendPoolMock = $this->getMock( 'Magento\Framework\App\Cache\Frontend\Pool', @@ -76,7 +76,7 @@ protected function setUp() ); $this->_themeCustomization = $this->getMock( - 'Magento\View\Design\Theme\Customization', + 'Magento\Framework\View\Design\Theme\Customization', array(), array(), '', @@ -97,11 +97,11 @@ protected function setUp() $this->returnValue($this->_themeCustomization) ); - $designMock = $this->getMock('Magento\View\DesignInterface'); + $designMock = $this->getMock('Magento\Framework\View\DesignInterface'); $designMock->expects($this->any())->method('getDesignTheme')->will($this->returnValue($themeMock)); $this->_assetsMock = $this->getMock( - 'Magento\View\Asset\GroupedCollection', + 'Magento\Framework\View\Asset\GroupedCollection', array(), array(), '', @@ -118,7 +118,7 @@ protected function setUp() ); $this->_assetFactory = $this->getMock( - 'Magento\View\Asset\PublicFileFactory', + 'Magento\Framework\View\Asset\PublicFileFactory', array('create'), array(), '', @@ -163,9 +163,15 @@ public function testCleanCache() public function testApplyThemeCustomization() { - $asset = new \Magento\View\Asset\Remote('http://127.0.0.1/test.css'); + $asset = new \Magento\Framework\View\Asset\Remote('http://127.0.0.1/test.css'); $file = $this->getMock('Magento\Core\Model\Theme\File', array(), array(), '', false); - $fileService = $this->getMock('Magento\View\Design\Theme\Customization\File\Css', array(), array(), '', false); + $fileService = $this->getMock( + 'Magento\Framework\View\Design\Theme\Customization\File\Css', + array(), + array(), + '', + false + ); $fileService->expects($this->atLeastOnce())->method('getContentType')->will($this->returnValue('css')); @@ -186,7 +192,7 @@ public function testApplyThemeCustomization() $this->_assetsMock->expects($this->once())->method('add')->with($this->anything(), $asset); - $observer = new \Magento\Event\Observer(); + $observer = new \Magento\Framework\Event\Observer(); $this->_model->applyThemeCustomization($observer); } } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php index 440fa98a1ba1e..0e79c7763fe51 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php @@ -26,14 +26,14 @@ */ /** - * Test class for \Magento\Model\Resource\Db\AbstractDb. + * Test class for \Magento\Framework\Model\Resource\Db\AbstractDb. */ namespace Magento\Core\Model\Resource\Db; class AbstractTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Model\Resource\Db\AbstractDb|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Model\Resource\Db\AbstractDb|PHPUnit_Framework_MockObject_MockObject */ protected $_model; @@ -46,7 +46,7 @@ protected function setUp() { $this->_resource = $this->getMock('Magento\Framework\App\Resource', array('getConnection'), array(), '', false, false); $this->_model = $this->getMock( - 'Magento\Model\Resource\Db\AbstractDb', + 'Magento\Framework\Model\Resource\Db\AbstractDb', array('_construct', '_getWriteAdapter'), array($this->_resource) ); @@ -68,9 +68,9 @@ public function testConstructor() public function testGetConnectionInMemoryCaching() { $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $string = $this->getMock('Magento\Stdlib\String', array(), array(), '', false); - $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true); - $connection = new \Magento\DB\Adapter\Pdo\Mysql( + $string = $this->getMock('Magento\Framework\Stdlib\String', array(), array(), '', false); + $dateTime = $this->getMock('Magento\Framework\Stdlib\DateTime', null, array(), '', true); + $connection = new \Magento\Framework\DB\Adapter\Pdo\Mysql( $filesystem, $string, $dateTime, diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php index 66423293d83b8..cc1773480cc37 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php @@ -44,7 +44,7 @@ class FileTest extends \PHPUnit_Framework_TestCase protected $filesystemMock; /** - * @var \Magento\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject */ protected $directoryReadMock; @@ -53,7 +53,7 @@ class FileTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->filesystemMock = $this->getMock( 'Magento\Framework\App\Filesystem', array('getDirectoryRead'), @@ -62,7 +62,7 @@ protected function setUp() false ); $this->directoryReadMock = $this->getMock( - 'Magento\Filesystem\Directory\Read', + 'Magento\Framework\Filesystem\Directory\Read', array('isDirectory', 'readRecursively'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php index 5e5eec5b7784a..fd4200dc8801b 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/AbstractTestCase.php @@ -76,12 +76,12 @@ protected function setUp() */ protected function _getResource(\Zend_Db_Select $select) { - $connection = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array(), array(), '', false); + $connection = $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', array(), array(), '', false); $connection->expects($this->once())->method('select')->will($this->returnValue($select)); $connection->expects($this->any())->method('quoteIdentifier')->will($this->returnArgument(0)); $resource = $this->getMockForAbstractClass( - 'Magento\Model\Resource\Db\AbstractDb', + 'Magento\Framework\Model\Resource\Db\AbstractDb', array(), '', false, @@ -98,7 +98,7 @@ protected function _getResource(\Zend_Db_Select $select) /** * @abstract * @param \Zend_Db_Select $select - * @return \Magento\Model\Resource\Db\Collection\AbstractCollection + * @return \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection */ abstract protected function _getCollection(\Zend_Db_Select $select); @@ -123,7 +123,7 @@ public function testAddUpdatedDaysBeforeFilter() $datetime = new \DateTime(); $storeInterval = new \DateInterval('P' . self::TEST_DAYS_BEFORE . 'D'); $datetime->sub($storeInterval); - $dateTimeLib = new \Magento\Stdlib\DateTime(); + $dateTimeLib = new \Magento\Framework\Stdlib\DateTime(); $expectedDate = $dateTimeLib->formatDate($datetime->getTimestamp()); $this->_expectedConditions['data'][1][1]['lt'] = $expectedDate; diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php index cbd5c8bfd42db..3d4c636a8fdef 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php @@ -46,14 +46,14 @@ class CollectionTest extends \Magento\Core\Model\Resource\Layout\AbstractTestCas */ protected function _getCollection(\Zend_Db_Select $select) { - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); return new \Magento\Core\Model\Resource\Layout\Link\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false), - $this->getMock('Magento\Logger', array(), array(), '', false), - $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface'), + $this->getMock('Magento\Framework\Logger', array(), array(), '', false), + $this->getMockForAbstractClass('Magento\Framework\Data\Collection\Db\FetchStrategyInterface'), $eventManager, - $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true), + $this->getMock('Magento\Framework\Stdlib\DateTime', null, array(), '', true), null, $this->_getResource($select) ); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php index 8eac24ca93f4e..ea93e753b7321 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php @@ -36,14 +36,14 @@ class CollectionTest extends \Magento\Core\Model\Resource\Layout\AbstractTestCas */ protected function _getCollection(\Zend_Db_Select $select) { - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); return new \Magento\Core\Model\Resource\Layout\Update\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false), - $this->getMock('Magento\Logger', array(), array(), '', false), - $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface'), + $this->getMock('Magento\Framework\Logger', array(), array(), '', false), + $this->getMockForAbstractClass('Magento\Framework\Data\Collection\Db\FetchStrategyInterface'), $eventManager, - $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true), + $this->getMock('Magento\Framework\Stdlib\DateTime', null, array(), '', true), null, $this->_getResource($select) ); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php index 316dabaa39c0d..08aa1578965c7 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/SessionTest.php @@ -61,7 +61,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase /** * Model under test * - * @var \Magento\Session\SaveHandler\DbTable + * @var \Magento\Framework\Session\SaveHandler\DbTable */ protected $_model; @@ -113,7 +113,7 @@ protected function _prepareResourceMock($connection) $resource->expects($this->once())->method('getTableName')->will($this->returnValue(self::SESSION_TABLE)); $resource->expects($this->once())->method('getConnection')->will($this->returnValue($connection)); - $this->_model = new \Magento\Session\SaveHandler\DbTable($resource); + $this->_model = new \Magento\Framework\Session\SaveHandler\DbTable($resource); } /** @@ -124,7 +124,7 @@ protected function _prepareResourceMock($connection) protected function _prepareMockForRead($isDataEncoded) { $connection = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('select', 'from', 'where', 'fetchOne', 'isTableExists'), array(), '', @@ -202,7 +202,7 @@ public function testWrite($sessionExists) protected function _prepareMockForWrite($sessionExists) { $connection = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('select', 'from', 'where', 'fetchOne', 'update', 'insert', 'isTableExists'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Wrapper.php b/dev/tests/unit/testsuite/Magento/Core/Model/Route/Wrapper.php index 8094252c8f8ec..ec46d50f5320c 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Route/Wrapper.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Route/Wrapper.php @@ -27,7 +27,7 @@ */ namespace Magento\Core\Model\Route; -class Wrapper extends \PHPUnit_Framework_TestCase implements \Magento\Config\CacheInterface +class Wrapper extends \PHPUnit_Framework_TestCase implements \Magento\Framework\Config\CacheInterface { /** * @var \PHPUnit_Framework_MockObject_MockObject diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Decorator/DebugHintsTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Decorator/DebugHintsTest.php index b184ce94968d4..2877888ee732e 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Decorator/DebugHintsTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Decorator/DebugHintsTest.php @@ -31,8 +31,8 @@ class DebugHintsTest extends \PHPUnit_Framework_TestCase */ public function testRender($showBlockHints) { - $subject = $this->getMock('Magento\View\TemplateEngineInterface'); - $block = $this->getMock('Magento\View\Element\BlockInterface', array(), array(), 'TestBlock', false); + $subject = $this->getMock('Magento\Framework\View\TemplateEngineInterface'); + $block = $this->getMock('Magento\Framework\View\Element\BlockInterface', array(), array(), 'TestBlock', false); $subject->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Plugin/DebugHintsTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Plugin/DebugHintsTest.php index fd4ffe93afb2f..10f0b5c3c2fb0 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Plugin/DebugHintsTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/TemplateEngine/Plugin/DebugHintsTest.php @@ -52,10 +52,16 @@ class DebugHintsTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); $this->_coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $this->subjectMock = $this->getMock('Magento\View\TemplateEngineFactory', array(), array(), '', false); + $this->subjectMock = $this->getMock( + 'Magento\Framework\View\TemplateEngineFactory', + array(), + array(), + '', + false + ); $this->_model = new DebugHints($this->_objectManager, $this->_scopeConfig, $this->_coreData); } @@ -67,8 +73,8 @@ public function testAfterCreateActive($showBlockHints) { $this->_coreData->expects($this->once())->method('isDevAllowed')->will($this->returnValue(true)); $this->_setupConfigFixture(true, $showBlockHints); - $engine = $this->getMock('Magento\View\TemplateEngineInterface'); - $engineDecorated = $this->getMock('Magento\View\TemplateEngineInterface'); + $engine = $this->getMock('Magento\Framework\View\TemplateEngineInterface'); + $engineDecorated = $this->getMock('Magento\Framework\View\TemplateEngineInterface'); $this->_objectManager->expects( $this->once() )->method( @@ -97,7 +103,7 @@ public function testAfterCreateInactive($isDevAllowed, $showTemplateHints) $this->_coreData->expects($this->any())->method('isDevAllowed')->will($this->returnValue($isDevAllowed)); $this->_setupConfigFixture($showTemplateHints, true); $this->_objectManager->expects($this->never())->method('create'); - $engine = $this->getMock('Magento\View\TemplateEngineInterface', array(), array(), '', false); + $engine = $this->getMock('Magento\Framework\View\TemplateEngineInterface', array(), array(), '', false); $this->assertSame($engine, $this->_model->afterCreate($this->subjectMock, $engine)); } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/PhysicalTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/PhysicalTest.php index 78bba666a755a..8df1de1923e28 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/PhysicalTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/PhysicalTest.php @@ -81,7 +81,7 @@ public function testCreateVirtualTheme() $themeCollection->expects($this->once())->method('count')->will($this->returnValue(1)); $domainModel = new \Magento\Core\Model\Theme\Domain\Physical( - $this->getMock('Magento\View\Design\ThemeInterface', array(), array(), '', false, false), + $this->getMock('Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false, false), $themeFactory, $copyService, $themeCollection diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php index e3fe5c1b511c5..cc4deacd0cc0a 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php @@ -90,7 +90,7 @@ public function testGetStagingThemeNew() $appState->expects($this->any())->method('getAreaCode')->will($this->returnValue('fixture_area')); $appStateProperty = new \ReflectionProperty('Magento\Core\Model\Theme', '_appState'); $appStateProperty->setAccessible(true); - /** @var $theme \Magento\Object */ + /** @var $theme \Magento\Framework\Object */ $theme->setData( array( 'id' => 'fixture_theme_id', @@ -98,7 +98,7 @@ public function testGetStagingThemeNew() 'theme_title' => 'fixture_theme_title', 'preview_image' => 'fixture_preview_image', 'is_featured' => 'fixture_is_featured', - 'type' => \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL ) ); $appStateProperty->setValue($theme, $appState); @@ -123,7 +123,7 @@ public function testGetStagingThemeNew() 'theme_title' => 'fixture_theme_title - Staging', 'preview_image' => 'fixture_preview_image', 'is_featured' => 'fixture_is_featured', - 'type' => \Magento\View\Design\ThemeInterface::TYPE_STAGING + 'type' => \Magento\Framework\View\Design\ThemeInterface::TYPE_STAGING ) ); $appStateProperty->setValue($themeStaging, $appState); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php index b7cca08476192..27169237b90ef 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php @@ -43,7 +43,7 @@ class PathTest extends \PHPUnit_Framework_TestCase protected $_filesystem; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\View\Url + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Url */ protected $_viewUrlMock; @@ -55,7 +55,7 @@ class PathTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_viewUrlMock = $this->getMock('Magento\View\Url', array(), array(), '', false); + $this->_viewUrlMock = $this->getMock('Magento\Framework\View\Url', array(), array(), '', false); $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false); $this->_filesystem->expects( diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ResolverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ResolverTest.php index c2322835bb428..262df3fd4b35f 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ResolverTest.php @@ -31,7 +31,7 @@ class ResolverTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\View\DesignInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\DesignInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $designMock; @@ -51,13 +51,13 @@ class ResolverTest extends \PHPUnit_Framework_TestCase protected $themeCollectionMock; /** - * @var \Magento\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Design\ThemeInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $themeMock; protected function setUp() { - $this->designMock = $this->getMockForAbstractClass('Magento\View\DesignInterface'); + $this->designMock = $this->getMockForAbstractClass('Magento\Framework\View\DesignInterface'); $this->themeCollectionFactoryMock = $this->getMock( 'Magento\Core\Model\Resource\Theme\CollectionFactory', ['create'], @@ -79,7 +79,7 @@ protected function setUp() '', false ); - $this->themeMock = $this->getMockForAbstractClass('Magento\View\Design\ThemeInterface'); + $this->themeMock = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); $this->model = new \Magento\Core\Model\Theme\Resolver( $this->appStateMock, @@ -205,7 +205,7 @@ public function testGetByAreaWithOtherAreaAndStringThemeId() )->method( 'getThemeByFullPath' )->with( - 'other_area' . \Magento\View\Design\ThemeInterface::PATH_SEPARATOR . 'other_theme' + 'other_area' . \Magento\Framework\View\Design\ThemeInterface::PATH_SEPARATOR . 'other_theme' )->will( $this->returnValue($this->themeMock) ); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ThemeProviderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ThemeProviderTest.php index a488be2a72d0a..293a8703b3507 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ThemeProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ThemeProviderTest.php @@ -36,7 +36,7 @@ public function testGetByFullPath() false ); $collectionMock = $this->getMock('Magento\Core\Model\Resource\Theme\Collection', array(), array(), '', false); - $theme = $this->getMock('Magento\View\Design\ThemeInterface', array(), array(), '', false); + $theme = $this->getMock('Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false); $collectionMock->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php index 16b1941c926f9..b6bc8fa945095 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php @@ -37,16 +37,16 @@ class ValidationTest extends \PHPUnit_Framework_TestCase * @param bool $result * @param array $messages * - * @covers \Magento\View\Design\Theme\Validator::validate + * @covers \Magento\Framework\View\Design\Theme\Validator::validate * @dataProvider dataProviderValidate */ public function testValidate(array $data, $result, array $messages) { - /** @var $themeMock \Magento\Object */ - $themeMock = new \Magento\Object(); + /** @var $themeMock \Magento\Framework\Object */ + $themeMock = new \Magento\Framework\Object(); $themeMock->setData($data); - $validator = new \Magento\View\Design\Theme\Validator(); + $validator = new \Magento\Framework\View\Design\Theme\Validator(); $this->assertEquals($result, $validator->validate($themeMock)); $this->assertEquals($messages, $validator->getErrorMessages()); diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php index 62889dcab9019..ce3581278dc38 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php @@ -30,7 +30,7 @@ */ namespace Magento\Core\Model; -use Magento\View\Design\ThemeInterface; +use Magento\Framework\View\Design\ThemeInterface; class ThemeTest extends \PHPUnit_Framework_TestCase { @@ -48,7 +48,7 @@ protected function setUp() { $customizationConfig = $this->getMock('Magento\Theme\Model\Config\Customization', array(), array(), '', false); $customizationFactory = $this->getMock( - 'Magento\View\Design\Theme\CustomizationFactory', + 'Magento\Framework\View\Design\Theme\CustomizationFactory', array('create'), array(), '', @@ -62,7 +62,7 @@ protected function setUp() false ); $this->_imageFactory = $this->getMock( - 'Magento\View\Design\Theme\ImageFactory', + 'Magento\Framework\View\Design\Theme\ImageFactory', array('create'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Url/ScopeResolverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Url/ScopeResolverTest.php index 079300ec17777..2fdb5b607e4da 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Url/ScopeResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Url/ScopeResolverTest.php @@ -51,7 +51,7 @@ public function setUp() */ public function testGetScope($scopeId) { - $scopeMock = $this->getMockBuilder('\Magento\Url\ScopeInterface')->getMock(); + $scopeMock = $this->getMockBuilder('\Magento\Framework\Url\ScopeInterface')->getMock(); $this->_storeManagerMock->expects( $this->at(0) )->method( @@ -65,7 +65,7 @@ public function testGetScope($scopeId) } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Invalid scope object */ public function testGetScopeException() diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php index a3634b4e81b06..7c91e8e9794d2 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Validator/FactoryTest.php @@ -28,27 +28,27 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @var \Magento\Module\Dir\Reader + * @var \Magento\Framework\Module\Dir\Reader */ protected $_config; /** - * @var \Magento\TranslateInterface + * @var \Magento\Framework\TranslateInterface */ protected $_translateAdapter; /** - * @var \Magento\Validator\Config + * @var \Magento\Framework\Validator\Config */ protected $_validatorConfig; /** - * @var \Magento\Translate\AdapterInterface|null + * @var \Magento\Framework\Translate\AdapterInterface|null */ protected $_defaultTranslator = null; @@ -57,10 +57,10 @@ class FactoryTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->_defaultTranslator = \Magento\Validator\AbstractValidator::getDefaultTranslator(); - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_defaultTranslator = \Magento\Framework\Validator\AbstractValidator::getDefaultTranslator(); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_validatorConfig = $this->getMockBuilder( - 'Magento\Validator\Config' + 'Magento\Framework\Validator\Config' )->setMethods( array('createValidatorBuilder', 'createValidator') )->disableOriginalConstructor()->getMock(); @@ -70,9 +70,9 @@ protected function setUp() )->method( 'create' )->with( - 'Magento\Translate\Adapter' + 'Magento\Framework\Translate\Adapter' )->will( - $this->returnValue(new \Magento\Translate\Adapter()) + $this->returnValue(new \Magento\Framework\Translate\Adapter()) ); $this->_objectManager->expects( @@ -80,7 +80,7 @@ protected function setUp() )->method( 'create' )->with( - 'Magento\Validator\Config', + 'Magento\Framework\Validator\Config', array('configFiles' => array('/tmp/moduleOne/etc/validation.xml')) )->will( $this->returnValue($this->_validatorConfig) @@ -88,7 +88,7 @@ protected function setUp() // Config mock $this->_config = $this->getMockBuilder( - 'Magento\Module\Dir\Reader' + 'Magento\Framework\Module\Dir\Reader' )->setMethods( array('getConfigurationFiles') )->disableOriginalConstructor()->getMock(); @@ -104,7 +104,7 @@ protected function setUp() // Translate adapter mock $this->_translateAdapter = $this->getMockBuilder( - 'Magento\TranslateInterface' + 'Magento\Framework\TranslateInterface' )->disableOriginalConstructor()->getMock(); } @@ -113,7 +113,7 @@ protected function setUp() */ protected function tearDown() { - \Magento\Validator\AbstractValidator::setDefaultTranslator($this->_defaultTranslator); + \Magento\Framework\Validator\AbstractValidator::setDefaultTranslator($this->_defaultTranslator); unset($this->_defaultTranslator); } @@ -128,12 +128,16 @@ public function testGetValidatorConfig() $this->_translateAdapter ); $actualConfig = $factory->getValidatorConfig(); - $this->assertInstanceOf('Magento\Validator\Config', $actualConfig, 'Object of incorrect type was created'); + $this->assertInstanceOf( + 'Magento\Framework\Validator\Config', + $actualConfig, + 'Object of incorrect type was created' + ); // Check that validator translator was correctly instantiated - $validatorTranslator = \Magento\Validator\AbstractValidator::getDefaultTranslator(); + $validatorTranslator = \Magento\Framework\Validator\AbstractValidator::getDefaultTranslator(); $this->assertInstanceOf( - 'Magento\Translate\Adapter', + 'Magento\Framework\Translate\Adapter', $validatorTranslator, 'Default validator translate adapter was not set correctly' ); @@ -154,7 +158,9 @@ public function testCreateValidatorBuilder() 'class', array() )->will( - $this->returnValue($objectManager->getObject('Magento\Validator\Builder', array('constraints' => array()))) + $this->returnValue( + $objectManager->getObject('Magento\Framework\Validator\Builder', array('constraints' => array())) + ) ); $factory = new \Magento\Core\Model\Validator\Factory( $this->_objectManager, @@ -162,7 +168,7 @@ public function testCreateValidatorBuilder() $this->_translateAdapter ); $this->assertInstanceOf( - 'Magento\Validator\Builder', + 'Magento\Framework\Validator\Builder', $factory->createValidatorBuilder('test', 'class', array()) ); } @@ -181,13 +187,13 @@ public function testCreateValidator() 'class', array() )->will( - $this->returnValue(new \Magento\Validator()) + $this->returnValue(new \Magento\Framework\Validator()) ); $factory = new \Magento\Core\Model\Validator\Factory( $this->_objectManager, $this->_config, $this->_translateAdapter ); - $this->assertInstanceOf('Magento\Validator', $factory->createValidator('test', 'class', array())); + $this->assertInstanceOf('Magento\Framework\Validator', $factory->createValidator('test', 'class', array())); } } diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml index ebf9297db4bac..0f316e31d328e 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Iphone 2.0.0.1 diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml index 2c328c2fd8e57..4471af25ffa78 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml +++ b/dev/tests/unit/testsuite/Magento/Core/Model/_files/frontend/magento_iphone/theme_invalid.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default diff --git a/dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php b/dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php index 0f646bea6100d..d28693237c046 100644 --- a/dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php +++ b/dev/tests/unit/testsuite/Magento/Cron/App/Cron/Plugin/ApplicationInitializerTest.php @@ -48,7 +48,13 @@ class ApplicationInitializerTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->sidResolverMock = $this->getMock('\Magento\Session\SidResolverInterface', array(), array(), '', false); + $this->sidResolverMock = $this->getMock( + '\Magento\Framework\Session\SidResolverInterface', + array(), + array(), + '', + false + ); $this->subjectMock = $this->getMock('Magento\Framework\App\Cron', array(), array(), '', false); $this->model = new ApplicationInitializer( $this->appStateMock, diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/DataTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/DataTest.php index dbc1c8e109b54..80dbdfd3ea3bc 100644 --- a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/DataTest.php @@ -33,7 +33,7 @@ public function testGetJobs() $reader = $this->getMockBuilder( 'Magento\Cron\Model\Config\Reader\Xml' )->disableOriginalConstructor()->getMock(); - $cache = $this->getMock('Magento\Config\CacheInterface'); + $cache = $this->getMock('Magento\Framework\Config\CacheInterface'); $dbReader = $this->getMockBuilder( 'Magento\Cron\Model\Config\Reader\Db' )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php index 4ddee8afbaeb9..4b7a24f59800e 100644 --- a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php +++ b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/Reader/XmlTest.php @@ -47,7 +47,7 @@ public function setUp() 'Magento\Cron\Model\Config\SchemaLocator' )->disableOriginalConstructor()->getMock(); $validator = $this->getMockBuilder( - '\Magento\Config\ValidationStateInterface' + '\Magento\Framework\Config\ValidationStateInterface' )->disableOriginalConstructor()->getMock(); $this->_xmlReader = new \Magento\Cron\Model\Config\Reader\Xml($fileResolver, $converter, $schema, $validator); } diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php index e32d3319d2564..a9e1cf9ec9563 100644 --- a/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Cron/Model/Config/SchemaLocatorTest.php @@ -43,7 +43,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_moduleReaderMock = $this->getMockBuilder( - 'Magento\Module\Dir\Reader' + 'Magento\Framework\Module\Dir\Reader' )->disableOriginalConstructor()->getMock(); $this->_moduleReaderMock->expects( $this->once() diff --git a/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php index f54f63142928c..1259545eac9dd 100644 --- a/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Cron/Model/ObserverTest.php @@ -67,7 +67,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase protected $_request; /** - * @var \Magento\ShellInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ShellInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_shell; @@ -108,7 +108,7 @@ public function setUp() 'Magento\Framework\App\Console\Request' )->disableOriginalConstructor()->getMock(); $this->_shell = $this->getMockBuilder( - 'Magento\ShellInterface' + 'Magento\Framework\ShellInterface' )->disableOriginalConstructor()->setMethods( array('execute') )->getMock(); @@ -489,7 +489,7 @@ public function testDispatchNotGenerate() $schedule->expects($this->any())->method('getJobCode')->will($this->returnValue('job_code1')); $schedule->expects($this->once())->method('getScheduledAt')->will($this->returnValue('* * * * *')); - $this->_collection->addItem(new \Magento\Object()); + $this->_collection->addItem(new \Magento\Framework\Object()); $this->_collection->addItem($schedule); $this->_cache->expects($this->any())->method('save'); @@ -554,7 +554,7 @@ public function testDispatchGenerate() $schedule->expects($this->any())->method('unsScheduleId')->will($this->returnSelf()); $schedule->expects($this->any())->method('trySchedule')->will($this->returnSelf()); - $this->_collection->addItem(new \Magento\Object()); + $this->_collection->addItem(new \Magento\Framework\Object()); $this->_collection->addItem($schedule); $this->_cache->expects($this->any())->method('save'); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php index b729ba7e9335c..5da32399ea9bb 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/AuthorizationLinkTest.php @@ -63,7 +63,7 @@ protected function setUp() ->setMethods(array('getLogoutUrl', 'getLoginUrl')) ->getMock(); - $context = $this->_objectManager->getObject('Magento\View\Element\Template\Context'); + $context = $this->_objectManager->getObject('Magento\Framework\View\Element\Template\Context'); $this->_block = $this->_objectManager->getObject( 'Magento\Customer\Block\Account\AuthorizationLink', array( diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/CustomerTest.php index f6a75f1e9ee26..136fdd9d76a17 100755 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/CustomerTest.php @@ -43,7 +43,7 @@ public function testGetCustomerName() )->disableOriginalConstructor()->getMock(); $viewHelperMock->expects($this->any())->method('getCustomerName')->will($this->returnValue($customerName)); - $escaperMock = $this->getMockBuilder('Magento\Escaper')->disableOriginalConstructor()->getMock(); + $escaperMock = $this->getMockBuilder('Magento\Framework\Escaper')->disableOriginalConstructor()->getMock(); $escaperMock->expects( $this->any() )->method( @@ -55,7 +55,7 @@ public function testGetCustomerName() ); $contextMock = $this->getMockBuilder( - 'Magento\View\Element\Template\Context' + 'Magento\Framework\View\Element\Template\Context' )->disableOriginalConstructor()->getMock(); $contextMock->expects($this->any())->method('getEscaper')->will($this->returnValue($escaperMock)); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php index 074e20a43a1f7..3ac1c42963b08 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/Dashboard/InfoTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Block\Account\Dashboard; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; /** * Test class for \Magento\Customer\Block\Account\Dashboard\Info. @@ -37,7 +37,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase const EMAIL_ADDRESS = 'john.doe@ebay.com'; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\View\Element\Template\Context */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\View\Element\Template\Context */ private $_context; /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Customer\Model\Session */ @@ -73,57 +73,58 @@ public function setUp() $this->customerCurrentService = $this->getMockForAbstractClass( 'Magento\Customer\Service\V1\CustomerCurrentServiceInterface', - array(), + [], '', false, true, true, - array() + [] ); - $urlBuilder = $this->getMockForAbstractClass('Magento\UrlInterface', array(), '', false); + $urlBuilder = $this->getMockForAbstractClass('Magento\Framework\UrlInterface', [], '', false); $urlBuilder->expects($this->any())->method('getUrl')->will($this->returnValue(self::CHANGE_PASSWORD_URL)); - $layout = $this->getMockForAbstractClass('Magento\View\LayoutInterface', array(), '', false); - $this->_formRegister = $this->getMock('Magento\Customer\Block\Form\Register', array(), array(), '', false); + $layout = $this->getMockForAbstractClass('Magento\Framework\View\LayoutInterface', [], '', false); + $this->_formRegister = $this->getMock('Magento\Customer\Block\Form\Register', [], [], '', false); $layout->expects( $this->any() )->method( - 'getBlockSingleton' - )->with( - 'Magento\Customer\Block\Form\Register' - )->will( - $this->returnValue($this->_formRegister) - ); - - $this->_context = $this->getMock('Magento\View\Element\Template\Context', array(), array(), '', false); + 'getBlockSingleton' + )->with( + 'Magento\Customer\Block\Form\Register' + )->will( + $this->returnValue($this->_formRegister) + ); + + $this->_context = $this->getMockBuilder('Magento\Framework\View\Element\Template\Context') + ->disableOriginalConstructor()->getMock(); $this->_context->expects($this->once())->method('getUrlBuilder')->will($this->returnValue($urlBuilder)); $this->_context->expects($this->once())->method('getLayout')->will($this->returnValue($layout)); - $this->_customerSession = $this->getMock('Magento\Customer\Model\Session', array(), array(), '', false); + $this->_customerSession = $this->getMock('Magento\Customer\Model\Session', [], [], '', false); $this->_customerSession->expects($this->any())->method('getId')->will($this->returnValue(self::CUSTOMER_ID)); - $this->_customer = $this->getMock('Magento\Customer\Service\V1\Data\Customer', array(), array(), '', false); + $this->_customer = $this->getMock('Magento\Customer\Service\V1\Data\Customer', [], [], '', false); $this->_customer->expects($this->any())->method('getEmail')->will($this->returnValue(self::EMAIL_ADDRESS)); $this->_helperView = $this->getMockBuilder( '\Magento\Customer\Helper\View' )->disableOriginalConstructor()->getMock(); $this->_subscriberFactory = $this->getMock( 'Magento\Newsletter\Model\SubscriberFactory', - array('create'), - array(), + ['create'], + [], '', false ); - $this->_subscriber = $this->getMock('Magento\Newsletter\Model\Subscriber', array(), array(), '', false); + $this->_subscriber = $this->getMock('Magento\Newsletter\Model\Subscriber', [], [], '', false); $this->_subscriber->expects($this->any())->method('loadByEmail')->will($this->returnSelf()); $this->_subscriberFactory->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_subscriber) - ); + 'create' + )->will( + $this->returnValue($this->_subscriber) + ); $this->_block = new Info( $this->_context, @@ -139,10 +140,10 @@ public function testGetCustomer() $this->customerCurrentService->expects( $this->once() )->method( - 'getCustomer' - )->will( - $this->returnValue($this->_customer) - ); + 'getCustomer' + )->will( + $this->returnValue($this->_customer) + ); $customer = $this->_block->getCustomer(); $this->assertEquals($customer, $this->_customer); @@ -153,10 +154,14 @@ public function testGetCustomerException() $this->customerCurrentService->expects( $this->once() )->method( - 'getCustomer' - )->will( - $this->throwException(new NoSuchEntityException('customerId', 1)) - ); + 'getCustomer' + )->will($this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'customerId', 'fieldValue' => 1] + ) + ) + ); + $this->assertNull($this->_block->getCustomer()); } @@ -167,10 +172,10 @@ public function testGetName() $this->customerCurrentService->expects( $this->once() )->method( - 'getCustomer' - )->will( - $this->returnValue($this->_customer) - ); + 'getCustomer' + )->will( + $this->returnValue($this->_customer) + ); /** * Called three times, once for each attribute (i.e. prefix, middlename, and suffix) @@ -207,7 +212,7 @@ public function testGetIsSubscribed($isSubscribed, $expectedValue) */ public function getIsSubscribedProvider() { - return array(array(true, true), array(false, false)); + return [[true, true], [false, false]]; } /** @@ -221,15 +226,15 @@ public function testIsNewsletterEnabled($isNewsletterEnabled, $expectedValue) $this->_formRegister->expects( $this->once() )->method( - 'isNewsletterEnabled' - )->will( - $this->returnValue($isNewsletterEnabled) - ); + 'isNewsletterEnabled' + )->will( + $this->returnValue($isNewsletterEnabled) + ); $this->assertEquals($expectedValue, $this->_block->isNewsletterEnabled()); } public function isNewsletterEnabledProvider() { - return array(array(true, true), array(false, false)); + return [[true, true], [false, false]]; } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php index 7eec92bf5b5c4..413aa2574d3df 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/LinkTest.php @@ -37,7 +37,7 @@ public function testGetHref() array('getAccountUrl') )->getMock(); $layout = $this->getMockBuilder( - 'Magento\View\Layout' + 'Magento\Framework\View\Layout' )->disableOriginalConstructor()->setMethods( array('helper') )->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php index 14f034915bb45..e856bc11d6a4a 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Account/RegisterLinkTest.php @@ -43,7 +43,7 @@ protected function setUp() public function testToHtml() { - $context = $this->_objectManager->getObject('Magento\View\Element\Template\Context'); + $context = $this->_objectManager->getObject('Magento\Framework\View\Element\Template\Context'); $httpContext = $this->getMockBuilder('Magento\Framework\App\Http\Context') ->disableOriginalConstructor() ->setMethods(array('getValue')) @@ -75,7 +75,7 @@ public function testGetHref() $helper->expects($this->any())->method('getRegisterUrl')->will($this->returnValue('register url')); - $context = $this->_objectManager->getObject('Magento\View\Element\Template\Context'); + $context = $this->_objectManager->getObject('Magento\Framework\View\Element\Template\Context'); $block = $this->_objectManager->getObject( 'Magento\Customer\Block\Account\RegisterLink', diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Form/RegisterTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Form/RegisterTest.php index 59f83a30a374d..eea415667ab4d 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Form/RegisterTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Form/RegisterTest.php @@ -52,7 +52,7 @@ class RegisterTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Customer\Model\Session */ private $_customerSession; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Module\Manager */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Module\Manager */ private $_moduleManager; /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Customer\Helper\Data */ @@ -64,7 +64,7 @@ class RegisterTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->_scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $this->_moduleManager = $this->getMock('Magento\Module\Manager', array(), array(), '', false); + $this->_moduleManager = $this->getMock('Magento\Framework\Module\Manager', array(), array(), '', false); $this->_coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); $this->_customerHelper = $this->getMock('Magento\Customer\Helper\Data', array(), array(), '', false); $this->_customerSession = $this->getMock( @@ -75,13 +75,13 @@ public function setUp() false ); - $context = $this->getMock('Magento\View\Element\Template\Context', array(), array(), '', false); + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', array(), array(), '', false); $context->expects($this->any())->method('getScopeConfig')->will($this->returnValue($this->_scopeConfig)); $this->_block = new Register( $context, $this->_coreData, - $this->getMockForAbstractClass('Magento\Json\EncoderInterface', array(), '', false), + $this->getMockForAbstractClass('Magento\Framework\Json\EncoderInterface', array(), '', false), $this->getMock('Magento\Framework\App\Cache\Type\Config', array(), array(), '', false), $this->getMock('Magento\Directory\Model\Resource\Region\CollectionFactory', array(), array(), '', false), $this->getMock('Magento\Directory\Model\Resource\Country\CollectionFactory', array(), array(), '', false), @@ -155,18 +155,18 @@ public function testGetBackUrlNotNullData() */ public function testGetFormDataNotNullFormData() { - $data = new \Magento\Object(); + $data = new \Magento\Framework\Object(); $this->_block->setData(self::FORM_DATA, $data); $this->assertSame($data, $this->_block->getFormData()); } /** * Form data has not been set on the block and there is no customer data in the customer session. So - * we expect an empty \Magento\Object. + * we expect an empty \Magento\Framework\Object. */ public function testGetFormDataNullFormData() { - $data = new \Magento\Object(); + $data = new \Magento\Framework\Object(); $this->_customerSession->expects($this->once())->method('getCustomerFormData')->will($this->returnValue(null)); $this->assertEquals($data, $this->_block->getFormData()); $this->assertEquals($data, $this->_block->getData(self::FORM_DATA)); @@ -178,7 +178,7 @@ public function testGetFormDataNullFormData() */ public function testGetFormDataNullFormDataCustomerFormData() { - $data = new \Magento\Object(); + $data = new \Magento\Framework\Object(); $data->setFirstname('John'); $data->setCustomerData(1); $customerFormData = array('firstname' => 'John'); @@ -199,7 +199,7 @@ public function testGetFormDataNullFormDataCustomerFormData() */ public function testGetFormDataCustomerFormDataRegionId() { - $data = new \Magento\Object(); + $data = new \Magento\Framework\Object(); $data->setRegionId(self::REGION_ID_ATTRIBUTE_VALUE); $data->setCustomerData(1); $data[self::REGION_ID_ATTRIBUTE_CODE] = (int)self::REGION_ID_ATTRIBUTE_VALUE; @@ -223,7 +223,7 @@ public function testGetFormDataCustomerFormDataRegionId() */ public function testGetCountryIdFormData() { - $formData = new \Magento\Object(); + $formData = new \Magento\Framework\Object(); $formData->setCountryId(self::COUNTRY_ID); $this->_block->setData(self::FORM_DATA, $formData); $this->assertEquals(self::COUNTRY_ID, $this->_block->getCountryId()); @@ -261,7 +261,7 @@ public function testGetCountryIdParentNotNullData() */ public function testGetRegionByRegion() { - $formData = new \Magento\Object(); + $formData = new \Magento\Framework\Object(); $formData->setRegion(self::REGION_ATTRIBUTE_VALUE); $this->_block->setData(self::FORM_DATA, $formData); $this->assertSame(self::REGION_ATTRIBUTE_VALUE, $this->_block->getRegion()); @@ -273,7 +273,7 @@ public function testGetRegionByRegion() */ public function testGetRegionByRegionId() { - $formData = new \Magento\Object(); + $formData = new \Magento\Framework\Object(); $formData->setRegionId(self::REGION_ID_ATTRIBUTE_VALUE); $this->_block->setData(self::FORM_DATA, $formData); $this->assertSame(self::REGION_ID_ATTRIBUTE_VALUE, $this->_block->getRegion()); @@ -285,7 +285,7 @@ public function testGetRegionByRegionId() */ public function testGetRegionNull() { - $formData = new \Magento\Object(); + $formData = new \Magento\Framework\Object(); $this->_block->setData(self::FORM_DATA, $formData); $this->assertNull($this->_block->getRegion()); } @@ -324,7 +324,7 @@ public function isNewsletterEnabledProvider() */ public function testRestoreSessionData() { - $data = new \Magento\Object(); + $data = new \Magento\Framework\Object(); $data->setRegionId(self::REGION_ID_ATTRIBUTE_VALUE); $data->setCustomerData(1); $data[self::REGION_ID_ATTRIBUTE_CODE] = (int)self::REGION_ID_ATTRIBUTE_VALUE; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/AbstractWidgetTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/AbstractWidgetTest.php index bb80a58278ebe..1a5f3a97e546a 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/AbstractWidgetTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/AbstractWidgetTest.php @@ -45,7 +45,7 @@ public function setUp() $this->_addressHelper = $this->getMock('Magento\Customer\Helper\Address', array(), array(), '', false); $this->_block = new AbstractWidget( - $this->getMock('Magento\View\Element\Template\Context', array(), array(), '', false), + $this->getMock('Magento\Framework\View\Element\Template\Context', array(), array(), '', false), $this->_addressHelper, $this->getMockForAbstractClass( 'Magento\Customer\Service\V1\CustomerMetadataServiceInterface', diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php index d6362b395d577..1e6ad5fbd71fa 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/DobTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Block\Widget; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; class DobTest extends \PHPUnit_Framework_TestCase { @@ -69,24 +69,29 @@ public function setUp() $zendCacheCore = new \Zend_Cache_Core(); $zendCacheCore->setBackend(new \Zend_Cache_Backend_BlackHole()); - $frontendCache = $this->getMockForAbstractClass('Magento\Cache\FrontendInterface', array(), '', false); + $frontendCache = $this->getMockForAbstractClass( + 'Magento\Framework\Cache\FrontendInterface', + array(), + '', + false + ); $frontendCache->expects($this->any())->method('getLowLevelFrontend')->will($this->returnValue($zendCacheCore)); $cache = $this->getMock('Magento\Framework\App\CacheInterface'); $cache->expects($this->any())->method('getFrontend')->will($this->returnValue($frontendCache)); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $locale = $objectManager->getObject( - '\Magento\Locale', - array('locale' => \Magento\Locale\ResolverInterface::DEFAULT_LOCALE) + '\Magento\Framework\Locale', + array('locale' => \Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE) ); - $localeResolver = $this->getMock('\Magento\Locale\ResolverInterface'); + $localeResolver = $this->getMock('\Magento\Framework\Locale\ResolverInterface'); $localeResolver->expects($this->any())->method('getLocale')->will($this->returnValue($locale)); $timezone = $objectManager->getObject( - '\Magento\Stdlib\DateTime\Timezone', + '\Magento\Framework\Stdlib\DateTime\Timezone', array('localeResolver' => $localeResolver) ); - $context = $this->getMock('Magento\View\Element\Template\Context', array(), array(), '', false); + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', array(), array(), '', false); $context->expects($this->any())->method('getLocaleDate')->will($this->returnValue($timezone)); $this->_attribute = $this->getMock( @@ -105,10 +110,10 @@ public function setUp() $this->_metadataService->expects( $this->any() )->method( - 'getCustomerAttributeMetadata' - )->will( - $this->returnValue($this->_attribute) - ); + 'getCustomerAttributeMetadata' + )->will( + $this->returnValue($this->_attribute) + ); date_default_timezone_set('America/Los_Angeles'); @@ -144,10 +149,14 @@ public function testIsEnabledWithException() $this->_metadataService->expects( $this->any() )->method( - 'getAttributeMetadata' - )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) - ); + 'getAttributeMetadata' + )->will( + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) + ); $this->assertSame(false, $this->_block->isEnabled()); } @@ -168,10 +177,14 @@ public function testIsRequiredWithException() $this->_metadataService->expects( $this->any() )->method( - 'getAttributeMetadata' - )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) - ); + 'getAttributeMetadata' + )->will( + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) + ); $this->assertSame(false, $this->_block->isRequired()); } @@ -266,7 +279,8 @@ public function getYearDataProvider() } /** - * The \Magento\Locale\ResolverInterface::DEFAULT_LOCALE is used to derive the Locale that is used to determine the + * The \Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE + * is used to derive the Locale that is used to determine the * value of Dob::getDateFormat() for that Locale. */ public function testGetDateFormat() @@ -314,10 +328,10 @@ public function testGetMinDateRange($validationRules, $expectedValue) $this->_attribute->expects( $this->once() )->method( - 'getValidationRules' - )->will( - $this->returnValue($validationRules) - ); + 'getValidationRules' + )->will( + $this->returnValue($validationRules) + ); $this->assertEquals($expectedValue, $this->_block->getMinDateRange()); } @@ -340,10 +354,14 @@ public function testGetMinDateRangeWithException() $this->_metadataService->expects( $this->any() )->method( - 'getAttributeMetadata' - )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) - ); + 'getAttributeMetadata' + )->will( + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) + ); $this->assertNull($this->_block->getMinDateRange()); } @@ -358,10 +376,10 @@ public function testGetMaxDateRange($validationRules, $expectedValue) $this->_attribute->expects( $this->once() )->method( - 'getValidationRules' - )->will( - $this->returnValue($validationRules) - ); + 'getValidationRules' + )->will( + $this->returnValue($validationRules) + ); $this->assertEquals($expectedValue, $this->_block->getMaxDateRange()); } @@ -384,10 +402,14 @@ public function testGetMaxDateRangeWithException() $this->_metadataService->expects( $this->any() )->method( - 'getAttributeMetadata' - )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) - ); + 'getAttributeMetadata' + )->will( + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) + ); $this->assertNull($this->_block->getMaxDateRange()); } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php index 814884e4ac798..8c3e22c239356 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/GenderTest.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Block\Widget; use Magento\Customer\Service\V1\Data\Customer; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; class GenderTest extends \PHPUnit_Framework_TestCase { @@ -54,8 +54,8 @@ public function setUp() { $this->_attribute = $this->getMock( 'Magento\Customer\Service\V1\Data\Eav\AttributeMetadata', - array(), - array(), + [], + [], '', false ); @@ -76,11 +76,11 @@ public function setUp() $this->_customerAccountService = $this->getMockBuilder( 'Magento\Customer\Service\V1\CustomerAccountServiceInterface' )->getMockForAbstractClass(); - $this->_customerSession = $this->getMock('Magento\Customer\Model\Session', array(), array(), '', false); + $this->_customerSession = $this->getMock('Magento\Customer\Model\Session', [], [], '', false); $this->_block = new Gender( - $this->getMock('Magento\View\Element\Template\Context', array(), array(), '', false), - $this->getMock('Magento\Customer\Helper\Address', array(), array(), '', false), + $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false), + $this->getMock('Magento\Customer\Helper\Address', [], [], '', false), $this->_attributeMetadata, $this->_customerAccountService, $this->_customerSession @@ -108,7 +108,7 @@ public function testIsEnabled($isVisible, $expectedValue) */ public function isEnabledDataProvider() { - return array(array(true, true), array(false, false)); + return [[true, true], [false, false]]; } public function testIsEnabledWithException() @@ -118,7 +118,11 @@ public function testIsEnabledWithException() )->method( 'getAttributeMetadata' )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) ); $this->assertSame(false, $this->_block->isEnabled()); } @@ -144,7 +148,7 @@ public function testIsRequired($isRequired, $expectedValue) */ public function isRequiredDataProvider() { - return array(array(true, true), array(false, false)); + return [[true, true], [false, false]]; } public function testIsRequiredWithException() @@ -154,7 +158,11 @@ public function testIsRequiredWithException() )->method( 'getAttributeMetadata' )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) ); $this->assertSame(false, $this->_block->isRequired()); } @@ -194,7 +202,7 @@ public function testGetCustomer() */ public function testGetGenderOptions() { - $options = array(array('label' => __('Male'), 'value' => 'M'), array('label' => __('Female'), 'value' => 'F')); + $options = [['label' => __('Male'), 'value' => 'M'], ['label' => __('Female'), 'value' => 'F']]; $this->_attribute->expects($this->once())->method('getOptions')->will($this->returnValue($options)); $this->assertSame($options, $this->_block->getGenderOptions()); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php index cbf0dc0f94bbd..9d540707bd9c9 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/NameTest.php @@ -25,9 +25,10 @@ use Magento\Customer\Service\V1\Data\Customer; use Magento\Customer\Service\V1\Data\CustomerBuilder; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\Eav\AttributeMetadata; use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; +use Magento\Framework\Service\Data\Eav\AttributeValueBuilder; /** * Test class for \Magento\Customer\Block\Widget\Name. @@ -69,7 +70,7 @@ class NameTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Customer\Helper\Data */ private $_customerHelper; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Escaper */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Escaper */ private $_escaper; /** @var Name */ @@ -78,13 +79,19 @@ class NameTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | CustomerMetadataServiceInterface */ private $_metadataService; + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $_objectManager; + public function setUp() { - $this->_escaper = $this->getMock('Magento\Escaper', array(), array(), '', false); - $context = $this->getMock('Magento\View\Element\Template\Context', array(), array(), '', false); + $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_escaper = $this->getMock('Magento\Framework\Escaper', [], [], '', false); + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); $context->expects($this->any())->method('getEscaper')->will($this->returnValue($this->_escaper)); - $addressHelper = $this->getMock('Magento\Customer\Helper\Address', array(), array(), '', false); + $addressHelper = $this->getMock('Magento\Customer\Helper\Address', [], [], '', false); $this->_metadataService = $this->getMockBuilder( 'Magento\Customer\Service\V1\CustomerMetadataService' @@ -94,14 +101,14 @@ public function setUp() )->method( 'getCustomCustomerAttributeMetadata' )->will( - $this->returnValue(array()) + $this->returnValue([]) ); - $this->_customerHelper = $this->getMock('Magento\Customer\Helper\Data', array(), array(), '', false); + $this->_customerHelper = $this->getMock('Magento\Customer\Helper\Data', [], [], '', false); $this->_attributeMetadata = $this->getMock( 'Magento\Customer\Service\V1\Data\Eav\AttributeMetadata', - array(), - array(), + [], + [], '', false ); @@ -129,7 +136,7 @@ public function setUp() */ public function testShowPrefix() { - $this->_setUpShowAttribute(array(Customer::PREFIX => self::PREFIX)); + $this->_setUpShowAttribute([Customer::PREFIX => self::PREFIX]); $this->assertTrue($this->_block->showPrefix()); $this->_attributeMetadata->expects($this->at(0))->method('isVisible')->will($this->returnValue(false)); @@ -143,7 +150,11 @@ public function testShowPrefixWithException() )->method( 'getAttributeMetadata' )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) ); $this->assertFalse($this->_block->showPrefix()); } @@ -159,21 +170,25 @@ public function testMethodWithNoSuchEntityException($method) )->method( 'getAttributeMetadata' )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) ); $this->assertFalse($this->_block->{$method}()); } public function methodDataProvider() { - return array( - 'showPrefix' => array('showPrefix'), - 'isPrefixRequired' => array('isPrefixRequired'), - 'showMiddlename' => array('showMiddlename'), - 'isMiddlenameRequired' => array('isMiddlenameRequired'), - 'showSuffix' => array('showSuffix'), - 'isSuffixRequired' => array('isSuffixRequired') - ); + return [ + 'showPrefix' => ['showPrefix'], + 'isPrefixRequired' => ['isPrefixRequired'], + 'showMiddlename' => ['showMiddlename'], + 'isMiddlenameRequired' => ['isMiddlenameRequired'], + 'showSuffix' => ['showSuffix'], + 'isSuffixRequired' => ['isSuffixRequired'] + ]; } /** @@ -187,7 +202,7 @@ public function testIsPrefixRequired() public function testShowMiddlename() { - $this->_setUpShowAttribute(array(Customer::MIDDLENAME, self::MIDDLENAME)); + $this->_setUpShowAttribute(array(Customer::MIDDLENAME => self::MIDDLENAME)); $this->assertTrue($this->_block->showMiddlename()); } @@ -199,7 +214,7 @@ public function testIsMiddlenameRequired() public function testShowSuffix() { - $this->_setUpShowAttribute(array(Customer::SUFFIX => self::SUFFIX)); + $this->_setUpShowAttribute([Customer::SUFFIX => self::SUFFIX]); $this->assertTrue($this->_block->showSuffix()); } @@ -215,11 +230,12 @@ public function testGetPrefixOptionsNotEmpty() * Added some padding so that the trim() call on Customer::getPrefix() will remove it. Also added * special characters so that the escapeHtml() method returns a htmlspecialchars translated value. */ - $customer = (new CustomerBuilder($this->_metadataService))->setPrefix(' <' . self::PREFIX . '> ')->create(); + $customer = $this->_objectManager->getObject('Magento\Customer\Service\V1\Data\CustomerBuilder') + ->setPrefix(' <' . self::PREFIX . '> ')->create(); $this->_block->setObject($customer); - $prefixOptions = array('Mrs' => 'Mrs', 'Ms' => 'Ms', 'Miss' => 'Miss'); + $prefixOptions = ['Mrs' => 'Mrs', 'Ms' => 'Ms', 'Miss' => 'Miss']; $prefix = '<' . self::PREFIX . '>'; $expectedOptions = $prefixOptions; @@ -239,7 +255,8 @@ public function testGetPrefixOptionsNotEmpty() public function testGetPrefixOptionsEmpty() { - $customer = (new CustomerBuilder($this->_metadataService))->setPrefix(self::PREFIX)->create(); + $customer = $this->_objectManager->getObject('Magento\Customer\Service\V1\Data\CustomerBuilder') + ->setPrefix(self::PREFIX)->create(); $this->_block->setObject($customer); $this->_customerHelper->expects( @@ -247,7 +264,7 @@ public function testGetPrefixOptionsEmpty() )->method( 'getNamePrefixOptions' )->will( - $this->returnValue(array()) + $this->returnValue([]) ); $this->assertEmpty($this->_block->getPrefixOptions()); @@ -259,10 +276,11 @@ public function testGetSuffixOptionsNotEmpty() * Added padding and special characters to show that trim() works on Customer::getSuffix() and that * a properly htmlspecialchars translated value is returned. */ - $customer = (new CustomerBuilder($this->_metadataService))->setSuffix(' <' . self::SUFFIX . '> ')->create(); + $customer = $this->_objectManager->getObject('Magento\Customer\Service\V1\Data\CustomerBuilder') + ->setSuffix(' <' . self::SUFFIX . '> ')->create(); $this->_block->setObject($customer); - $suffixOptions = array('Sr' => 'Sr'); + $suffixOptions = ['Sr' => 'Sr']; $suffix = '<' . self::SUFFIX . '>'; $expectedOptions = $suffixOptions; @@ -282,7 +300,8 @@ public function testGetSuffixOptionsNotEmpty() public function testGetSuffixOptionsEmpty() { - $customer = (new CustomerBuilder($this->_metadataService))->setSuffix(' <' . self::SUFFIX . '> ')->create(); + $customer = $this->_objectManager->getObject('Magento\Customer\Service\V1\Data\CustomerBuilder') + ->setSuffix(' <' . self::SUFFIX . '> ')->create(); $this->_block->setObject($customer); $this->_customerHelper->expects( @@ -290,7 +309,7 @@ public function testGetSuffixOptionsEmpty() )->method( 'getNameSuffixOptions' )->will( - $this->returnValue(array()) + $this->returnValue([]) ); $this->assertEmpty($this->_block->getSuffixOptions()); @@ -349,12 +368,12 @@ public function testGetContainerClassName($isPrefixVisible, $isMiddlenameVisible */ public function getContainerClassNameProvider() { - return array( - array(false, false, false, self::DEFAULT_CLASS_NAME), - array(true, false, false, self::DEFAULT_CLASS_NAME . self::CONTAINER_CLASS_NAME_PREFIX), - array(false, true, false, self::DEFAULT_CLASS_NAME . self::CONTAINER_CLASS_NAME_MIDDLENAME), - array(false, false, true, self::DEFAULT_CLASS_NAME . self::CONTAINER_CLASS_NAME_SUFFIX), - array( + return [ + [false, false, false, self::DEFAULT_CLASS_NAME], + [true, false, false, self::DEFAULT_CLASS_NAME . self::CONTAINER_CLASS_NAME_PREFIX], + [false, true, false, self::DEFAULT_CLASS_NAME . self::CONTAINER_CLASS_NAME_MIDDLENAME], + [false, false, true, self::DEFAULT_CLASS_NAME . self::CONTAINER_CLASS_NAME_SUFFIX], + [ true, true, true, @@ -362,8 +381,8 @@ public function getContainerClassNameProvider() self::CONTAINER_CLASS_NAME_PREFIX . self::CONTAINER_CLASS_NAME_MIDDLENAME . self::CONTAINER_CLASS_NAME_SUFFIX - ) - ); + ] + ]; } /** @@ -394,10 +413,10 @@ public function testGetStoreLabel($attributeCode, $storeLabel, $expectedValue) */ public function getStoreLabelProvider() { - return array( - array(self::INVALID_ATTRIBUTE_CODE, '', ''), - array(self::PREFIX_ATTRIBUTE_CODE, self::PREFIX_STORE_LABEL, self::PREFIX_STORE_LABEL) - ); + return [ + [self::INVALID_ATTRIBUTE_CODE, '', ''], + [self::PREFIX_ATTRIBUTE_CODE, self::PREFIX_STORE_LABEL, self::PREFIX_STORE_LABEL] + ]; } public function testGetStoreLabelWithException() @@ -407,7 +426,11 @@ public function testGetStoreLabelWithException() )->method( 'getAttributeMetadata' )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) ); $this->assertSame('', $this->_block->getStoreLabel('attributeCode')); } @@ -419,7 +442,8 @@ public function testGetStoreLabelWithException() */ private function _setUpShowAttribute(array $data) { - $customer = (new CustomerBuilder($this->_metadataService))->populateWithArray($data)->create(); + $customer = $this->_objectManager->getObject('Magento\Customer\Service\V1\Data\CustomerBuilder') + ->populateWithArray($data)->create(); /** * These settings cause the first code path in Name::_getAttribute() to be executed, which diff --git a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php index 5abbba36218f2..256a9eff15253 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Block/Widget/TaxvatTest.php @@ -23,7 +23,7 @@ */ namespace Magento\Customer\Block\Widget; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; class TaxvatTest extends \PHPUnit_Framework_TestCase { @@ -47,15 +47,15 @@ public function setUp() { $this->_attribute = $this->getMock( 'Magento\Customer\Service\V1\Data\Eav\AttributeMetadata', - array(), - array(), + [], + [], '', false ); $this->_attributeMetadata = $this->getMockForAbstractClass( 'Magento\Customer\Service\V1\CustomerMetadataServiceInterface', - array(), + [], '', false ); @@ -70,8 +70,8 @@ public function setUp() ); $this->_block = new Taxvat( - $this->getMock('Magento\View\Element\Template\Context', array(), array(), '', false), - $this->getMock('Magento\Customer\Helper\Address', array(), array(), '', false), + $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false), + $this->getMock('Magento\Customer\Helper\Address', [], [], '', false), $this->_attributeMetadata ); } @@ -94,7 +94,7 @@ public function testIsEnabled($isVisible, $expectedValue) */ public function isEnabledDataProvider() { - return array(array(true, true), array(false, false)); + return [[true, true], [false, false]]; } public function testIsEnabledWithException() @@ -104,7 +104,11 @@ public function testIsEnabledWithException() )->method( 'getAttributeMetadata' )->will( - $this->throwException(new \Magento\Exception\NoSuchEntityException('field', 'value')) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) ); $this->assertSame(false, $this->_block->isEnabled()); } @@ -127,7 +131,7 @@ public function testIsRequired($isRequired, $expectedValue) */ public function isRequiredDataProvider() { - return array(array(true, true), array(false, false)); + return [[true, true], [false, false]]; } public function testIsRequiredWithException() @@ -137,7 +141,11 @@ public function testIsRequiredWithException() )->method( 'getAttributeMetadata' )->will( - $this->throwException(new NoSuchEntityException('field', 'value')) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'field', 'fieldValue' => 'value'] + ) + ) ); $this->assertSame(false, $this->_block->isRequired()); } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/AccountTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/AccountTest.php index b8cbaaac9f5cd..cf6cd068720f0 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/AccountTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/AccountTest.php @@ -53,12 +53,12 @@ class AccountTest extends \PHPUnit_Framework_TestCase protected $customerSession; /** - * @var \Magento\UrlInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\UrlInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $url; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManager; @@ -110,9 +110,9 @@ protected function setUp() '', false ); - $this->url = $this->getMockForAbstractClass('\Magento\UrlInterface'); + $this->url = $this->getMockForAbstractClass('\Magento\Framework\UrlInterface'); $this->objectManager = $this->getMock( - '\Magento\ObjectManager\ObjectManager', + '\Magento\Framework\ObjectManager\ObjectManager', array('get'), array(), '', @@ -165,10 +165,10 @@ public function testLoginPostActionWhenRefererSetBeforeAuthUrl() )->will( $this->returnValueMap( array( - array('Magento\Customer\Helper\Data', new \Magento\Object(array('account_url' => 1))), + array('Magento\Customer\Helper\Data', new \Magento\Framework\Object(array('account_url' => 1))), array( 'Magento\Framework\App\Config\ScopeConfigInterface', - new \Magento\Object(array('config_flag' => 1)) + new \Magento\Framework\Object(array('config_flag' => 1)) ), array( 'Magento\Core\Helper\Data', diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php index 2de86d58b6114..facfa470d03b6 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Controller\Adminhtml; use Magento\Customer\Service\V1\CustomerAccountServiceInterface; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\Customer; /** @@ -80,7 +80,7 @@ class IndexTest extends \PHPUnit_Framework_TestCase protected $_helper; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Message\ManagerInterface + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Message\ManagerInterface */ protected $messageManager; @@ -139,7 +139,7 @@ protected function setUp() )->getMock(); $this->messageManager = $this->getMockBuilder( - 'Magento\Message\Manager' + 'Magento\Framework\Message\Manager' )->disableOriginalConstructor()->setMethods( array('addSuccess', 'addMessage', 'addException') )->getMock(); @@ -255,7 +255,11 @@ public function testResetPasswordActionInvalidCustomerId() )->with( $customerId )->will( - $this->throwException(new NoSuchEntityException('customerId', $customerId)) + $this->throwException(new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'customerId', 'fieldValue' => $customerId] + ) + ) ); $this->_helper->expects( @@ -289,8 +293,8 @@ public function testResetPasswordActionCoreException() ); // Setup a core exception to return - $exception = new \Magento\Model\Exception(); - $error = new \Magento\Message\Error('Something Bad happened'); + $exception = new \Magento\Framework\Model\Exception(); + $error = new \Magento\Framework\Message\Error('Something Bad happened'); $exception->addMessage($error); $this->_acctServiceMock->expects( @@ -326,8 +330,8 @@ public function testResetPasswordActionCoreExceptionWarn() ); // Setup a core exception to return - $exception = new \Magento\Model\Exception($warningText); - $error = new \Magento\Message\Warning('Something Not So Bad happened'); + $exception = new \Magento\Framework\Model\Exception($warningText); + $error = new \Magento\Framework\Message\Warning('Something Not So Bad happened'); $exception->addMessage($error); $this->_acctServiceMock->expects( @@ -346,7 +350,7 @@ public function testResetPasswordActionCoreExceptionWarn() )->method( 'addMessage' )->with( - $this->equalTo(new \Magento\Message\Error($warningText)) + $this->equalTo(new \Magento\Framework\Message\Error($warningText)) ); $this->_testedObject->resetPasswordAction(); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Helper/AddressTest.php b/dev/tests/unit/testsuite/Magento/Customer/Helper/AddressTest.php index 8867cc8abc6e6..bd0a2419d3da4 100755 --- a/dev/tests/unit/testsuite/Magento/Customer/Helper/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Helper/AddressTest.php @@ -31,7 +31,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\App\Helper\Context */ protected $context; - /** @var \Magento\View\Element\BlockFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\View\Element\BlockFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $blockFactory; /** @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ @@ -52,7 +52,7 @@ protected function setUp() ->disableOriginalConstructor() ->getMock(); $this->blockFactory = $this->getMockBuilder( - 'Magento\View\Element\BlockFactory' + 'Magento\Framework\View\Element\BlockFactory' )->disableOriginalConstructor()->getMock(); $this->storeManager = $this->getMockBuilder( 'Magento\Store\Model\StoreManagerInterface' diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php index fc5ea1d3fa290..aa1e05682d4c2 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/ReaderTest.php @@ -31,7 +31,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Config\FileResolverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\FileResolverInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_fileResolverMock; @@ -46,13 +46,13 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_schemaLocator; /** - * @var \Magento\Config\ValidationStateInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\ValidationStateInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_validationState; protected function setUp() { - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $this->_fileResolverMock->expects( $this->once() )->method( @@ -71,7 +71,13 @@ protected function setUp() $this->_converter = $this->getMock('Magento\Customer\Model\Address\Config\Converter', array('convert')); - $moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $moduleReader = $this->getMock( + 'Magento\Framework\Module\Dir\Reader', + array('getModuleDir'), + array(), + '', + false + ); $moduleReader->expects( $this->once() @@ -85,7 +91,7 @@ protected function setUp() ); $this->_schemaLocator = new \Magento\Customer\Model\Address\Config\SchemaLocator($moduleReader); - $this->_validationState = $this->getMock('Magento\Config\ValidationStateInterface'); + $this->_validationState = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $this->_validationState->expects($this->once())->method('isValidated')->will($this->returnValue(false)); $this->_model = new \Magento\Customer\Model\Address\Config\Reader( diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php index 5c3689b4e8ef3..2c7d384d2683a 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/SchemaLocatorTest.php @@ -31,7 +31,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Module\Dir\Reader|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir\Reader|PHPUnit_Framework_MockObject_MockObject */ protected $_moduleReader; @@ -48,7 +48,13 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_xsdFile = $this->_xsdDir . '/address_formats.xsd'; - $this->_moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $this->_moduleReader = $this->getMock( + 'Magento\Framework\Module\Dir\Reader', + array('getModuleDir'), + array(), + '', + false + ); $this->_moduleReader->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/XsdTest.php index 5ccbc673dec4b..fa86b4a08bf5a 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/Config/XsdTest.php @@ -44,7 +44,7 @@ protected function setUp() */ public function testExemplarXml($fixtureXml, array $expectedErrors) { - $dom = new \Magento\Config\Dom($fixtureXml, array(), null, null, '%message%'); + $dom = new \Magento\Framework\Config\Dom($fixtureXml, array(), null, null, '%message%'); $actualResult = $dom->validate($this->_schemaFile, $actualErrors); $this->assertEquals(empty($expectedErrors), $actualResult); $this->assertEquals($expectedErrors, $actualErrors); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConfigTest.php index f6fdf8f23e5ab..22bae0f51d759 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Address/ConfigTest.php @@ -77,7 +77,7 @@ public function setUp() '', false ); - $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface'); + $this->_cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false); $this->_storeManagerMock->expects( $this->once() @@ -142,7 +142,7 @@ public function testGetFormats() $this->_scopeConfigMock->expects($this->any())->method('getValue')->will($this->returnValue('someValue')); - $rendererMock = $this->getMock('Magento\Object'); + $rendererMock = $this->getMock('Magento\Framework\Object'); $this->_addressHelperMock->expects( $this->any() @@ -152,7 +152,7 @@ public function testGetFormats() $this->returnValue($rendererMock) ); - $firstExpected = new \Magento\Object(); + $firstExpected = new \Magento\Framework\Object(); $firstExpected->setCode( 'format_one' )->setTitle( @@ -165,7 +165,7 @@ public function testGetFormats() null ); - $secondExpected = new \Magento\Object(); + $secondExpected = new \Magento\Framework\Object(); $secondExpected->setCode( 'format_two' )->setTitle( diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/AddressRegistryTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/AddressRegistryTest.php index 97751f7db2a39..12b824b05956c 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/AddressRegistryTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/AddressRegistryTest.php @@ -70,7 +70,7 @@ public function testRetrieve() } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRetrieveException() { diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Backend/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Backend/CustomerTest.php index 7cd89a352b555..fcca6000b5d02 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Backend/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Backend/CustomerTest.php @@ -61,7 +61,7 @@ public function testGetStoreId($websiteId, $websiteStoreId, $storeId, $result) { if ($websiteId * 1) { $this->_model->setWebsiteId($websiteId); - $website = new \Magento\Object(array('store_ids' => array($websiteStoreId))); + $website = new \Magento\Framework\Object(array('store_ids' => array($websiteStoreId))); $this->_storeManager->expects($this->once())->method('getWebsite')->will($this->returnValue($website)); } else { $this->_model->setStoreId($storeId); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/Group/MultiselectTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/Group/MultiselectTest.php index 204ddfa76e86e..04194ed5e4300 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/Group/MultiselectTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/Group/MultiselectTest.php @@ -44,7 +44,7 @@ class MultiselectTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->groupServiceMock = $this->getMock('\Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $this->converterMock = $this->getMock('\Magento\Convert\Object', array(), array(), '', false); + $this->converterMock = $this->getMock('\Magento\Framework\Convert\Object', array(), array(), '', false); $this->model = new \Magento\Customer\Model\Config\Source\Group\Multiselect($this->groupServiceMock, $this->converterMock); } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/GroupTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/GroupTest.php index 8a774da617937..4df9153739a7e 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/GroupTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Config/Source/GroupTest.php @@ -44,7 +44,7 @@ class GroupTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->groupServiceMock = $this->getMock('\Magento\Customer\Service\V1\CustomerGroupServiceInterface'); - $this->converterMock = $this->getMock('\Magento\Convert\Object', array(), array(), '', false); + $this->converterMock = $this->getMock('\Magento\Framework\Convert\Object', array(), array(), '', false); $this->model = new \Magento\Customer\Model\Config\Source\Group($this->groupServiceMock, $this->converterMock); } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php index 83b20a0648837..e4ffd74f61d3f 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ConverterTest.php @@ -28,6 +28,7 @@ use Magento\Customer\Service\V1\Data\Eav\AttributeMetadata; use Magento\Customer\Service\V1\Data\CustomerBuilder; use Magento\Customer\Service\V1\CustomerMetadataServiceInterface; +use Magento\Framework\Service\Data\Eav\AttributeValueBuilder; class ConverterTest extends \PHPUnit_Framework_TestCase { @@ -37,8 +38,15 @@ class ConverterTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | CustomerMetadataServiceInterface */ private $_metadataService; + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $_objectManager; + public function setUp() { + $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); + $this->_metadataService = $this->getMockForAbstractClass( 'Magento\Customer\Service\V1\CustomerMetadataServiceInterface', array(), @@ -125,7 +133,11 @@ public function testCreateCustomerFromModel() ); $customerModelMock->expects($this->any())->method('getData')->will($this->returnValueMap($map)); - $customerBuilder = new CustomerBuilder($this->_metadataService); + $customerBuilder = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + ['metadataService' => $this->_metadataService] + ); + $customerFactory = $this->getMockBuilder( 'Magento\Customer\Model\CustomerFactory' )->disableOriginalConstructor()->getMock(); @@ -133,7 +145,11 @@ public function testCreateCustomerFromModel() $converter = new Converter($customerBuilder, $customerFactory); $customerDataObject = $converter->createCustomerFromModel($customerModelMock); - $customerBuilder = new CustomerBuilder($this->_metadataService); + $customerBuilder = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + ['metadataService' => $this->_metadataService] + ); + $customerData = array( 'firstname' => 'Tess', 'email' => 'ttester@example.com', diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerRegistryTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerRegistryTest.php index af098a7f1913f..7d1e763cf6d7d 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerRegistryTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerRegistryTest.php @@ -24,6 +24,8 @@ namespace Magento\Customer\Model; +use Magento\TestFramework\Helper\ObjectManager; + /** * Test for CustomerRegistry * @@ -55,12 +57,16 @@ class CustomerRegistryTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->customerFactory = $this->getMockBuilder('\Magento\Customer\Model\CustomerFactory') - ->disableOriginalConstructor() + $this->customerFactory = $this->getMockBuilder('Magento\Customer\Model\CustomerFactory') ->setMethods(['create']) + ->disableOriginalConstructor() ->getMock(); - $this->customerRegistry = new CustomerRegistry($this->customerFactory); - $this->customer = $this->getMockBuilder('\Magento\Customer\Model\Customer') + $objectManager = new ObjectManager($this); + $this->customerRegistry = $objectManager->getObject( + 'Magento\Customer\Model\CustomerRegistry', + ['customerFactory' => $this->customerFactory] + ); + $this->customer = $this->getMockBuilder('Magento\Customer\Model\Customer') ->disableOriginalConstructor() ->setMethods( [ @@ -126,7 +132,7 @@ public function testRetrieveByEmail() } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRetrieveException() { @@ -144,7 +150,7 @@ public function testRetrieveException() } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRetrieveByEmailException() { @@ -219,4 +225,4 @@ public function testRemoveByEmail() $actual = $this->customerRegistry->retrieveByEmail(self::CUSTOMER_EMAIL, self::WEBSITE_ID); $this->assertEquals($this->customer, $actual); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php index 3ac0237a569ee..8699ebf1913ab 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/CustomerTest.php @@ -49,13 +49,13 @@ class CustomerTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_scopeConfigMock; - /** @var \Magento\Mail\Template\TransportBuilder|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Mail\Template\TransportBuilder|\PHPUnit_Framework_MockObject_MockObject */ protected $_transportBuilderMock; - /** @var \Magento\Mail\TransportInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Mail\TransportInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_transportMock; - /** @var \Magento\Encryption\EncryptorInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Encryption\EncryptorInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_encryptor; protected function setUp() @@ -67,14 +67,20 @@ protected function setUp() $this->_storetMock = $this->getMock('\Magento\Store\Model\Store', array(), array(), '', false); $this->_scopeConfigMock = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface'); $this->_transportBuilderMock = $this->getMock( - '\Magento\Mail\Template\TransportBuilder', + '\Magento\Framework\Mail\Template\TransportBuilder', array(), array(), '', false ); - $this->_transportMock = $this->getMock('Magento\Mail\TransportInterface', array(), array(), '', false); - $this->_encryptor = $this->getMock('Magento\Encryption\EncryptorInterface'); + $this->_transportMock = $this->getMock( + 'Magento\Framework\Mail\TransportInterface', + array(), + array(), + '', + false + ); + $this->_encryptor = $this->getMock('Magento\Framework\Encryption\EncryptorInterface'); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_model = $helper->getObject( 'Magento\Customer\Model\Customer', diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/GroupRegistryTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/GroupRegistryTest.php index aa5cb81ad543f..77c25de53e697 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/GroupRegistryTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/GroupRegistryTest.php @@ -79,7 +79,7 @@ public function testRetrieve() * Tests that attempting to retrieve a non-existing entity will result in an exception. * * @return void - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testRetrieveException() { diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Export/AddressTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Export/AddressTest.php index 3040d0e6c4047..1d67e00218ce7 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Export/AddressTest.php @@ -18,13 +18,10 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ImportExport\Model\Export\Entity\Eav\Customer; +namespace Magento\Customer\Model\ImportExport\Export; class AddressTest extends \PHPUnit_Framework_TestCase { @@ -79,7 +76,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase /** * Customer address export model * - * @var \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address + * @var Address */ protected $_model; @@ -96,7 +93,7 @@ protected function setUp() ); $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_model = new \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address( + $this->_model = new \Magento\Customer\Model\ImportExport\Export\Address( $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'), $storeManager, $this->getMock('Magento\ImportExport\Model\Export\Factory', array(), array(), '', false), @@ -107,11 +104,11 @@ protected function setUp() '', false ), - $this->getMock('Magento\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false), + $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false), $this->getMock('Magento\Customer\Model\Resource\Customer\CollectionFactory', array(), array(), '', false), $this->getMock( - 'Magento\ImportExport\Model\Export\Entity\Eav\CustomerFactory', + 'Magento\Customer\Model\ImportExport\Export\CustomerFactory', array(), array(), '', @@ -139,9 +136,9 @@ protected function _getModelDependencies() $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false); - /** @var $attributeCollection \Magento\Data\Collection|PHPUnit_Framework_TestCase */ + /** @var $attributeCollection \Magento\Framework\Data\Collection|PHPUnit_Framework_TestCase */ $attributeCollection = $this->getMock( - 'Magento\Data\Collection', + 'Magento\Framework\Data\Collection', array('getEntityTypeCode'), array($entityFactory) ); @@ -180,7 +177,7 @@ protected function _getModelDependencies() ); $customerCollection = $this->getMock( - 'Magento\Data\Collection\Db', + 'Magento\Framework\Data\Collection\Db', array('addAttributeToSelect'), array(), '', @@ -222,7 +219,7 @@ public function getWebsites($withDefault = false) continue; } $websiteData = array('id' => $id, 'code' => $code); - $websites[$id] = new \Magento\Object($websiteData); + $websites[$id] = new \Magento\Framework\Object($websiteData); } return $websites; @@ -233,11 +230,11 @@ public function getWebsites($withDefault = false) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) * - * @param \Magento\Data\Collection\Db $collection + * @param \Magento\Framework\Data\Collection\Db $collection * @param int $pageSize * @param array $callbacks */ - public function iterate(\Magento\Data\Collection\Db $collection, $pageSize, array $callbacks) + public function iterate(\Magento\Framework\Data\Collection\Db $collection, $pageSize, array $callbacks) { $resource = $this->getMock( 'Magento\Customer\Model\Resource\Customer', @@ -267,7 +264,7 @@ public function iterate(\Magento\Data\Collection\Db $collection, $pageSize, arra /** * Test for method exportItem() * - * @covers \Magento\ImportExport\Model\Export\Entity\Eav\Customer::exportItem + * @covers \Magento\Customer\Model\ImportExport\Export\Address::exportItem */ public function testExportItem() { @@ -292,9 +289,9 @@ public function testExportItem() $this->_model->setWriter($writer); $this->_model->setParameters(array()); - $arguments = $this->_objectManager->getConstructArguments('Magento\Model\AbstractModel'); + $arguments = $this->_objectManager->getConstructArguments('Magento\Framework\Model\AbstractModel'); $arguments['data'] = $this->_addressData; - $item = $this->getMockForAbstractClass('Magento\Model\AbstractModel', $arguments); + $item = $this->getMockForAbstractClass('Magento\Framework\Model\AbstractModel', $arguments); $this->_model->exportItem($item); } @@ -305,19 +302,19 @@ public function testExportItem() */ public function validateWriteRow(array $row) { - $billingColumn = \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address::COLUMN_NAME_DEFAULT_BILLING; + $billingColumn = \Magento\Customer\Model\ImportExport\Export\Address::COLUMN_NAME_DEFAULT_BILLING; $this->assertEquals($this->_customerData['default_billing'], $row[$billingColumn]); - $shippingColumn = \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address::COLUMN_NAME_DEFAULT_SHIPPING; + $shippingColumn = \Magento\Customer\Model\ImportExport\Export\Address::COLUMN_NAME_DEFAULT_SHIPPING; $this->assertEquals($this->_customerData['default_shipping'], $row[$shippingColumn]); - $idColumn = \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID; + $idColumn = \Magento\Customer\Model\ImportExport\Export\Address::COLUMN_ADDRESS_ID; $this->assertEquals($this->_addressData['id'], $row[$idColumn]); - $emailColumn = \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address::COLUMN_EMAIL; + $emailColumn = \Magento\Customer\Model\ImportExport\Export\Address::COLUMN_EMAIL; $this->assertEquals($this->_customerData['email'], $row[$emailColumn]); - $websiteColumn = \Magento\ImportExport\Model\Export\Entity\Eav\Customer\Address::COLUMN_WEBSITE; + $websiteColumn = \Magento\Customer\Model\ImportExport\Export\Address::COLUMN_WEBSITE; $this->assertEquals($this->_websites[$this->_customerData['website_id']], $row[$websiteColumn]); $this->assertEquals($this->_addressData[self::ATTRIBUTE_CODE], $row[self::ATTRIBUTE_CODE]); diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Export/CustomerTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/CustomerTest.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Export/CustomerTest.php index 01bd833dfa3c5..d90a834810ac6 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/Eav/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Export/CustomerTest.php @@ -18,13 +18,10 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ImportExport\Model\Export\Entity\Eav; +namespace Magento\Customer\Model\ImportExport\Export; class CustomerTest extends \PHPUnit_Framework_TestCase { @@ -66,7 +63,7 @@ class CustomerTest extends \PHPUnit_Framework_TestCase /** * Customer export model * - * @var \Magento\ImportExport\Model\Export\Entity\Eav\Customer + * @var Customer */ protected $_model; @@ -90,7 +87,7 @@ protected function setUp() $this->returnCallback(array($this, 'getStores')) ); - $this->_model = new \Magento\ImportExport\Model\Export\Entity\Eav\Customer( + $this->_model = new Customer( $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'), $storeManager, $this->getMock('Magento\ImportExport\Model\Export\Factory', array(), array(), '', false), @@ -101,7 +98,7 @@ protected function setUp() '', false ), - $this->getMock('Magento\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false), + $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false), $this->getMock('Magento\Customer\Model\Resource\Customer\CollectionFactory', array(), array(), '', false), $this->_getModelDependencies() @@ -123,7 +120,7 @@ protected function _getModelDependencies() $translator = $this->getMock('stdClass'); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $attributeCollection = new \Magento\Data\Collection( + $attributeCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); foreach ($this->_attributes as $attributeData) { @@ -173,7 +170,7 @@ public function getWebsites($withDefault = false) continue; } $websiteData = array('id' => $id, 'code' => $code); - $websites[$id] = new \Magento\Object($websiteData); + $websites[$id] = new \Magento\Framework\Object($websiteData); } return $websites; @@ -196,7 +193,7 @@ public function getStores($withDefault = false) continue; } $storeData = array('id' => $id, 'code' => $code); - $stores[$id] = new \Magento\Object($storeData); + $stores[$id] = new \Magento\Framework\Object($storeData); } return $stores; @@ -205,7 +202,7 @@ public function getStores($withDefault = false) /** * Test for method exportItem() * - * @covers \Magento\ImportExport\Model\Export\Entity\Eav\Customer::exportItem + * @covers \Magento\Customer\Model\ImportExport\Export\Customer::exportItem */ public function testExportItem() { @@ -231,9 +228,9 @@ public function testExportItem() $this->_model->setWriter($writer); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $arguments = $objectManagerHelper->getConstructArguments('Magento\Model\AbstractModel'); + $arguments = $objectManagerHelper->getConstructArguments('Magento\Framework\Model\AbstractModel'); $arguments['data'] = $this->_customerData; - $item = $this->getMockForAbstractClass('Magento\Model\AbstractModel', $arguments); + $item = $this->getMockForAbstractClass('Magento\Framework\Model\AbstractModel', $arguments); $this->_model->exportItem($item); } @@ -245,8 +242,8 @@ public function testExportItem() */ public function validateWriteRow(array $row) { - $websiteColumn = \Magento\ImportExport\Model\Export\Entity\Eav\Customer::COLUMN_WEBSITE; - $storeColumn = \Magento\ImportExport\Model\Export\Entity\Eav\Customer::COLUMN_STORE; + $websiteColumn = Customer::COLUMN_WEBSITE; + $storeColumn = Customer::COLUMN_STORE; $this->assertEquals($this->_websites[$this->_customerData['website_id']], $row[$websiteColumn]); $this->assertEquals($this->_stores[$this->_customerData['store_id']], $row[$storeColumn]); $this->assertEquals($this->_customerData[self::ATTRIBUTE_CODE], $row[self::ATTRIBUTE_CODE]); diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/AbstractCustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/AbstractCustomerTest.php similarity index 60% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/AbstractCustomerTest.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/AbstractCustomerTest.php index b3cbf9a477498..4d4013cd31975 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/AbstractCustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/AbstractCustomerTest.php @@ -18,26 +18,21 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Test class for \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer - * - * @todo fix in the scope of https://wiki.magento.com/display/MAGE2/Technical+Debt+%28Team-Donetsk-B%29 + * Test class for \Magento\Customer\Model\ImportExport\Import\AbstractCustomer */ -namespace Magento\ImportExport\Model\Import\Entity\Eav; +namespace Magento\Customer\Model\ImportExport\Import; class AbstractCustomerTest extends \PHPUnit_Framework_TestCase { /** * Abstract customer export model * - * @var \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Customer\Model\ImportExport\Import\AbstractCustomer|PHPUnit_Framework_MockObject_MockObject */ protected $_model; @@ -85,26 +80,22 @@ protected function tearDown() /** * Create mock for abstract customer model class * - * @return \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer|PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Customer\Model\ImportExport\Import\AbstractCustomer|PHPUnit_Framework_MockObject_MockObject */ protected function _getModelMock() { - $customerCollection = new \Magento\Data\Collection( + $customerCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); foreach ($this->_customers as $customer) { - $customerCollection->addItem(new \Magento\Object($customer)); + $customerCollection->addItem(new \Magento\Framework\Object($customer)); } - $modelMock = $this->getMockForAbstractClass( - 'Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer', - array(), - '', - false, - true, - true, - array('_getCustomerCollection', '_validateRowForUpdate', '_validateRowForDelete') - ); + $modelMock = $this->getMockBuilder('Magento\Customer\Model\ImportExport\Import\AbstractCustomer') + ->disableOriginalConstructor() + ->setMethods(['_getCustomerCollection', '_validateRowForUpdate', '_validateRowForDelete']) + ->getMockForAbstractClass(); + $property = new \ReflectionProperty($modelMock, '_websiteCodeToId'); $property->setAccessible(true); $property->setValue($modelMock, array_flip($this->_websites)); @@ -113,13 +104,9 @@ protected function _getModelMock() $property->setAccessible(true); $property->setValue($modelMock, $this->_availableBehaviors); - $modelMock->expects( - $this->any() - )->method( - '_getCustomerCollection' - )->will( - $this->returnValue($customerCollection) - ); + $modelMock->expects($this->any()) + ->method('_getCustomerCollection') + ->will($this->returnValue($customerCollection)); return $modelMock; } @@ -133,55 +120,55 @@ public function checkUniqueKeyDataProvider() { return array( 'valid' => array( - '$rowData' => include __DIR__ . '/Customer/_files/row_data_abstract_valid.php', + '$rowData' => include __DIR__ . '/_files/row_data_abstract_valid.php', '$errors' => array(), '$isValid' => true ), 'no website' => array( - '$rowData' => include __DIR__ . '/Customer/_files/row_data_abstract_no_website.php', + '$rowData' => include __DIR__ . '/_files/row_data_abstract_no_website.php', '$errors' => array( - \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::ERROR_WEBSITE_IS_EMPTY => array( - array(1, \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::COLUMN_WEBSITE) + AbstractCustomer::ERROR_WEBSITE_IS_EMPTY => array( + array(1, AbstractCustomer::COLUMN_WEBSITE) ) ) ), 'empty website' => array( - '$rowData' => include __DIR__ . '/Customer/_files/row_data_abstract_empty_website.php', + '$rowData' => include __DIR__ . '/_files/row_data_abstract_empty_website.php', '$errors' => array( - \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::ERROR_WEBSITE_IS_EMPTY => array( - array(1, \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::COLUMN_WEBSITE) + AbstractCustomer::ERROR_WEBSITE_IS_EMPTY => array( + array(1, AbstractCustomer::COLUMN_WEBSITE) ) ) ), 'no email' => array( - '$rowData' => include __DIR__ . '/Customer/_files/row_data_abstract_no_email.php', + '$rowData' => include __DIR__ . '/_files/row_data_abstract_no_email.php', '$errors' => array( - \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::ERROR_EMAIL_IS_EMPTY => array( - array(1, \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::COLUMN_EMAIL) + AbstractCustomer::ERROR_EMAIL_IS_EMPTY => array( + array(1, AbstractCustomer::COLUMN_EMAIL) ) ) ), 'empty email' => array( - '$rowData' => include __DIR__ . '/Customer/_files/row_data_abstract_empty_email.php', + '$rowData' => include __DIR__ . '/_files/row_data_abstract_empty_email.php', '$errors' => array( - \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::ERROR_EMAIL_IS_EMPTY => array( - array(1, \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::COLUMN_EMAIL) + AbstractCustomer::ERROR_EMAIL_IS_EMPTY => array( + array(1, AbstractCustomer::COLUMN_EMAIL) ) ) ), 'invalid email' => array( - '$rowData' => include __DIR__ . '/Customer/_files/row_data_abstract_invalid_email.php', + '$rowData' => include __DIR__ . '/_files/row_data_abstract_invalid_email.php', '$errors' => array( - \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::ERROR_INVALID_EMAIL => array( - array(1, \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::COLUMN_EMAIL) + AbstractCustomer::ERROR_INVALID_EMAIL => array( + array(1, AbstractCustomer::COLUMN_EMAIL) ) ) ), 'invalid website' => array( - '$rowData' => include __DIR__ . '/Customer/_files/row_data_abstract_invalid_website.php', + '$rowData' => include __DIR__ . '/_files/row_data_abstract_invalid_website.php', '$errors' => array( - \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::ERROR_INVALID_WEBSITE => array( - array(1, \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::COLUMN_WEBSITE) + AbstractCustomer::ERROR_INVALID_WEBSITE => array( + array(1, AbstractCustomer::COLUMN_WEBSITE) ) ) ) @@ -189,9 +176,6 @@ public function checkUniqueKeyDataProvider() } /** - * Test \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::_checkUniqueKey() with different values - * - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::_checkUniqueKey * @dataProvider checkUniqueKeyDataProvider * * @param array $rowData @@ -201,7 +185,7 @@ public function checkUniqueKeyDataProvider() public function testCheckUniqueKey(array $rowData, array $errors, $isValid = false) { $checkUniqueKey = new \ReflectionMethod( - 'Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer', + 'Magento\Customer\Model\ImportExport\Import\AbstractCustomer', '_checkUniqueKey' ); $checkUniqueKey->setAccessible(true); @@ -214,11 +198,6 @@ public function testCheckUniqueKey(array $rowData, array $errors, $isValid = fal $this->assertAttributeEquals($errors, '_errors', $this->_model); } - /** - * Test for \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::validateRow for add/update action - * - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::validateRow - */ public function testValidateRowForUpdate() { // _validateRowForUpdate should be called only once @@ -237,11 +216,6 @@ public function testValidateRowForUpdate() $this->assertTrue($this->_model->validateRow(array(), 1)); } - /** - * Test for \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::validateRow for delete action - * - * @covers \Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer::validateRow - */ public function testValidateRowForDelete() { // _validateRowForDelete should be called only once @@ -259,15 +233,13 @@ public function testValidateRowForDelete() } /** - * Clear validated rows array - * - * @return null + * @return void */ protected function _clearValidatedRows() { // clear array $validatedRows = new \ReflectionProperty( - 'Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer', + 'Magento\Customer\Model\ImportExport\Import\AbstractCustomer', '_validatedRows' ); $validatedRows->setAccessible(true); @@ -276,7 +248,7 @@ protected function _clearValidatedRows() // reset counter $entitiesCount = new \ReflectionProperty( - 'Magento\ImportExport\Model\Import\Entity\Eav\AbstractCustomer', + 'Magento\Customer\Model\ImportExport\Import\AbstractCustomer', '_processedEntitiesCount' ); $entitiesCount->setAccessible(true); diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/AddressTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/AddressTest.php index 76db409398784..2b37358377c04 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/AddressTest.php @@ -18,26 +18,17 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Test class for \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address - * - * @todo Fix tests in the scope of https://wiki.magento.com/display/MAGE2/Technical+Debt+%28Team-Donetsk-B%29 - */ -namespace Magento\ImportExport\Model\Import\Entity\Eav\Customer; -use \Magento\ImportExport\Model\Import\AbstractEntity; -use \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address; +namespace Magento\Customer\Model\ImportExport\Import; + +use Magento\ImportExport\Model\Import\AbstractEntity; /** * Class AddressTest * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - * */ class AddressTest extends \PHPUnit_Framework_TestCase { @@ -55,6 +46,9 @@ class AddressTest extends \PHPUnit_Framework_TestCase */ protected $_websites = array(1 => 'website1', 2 => 'website2'); + /** @var \PHPUnit_Framework_MockObject_MockObject |\Magento\Store\Model\StoreManager */ + protected $_storeManager; + /** * Attributes array * @@ -124,7 +118,7 @@ class AddressTest extends \PHPUnit_Framework_TestCase protected $_coreDataMock; /** - * @var \Magento\Stdlib\String + * @var \Magento\Framework\Stdlib\String */ protected $_stringLib; @@ -138,10 +132,16 @@ class AddressTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->markTestSkipped(); $this->_objectManagerMock = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false); - $this->_stringLib = new \Magento\Stdlib\String(); + $this->_stringLib = new \Magento\Framework\Stdlib\String(); + $this->_storeManager = $this->getMockBuilder('Magento\Store\Model\StoreManager') + ->disableOriginalConstructor() + ->setMethods(['getWebsites']) + ->getMock(); + $this->_storeManager->expects($this->any()) + ->method('getWebsites') + ->will($this->returnCallback(array($this, 'getWebsites'))); $this->_model = $this->_getModelMock(); } @@ -161,36 +161,22 @@ protected function tearDown() protected function _getModelDependencies() { $dataSourceModel = $this->getMock('stdClass', array('getNextBunch')); - $connection = $this->getMock('stdClass'); - - $websiteManager = $this->getMock('stdClass', array('getWebsites')); - $websiteManager->expects( - $this->once() - )->method( - 'getWebsites' - )->will( - $this->returnCallback(array($this, 'getWebsites')) - ); - $attributeCollection = $this->_createAttrCollectionMock(); - $customerStorage = $this->_createCustomerStorageMock(); - $customerEntity = $this->_createCustomerEntityMock(); - - $addressCollection = new \Magento\Data\Collection( + $addressCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); foreach ($this->_addresses as $address) { - $addressCollection->addItem(new \Magento\Object($address)); + $addressCollection->addItem(new \Magento\Framework\Object($address)); } - $regionCollection = new \Magento\Data\Collection( + $regionCollection = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); foreach ($this->_regions as $region) { - $regionCollection->addItem(new \Magento\Object($region)); + $regionCollection->addItem(new \Magento\Framework\Object($region)); } $data = array( @@ -214,13 +200,13 @@ protected function _getModelDependencies() /** * Create mock of attribute collection, so it can be used for tests * - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Data\Collection + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Data\Collection */ protected function _createAttrCollectionMock() { $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false); $attributeCollection = $this->getMock( - 'Magento\Data\Collection', + 'Magento\Framework\Data\Collection', array('getEntityTypeCode'), array($entityFactory) ); @@ -228,14 +214,14 @@ protected function _createAttrCollectionMock() $arguments = $this->_objectManagerMock->getConstructArguments( 'Magento\Eav\Model\Entity\Attribute\AbstractAttribute', array( - $this->getMock('Magento\Model\Context', array(), array(), '', false, false), - $this->getMock('Magento\Registry'), + $this->getMock('Magento\Framework\Model\Context', array(), array(), '', false, false), + $this->getMock('Magento\Framework\Registry'), $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false, false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false, false), $this->getMock('Magento\Eav\Model\Entity\TypeFactory'), $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false, false), $this->getMock('Magento\Eav\Model\Resource\Helper', array(), array(), '', false, false), - $this->getMock('Magento\Validator\UniversalFactory', array(), array(), '', false, false) + $this->getMock('Magento\Framework\Validator\UniversalFactory', array(), array(), '', false, false) ) ); $arguments['data'] = $attributeData; @@ -258,12 +244,12 @@ protected function _createAttrCollectionMock() /** * Create mock of customer storage, so it can be used for tests * - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\ImportExport\Model\Resource\Customer\Storage + * @return \PHPUnit_Framework_MockObject_MockObject */ protected function _createCustomerStorageMock() { $customerStorage = $this->getMock( - 'Magento\ImportExport\Model\Resource\Customer\Storage', + 'Magento\Customer\Model\Resource\ImportExport\Import\Customer\Storage', array('load'), array(), '', @@ -330,7 +316,7 @@ public function getWebsites($withDefault = false) continue; } $websiteData = array('id' => $id, 'code' => $code); - $websites[$id] = new \Magento\Object($websiteData); + $websites[$id] = new \Magento\Framework\Object($websiteData); } return $websites; @@ -341,11 +327,11 @@ public function getWebsites($withDefault = false) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) * - * @param \Magento\Data\Collection $collection + * @param \Magento\Framework\Data\Collection $collection * @param int $pageSize * @param array $callbacks */ - public function iterate(\Magento\Data\Collection $collection, $pageSize, array $callbacks) + public function iterate(\Magento\Framework\Data\Collection $collection, $pageSize, array $callbacks) { foreach ($collection as $customer) { foreach ($callbacks as $callback) { @@ -380,7 +366,7 @@ protected function _getModelMockForTestImportDataWithCustomBehaviour() // entity adapter mock $modelMock = $this->getMock( - 'Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address', + 'Magento\Customer\Model\ImportExport\Import\Address', array( 'validateRow', '_prepareDataForUpdate', @@ -413,7 +399,7 @@ protected function _getModelMockForTestImportDataWithCustomBehaviour() $dataSourceMock->expects($this->at(1))->method('getNextBunch')->will($this->returnValue(null)); $dataSourceModel = new \ReflectionProperty( - 'Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address', + 'Magento\Customer\Model\ImportExport\Import\Address', '_dataSourceModel' ); $dataSourceModel->setAccessible(true); @@ -457,15 +443,6 @@ protected function _getModelMockForTestImportDataWithCustomBehaviour() protected function _getModelMock() { $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $storeManager = $this->getMock('\Magento\Store\Model\StoreManager', array('getWebsites'), array(), '', false); - $storeManager->expects( - $this->once() - )->method( - 'getWebsites' - )->will( - $this->returnCallback(array($this, 'getWebsites')) - ); - $modelMock = new Address( $this->_coreDataMock, $this->_stringLib, @@ -473,10 +450,16 @@ protected function _getModelMock() $this->getMock('Magento\ImportExport\Model\ImportFactory', array(), array(), '', false), $this->getMock('Magento\ImportExport\Model\Resource\Helper', array(), array(), '', false), $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false), - $storeManager, + $this->_storeManager, $this->getMock('Magento\ImportExport\Model\Export\Factory', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false), - $this->getMock('Magento\ImportExport\Model\Resource\Customer\StorageFactory', array(), array(), '', false), + $this->getMock( + 'Magento\Customer\Model\Resource\ImportExport\Import\Customer\StorageFactory', + array(), + array(), + '', + false + ), $this->getMock('Magento\Customer\Model\AddressFactory', array(), array(), '', false), $this->getMock('Magento\Directory\Model\Resource\Region\CollectionFactory', array(), array(), '', false), $this->getMock('Magento\Customer\Model\CustomerFactory', array(), array(), '', false), @@ -488,7 +471,7 @@ protected function _getModelMock() '', false ), - new \Magento\Stdlib\DateTime(), + new \Magento\Framework\Stdlib\DateTime(), $this->_getModelDependencies() ); @@ -585,10 +568,6 @@ public function validateRowForDeleteDataProvider() } /** - * Test Address::validateRow() with add/update action - * - * @covers Address::validateRow - * @covers Address::_validateRowForUpdate * @dataProvider validateRowForUpdateDataProvider * * @param array $rowData diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerCompositeTest.php similarity index 58% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerCompositeTest.php index 9c1e948a3b95e..0c93e7ee4a130 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerCompositeTest.php @@ -18,13 +18,15 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ImportExport\Model\Import\Entity; +namespace Magento\Customer\Model\ImportExport\Import; + +use Magento\Framework\Filesystem\Driver\File; +use Magento\Framework\Filesystem\File\Read; +use Magento\ImportExport\Model\Import; +use Magento\ImportExport\Model\Import\Source\Csv; /** * Customer composite test @@ -33,11 +35,6 @@ */ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase { - /** - * @var \Magento\ImportExport\Model\Import\Entity\CustomerComposite - */ - protected $_model; - /** * @var array */ @@ -54,7 +51,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase protected $_coreHelper; /** - * @var \Magento\Stdlib\String|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\String|\PHPUnit_Framework_MockObject_MockObject */ protected $_string; @@ -74,20 +71,37 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase protected $_resourceHelper; /** - * @var \Magento\ImportExport\Model\Resource\Import\CustomerComposite\DataFactory + * @var \Magento\Customer\Model\Resource\ImportExport\Import\CustomerComposite\DataFactory */ protected $_dataFactory; /** - * @var \Magento\ImportExport\Model\Import\Entity\Eav\CustomerFactory + * @var CustomerFactory */ protected $_customerFactory; /** - * @var \Magento\ImportExport\Model\Import\Entity\Eav\Customer\AddressFactory + * @var AddressFactory */ protected $_addressFactory; + /** + * @var \Magento\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $_scopeConfigMock; + + /** + * Expected prepared data after method CustomerComposite::_prepareRowForDb + * + * @var array + */ + protected $_preparedData = array( + '_scope' => CustomerComposite::SCOPE_DEFAULT, + Address::COLUMN_WEBSITE => 'admin', + Address::COLUMN_EMAIL => 'test@qwewqeq.com', + Address::COLUMN_ADDRESS_ID => null + ); + /** * List of mocked methods for customer and address entity adapters * @@ -109,7 +123,7 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $translateInline = $this->getMock('\Magento\Translate\InlineInterface', array(), array(), '', false); + $translateInline = $this->getMock('\Magento\Framework\Translate\InlineInterface', array(), array(), '', false); $translateInline->expects($this->any())->method('isAllowed')->will($this->returnValue(false)); $context = @@ -118,11 +132,11 @@ protected function setUp() $data = array( 'context' => $context, - 'locale' => $this->getMock('Magento\Locale', array(), array(), '', false), - 'dateModel' => $this->getMock('Magento\Stdlib\DateTime\DateTime', array(), array(), '', false) + 'locale' => $this->getMock('Magento\Framework\Locale', array(), array(), '', false), + 'dateModel' => $this->getMock('Magento\Framework\Stdlib\DateTime\DateTime', array(), array(), '', false) ); $this->_coreHelper = $objectManager->getObject('Magento\Core\Helper\Data', $data); - $this->_string = new \Magento\Stdlib\String(); + $this->_string = new \Magento\Framework\Stdlib\String(); $this->_importFactory = $this->getMock( 'Magento\ImportExport\Model\ImportFactory', @@ -140,43 +154,40 @@ protected function setUp() false ); $this->_dataFactory = $this->getMock( - 'Magento\ImportExport\Model\Resource\Import\CustomerComposite\DataFactory', + 'Magento\Customer\Model\Resource\ImportExport\Import\CustomerComposite\DataFactory', array(), array(), '', false ); $this->_customerFactory = $this->getMock( - 'Magento\ImportExport\Model\Import\Entity\Eav\CustomerFactory', + 'Magento\Customer\Model\ImportExport\Import\CustomerFactory', array(), array(), '', false ); $this->_addressFactory = $this->getMock( - 'Magento\ImportExport\Model\Import\Entity\Eav\Customer\AddressFactory', + 'Magento\Customer\Model\ImportExport\Import\AddressFactory', array(), array(), '', false ); + + $this->_scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); } /** - * @return \Magento\ImportExport\Model\Import\Entity\CustomerComposite + * @param array $data + * @return CustomerComposite */ - protected function _getModelMock() + protected function _createModelMock($data) { - $data = $this->_getModelDependencies(); - $data['customer_entity'] = $this->_getCustomerEntityMock(); - $data['address_entity'] = $this->_getAddressEntityMock(); - - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( + return new CustomerComposite( $this->_coreHelper, $this->_string, - $scopeConfig, + $this->_scopeConfigMock, $this->_importFactory, $this->_resourceHelper, $this->_resource, @@ -185,14 +196,23 @@ protected function _getModelMock() $this->_addressFactory, $data ); + } - return $this->_model; + /** + * @return CustomerComposite + */ + protected function _getModelMock() + { + $data = $this->_getModelDependencies(); + $data['customer_entity'] = $this->_getCustomerEntityMock(); + $data['address_entity'] = $this->_getAddressEntityMock(); + return $this->_createModelMock($data); } /** * Returns entity mock for method testPrepareRowForDb * - * @return \Magento\ImportExport\Model\Import\Entity\CustomerComposite + * @return CustomerComposite */ protected function _getModelMockForPrepareRowForDb() { @@ -226,43 +246,16 @@ protected function _getModelMockForPrepareRowForDb() $data['address_entity'] = $addressEntity; $data['data_source_model'] = $dataSourceMock; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); - - return $this->_model; + return $this->_createModelMock($data); } - /** - * Expected prepared data after method \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_prepareRowForDb - * - * @var array - */ - protected $_preparedData = array( - '_scope' => \Magento\ImportExport\Model\Import\Entity\CustomerComposite::SCOPE_DEFAULT, - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_WEBSITE => 'admin', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_EMAIL => 'test@qwewqeq.com', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => null - ); - /** * Returns entity mock for method testImportData * * @param bool $isDeleteBehavior * @param boolean $customerImport * @param boolean $addressImport - * @return \Magento\ImportExport\Model\Import\Entity\CustomerComposite + * @return CustomerComposite */ protected function _getModelMockForImportData($isDeleteBehavior, $customerImport, $addressImport) { @@ -281,32 +274,12 @@ protected function _getModelMockForImportData($isDeleteBehavior, $customerImport $data['customer_entity'] = $customerEntity; $data['address_entity'] = $addressEntity; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); - - return $this->_model; - } - - protected function tearDown() - { - unset($this->_model); + return $this->_createModelMock($data); } /** * @param array $mockedMethods - * @return \Magento\ImportExport\Model\Import\Entity\Eav\Customer|\PHPUnit_Framework_MockObject_MockObject + * @return Customer|\PHPUnit_Framework_MockObject_MockObject */ protected function _getCustomerEntityMock(array $mockedMethods = null) { @@ -316,9 +289,8 @@ protected function _getCustomerEntityMock(array $mockedMethods = null) $mockedMethods[] = 'getAttributeCollection'; $mockedMethods[] = 'getWebsiteId'; - /** @var $customerEntity \Magento\ImportExport\Model\Import\Entity\Eav\Customer */ $customerEntity = $this->getMock( - 'Magento\ImportExport\Model\Import\Entity\Eav\Customer', + 'Magento\Customer\Model\ImportExport\Import\Customer', $mockedMethods, array(), '', @@ -327,7 +299,7 @@ protected function _getCustomerEntityMock(array $mockedMethods = null) $attributeList = array(); foreach ($this->_customerAttributes as $code) { - $attribute = new \Magento\Object(array('attribute_code' => $code)); + $attribute = new \Magento\Framework\Object(array('attribute_code' => $code)); $attributeList[] = $attribute; } $customerEntity->expects( @@ -343,7 +315,7 @@ protected function _getCustomerEntityMock(array $mockedMethods = null) /** * @param array $mockedMethods - * @return \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address|\PHPUnit_Framework_MockObject_MockObject + * @return Address|\PHPUnit_Framework_MockObject_MockObject */ protected function _getAddressEntityMock(array $mockedMethods = null) { @@ -352,9 +324,8 @@ protected function _getAddressEntityMock(array $mockedMethods = null) } $mockedMethods[] = 'getAttributeCollection'; - /** @var $addressEntity \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address */ $addressEntity = $this->getMock( - 'Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address', + 'Magento\Customer\Model\ImportExport\Import\Address', $mockedMethods, array(), '', @@ -363,7 +334,7 @@ protected function _getAddressEntityMock(array $mockedMethods = null) $attributeList = array(); foreach ($this->_addressAttributes as $code) { - $attribute = new \Magento\Object(array('attribute_code' => $code)); + $attribute = new \Magento\Framework\Object(array('attribute_code' => $code)); $attributeList[] = $attribute; } $addressEntity->expects( @@ -400,28 +371,22 @@ protected function _getModelDependencies() return $data; } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::isAttributeParticular - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_initAddressAttributes - */ public function testIsAttributeParticular() { - $this->_getModelMock(); + $modelUnderTest = $this->_getModelMock(); foreach ($this->_addressAttributes as $code) { $this->assertTrue( - $this->_model->isAttributeParticular( - \Magento\ImportExport\Model\Import\Entity\CustomerComposite::COLUMN_ADDRESS_PREFIX . $code + $modelUnderTest->isAttributeParticular( + CustomerComposite::COLUMN_ADDRESS_PREFIX . $code ), 'Attribute must be particular' ); } - $this->assertFalse($this->_model->isAttributeParticular('test'), 'Attribute must not be particular'); + $this->assertFalse($modelUnderTest->isAttributeParticular('test'), 'Attribute must not be particular'); } /** * @dataProvider getRowDataProvider - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::validateRow - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_getRowScope * * @param array $rows * @param array $calls @@ -435,23 +400,18 @@ public function testValidateRow(array $rows, array $calls, $validationReturn, ar $this->_entityMockedMethods[] = 'getCustomerStorage'; $addressEntity = $this->_getAddressEntityMock(); - $customerEntity->expects( - $this->exactly($calls['customerValidationCalls']) - )->method( - 'validateRow' - )->will( - $this->returnValue($validationReturn) - ); + $customerEntity->expects($this->exactly($calls['customerValidationCalls'])) + ->method('validateRow') + ->will($this->returnValue($validationReturn)); - $customerEntity->expects($this->any())->method('getErrorMessages')->will($this->returnValue(array())); + $customerEntity->expects($this->any()) + ->method('getErrorMessages') + ->will($this->returnValue(array())); - $addressEntity->expects( - $this->exactly($calls['addressValidationCalls']) - )->method( - 'validateRow' - )->will( - $this->returnValue($validationReturn) - ); + $addressEntity + ->expects($this->exactly($calls['addressValidationCalls'])) + ->method('validateRow') + ->will($this->returnValue($validationReturn)); $customerStorage = $this->getMock('stdClass', array('getCustomerId')); $customerStorage->expects($this->any())->method('getCustomerId')->will($this->returnValue(true)); @@ -470,33 +430,17 @@ public function testValidateRow(array $rows, array $calls, $validationReturn, ar $data['customer_entity'] = $customerEntity; $data['address_entity'] = $addressEntity; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); - $this->_model->setParameters(array('behavior' => $behavior)); + $modelUnderTest = $this->_createModelMock($data); + $modelUnderTest->setParameters(array('behavior' => $behavior)); foreach ($rows as $index => $data) { - $this->_model->validateRow($data, $index); + $modelUnderTest->validateRow($data, $index); } foreach ($expectedErrors as $error) { - $this->assertArrayHasKey($error, $this->_model->getErrorMessages()); + $this->assertArrayHasKey($error, $modelUnderTest->getErrorMessages()); } } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_prepareAddressRowData - */ public function testPrepareAddressRowData() { $customerEntity = $this->_getCustomerEntityMock(); @@ -515,45 +459,28 @@ public function testPrepareAddressRowData() $customerStorage = $this->getMock('stdClass', array('getCustomerId')); $customerStorage->expects($this->any())->method('getCustomerId')->will($this->returnValue(true)); - $addressEntity->expects( - $this->any() - )->method( - 'getCustomerStorage' - )->will( - $this->returnValue($customerStorage) - ); + $addressEntity->expects($this->any()) + ->method('getCustomerStorage') + ->will($this->returnValue($customerStorage)); $data = $this->_getModelDependencies(); $data['customer_entity'] = $customerEntity; $data['address_entity'] = $addressEntity; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); + $modelUnderTest = $this->_createModelMock($data); $rowData = array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => 'test@test.com', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => 'admin', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => null, - \Magento\ImportExport\Model\Import\Entity\CustomerComposite::COLUMN_DEFAULT_BILLING => true, - \Magento\ImportExport\Model\Import\Entity\CustomerComposite::COLUMN_DEFAULT_SHIPPING => true, + Customer::COLUMN_EMAIL => 'test@test.com', + Customer::COLUMN_WEBSITE => 'admin', + Address::COLUMN_ADDRESS_ID => null, + CustomerComposite::COLUMN_DEFAULT_BILLING => true, + CustomerComposite::COLUMN_DEFAULT_SHIPPING => true, 'firstname' => 'John', 'lastname' => 'Doe', 'dob' => '1984-11-11' ); - $this->_model->validateRow($rowData, 1); + $modelUnderTest->validateRow($rowData, 1); } /** @@ -566,11 +493,11 @@ public function validateAddressRowParams(array $rowData, $rowNumber) $this->assertArrayNotHasKey($attributeCode, $rowData); } $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\CustomerComposite::COLUMN_DEFAULT_BILLING, + CustomerComposite::COLUMN_DEFAULT_BILLING, $rowData ); $this->assertArrayHasKey( - \Magento\ImportExport\Model\Import\Entity\CustomerComposite::COLUMN_DEFAULT_SHIPPING, + CustomerComposite::COLUMN_DEFAULT_SHIPPING, $rowData ); $this->assertEquals(1, $rowNumber); @@ -585,86 +512,83 @@ public function getRowDataProvider() 'customer and address rows, append behavior' => array( '$rows' => array( array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => 'test@test.com', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => 'admin', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => null + Customer::COLUMN_EMAIL => 'test@test.com', + Customer::COLUMN_WEBSITE => 'admin', + Address::COLUMN_ADDRESS_ID => null ), array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => 1 + Customer::COLUMN_EMAIL => '', + Customer::COLUMN_WEBSITE => '', + Address::COLUMN_ADDRESS_ID => 1 ) ), '$calls' => array('customerValidationCalls' => 1, 'addressValidationCalls' => 2), '$validationReturn' => true, '$expectedErrors' => array(), - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND + '$behavior' => Import::BEHAVIOR_APPEND ), 'customer and address rows, delete behavior' => array( '$rows' => array( array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => 'test@test.com', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => 'admin', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => null + Customer::COLUMN_EMAIL => 'test@test.com', + Customer::COLUMN_WEBSITE => 'admin', + Address::COLUMN_ADDRESS_ID => null ), array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => 1 + Customer::COLUMN_EMAIL => '', + Customer::COLUMN_WEBSITE => '', + Address::COLUMN_ADDRESS_ID => 1 ) ), '$calls' => array('customerValidationCalls' => 1, 'addressValidationCalls' => 0), '$validationReturn' => true, '$expectedErrors' => array(), - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE + '$behavior' => Import::BEHAVIOR_DELETE ), 'customer and two addresses row, append behavior' => array( '$rows' => array( array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => 'test@test.com', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => 'admin', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => null + Customer::COLUMN_EMAIL => 'test@test.com', + Customer::COLUMN_WEBSITE => 'admin', + Address::COLUMN_ADDRESS_ID => null ), array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => 1 + Customer::COLUMN_EMAIL => '', + Customer::COLUMN_WEBSITE => '', + Address::COLUMN_ADDRESS_ID => 1 ), array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => 2 + Customer::COLUMN_EMAIL => '', + Customer::COLUMN_WEBSITE => '', + Address::COLUMN_ADDRESS_ID => 2 ) ), '$calls' => array('customerValidationCalls' => 1, 'addressValidationCalls' => 3), '$validationReturn' => true, '$expectedErrors' => array(), - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND + '$behavior' => Import::BEHAVIOR_APPEND ), 'customer and addresses row with filed validation, append behavior' => array( '$rows' => array( array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => 'test@test.com', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => 'admin', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => null + Customer::COLUMN_EMAIL => 'test@test.com', + Customer::COLUMN_WEBSITE => 'admin', + Address::COLUMN_ADDRESS_ID => null ), array( - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_EMAIL => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer::COLUMN_WEBSITE => '', - \Magento\ImportExport\Model\Import\Entity\Eav\Customer\Address::COLUMN_ADDRESS_ID => 1 + Customer::COLUMN_EMAIL => '', + Customer::COLUMN_WEBSITE => '', + Address::COLUMN_ADDRESS_ID => 1 ) ), '$calls' => array('customerValidationCalls' => 1, 'addressValidationCalls' => 0), '$validationReturn' => false, '$expectedErrors' => array('Orphan rows that will be skipped due default row errors'), - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND + '$behavior' => Import::BEHAVIOR_APPEND ) ); } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::setParameters - */ public function testSetParameters() { $customerEntity = $this->_getCustomerEntityMock(); @@ -688,23 +612,10 @@ public function testSetParameters() $data['customer_entity'] = $customerEntity; $data['address_entity'] = $addressEntity; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); + $modelUnderTest = $this->_createModelMock($data); - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); - - $params = array('behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND); - $this->_model->setParameters($params); + $params = array('behavior' => Import::BEHAVIOR_APPEND); + $modelUnderTest->setParameters($params); } /** @@ -713,12 +624,9 @@ public function testSetParameters() public function callbackCheckParameters(array $params) { $this->assertArrayHasKey('behavior', $params); - $this->assertEquals(\Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, $params['behavior']); + $this->assertEquals(Import::BEHAVIOR_ADD_UPDATE, $params['behavior']); } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::setSource - */ public function testSetSource() { $customerEntity = $this->_getCustomerEntityMock(); @@ -730,20 +638,7 @@ public function testSetSource() $data['customer_entity'] = $customerEntity; $data['address_entity'] = $addressEntity; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); + $modelUnderTest = $this->_createModelMock($data); $source = $this->getMockForAbstractClass( 'Magento\ImportExport\Model\Import\AbstractSource', @@ -751,12 +646,9 @@ public function testSetSource() '', false ); - $this->_model->setSource($source); + $modelUnderTest->setSource($source); } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::getErrorMessages - */ public function testGetErrorMessages() { $errorMessages = array( @@ -775,22 +667,9 @@ public function testGetErrorMessages() $data['customer_entity'] = $customerEntity; $data['address_entity'] = $addressEntity; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); + $modelUnderTest = $this->_createModelMock($data); - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); - - $this->_model->addRowError('Bad password', 1); + $modelUnderTest->addRowError('Bad password', 1); $expectedErrors = array( 'Required field' => array(1, 2, 3, 4, 5), @@ -799,38 +678,30 @@ public function testGetErrorMessages() 'Wrong address' => array(1, 2) ); - $actualErrors = $this->_model->getErrorMessages(); + $actualErrors = $modelUnderTest->getErrorMessages(); foreach ($expectedErrors as $error => $rows) { $this->assertArrayHasKey($error, $actualErrors); $this->assertSame($rows, array_values($actualErrors[$error])); } } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_prepareRowForDb - */ public function testPrepareRowForDb() { - $this->_getModelMockForPrepareRowForDb(); + $modelUnderTest = $this->_getModelMockForPrepareRowForDb(); $pathToCsvFile = __DIR__ . '/_files/customer_composite_prepare_row_for_db.csv'; - $directoryMock = $this->getMock('\Magento\Filesystem\Directory\Write', array(), array(), '', false); - $directoryMock->expects( - $this->any() - )->method( - 'openFile' - )->will( - $this->returnValue( - new \Magento\Filesystem\File\Read($pathToCsvFile, new \Magento\Filesystem\Driver\File()) - ) - ); - $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToCsvFile, $directoryMock); - $this->_model->setSource($source); - $this->_model->validateData(); + $directoryMock = $this->getMock('\Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false); + $directoryMock->expects($this->any()) + ->method('openFile')->will( + $this->returnValue(new Read($pathToCsvFile, new File())) + ); + $source = new Csv($pathToCsvFile, $directoryMock); + $modelUnderTest->setSource($source); + $modelUnderTest->validateData(); } /** * Callback for \Magento\ImportExport\Model\Resource\Import\Data::saveBunch to verify correctness of data - * for method \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_prepareRowForDb + * for method CustomerComposite::_prepareRowForDb * * @param string $entityType * @param string $behavior @@ -860,37 +731,37 @@ public function dataProviderTestImportData() { return array( 'add_update_behavior_customer_true_address_true' => array( - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, + '$behavior' => Import::BEHAVIOR_ADD_UPDATE, '$customerImport' => true, '$addressImport' => true, '$result' => true ), 'add_update_behavior_customer_true_address_false' => array( - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, + '$behavior' => Import::BEHAVIOR_ADD_UPDATE, '$customerImport' => true, '$addressImport' => false, '$result' => false ), 'add_update_behavior_customer_false_address_true' => array( - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, + '$behavior' => Import::BEHAVIOR_ADD_UPDATE, '$customerImport' => false, '$addressImport' => true, '$result' => false ), 'add_update_behavior_customer_false_address_false' => array( - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, + '$behavior' => Import::BEHAVIOR_ADD_UPDATE, '$customerImport' => false, '$addressImport' => false, '$result' => false ), 'delete_behavior_customer_true' => array( - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, + '$behavior' => Import::BEHAVIOR_DELETE, '$customerImport' => true, '$addressImport' => false, '$result' => true ), 'delete_behavior_customer_false' => array( - '$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, + '$behavior' => Import::BEHAVIOR_DELETE, '$customerImport' => false, '$addressImport' => false, '$result' => false @@ -900,7 +771,6 @@ public function dataProviderTestImportData() /** * @dataProvider dataProviderTestImportData - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::_importData * * @param string $behavior * @param boolean $customerImport @@ -909,7 +779,7 @@ public function dataProviderTestImportData() */ public function testImportData($behavior, $customerImport, $addressImport, $result) { - $isDeleteBehavior = $behavior == \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE; + $isDeleteBehavior = $behavior == Import::BEHAVIOR_DELETE; $entityMock = $this->_getModelMockForImportData($isDeleteBehavior, $customerImport, $addressImport); $entityMock->setParameters(array('behavior' => $behavior)); $importResult = $entityMock->importData(); @@ -920,35 +790,26 @@ public function testImportData($behavior, $customerImport, $addressImport, $resu } } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::getErrorsCount - */ public function testGetErrorsCount() { $customerReturnData = 1; $addressReturnData = 2; $model = $this->_getModelForGetterTest('getErrorsCount', $customerReturnData, $addressReturnData); - $model->addRowError(\Magento\ImportExport\Model\Import\Entity\CustomerComposite::ERROR_ROW_IS_ORPHAN, 1); + $model->addRowError(CustomerComposite::ERROR_ROW_IS_ORPHAN, 1); $this->assertEquals($customerReturnData + $addressReturnData + 1, $model->getErrorsCount()); } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::getInvalidRowsCount - */ public function testGetInvalidRowsCount() { $customerReturnData = 3; $addressReturnData = 2; $model = $this->_getModelForGetterTest('getInvalidRowsCount', $customerReturnData, $addressReturnData); - $model->addRowError(\Magento\ImportExport\Model\Import\Entity\CustomerComposite::ERROR_ROW_IS_ORPHAN, 1); + $model->addRowError(CustomerComposite::ERROR_ROW_IS_ORPHAN, 1); $this->assertEquals($customerReturnData + $addressReturnData + 1, $model->getInvalidRowsCount()); } - /** - * @covers \Magento\ImportExport\Model\Import\Entity\CustomerComposite::getProcessedEntitiesCount - */ public function testGetProcessedEntitiesCount() { $customerReturnData = 3; @@ -962,7 +823,7 @@ public function testGetProcessedEntitiesCount() * @param string $method * @param int $customerReturnData * @param int $addressReturnData - * @return \Magento\ImportExport\Model\Import\Entity\CustomerComposite + * @return CustomerComposite */ protected function _getModelForGetterTest($method, $customerReturnData, $addressReturnData) { @@ -975,19 +836,7 @@ protected function _getModelForGetterTest($method, $customerReturnData, $address $data = $this->_getModelDependencies(); $data['customer_entity'] = $customerEntity; $data['address_entity'] = $addressEntity; - $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $this->_model = new \Magento\ImportExport\Model\Import\Entity\CustomerComposite( - $this->_coreHelper, - $this->_string, - $scopeConfig, - $this->_importFactory, - $this->_resourceHelper, - $this->_resource, - $this->_dataFactory, - $this->_customerFactory, - $this->_addressFactory, - $data - ); - return $this->_model; + + return $this->_createModelMock($data); } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php new file mode 100644 index 0000000000000..24819fc15fbfe --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/CustomerTest.php @@ -0,0 +1,233 @@ + array( + Customer::COLUMN_ACTION => 'create', + Customer::COLUMN_EMAIL => 'create@email.com', + Customer::COLUMN_WEBSITE => 'website1' + ), + 'update' => array( + Customer::COLUMN_ACTION => 'update', + Customer::COLUMN_EMAIL => 'update@email.com', + Customer::COLUMN_WEBSITE => 'website1' + ), + 'delete' => array( + Customer::COLUMN_ACTION => Customer::COLUMN_ACTION_VALUE_DELETE, + Customer::COLUMN_EMAIL => 'delete@email.com', + Customer::COLUMN_WEBSITE => 'website1' + ) + ); + + /** + * Customer ids for all custom behavior input rows + * + * @var array + */ + protected $_customerIds = array('create' => 1, 'update' => 2, 'delete' => 3); + + /** + * Unset entity adapter model + */ + protected function tearDown() + { + unset($this->_model); + + parent::tearDown(); + } + + /** + * Create mock for import with custom behavior test + * + * @return Customer|PHPUnit_Framework_MockObject_MockObject + */ + protected function _getModelMockForTestImportDataWithCustomBehaviour() + { + // entity adapter mock + $modelMock = $this->getMockBuilder('Magento\Customer\Model\ImportExport\Import\Customer') + ->disableOriginalConstructor() + ->setMethods( + [ + 'validateRow', + '_getCustomerId', + '_prepareDataForUpdate', + '_saveCustomerEntities', + '_saveCustomerAttributes', + '_deleteCustomerEntities' + ]) + ->getMock(); + + $availableBehaviors = new \ReflectionProperty($modelMock, '_availableBehaviors'); + $availableBehaviors->setAccessible(true); + $availableBehaviors->setValue($modelMock, $this->_availableBehaviors); + + // mock to imitate data source model + $dataSourceModelMock = $this->getMockBuilder('Magento\ImportExport\Model\Resource\Import\Data') + ->disableOriginalConstructor() + ->setMethods([ + 'getNextBunch', + '__wakeup' + ]) + ->getMock(); + + $dataSourceModelMock->expects($this->at(0)) + ->method('getNextBunch') + ->will($this->returnValue($this->_inputRows)); + $dataSourceModelMock->expects($this->at(1)) + ->method('getNextBunch') + ->will($this->returnValue(null)); + + $property = new \ReflectionProperty( + 'Magento\Customer\Model\ImportExport\Import\Customer', + '_dataSourceModel' + ); + $property->setAccessible(true); + $property->setValue($modelMock, $dataSourceModelMock); + + $modelMock->expects($this->any()) + ->method('validateRow') + ->will($this->returnValue(true)); + + $modelMock->expects($this->any()) + ->method('_getCustomerId') + ->will($this->returnValue($this->_customerIds['delete'])); + + $modelMock->expects($this->any()) + ->method('_prepareDataForUpdate') + ->will($this->returnCallback(array($this, 'prepareForUpdateMock'))); + + $modelMock->expects($this->any()) + ->method('_saveCustomerEntities') + ->will($this->returnCallback(array($this, 'validateSaveCustomerEntities'))); + + $modelMock->expects($this->any()) + ->method('_saveCustomerAttributes') + ->will($this->returnValue($modelMock)); + + $modelMock->expects($this->any()) + ->method('_deleteCustomerEntities') + ->will($this->returnCallback(array($this, 'validateDeleteCustomerEntities'))); + + return $modelMock; + } + + /** + * Test whether correct methods are invoked in case of custom behaviour for each row in action column + */ + public function testImportDataWithCustomBehaviour() + { + $this->_model = $this->_getModelMockForTestImportDataWithCustomBehaviour(); + $this->_model->setParameters(['behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM]); + + // validation in validateSaveCustomerEntities and validateDeleteCustomerEntities + $this->_model->importData(); + } + + /** + * Emulate data preparing depending on value in row action column + * + * @param array $rowData + * @return int + */ + public function prepareForUpdateMock(array $rowData) + { + $preparedResult = array( + Customer::ENTITIES_TO_CREATE_KEY => array(), + Customer::ENTITIES_TO_UPDATE_KEY => array(), + Customer::ATTRIBUTES_TO_SAVE_KEY => array('table' => array()) + ); + + $actionColumnKey = Customer::COLUMN_ACTION; + if ($rowData[$actionColumnKey] == 'create') { + $preparedResult[Customer::ENTITIES_TO_CREATE_KEY] = [ + ['entity_id' => $this->_customerIds['create']] + ]; + } elseif ($rowData[$actionColumnKey] == 'update') { + $preparedResult[Customer::ENTITIES_TO_UPDATE_KEY] = [ + ['entity_id' => $this->_customerIds['update']] + ]; + } + + return $preparedResult; + } + + /** + * Validation method for _saveCustomerEntities + * + * @param array $entitiesToCreate + * @param array $entitiesToUpdate + * @return Customer|PHPUnit_Framework_MockObject_MockObject + */ + public function validateSaveCustomerEntities(array $entitiesToCreate, array $entitiesToUpdate) + { + $this->assertCount(1, $entitiesToCreate); + $this->assertEquals($this->_customerIds['create'], $entitiesToCreate[0]['entity_id']); + $this->assertCount(1, $entitiesToUpdate); + $this->assertEquals($this->_customerIds['update'], $entitiesToUpdate[0]['entity_id']); + return $this->_model; + } + + /** + * Validation method for _deleteCustomerEntities + * + * @param array $customerIdsToDelete + * @return Customer|PHPUnit_Framework_MockObject_MockObject + */ + public function validateDeleteCustomerEntities(array $customerIdsToDelete) + { + $this->assertCount(1, $customerIdsToDelete); + $this->assertEquals($this->_customerIds['delete'], $customerIdsToDelete[0]); + return $this->_model; + } +} diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customer_composite_prepare_row_for_db.csv b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customer_composite_prepare_row_for_db.csv similarity index 100% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/_files/customer_composite_prepare_row_for_db.csv rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/customer_composite_prepare_row_for_db.csv diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_empty_email.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_empty_email.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_empty_email.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_empty_email.php index 6397d6114bb22..a695e2485590d 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_empty_email.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_empty_email.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_empty_website.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_empty_website.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_empty_website.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_empty_website.php index 7a8513a731512..db921b5783d8d 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_empty_website.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_empty_website.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_invalid_email.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_invalid_email.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_invalid_email.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_invalid_email.php index 58a2c94019658..b1e5264b96246 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_invalid_email.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_invalid_email.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_invalid_website.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_invalid_website.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_invalid_website.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_invalid_website.php index 1c8f0f07b6dd4..46fa9daffbdfb 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_invalid_website.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_invalid_website.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_no_email.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_no_email.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_no_email.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_no_email.php index 3b702f751f77b..5e8bc906753eb 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_no_email.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_no_email.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_no_website.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_no_website.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_no_website.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_no_website.php index e3e0b8803a579..912bd9061f60d 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_no_website.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_no_website.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_valid.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_valid.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_valid.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_valid.php index ebf56e83dfbb7..47acf05b778d7 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_abstract_valid.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_abstract_valid.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_address_not_found.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_address_not_found.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_address_not_found.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_address_not_found.php index 2d0490987cced..0ab61d39eff70 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_address_not_found.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_address_not_found.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_empty_address_id.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_empty_address_id.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_empty_address_id.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_empty_address_id.php index 6bfe2ee0a7fed..85caa6dfe5f97 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_empty_address_id.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_empty_address_id.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_no_customer.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_no_customer.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_no_customer.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_no_customer.php index ac16338073762..6fe5ed7e67d5b 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_no_customer.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_no_customer.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_valid.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_valid.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_valid.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_valid.php index 07d12cc4d0878..edfb652bf53c7 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_delete_valid.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_delete_valid.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_absent_required_attribute.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_absent_required_attribute.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_absent_required_attribute.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_absent_required_attribute.php index 0236ae51181e9..5dfef1df61f0a 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_absent_required_attribute.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_absent_required_attribute.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_empty_address_id.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_empty_address_id.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_empty_address_id.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_empty_address_id.php index 9e00dc62a7927..8683088a61f15 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_empty_address_id.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_empty_address_id.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_invalid_region.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_invalid_region.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_invalid_region.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_invalid_region.php index b04f99b3911d2..d34e7fe272b31 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_invalid_region.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_invalid_region.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_no_customer.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_no_customer.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_no_customer.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_no_customer.php index cb52c0f5c6d15..0520c09e9aec2 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_no_customer.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_no_customer.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_valid.php b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_valid.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_valid.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_valid.php index b6d9502db6591..c7d0a6839f176 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/_files/row_data_address_update_valid.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/ImportExport/Import/_files/row_data_address_update_valid.php @@ -18,9 +18,6 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Layout/DepersonalizePluginTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Layout/DepersonalizePluginTest.php index bac23274926d1..431d5ecf40563 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Layout/DepersonalizePluginTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Layout/DepersonalizePluginTest.php @@ -40,12 +40,12 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase protected $plugin; /** - * @var \Magento\View\Layout|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Layout|\PHPUnit_Framework_MockObject_MockObject */ protected $layoutMock; /** - * @var \Magento\Session\Generic|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Session\Generic|\PHPUnit_Framework_MockObject_MockObject */ protected $sessionMock; @@ -70,7 +70,7 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase protected $customerMock; /** - * @var \Magento\Module\Manager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $moduleManagerMock; @@ -88,9 +88,9 @@ class DepersonalizePluginTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->sessionMock = $this->getMock( - 'Magento\Session\Generic', + 'Magento\Framework\Session\Generic', array('clearStorage', 'setData', 'getData'), array(), '', @@ -118,7 +118,7 @@ public function setUp() '', false ); - $this->moduleManagerMock = $this->getMock('Magento\Module\Manager', array(), array(), '', false); + $this->moduleManagerMock = $this->getMock('Magento\Framework\Module\Manager', array(), array(), '', false); $this->visitorMock = $this->getMock('Magento\Log\Model\Visitor', array(), array(), '', false); $this->customerFactoryMock->expects($this->once()) ->method('create') @@ -162,7 +162,7 @@ public function testBeforeGenerateXmlPageCacheEnabled() ->method('getCustomerGroupId'); $this->sessionMock->expects($this->once()) ->method('getData') - ->with($this->equalTo(\Magento\Data\Form\FormKey::FORM_KEY)); + ->with($this->equalTo(\Magento\Framework\Data\Form\FormKey::FORM_KEY)); $output = $this->plugin->beforeGenerateXml($this->layoutMock); $this->assertEquals(array(), $output); } @@ -240,7 +240,7 @@ public function testBeforeGenerateXmlLayoutIsNotCacheable() */ public function testAfterGenerateXmlPageCacheEnabled() { - $expectedResult = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $expectedResult = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->moduleManagerMock ->expects($this->once()) ->method('isEnabled') @@ -283,7 +283,7 @@ public function testAfterGenerateXmlPageCacheEnabled() ->expects($this->once()) ->method('setData') ->with( - $this->equalTo(\Magento\Data\Form\FormKey::FORM_KEY), + $this->equalTo(\Magento\Framework\Data\Form\FormKey::FORM_KEY), $this->equalTo(null) ); $this->customerSessionMock @@ -299,7 +299,7 @@ public function testAfterGenerateXmlPageCacheEnabled() */ public function testAfterGenerateXmlPageCacheDisabled() { - $expectedResult = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $expectedResult = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->moduleManagerMock ->expects($this->once()) ->method('isEnabled') @@ -317,7 +317,7 @@ public function testAfterGenerateXmlPageCacheDisabled() */ public function testAfterGenerateXmlRequestIsAjax() { - $expectedResult = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $expectedResult = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->moduleManagerMock ->expects($this->once()) ->method('isEnabled') @@ -342,7 +342,7 @@ public function testAfterGenerateXmlRequestIsAjax() */ public function testAfterGenerateXmlLayoutIsNotCacheable() { - $expectedResult = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $expectedResult = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->moduleManagerMock ->expects($this->once()) ->method('isEnabled') diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ElementFactoryTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ElementFactoryTest.php index 1d76ad3e06825..d9b113778d748 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ElementFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ElementFactoryTest.php @@ -25,7 +25,7 @@ class ElementFactoryTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\ObjectManager | \PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\ObjectManager | \PHPUnit_Framework_MockObject_MockObject */ private $_objectManager; /** @var \Magento\Customer\Service\V1\Data\Eav\AttributeMetadata | \PHPUnit_Framework_MockObject_MockObject */ @@ -39,7 +39,7 @@ class ElementFactoryTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $this->_attributeMetadata = $this->getMock( 'Magento\Customer\Service\V1\Data\Eav\AttributeMetadata', array(), @@ -47,7 +47,7 @@ public function setUp() '', false ); - $this->_elementFactory = new ElementFactory($this->_objectManager, new \Magento\Stdlib\String()); + $this->_elementFactory = new ElementFactory($this->_objectManager, new \Magento\Framework\Stdlib\String()); } /** TODO fix when Validation is implemented MAGETWO-17341 */ diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php index 28018b3a520f8..242bf8ce56a5a 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractDataTest.php @@ -32,13 +32,13 @@ class AbstractDataTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Model\Metadata\Form\ExtendsAbstractData */ protected $_model; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Stdlib\DateTime\TimezoneInterface */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Stdlib\DateTime\TimezoneInterface */ protected $_localeMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Locale\ResolverInterface */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolverMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Logger */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Logger */ protected $_loggerMock; /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Customer\Service\V1\Data\Eav\AttributeMetadata */ @@ -56,12 +56,12 @@ class AbstractDataTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_localeMock = $this->getMockBuilder( - 'Magento\Stdlib\DateTime\TimezoneInterface' + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' )->disableOriginalConstructor()->getMock(); $this->_localeResolverMock = $this->getMockBuilder( - 'Magento\Locale\ResolverInterface' + 'Magento\Framework\Locale\ResolverInterface' )->disableOriginalConstructor()->getMock(); - $this->_loggerMock = $this->getMockBuilder('Magento\Logger')->disableOriginalConstructor()->getMock(); + $this->_loggerMock = $this->getMockBuilder('Magento\Framework\Logger')->disableOriginalConstructor()->getMock(); $this->_attributeMock = $this->getMockBuilder( 'Magento\Customer\Service\V1\Data\Eav\AttributeMetadata' )->disableOriginalConstructor()->getMock(); @@ -86,7 +86,7 @@ public function testGetAttribute() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Attribute object is undefined */ public function testGetAttributeException() @@ -168,7 +168,7 @@ public function testDateFilterFormat($format, $output) )->method( 'getDateFormat' )->with( - $this->equalTo(\Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT) + $this->equalTo(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT) )->will( $this->returnValue($output) ); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractFormTestCase.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractFormTestCase.php index d4e009208d940..585e49fb25c6b 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractFormTestCase.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/AbstractFormTestCase.php @@ -26,13 +26,13 @@ /** Test Magento\Customer\Model\Metadata\Form\Multiline */ abstract class AbstractFormTestCase extends \PHPUnit_Framework_TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Stdlib\DateTime\TimezoneInterface */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Stdlib\DateTime\TimezoneInterface */ protected $localeMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Locale\ResolverInterface */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Locale\ResolverInterface */ protected $localeResolverMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Logger */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Logger */ protected $loggerMock; /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Customer\Service\V1\Data\Eav\AttributeMetadata */ @@ -40,9 +40,9 @@ abstract class AbstractFormTestCase extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->localeMock = $this->getMockBuilder('Magento\Stdlib\DateTime\TimezoneInterface')->getMock(); - $this->localeResolverMock = $this->getMockBuilder('Magento\Locale\ResolverInterface')->getMock(); - $this->loggerMock = $this->getMockBuilder('Magento\Logger')->disableOriginalConstructor()->getMock(); + $this->localeMock = $this->getMockBuilder('Magento\Framework\Stdlib\DateTime\TimezoneInterface')->getMock(); + $this->localeResolverMock = $this->getMockBuilder('Magento\Framework\Locale\ResolverInterface')->getMock(); + $this->loggerMock = $this->getMockBuilder('Magento\Framework\Logger')->disableOriginalConstructor()->getMock(); $this->attributeMetadataMock = $this->getMockBuilder( 'Magento\Customer\Service\V1\Data\Eav\AttributeMetadata' )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php index b0c30befbb3dd..5c3b8b85ae444 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/TextTest.php @@ -30,13 +30,13 @@ class TextTest extends AbstractFormTestCase { - /** @var \Magento\Stdlib\String */ + /** @var \Magento\Framework\Stdlib\String */ protected $stringHelper; protected function setUp() { parent::setUp(); - $this->stringHelper = new \Magento\Stdlib\String(); + $this->stringHelper = new \Magento\Framework\Stdlib\String(); } /** diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ValidatorTest.php index 15a76dce83060..046162cbc32fb 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/ValidatorTest.php @@ -76,7 +76,7 @@ public function testIsValidWithNoModel() $this->validator->setData(array('something')); $this->assertTrue($this->validator->isValid(array('entity'))); $this->validator->setData(array()); - $this->assertTrue($this->validator->isValid(new \Magento\Object(array()))); + $this->assertTrue($this->validator->isValid(new \Magento\Framework\Object(array()))); } /** @@ -93,7 +93,7 @@ public function testIsValid($isValid) $this->validator->setData($data); $this->assertEquals($isValid, $this->validator->isValid(array('ENTITY'))); $this->validator->setData(array()); - $this->assertEquals($isValid, $this->validator->isValid(new \Magento\Object($data))); + $this->assertEquals($isValid, $this->validator->isValid(new \Magento\Framework\Object($data))); } public function trueFalseDataProvider() diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Renderer/RegionTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Renderer/RegionTest.php index a1d74c6870316..6d3d502d6ec36 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Renderer/RegionTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Renderer/RegionTest.php @@ -48,22 +48,28 @@ public function testRender($regionCollection) '', false ); - $escaperMock = $this->getMock('Magento\Escaper', array(), array(), '', false); + $escaperMock = $this->getMock('Magento\Framework\Escaper', array(), array(), '', false); $elementMock = $this->getMock( - 'Magento\Data\Form\Element\AbstractElement', + 'Magento\Framework\Data\Form\Element\AbstractElement', array('getForm', 'getHtmlAttributes'), array(), '', false ); $countryMock = $this->getMock( - 'Magento\Data\Form\Element\AbstractElement', + 'Magento\Framework\Data\Form\Element\AbstractElement', array('getValue'), array(), '', false ); - $regionMock = $this->getMock('Magento\Data\Form\Element\AbstractElement', array(), array(), '', false); + $regionMock = $this->getMock( + 'Magento\Framework\Data\Form\Element\AbstractElement', + array(), + array(), + '', + false + ); $countryModelMock = $this->getMock( 'Magento\Directory\Model\Country', array('setId', 'getLoadedRegionCollection', 'toOptionArray', '__wakeup'), @@ -71,7 +77,7 @@ public function testRender($regionCollection) '', false ); - $formMock = $this->getMock('Magento\Data\Form', array('getElement'), array(), '', false); + $formMock = $this->getMock('Magento\Framework\Data\Form', array('getElement'), array(), '', false); $elementMock->expects($this->any())->method('getForm')->will($this->returnValue($formMock)); $elementMock->expects( @@ -131,8 +137,8 @@ public function renderDataProvider() 'with no defined regions' => array(array()), 'with defined regions' => array( array( - new \Magento\Object(array('value' => 'Bavaria')), - new \Magento\Object(array('value' => 'Saxony')) + new \Magento\Framework\Object(array('value' => 'Bavaria')), + new \Magento\Framework\Object(array('value' => 'Saxony')) ) ) ); diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php index 73384e91eea00..194e2986bd28c 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/Group/Grid/ServiceCollectionTest.php @@ -24,7 +24,7 @@ namespace Magento\Customer\Model\Resource\Group\Grid; -use Magento\Service\V1\Data\SearchCriteria; +use Magento\Framework\Service\V1\Data\SearchCriteria; /** * Unit test for \Magento\Customer\Model\Resource\Group\Grid\ServiceCollection @@ -34,10 +34,10 @@ class ServiceCollectionTest extends \PHPUnit_Framework_TestCase /** @var \Magento\TestFramework\Helper\ObjectManager */ protected $objectManager; - /** @var \Magento\Service\V1\Data\FilterBuilder */ + /** @var \Magento\Framework\Service\V1\Data\FilterBuilder */ protected $filterBuilder; - /** @var \Magento\Service\V1\Data\SearchCriteriaBuilder */ + /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder */ protected $searchCriteriaBuilder; /** @var \Magento\Customer\Service\V1\Data\SearchResults */ @@ -52,12 +52,12 @@ class ServiceCollectionTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->filterBuilder = new \Magento\Service\V1\Data\FilterBuilder(); + $this->filterBuilder = new \Magento\Framework\Service\V1\Data\FilterBuilder(); $filterGroupBuilder = $this->objectManager - ->getObject('Magento\Service\V1\Data\Search\FilterGroupBuilder'); - /** @var \Magento\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ + ->getObject('Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); + /** @var \Magento\Framework\Service\V1\Data\SearchCriteriaBuilder $searchBuilder */ $this->searchCriteriaBuilder = $this->objectManager->getObject( - 'Magento\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); $this->groupServiceMock = $this->getMockBuilder('\Magento\Customer\Service\V1\CustomerGroupServiceInterface') @@ -192,7 +192,7 @@ public function testGetSearchCriteriaAnd() * @param string[] $fields * @param array $conditions * - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage When passing in a field array there must be a matching condition array * @dataProvider addFieldToFilterInconsistentArraysDataProvider */ diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Customer/StorageTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/ImportExport/Import/Customer/StorageTest.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Customer/StorageTest.php rename to dev/tests/unit/testsuite/Magento/Customer/Model/Resource/ImportExport/Import/Customer/StorageTest.php index 13a73f49b7613..ec0f0d89f0b8d 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/Customer/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/ImportExport/Import/Customer/StorageTest.php @@ -18,18 +18,15 @@ * 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_ImportExport - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ImportExport\Model\Resource\Customer; +namespace Magento\Customer\Model\Resource\ImportExport\Import\Customer; class StorageTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ImportExport\Model\Resource\Customer\Storage + * @var Storage */ protected $_model; @@ -45,15 +42,13 @@ class StorageTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_model = new \Magento\ImportExport\Model\Resource\Customer\Storage( - $this->getMock('Magento\Customer\Model\Resource\Customer\CollectionFactory', array(), array(), '', false), - $this->getMock( - 'Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory', - array(), - array(), - '', - false - ), + $this->_model = new Storage( + $this->getMockBuilder('Magento\Customer\Model\Resource\Customer\CollectionFactory') + ->disableOriginalConstructor() + ->getMock(), + $this->getMockBuilder('Magento\ImportExport\Model\Resource\CollectionByPagesIteratorFactory') + ->disableOriginalConstructor() + ->getMock(), $this->_getModelDependencies() ); $this->_model->load(); @@ -71,30 +66,26 @@ protected function tearDown() */ protected function _getModelDependencies() { - $select = $this->getMock('Magento\DB\Select', array('from'), array(), '', false); + $select = $this->getMockBuilder('Magento\Framework\DB\Select') + ->disableOriginalConstructor() + ->setMethods(['from']) + ->getMock(); $select->expects($this->any())->method('from')->will($this->returnCallback(array($this, 'validateFrom'))); - $customerCollection = $this->getMock( - 'Magento\Customer\Model\Resource\Customer\Collection', - array('load', 'removeAttributeToSelect', 'getResource', 'getSelect'), - array(), - '', - false - ); + $customerCollection = $this->getMockBuilder('Magento\Customer\Model\Resource\Customer\Collection') + ->disableOriginalConstructor() + ->setMethods(['load', 'removeAttributeToSelect', 'getResource', 'getSelect']) + ->getMock(); - $resourceStub = new \Magento\Object(); + $resourceStub = new \Magento\Framework\Object(); $resourceStub->setEntityTable($this->_entityTable); $customerCollection->expects($this->once())->method('getResource')->will($this->returnValue($resourceStub)); $customerCollection->expects($this->once())->method('getSelect')->will($this->returnValue($select)); $byPagesIterator = $this->getMock('stdClass', array('iterate')); - $byPagesIterator->expects( - $this->once() - )->method( - 'iterate' - )->will( - $this->returnCallback(array($this, 'iterate')) - ); + $byPagesIterator->expects($this->once()) + ->method('iterate') + ->will($this->returnCallback(array($this, 'iterate'))); return array( 'customer_collection' => $customerCollection, @@ -108,11 +99,11 @@ protected function _getModelDependencies() * * @SuppressWarnings(PHPMD.UnusedFormalParameter) * - * @param \Magento\Data\Collection $collection + * @param \Magento\Framework\Data\Collection $collection * @param int $pageSize * @param array $callbacks */ - public function iterate(\Magento\Data\Collection $collection, $pageSize, array $callbacks) + public function iterate(\Magento\Framework\Data\Collection $collection, $pageSize, array $callbacks) { foreach ($collection as $customer) { foreach ($callbacks as $callback) { @@ -131,17 +122,11 @@ public function validateFrom($tableName, $fields) $this->assertEquals($this->_expectedFields, $fields); } - /** - * @covers \Magento\ImportExport\Model\Resource\Customer\Storage::load - */ public function testLoad() { $this->assertAttributeEquals(true, '_isCollectionLoaded', $this->_model); } - /** - * @covers \Magento\ImportExport\Model\Resource\Customer\Storage::addCustomer - */ public function testAddCustomer() { $propertyName = '_customerIds'; @@ -153,9 +138,6 @@ public function testAddCustomer() $this->assertAttributeContains($expectedCustomerData, $propertyName, $this->_model); } - /** - * @covers \Magento\ImportExport\Model\Resource\Customer\Storage::addCustomer - */ public function testGetCustomerId() { $customer = $this->_addCustomerToStorage(); @@ -168,11 +150,11 @@ public function testGetCustomerId() } /** - * @return \Magento\Object + * @return \Magento\Framework\Object */ protected function _addCustomerToStorage() { - $customer = new \Magento\Object(array('id' => 1, 'website_id' => 1, 'email' => 'test@test.com')); + $customer = new \Magento\Framework\Object(array('id' => 1, 'website_id' => 1, 'email' => 'test@test.com')); $this->_model->addCustomer($customer); return $customer; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/ImportExport/Import/CustomerComposite/DataTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/ImportExport/Import/CustomerComposite/DataTest.php new file mode 100644 index 0000000000000..3adc1cd18eafe --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Resource/ImportExport/Import/CustomerComposite/DataTest.php @@ -0,0 +1,233 @@ +getMock( + 'Magento\Framework\DB\Statement\Pdo\Mysql', + array('setFetchMode', 'getIterator'), + array(), + '', + false + ); + $statementMock->expects( + $this->any() + )->method( + 'getIterator' + )->will( + $this->returnValue(new \ArrayIterator($bunchData)) + ); + + /** @var $selectMock \Magento\Framework\DB\Select */ + $selectMock = $this->getMock('Magento\Framework\DB\Select', array('from', 'order'), array(), '', false); + $selectMock->expects($this->any())->method('from')->will($this->returnSelf()); + $selectMock->expects($this->any())->method('order')->will($this->returnSelf()); + + /** @var $adapterMock \Magento\Framework\DB\Adapter\Pdo\Mysql */ + $adapterMock = $this->getMock( + 'Magento\Framework\DB\Adapter\Pdo\Mysql', + array('select', 'from', 'order', 'query'), + array(), + '', + false + ); + $adapterMock->expects($this->any())->method('select')->will($this->returnValue($selectMock)); + $adapterMock->expects($this->any())->method('query')->will($this->returnValue($statementMock)); + + /** @var $resourceModelMock \Magento\Framework\App\Resource */ + $resourceModelMock = $this->getMock( + 'Magento\Framework\App\Resource', + array('getConnection', '_newConnection', 'getTableName'), + array(), + '', + false + ); + $resourceModelMock->expects($this->any())->method('getConnection')->will($this->returnValue($adapterMock)); + + $data = array('resource' => $resourceModelMock, 'entity_type' => $entityType); + + if ($entityType == CustomerComposite::COMPONENT_ENTITY_ADDRESS) { + $data['customer_attributes'] = $this->_customerAttributes; + } + + return $data; + } + + /** + * @covers Data::getNextBunch + * @covers Data::_prepareRow + * @covers Data::_prepareAddressRowData + * + * @dataProvider getNextBunchDataProvider + * @param string $entityType + * @param array $bunchData + * @param array $expectedData + */ + public function testGetNextBunch($entityType, $bunchData, $expectedData) + { + $dependencies = $this->_getDependencies($entityType, $bunchData); + + $resource = $dependencies['resource']; + $coreHelper = $this->getMock('Magento\Core\Helper\Data', array('__construct'), array(), '', false); + unset($dependencies['resource'], $dependencies['json_helper']); + + $object = new Data( + $resource, + $coreHelper, + $dependencies + ); + $this->assertEquals($expectedData, $object->getNextBunch()); + } + + /** + * Data provider of row data and expected result of getNextBunch() method + * + * @return array + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function getNextBunchDataProvider() + { + return array( + 'address entity' => array( + '$entityType' => CustomerComposite::COMPONENT_ENTITY_ADDRESS, + '$bunchData' => array( + array( + \Zend_Json::encode( + array( + array( + '_scope' => CustomerComposite::SCOPE_DEFAULT, + Address::COLUMN_WEBSITE =>'website1', + Address::COLUMN_EMAIL => 'email1', + Address::COLUMN_ADDRESS_ID => null, + CustomerComposite::COLUMN_DEFAULT_BILLING => 'value', + CustomerComposite::COLUMN_DEFAULT_SHIPPING => 'value', + 'customer_attribute1' => 'value', + 'customer_attribute2' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute1' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute2' => 'value' + ) + ) + ) + ) + ), + '$expectedData' => array( + 0 => array( + Address::COLUMN_WEBSITE => 'website1', + Address::COLUMN_EMAIL => 'email1', + Address::COLUMN_ADDRESS_ID => null, + CustomerComposite::COLUMN_DEFAULT_BILLING => 'value', + CustomerComposite::COLUMN_DEFAULT_SHIPPING => 'value', + 'attribute1' => 'value', + 'attribute2' => 'value' + ) + ) + ), + 'customer entity default scope' => array( + '$entityType' => CustomerComposite::COMPONENT_ENTITY_CUSTOMER, + '$bunchData' => array( + array( + \Zend_Json::encode( + array( + array( + '_scope' => CustomerComposite::SCOPE_DEFAULT, + Address::COLUMN_WEBSITE => 'website1', + Address::COLUMN_EMAIL => 'email1', + Address::COLUMN_ADDRESS_ID => null, + CustomerComposite::COLUMN_DEFAULT_BILLING => 'value', + CustomerComposite::COLUMN_DEFAULT_SHIPPING => 'value', + 'customer_attribute1' => 'value', + 'customer_attribute2' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute1' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute2' => 'value' + ) + ) + ) + ) + ), + '$expectedData' => array( + 0 => array( + Address::COLUMN_WEBSITE => 'website1', + Address::COLUMN_EMAIL => 'email1', + Address::COLUMN_ADDRESS_ID => null, + CustomerComposite::COLUMN_DEFAULT_BILLING => 'value', + CustomerComposite::COLUMN_DEFAULT_SHIPPING => 'value', + 'customer_attribute1' => 'value', + 'customer_attribute2' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute1' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute2' => 'value' + ) + ) + ), + 'customer entity address scope' => array( + '$entityType' => CustomerComposite::COMPONENT_ENTITY_CUSTOMER, + '$bunchData' => array( + array( + \Zend_Json::encode( + array( + array( + '_scope' => CustomerComposite::SCOPE_ADDRESS, + Address::COLUMN_WEBSITE => 'website1', + Address::COLUMN_EMAIL => 'email1', + Address::COLUMN_ADDRESS_ID => null, + CustomerComposite::COLUMN_DEFAULT_BILLING => 'value', + CustomerComposite::COLUMN_DEFAULT_SHIPPING => 'value', + 'customer_attribute1' => 'value', + 'customer_attribute2' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute1' => 'value', + CustomerComposite::COLUMN_ADDRESS_PREFIX . 'attribute2' => 'value' + ) + ) + ) + ) + ), + '$expectedData' => array() + ) + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/SessionTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/SessionTest.php index f92d429fd3527..a95ac2e6046ac 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Model/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Model/SessionTest.php @@ -56,7 +56,7 @@ protected function setUp() { $this->_converterMock = $this->getMock('Magento\Customer\Model\Converter', [], [], '', false); $this->_storageMock = $this->getMock('Magento\Customer\Model\Session\Storage', [], [], '', false); - $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', [], [], '', false); + $this->_eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface', [], [], '', false); $this->_httpContextMock = $this->getMock('Magento\Framework\App\Http\Context', [], [], '', false); $helper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_model = $helper->getObject('Magento\Customer\Model\Session', diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php index e703f9d932d2d..bc54ef61e80a7 100755 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php @@ -26,12 +26,13 @@ use Magento\Customer\Model\Converter; use Magento\Customer\Model\CustomerRegistry; -use Magento\Service\V1\Data\SearchCriteriaBuilder; -use Magento\Exception\InputException; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Service\V1\Data\SearchCriteriaBuilder; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\CustomerBuilder; -use Magento\Service\V1\Data\FilterBuilder; -use Magento\Mail\Exception as MailException; +use Magento\Framework\Service\Data\Eav\AttributeValueBuilder; +use Magento\Framework\Service\V1\Data\FilterBuilder; +use Magento\Framework\Mail\Exception as MailException; /** * Test for \Magento\Customer\Service\V1\CustomerAccountService @@ -65,7 +66,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase private $_customerModelMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Event\ManagerInterface + * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Event\ManagerInterface */ private $_eventManagerMock; @@ -110,7 +111,7 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase private $_customerRegistry; /** - * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Logger + * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Logger */ private $_loggerMock; @@ -127,9 +128,14 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Customer\Model\Config\Share */ private $_configShareMock; - /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Encryption\EncryptorInterface */ + /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Encryption\EncryptorInterface */ private $_encryptorMock; + /** + * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\UrlInterface + */ + private $_urlMock; + /** * @var SearchCriteriaBuilder */ @@ -140,18 +146,18 @@ public function setUp() $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $filterGroupBuilder = $this->_objectManager - ->getObject('Magento\Service\V1\Data\Search\FilterGroupBuilder'); + ->getObject('Magento\Framework\Service\V1\Data\Search\FilterGroupBuilder'); /** @var SearchCriteriaBuilder $searchBuilder */ $this->_searchBuilder = $this->_objectManager->getObject( - 'Magento\Service\V1\Data\SearchCriteriaBuilder', + 'Magento\Framework\Service\V1\Data\SearchCriteriaBuilder', ['filterGroupBuilder' => $filterGroupBuilder] ); $this->_customerFactoryMock = $this->getMockBuilder( 'Magento\Customer\Model\CustomerFactory' )->disableOriginalConstructor()->setMethods( - array('create') - )->getMock(); + array('create') + )->getMock(); $this->_customerModelMock = $this->getMockBuilder('Magento\Customer\Model\Customer') ->disableOriginalConstructor() @@ -203,18 +209,19 @@ public function setUp() 'changeResetPasswordLinkToken', 'sendPasswordResetConfirmationEmail', 'sendPasswordResetNotificationEmail', + 'delete' ) - )->getMock(); + )->getMock(); $this->_eventManagerMock = $this->getMockBuilder( - '\Magento\Event\ManagerInterface' + '\Magento\Framework\Event\ManagerInterface' )->disableOriginalConstructor()->getMock(); $this->_customerModelMock->expects($this->any())->method('validate')->will($this->returnValue(true)); $this->_setupStoreMock(); $this->_mathRandomMock = $this->getMockBuilder( - '\Magento\Math\Random' + '\Magento\Framework\Math\Random' )->disableOriginalConstructor()->getMock(); $this->_validator = $this->getMockBuilder( @@ -230,20 +237,30 @@ public function setUp() $this->_customerMetadataService->expects( $this->any() )->method( - 'getCustomCustomerAttributeMetadata' - )->will( - $this->returnValue(array()) + 'getCustomCustomerAttributeMetadata' + )->will( + $this->returnValue(array()) + ); + + $this->_customerBuilder = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + ['metadataService' => $this->_customerMetadataService] ); - $this->_customerBuilder = new Data\CustomerBuilder($this->_customerMetadataService); + $addressBuilder = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\AddressBuilder', + ['metadataService' => $this->_customerMetadataService] + ); - $customerBuilder = new CustomerBuilder($this->_customerMetadataService); - $this->_customerDetailsBuilder = new Data\CustomerDetailsBuilder( - $this->_customerBuilder, - new Data\AddressBuilder(new Data\RegionBuilder(), $this->_customerMetadataService) + $this->_customerDetailsBuilder = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\CustomerDetailsBuilder', + [ + 'customerBuilder' => $this->_customerBuilder, + 'addressBuilder' => $addressBuilder + ] ); - $this->_converter = new Converter($customerBuilder, $this->_customerFactoryMock); + $this->_converter = new Converter($this->_customerBuilder, $this->_customerFactoryMock); $this->_customerRegistry = $this->getMockBuilder('\Magento\Customer\Model\CustomerRegistry') ->setMethods(['retrieve', 'retrieveByEmail']) @@ -274,15 +291,15 @@ public function setUp() ->method('isCustomerInStore') ->will($this->returnValue(false)); - $this->_urlMock = $this->getMockBuilder('Magento\UrlInterface') + $this->_urlMock = $this->getMockBuilder('Magento\Framework\UrlInterface') ->disableOriginalConstructor() ->getMock(); - $this->_loggerMock = $this->getMockBuilder('Magento\Logger') + $this->_loggerMock = $this->getMockBuilder('Magento\Framework\Logger') ->disableOriginalConstructor() ->getMock(); - $this->_encryptorMock = $this->getMockBuilder('Magento\Encryption\EncryptorInterface') + $this->_encryptorMock = $this->getMockBuilder('Magento\Framework\Encryption\EncryptorInterface') ->disableOriginalConstructor() ->getMock(); @@ -303,10 +320,10 @@ public function testActivateAccount() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); // Assertions $this->_customerModelMock->expects($this->once())->method('save'); @@ -320,8 +337,7 @@ public function testActivateAccount() } /** - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::INVALID_STATE + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException */ public function testActivateAccountAlreadyActive() { @@ -335,10 +351,10 @@ public function testActivateAccountAlreadyActive() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); // Assertions $this->_customerModelMock->expects($this->never())->method('save'); @@ -354,7 +370,14 @@ public function testActivateAccountDoesntExist() $this->_customerRegistry ->expects($this->any()) ->method('retrieve') - ->will($this->throwException(new NoSuchEntityException('customerId', 1))); + ->will($this->throwException( + new NoSuchEntityException(NoSuchEntityException::MESSAGE_SINGLE_FIELD, + [ + 'fieldName' => 'customerId', + 'fieldValue' => 1, + ] + ) + )); // Assertions $this->_customerModelMock->expects($this->never())->method('save'); @@ -365,20 +388,13 @@ public function testActivateAccountDoesntExist() try { $customerService->activateCustomer(self::ID, self::EMAIL_CONFIRMATION_KEY); $this->fail('Expected exception not thrown.'); - } catch (\Magento\Exception\NoSuchEntityException $e) { - $this->assertSame($e->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame( - $e->getParams(), - [ - 'customerId' => self::ID, - ] - ); + } catch (NoSuchEntityException $nsee) { + $this->assertSame('No such entity with customerId = 1', $nsee->getMessage()); } } /** - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::INPUT_MISMATCH + * @expectedException \Magento\Framework\Exception\State\InputMismatchException */ public function testActivateAccountBadKey() { @@ -392,10 +408,10 @@ public function testActivateAccountBadKey() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); // Assertions $this->_customerModelMock->expects($this->never())->method('save'); @@ -422,19 +438,19 @@ public function testActivateAccountSaveFailed() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); // Assertions/Mocking $this->_customerModelMock->expects( $this->once() )->method( - 'save' - )->will( - $this->throwException(new \Exception('DB is down')) - ); + 'save' + )->will( + $this->throwException(new \Exception('DB is down')) + ); $this->_customerModelMock->expects($this->once())->method('setConfirmation'); $customerService = $this->_createService(); @@ -457,10 +473,10 @@ public function testLoginAccount() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $customerService = $this->_createService(); @@ -470,7 +486,7 @@ public function testLoginAccount() } /** - * @expectedException \Magento\Exception\AuthenticationException + * @expectedException \Magento\Framework\Exception\AuthenticationException * @expectedExceptionMessage exception message */ public function testLoginAccountWithException() @@ -485,16 +501,16 @@ public function testLoginAccountWithException() )->method( 'authenticate' )->will( - $this->throwException(new \Magento\Model\Exception('exception message')) + $this->throwException(new \Magento\Framework\Model\Exception('exception message')) ); $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $customerService = $this->_createService(); @@ -517,10 +533,10 @@ public function testValidateResetPasswordLinkToken() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $customerService = $this->_createService(); @@ -528,8 +544,7 @@ public function testValidateResetPasswordLinkToken() } /** - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::EXPIRED + * @expectedException \Magento\Framework\Exception\State\ExpiredException */ public function testValidateResetPasswordLinkTokenExpired() { @@ -547,10 +562,10 @@ public function testValidateResetPasswordLinkTokenExpired() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $customerService = $this->_createService(); @@ -558,8 +573,7 @@ public function testValidateResetPasswordLinkTokenExpired() } /** - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::INPUT_MISMATCH + * @expectedException \Magento\Framework\Exception\State\InputMismatchException */ public function testValidateResetPasswordLinkTokenInvalid() { @@ -578,10 +592,10 @@ public function testValidateResetPasswordLinkTokenInvalid() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $customerService = $this->_createService(); @@ -595,21 +609,22 @@ public function testValidateResetPasswordLinkTokenWrongUser() $this->_customerRegistry ->expects($this->any()) ->method('retrieve') - ->will($this->throwException(new NoSuchEntityException('customerId', 1))); + ->will($this->throwException( + new NoSuchEntityException(NoSuchEntityException::MESSAGE_SINGLE_FIELD, + [ + 'fieldName' => 'customerId', + 'fieldValue' => 1, + ] + ) + )); $customerService = $this->_createService(); try { $customerService->validateResetPasswordLinkToken(1, $resetToken); $this->fail("Expected NoSuchEntityException not caught"); - } catch (\Magento\Exception\NoSuchEntityException $e) { - $this->assertSame($e->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame( - $e->getParams(), - [ - 'customerId' => self::ID, - ] - ); + } catch (NoSuchEntityException $nsee) { + $this->assertSame('No such entity with customerId = 1', $nsee->getMessage()); } } @@ -629,10 +644,10 @@ public function testValidateResetPasswordLinkTokenNull() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $customerService = $this->_createService(); @@ -640,22 +655,25 @@ public function testValidateResetPasswordLinkTokenNull() $customerService->validateResetPasswordLinkToken(14, null); $this->fail('Expected exception not thrown.'); } catch (InputException $e) { - $expectedParams = array( - array( - 'code' => InputException::INVALID_FIELD_VALUE, - 'fieldName' => 'resetPasswordLinkToken', - 'value' => null - ) - ); - $this->assertEquals($expectedParams, $e->getParams()); + $this->assertEquals(InputException::REQUIRED_FIELD, $e->getRawMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $e->getMessage()); + $this->assertEquals('resetPasswordLinkToken is a required field.', $e->getLogMessage()); } } public function testSendPasswordResetLink() { $email = 'foo@example.com'; + $storeId = 42; - $this->_customerModelMock->expects($this->once())->method('sendPasswordResetConfirmationEmail'); + $this->_customerModelMock->expects($this->once()) + ->method('sendPasswordResetConfirmationEmail'); + $this->_customerModelMock->expects($this->atLeastOnce()) + ->method('getStoreId') + ->will($this->returnValue($storeId)); + $this->_urlMock->expects($this->once()) + ->method('setScope')->with($storeId) + ->will($this->returnSelf()); $customerService = $this->_createService(); @@ -673,7 +691,7 @@ public function testSendPasswordResetLinkBadEmailOrWebsite() $this->_customerRegistry ->expects($this->any()) ->method('retrieveByEmail') - ->will($this->throwException((new NoSuchEntityException('email', $email))->addField('websiteId', 0))); + ->will($this->throwException(NoSuchEntityException::doubleField('email', $email, 'websiteId', 0))); $this->_customerModelMock->expects($this->never())->method('sendPasswordResetConfirmationEmail'); @@ -682,20 +700,13 @@ public function testSendPasswordResetLinkBadEmailOrWebsite() try { $customerService->initiatePasswordReset($email, CustomerAccountServiceInterface::EMAIL_RESET, 0); $this->fail("Expected NoSuchEntityException not caught"); - } catch (\Magento\Exception\NoSuchEntityException $e) { - $this->assertSame($e->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame( - $e->getParams(), - [ - 'email' => $email, - 'websiteId' => 0 - ] - ); + } catch (NoSuchEntityException $nsee) { + $this->assertSame("No such entity with email = foo@example.com, websiteId = 0", $nsee->getMessage()); } } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Invalid transactional email code: 0 */ public function testSendPasswordResetLinkSendException() @@ -715,7 +726,9 @@ public function testSendPasswordResetLinkSendException() $this->_customerModelMock->expects($this->once()) ->method('sendPasswordResetConfirmationEmail') - ->will($this->throwException(new \Magento\Model\Exception(__('Invalid transactional email code: %1', 0)))); + ->will($this->throwException( + new \Magento\Framework\Model\Exception(__('Invalid transactional email code: %1', 0)) + )); $customerService = $this->_createService(); @@ -774,10 +787,10 @@ public function testResetPassword() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerModelMock->expects($this->once()) ->method('setRpToken') @@ -819,10 +832,10 @@ public function testResetPasswordShortPassword() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerModelMock->expects($this->once()) ->method('setRpToken') @@ -847,8 +860,7 @@ public function testResetPasswordShortPassword() } /** - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::EXPIRED + * @expectedException \Magento\Framework\Exception\State\ExpiredException */ public function testResetPasswordTokenExpired() { @@ -867,10 +879,10 @@ public function testResetPasswordTokenExpired() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerModelMock->expects($this->never())->method('setRpToken'); $this->_customerModelMock->expects($this->never())->method('setRpTokenCreatedAt'); @@ -882,8 +894,7 @@ public function testResetPasswordTokenExpired() } /** - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::INPUT_MISMATCH + * @expectedException \Magento\Framework\Exception\State\InputMismatchException */ public function testResetPasswordTokenInvalid() { @@ -903,10 +914,10 @@ public function testResetPasswordTokenInvalid() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerModelMock->expects($this->never())->method('setRpToken'); $this->_customerModelMock->expects($this->never())->method('setRpTokenCreatedAt'); @@ -926,7 +937,14 @@ public function testResetPasswordTokenWrongUser() $this->_customerRegistry ->expects($this->any()) ->method('retrieve') - ->will($this->throwException(new NoSuchEntityException('customerId', $invalidCustomerId))); + ->will($this->throwException( + new NoSuchEntityException(NoSuchEntityException::MESSAGE_SINGLE_FIELD, + [ + 'fieldName' => 'customerId', + 'fieldValue' => $invalidCustomerId, + ] + ) + )); $this->_customerModelMock->expects($this->never())->method('setRpToken'); $this->_customerModelMock->expects($this->never())->method('setRpTokenCreatedAt'); @@ -937,14 +955,8 @@ public function testResetPasswordTokenWrongUser() try { $customerService->resetPassword($invalidCustomerId, $resetToken, $password); $this->fail("Expected NoSuchEntityException not caught"); - } catch (\Magento\Exception\NoSuchEntityException $e) { - $this->assertSame($e->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame( - $e->getParams(), - [ - 'customerId' => $invalidCustomerId, - ] - ); + } catch (NoSuchEntityException $nsee) { + $this->assertSame('No such entity with customerId = 4200', $nsee->getMessage()); } } @@ -965,10 +977,10 @@ public function testResetPasswordTokenInvalidUserId() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerModelMock->expects($this->never())->method('setRpToken'); $this->_customerModelMock->expects($this->never())->method('setRpTokenCreatedAt'); @@ -980,10 +992,9 @@ public function testResetPasswordTokenInvalidUserId() $customerService->resetPassword(0, $resetToken, $password); $this->fail('Expected exception not thrown.'); } catch (InputException $e) { - $expectedParams = array( - array('code' => InputException::INVALID_FIELD_VALUE, 'fieldName' => 'customerId', 'value' => 0) - ); - $this->assertEquals($expectedParams, $e->getParams()); + $this->assertEquals(InputException::INVALID_FIELD_VALUE, $e->getRawMessage()); + $this->assertEquals('Invalid value of "0" provided for the customerId field.', $e->getMessage()); + $this->assertEquals('Invalid value of "0" provided for the customerId field.', $e->getLogMessage()); } } @@ -992,17 +1003,17 @@ public function testResendConfirmation() $this->_customerModelMock->expects( $this->any() )->method( - 'isConfirmationRequired' - )->will( - $this->returnValue(true) - ); + 'isConfirmationRequired' + )->will( + $this->returnValue(true) + ); $this->_customerModelMock->expects( $this->any() )->method( - 'getConfirmation' - )->will( - $this->returnValue('123abc') - ); + 'getConfirmation' + )->will( + $this->returnValue('123abc') + ); $customerService = $this->_createService(); $customerService->resendConfirmation('email', 1); @@ -1010,31 +1021,32 @@ public function testResendConfirmation() public function testResendConfirmationNoEmail() { + $email = 'no.customer@example.com'; + $websiteId = self::WEBSITE_ID; + $exception = new NoSuchEntityException(NoSuchEntityException::MESSAGE_DOUBLE_FIELDS, + [ + 'fieldName' => 'email', + 'fieldValue' => 'email@no.customer', + 'field2Name' => 'websiteId', + 'field2Value' => 1, + ] + ); $this->_customerRegistry ->expects($this->any()) ->method('retrieveByEmail') - ->will( - $this->throwException( - (new NoSuchEntityException('email', self::EMAIL))->addField('websiteId', self::WEBSITE_ID) - ) - ); + ->will($this->throwException($exception)); $customerService = $this->_createService(); try { - $customerService->resendConfirmation('email@no.customer', 1); + $customerService->resendConfirmation($email, $websiteId); $this->fail("Expected NoSuchEntityException not caught"); } catch (NoSuchEntityException $e) { - $expectedParams = [ - 'email' => self::EMAIL, - 'websiteId' => self::WEBSITE_ID - ]; - $this->assertEquals($expectedParams, $e->getParams()); + $this->assertSame("No such entity with email = email@no.customer, websiteId = 1", $e->getMessage()); } } /** - * @expectedException \Magento\Exception\StateException - * @expectedExceptionCode \Magento\Exception\StateException::INVALID_STATE + * @expectedException \Magento\Framework\Exception\State\InvalidTransitionException */ public function testResendConfirmationNotNeeded() { @@ -1078,35 +1090,35 @@ public function testGetConfirmationStatus($expected) $this->_customerModelMock->expects( $this->once() )->method( - 'getConfirmation' - )->will( - $this->returnValue(false) - ); + 'getConfirmation' + )->will( + $this->returnValue(false) + ); } else { $this->_customerModelMock->expects( $this->once() )->method( - 'getConfirmation' - )->will( - $this->returnValue(true) - ); + 'getConfirmation' + )->will( + $this->returnValue(true) + ); } if (CustomerAccountServiceInterface::ACCOUNT_CONFIRMATION_REQUIRED == $expected) { $this->_customerModelMock->expects( $this->once() )->method( - 'isConfirmationRequired' - )->will( - $this->returnValue(true) - ); + 'isConfirmationRequired' + )->will( + $this->returnValue(true) + ); } elseif (CustomerAccountServiceInterface::ACCOUNT_CONFIRMED != $expected) { $this->_customerModelMock->expects( $this->once() )->method( - 'getConfirmation' - )->will( - $this->returnValue(false) - ); + 'getConfirmation' + )->will( + $this->returnValue(false) + ); } $customerService = $this->_createService(); @@ -1147,10 +1159,10 @@ public function testCanDelete($isBoolean) $this->_customerModelMock->expects( $this->once() )->method( - 'isDeleteable' - )->will( - $this->returnValue($isBoolean) - ); + 'isDeleteable' + )->will( + $this->returnValue($isBoolean) + ); $customerService = $this->_createService(); $this->assertEquals($isBoolean, $customerService->canDelete(self::ID)); @@ -1183,10 +1195,10 @@ public function testCreateCustomer() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_converter = $this->getMock('Magento\Customer\Model\Converter', [], [], '', false); $this->_converter @@ -1215,10 +1227,10 @@ public function testCreateCustomer() $this->_customerMetadataService->expects( $this->any() )->method( - 'getCustomerAttributeMetadata' - )->will( - $this->returnValue($mockAttribute) - ); + 'getCustomerAttributeMetadata' + )->will( + $this->returnValue($mockAttribute) + ); // verify $this->_converter @@ -1257,10 +1269,10 @@ public function testCreateNewCustomer() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_mockReturnValue( $this->_customerModelMock, @@ -1278,10 +1290,10 @@ public function testCreateNewCustomer() $this->_customerMetadataService->expects( $this->any() )->method( - 'getCustomerAttributeMetadata' - )->will( - $this->returnValue($mockAttribute) - ); + 'getCustomerAttributeMetadata' + )->will( + $this->returnValue($mockAttribute) + ); // verify $this->_converter @@ -1324,10 +1336,10 @@ public function testCreateCustomerWithException() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_mockReturnValue( $this->_customerModelMock, @@ -1345,10 +1357,10 @@ public function testCreateCustomerWithException() $this->_customerMetadataService->expects( $this->any() )->method( - 'getCustomerAttributeMetadata' - )->will( - $this->returnValue($mockAttribute) - ); + 'getCustomerAttributeMetadata' + )->will( + $this->returnValue($mockAttribute) + ); $this->_converter ->expects($this->once()) @@ -1381,10 +1393,10 @@ public function testCreateCustomerWithInputException() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_mockReturnValue($this->_customerModelMock, array('getId' => self::ID, 'getEmail' => 'missingAtSign')); @@ -1395,10 +1407,10 @@ public function testCreateCustomerWithInputException() $this->_customerMetadataService->expects( $this->any() )->method( - 'getCustomerAttributeMetadata' - )->will( - $this->returnValue($mockAttribute) - ); + 'getCustomerAttributeMetadata' + )->will( + $this->returnValue($mockAttribute) + ); // verify $customerService = $this->_createService(); @@ -1406,34 +1418,42 @@ public function testCreateCustomerWithInputException() try { $customerService->createCustomer($customerDetails); } catch (InputException $inputException) { - $this->assertContains( - array('fieldName' => 'firstname', 'code' => InputException::REQUIRED_FIELD, 'value' => null), - $inputException->getParams() + $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getRawMessage()); + $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getMessage()); + $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getLogMessage()); + + $errors = $inputException->getErrors(); + $this->assertCount(6, $errors); + + $this->assertEquals(InputException::REQUIRED_FIELD, $errors[0]->getRawMessage()); + $this->assertEquals('firstname is a required field.', $errors[0]->getMessage()); + $this->assertEquals('firstname is a required field.', $errors[0]->getLogMessage()); + + $this->assertEquals(InputException::REQUIRED_FIELD, $errors[1]->getRawMessage()); + $this->assertEquals('lastname is a required field.', $errors[1]->getMessage()); + $this->assertEquals('lastname is a required field.', $errors[1]->getLogMessage()); + + $this->assertEquals(InputException::INVALID_FIELD_VALUE, $errors[2]->getRawMessage()); + $this->assertEquals( + 'Invalid value of "missingAtSign" provided for the email field.', + $errors[2]->getMessage() ); - $this->assertContains( - array('fieldName' => 'lastname', 'code' => InputException::REQUIRED_FIELD, 'value' => null), - $inputException->getParams() - ); - $this->assertContains( - array( - 'fieldName' => 'email', - 'code' => InputException::INVALID_FIELD_VALUE, - 'value' => 'missingAtSign' - ), - $inputException->getParams() - ); - $this->assertContains( - array('fieldName' => 'dob', 'code' => InputException::REQUIRED_FIELD, 'value' => null), - $inputException->getParams() - ); - $this->assertContains( - array('fieldName' => 'taxvat', 'code' => InputException::REQUIRED_FIELD, 'value' => null), - $inputException->getParams() - ); - $this->assertContains( - array('fieldName' => 'gender', 'code' => InputException::REQUIRED_FIELD, 'value' => null), - $inputException->getParams() + $this->assertEquals( + 'Invalid value of "missingAtSign" provided for the email field.', + $errors[2]->getLogMessage() ); + + $this->assertEquals(InputException::REQUIRED_FIELD, $errors[3]->getRawMessage()); + $this->assertEquals('dob is a required field.', $errors[3]->getMessage()); + $this->assertEquals('dob is a required field.', $errors[3]->getLogMessage()); + + $this->assertEquals(InputException::REQUIRED_FIELD, $errors[4]->getRawMessage()); + $this->assertEquals('taxvat is a required field.', $errors[4]->getMessage()); + $this->assertEquals('taxvat is a required field.', $errors[4]->getLogMessage()); + + $this->assertEquals(InputException::REQUIRED_FIELD, $errors[5]->getRawMessage()); + $this->assertEquals('gender is a required field.', $errors[5]->getMessage()); + $this->assertEquals('gender is a required field.', $errors[5]->getLogMessage()); } } @@ -1446,10 +1466,10 @@ public function testGetCustomer() $this->_customerModelMock->expects( $this->any() )->method( - 'load' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'load' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_mockReturnValue( $this->_customerModelMock, @@ -1466,28 +1486,28 @@ public function testGetCustomer() $attributeModelMock->expects( $this->any() )->method( - 'getAttributeCode' - )->will( - $this->returnValue('attribute_code') - ); + 'getAttributeCode' + )->will( + $this->returnValue('attribute_code') + ); $this->_customerModelMock->expects( $this->any() )->method( - 'getData' - )->with( - $this->equalTo('attribute_code') - )->will( - $this->returnValue('ATTRIBUTE_VALUE') - ); + 'getData' + )->with( + $this->equalTo('attribute_code') + )->will( + $this->returnValue('ATTRIBUTE_VALUE') + ); $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $customerService = $this->_createService(); @@ -1496,7 +1516,7 @@ public function testGetCustomer() $this->assertEquals(self::FIRSTNAME, $actualCustomer->getFirstName()); $this->assertEquals(self::LASTNAME, $actualCustomer->getLastName()); $this->assertEquals(self::EMAIL, $actualCustomer->getEmail()); - $this->assertEquals(4, count(\Magento\Service\DataObjectConverter::toFlatArray($actualCustomer))); + $this->assertEquals(4, count(\Magento\Framework\Service\EavDataObjectConverter::toFlatArray($actualCustomer))); } public function testSearchCustomersEmpty() @@ -1504,18 +1524,18 @@ public function testSearchCustomersEmpty() $collectionMock = $this->getMockBuilder( 'Magento\Customer\Model\Resource\Customer\Collection' )->disableOriginalConstructor()->setMethods( - array('addNameToSelect', 'addFieldToFilter', 'getSize', 'load', 'joinAttribute') - )->getMock(); + array('addNameToSelect', 'addFieldToFilter', 'getSize', 'load', 'joinAttribute') + )->getMock(); $collectionMock->expects($this->any())->method('joinAttribute')->will($this->returnSelf()); $this->_mockReturnValue($collectionMock, array('getSize' => 0)); $this->_customerFactoryMock->expects( $this->atLeastOnce() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerModelMock->expects($this->any())->method('load')->will($this->returnSelf()); @@ -1527,17 +1547,17 @@ public function testSearchCustomersEmpty() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerMetadataService->expects( $this->any() )->method( - 'getAllCustomerAttributeMetadata' - )->will( - $this->returnValue(array()) - ); + 'getAllCustomerAttributeMetadata' + )->will( + $this->returnValue(array()) + ); $customerService = $this->_createService(); $filterBuilder = new FilterBuilder(); @@ -1550,11 +1570,11 @@ public function testSearchCustomersEmpty() public function testSearchCustomers() { - $collectionMock = $this->getMockBuilder( - '\Magento\Customer\Model\Resource\Customer\Collection' - )->disableOriginalConstructor()->setMethods( - array('addNameToSelect', 'addFieldToFilter', 'getSize', 'load', 'getItems', 'getIterator', 'joinAttribute') - )->getMock(); + $collectionMock = $this->getMockBuilder('\Magento\Customer\Model\Resource\Customer\Collection') + ->disableOriginalConstructor() + ->setMethods( + ['addNameToSelect', 'addFieldToFilter', 'getSize', 'load', 'getItems', 'getIterator', 'joinAttribute'] + )->getMock(); $collectionMock->expects($this->any())->method('joinAttribute')->will($this->returnSelf()); $this->_mockReturnValue( @@ -1569,10 +1589,10 @@ public function testSearchCustomers() $this->_customerFactoryMock->expects( $this->atLeastOnce() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_mockReturnValue( $this->_customerModelMock, @@ -1588,26 +1608,26 @@ public function testSearchCustomers() $this->_customerFactoryMock->expects( $this->any() )->method( - 'create' - )->will( - $this->returnValue($this->_customerModelMock) - ); + 'create' + )->will( + $this->returnValue($this->_customerModelMock) + ); $this->_customerAddressServiceMock->expects( $this->once() )->method( - 'getAddresses' - )->will( - $this->returnValue(array()) - ); + 'getAddresses' + )->will( + $this->returnValue(array()) + ); $this->_customerMetadataService->expects( $this->any() )->method( - 'getAllCustomerAttributeMetadata' - )->will( - $this->returnValue(array()) - ); + 'getAllCustomerAttributeMetadata' + )->will( + $this->returnValue(array()) + ); $customerService = $this->_createService(); $filterBuilder = new FilterBuilder(); @@ -1641,17 +1661,17 @@ public function testGetCustomerDetails() $this->_customerAddressServiceMock->expects( $this->once() )->method( - 'getAddresses' - )->will( - $this->returnValue(array($addressMock)) - ); + 'getAddresses' + )->will( + $this->returnValue(array($addressMock)) + ); $customerDetails = $service->getCustomerDetails(1); $this->assertEquals($customerMock, $customerDetails->getCustomer()); $this->assertEquals(array($addressMock), $customerDetails->getAddresses()); } /** - * @expectedException \Magento\Exception\NoSuchEntityException + * @expectedException \Magento\Framework\Exception\NoSuchEntityException */ public function testGetCustomerDetailsWithException() { @@ -1665,39 +1685,53 @@ public function testGetCustomerDetailsWithException() ->disableOriginalConstructor() ->getMock(); $service = $this->_createService(); - $this->_customerRegistry - ->expects($this->any()) + $this->_customerRegistry->expects($this->once()) ->method('retrieve') - ->will($this->throwException(new NoSuchEntityException('customerId', 1))); + ->will( + $this->throwException( + new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + [ + 'fieldName' => 'testField', + 'fieldValue' => 'value', + ] + ) + ) + ); $this->_converter->expects( $this->any() )->method( - 'createCustomerFromModel' - )->will( - $this->returnValue($customerMock) - ); + 'createCustomerFromModel' + )->will( + $this->returnValue($customerMock) + ); $this->_customerAddressServiceMock->expects( $this->any() )->method( - 'getAddresses' - )->will( - $this->returnValue(array($addressMock)) - ); + 'getAddresses' + )->will( + $this->returnValue(array($addressMock)) + ); $service->getCustomerDetails(1); } public function testIsEmailAvailable() { + $this->_converter = $this->getMockBuilder('\Magento\Customer\Model\Converter') + ->disableOriginalConstructor() + ->getMock(); $service = $this->_createService(); - $this->_customerRegistry - ->expects($this->any()) + $this->_customerRegistry->expects($this->once()) ->method('retrieveByEmail') ->will( $this->throwException( - (new NoSuchEntityException('email', self::EMAIL))->addField('websiteId', self::WEBSITE_ID) + new NoSuchEntityException( + NoSuchEntityException::MESSAGE_SINGLE_FIELD, + ['fieldName' => 'testField', 'fieldValue' => 'value'] + ) ) ); - $this->assertTrue($service->isEmailAvailable(self::EMAIL, self::WEBSITE_ID)); + $this->assertTrue($service->isEmailAvailable('email', 1)); } public function testIsEmailAvailableNegative() @@ -1791,6 +1825,103 @@ public function testCreateAccountMailException() // If we get no mail exception, the test in considered a success } + public function testGetCustomerByEmail() + { + + $this->_converter = $this->getMockBuilder('Magento\Customer\Model\Converter') + ->disableOriginalConstructor()->getMock(); + + $this->_customerRegistry->expects($this->any()) + ->method('retrieveByEmail') + ->will($this->returnValue($this->_customerModelMock)); + + $customerDataMock = $this->getMockBuilder( + 'Magento\Customer\Service\V1\Data\Customer' + )->setMethods(['getId', 'getFirstname', 'getLastname', 'getEmail']) + ->disableOriginalConstructor()->getMock(); + + $defaultWebsiteId = 7; + + $this->_mockReturnValue( + $customerDataMock, + array( + 'getId' => self::ID, + 'getFirstname' => self::FIRSTNAME, + 'getLastname' => self::LASTNAME, + 'getName' => self::NAME, + 'getEmail' => self::EMAIL + ) + ); + + $this->_storeMock->expects($this->any())->method('getWebSiteId')->will($this->returnValue($defaultWebsiteId)); + $this->_converter->expects($this->once()) + ->method('createCustomerFromModel')->with($this->_customerModelMock) + ->will($this->returnValue($customerDataMock)); + + $customerService = $this->_createService(); + $actualCustomer = $customerService->getCustomerByEmail(self::EMAIL); + + $this->assertEquals(self::ID, $actualCustomer->getId()); + $this->assertEquals(self::FIRSTNAME, $actualCustomer->getFirstName()); + $this->assertEquals(self::LASTNAME, $actualCustomer->getLastName()); + $this->assertEquals(self::EMAIL, $actualCustomer->getEmail()); + } + + public function testGetCustomerDetailsByEmail() + { + $this->_converter = $this->getMockBuilder('Magento\Customer\Model\Converter') + ->disableOriginalConstructor()->getMock(); + + $customerDataMock = $this->getMockBuilder('Magento\Customer\Service\V1\Data\Customer') + ->disableOriginalConstructor()->getMock(); + + $addressMock = $this->getMockBuilder('Magento\Customer\Service\V1\Data\Address') + ->disableOriginalConstructor()->getMock(); + + $this->_customerAddressServiceMock + ->expects($this->once()) + ->method('getAddresses') + ->will($this->returnValue(array($addressMock))); + $defaultWebsiteId = 7; + $this->_storeMock->expects($this->any())->method('getWebSiteId')->will($this->returnValue($defaultWebsiteId)); + $this->_customerRegistry->expects($this->once()) + ->method('retrieveByEmail')->with(self::EMAIL, $defaultWebsiteId) + ->will($this->returnValue($this->_customerModelMock)); + $this->_converter->expects($this->once()) + ->method('createCustomerFromModel')->with($this->_customerModelMock) + ->will($this->returnValue($customerDataMock)); + + $customerService = $this->_createService(); + $actualCustomerDetails = $customerService->getCustomerDetailsByEmail(self::EMAIL, $defaultWebsiteId); + + $this->assertEquals($customerDataMock, $actualCustomerDetails->getCustomer()); + $this->assertEquals(array($addressMock), $actualCustomerDetails->getAddresses()); + + } + + public function testDeleteCustomerByEmail() + { + $this->_converter = $this->getMockBuilder('\Magento\Customer\Model\Converter') + ->setMethods(['getCustomerModelByEmail', 'createCustomerFromModel']) + ->disableOriginalConstructor() + ->getMock(); + + $defaultWebsiteId = 7; + + $this->_storeMock->expects($this->any()) + ->method('getWebSiteId') + ->will($this->returnValue($defaultWebsiteId)); + $this->_customerRegistry->expects($this->once()) + ->method('retrieveByEmail') + ->with(self::EMAIL, $defaultWebsiteId) + ->will($this->returnValue($this->_customerModelMock)); + $this->_customerModelMock->expects($this->once()) + ->method('delete'); + + $customerService = $this->_createService(); + $this->assertTrue($customerService->deleteCustomerByEmail(self::EMAIL, $defaultWebsiteId)); + } + private function _setupStoreMock() { $this->_storeManagerMock = $this->getMockBuilder( @@ -1804,12 +1935,13 @@ private function _setupStoreMock() $this->_storeManagerMock->expects( $this->any() )->method( - 'getStore' - )->will( - $this->returnValue($this->_storeMock) - ); + 'getStore' + )->will( + $this->returnValue($this->_storeMock) + ); } + /** * @param \PHPUnit_Framework_MockObject_MockObject $mock * @param array $valueMap @@ -1838,7 +1970,8 @@ private function _createService() 'customerMetadataService' => $this->_customerMetadataService, 'customerRegistry' => $this->_customerRegistry, 'encryptor' => $this->_encryptorMock, - 'logger' => $this->_loggerMock + 'logger' => $this->_loggerMock, + 'url' => $this->_urlMock, ] ); return $customerService; diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php index 3d429f4c9a3bd..fd2485efb6ca3 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAddressServiceTest.php @@ -23,10 +23,11 @@ */ namespace Magento\Customer\Service\V1; -use Magento\Exception\InputException; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\InputException; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Customer\Service\V1\Data\RegionBuilder; use Magento\Customer\Service\V1\Data\CustomerBuilder; +use Magento\Framework\Service\Data\Eav\AttributeValueBuilder; /** * \Magento\Customer\Service\V1\CustomerAddressService @@ -257,7 +258,10 @@ public function setUp() array('regionBuilder' => $regionBuilder, 'metadataService' => $metadataService) ); - $customerBuilder = new CustomerBuilder($metadataService); + $customerBuilder = $objectManagerHelper->getObject( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + ['metadataService' => $metadataService] + ); $this->_customerConverter = new \Magento\Customer\Model\Converter( $customerBuilder, @@ -622,7 +626,7 @@ public function testSaveAddressesIdSetButNotAlreadyExisting() public function testSaveAddressesCustomerIdNotExist() { - $expectedException = new \Magento\Exception\NoSuchEntityException('customerId', 4200); + $expectedException = NoSuchEntityException::singleField('customerId', 4200); // Setup Customer mock $this->_customerRegistryMock->expects($this->once()) @@ -663,7 +667,7 @@ public function testSaveAddressesCustomerIdNotExist() try { $customerService->saveAddresses(4200, array($this->_addressBuilder->create())); $this->fail("Expected NoSuchEntityException not caught"); - } catch (\Magento\Exception\NoSuchEntityException $e) { + } catch (NoSuchEntityException $e) { $this->assertSame($e, $expectedException); } } @@ -691,7 +695,7 @@ public function testDeleteAddressFromCustomerBadAddrId() $mockAddress->expects($this->any())->method('getCustomerId')->will($this->returnValue(self::ID)); $this->_addressRegistryMock->expects($this->once()) ->method('retrieve') - ->will($this->throwException(new \Magento\Exception\NoSuchEntityException('addressId', 2))); + ->will($this->throwException(NoSuchEntityException::singleField('addressId', 2))); // verify delete is called on the mock address model $mockAddress->expects($this->never())->method('delete'); @@ -701,8 +705,7 @@ public function testDeleteAddressFromCustomerBadAddrId() $customerService->deleteAddress(2); $this->fail("Expected NoSuchEntityException not caught"); } catch (NoSuchEntityException $exception) { - $this->assertSame($exception->getCode(), \Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY); - $this->assertSame($exception->getParams(), array('addressId' => 2)); + $this->assertSame('No such entity with addressId = 2', $exception->getMessage()); } } @@ -744,19 +747,12 @@ public function testSaveAddressesWithValidatorException() try { $customerService->saveAddresses(1, array($this->_addressBuilder->create())); $this->fail("Expected InputException not caught"); - } catch (InputException $exception) { - $this->assertSame($exception->getCode(), \Magento\Exception\InputException::INPUT_EXCEPTION); - $this->assertSame( - $exception->getParams(), - array( - array( - 'index' => 0, - 'fieldName' => 'firstname', - 'code' => \Magento\Exception\InputException::REQUIRED_FIELD, - 'value' => null - ) - ) - ); + } catch (InputException $inputException) { + $this->assertEquals(InputException::REQUIRED_FIELD, $inputException->getRawMessage()); + $this->assertEquals('firstname is a required field.', $inputException->getMessage()); + $this->assertEquals('firstname is a required field.', $inputException->getLogMessage()); + $this->assertTrue($inputException->wasErrorAdded()); + $this->assertEmpty($inputException->getErrors()); } } @@ -825,12 +821,12 @@ public function testValidateAddressesBoth() $customerService = $this->_createService(); try { - $customerService->validateAddresses(array('b' => $addressBad, 'g' => $addressGood)); + $customerService->validateAddresses(array($addressBad, $addressGood)); $this->fail("InputException was expected but not thrown"); } catch (InputException $actualException) { $expectedException = new InputException(); - $expectedException->addError('REQUIRED_FIELD', 'firstname', '', array('index' => 'b')); - $this->assertEquals($expectedException->getErrors(), $actualException->getErrors()); + $expectedException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'firstname', 'index' => 0]); + $this->assertEquals($expectedException, $actualException); } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerCurrentServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerCurrentServiceTest.php index 0b546fed3da07..da50ae07cebee 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerCurrentServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerCurrentServiceTest.php @@ -36,7 +36,7 @@ class CustomerCurrentServiceTest extends \PHPUnit_Framework_TestCase protected $customerSessionMock; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $layoutMock; @@ -61,7 +61,7 @@ class CustomerCurrentServiceTest extends \PHPUnit_Framework_TestCase protected $requestMock; /** - * @var \Magento\Module\Manager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Manager|\PHPUnit_Framework_MockObject_MockObject */ protected $moduleManagerMock; @@ -86,7 +86,7 @@ class CustomerCurrentServiceTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->customerSessionMock = $this->getMock('Magento\Customer\Model\Session', array(), array(), '', false); - $this->layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->customerDataBuilderMock = $this->getMock( 'Magento\Customer\Service\V1\Data\CustomerBuilder', array('create', 'setGroupId'), @@ -109,7 +109,7 @@ public function setUp() false ); $this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); - $this->moduleManagerMock = $this->getMock('Magento\Module\Manager', array(), array(), '', false); + $this->moduleManagerMock = $this->getMock('Magento\Framework\Module\Manager', array(), array(), '', false); $this->viewMock = $this->getMock('Magento\Framework\App\View', array(), array(), '', false); $this->customerCurrentService = new \Magento\Customer\Service\V1\CustomerCurrentService( diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php index ee7b721ff261f..402b86858ee7e 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerMetadataServiceTest.php @@ -25,7 +25,7 @@ */ namespace Magento\Customer\Service\V1; -use Magento\Exception\NoSuchEntityException; +use Magento\Framework\Exception\NoSuchEntityException; class CustomerMetadataServiceTest extends \PHPUnit_Framework_TestCase { @@ -197,11 +197,10 @@ public function testGetAttributeMetadataWithoutAttributeMetadata() try { $service->getAttributeMetadata('entityCode', 'attributeId'); $this->fail('Expected exception not thrown.'); - } catch (\Magento\Exception\NoSuchEntityException $e) { - $this->assertEquals(\Magento\Exception\NoSuchEntityException::NO_SUCH_ENTITY, $e->getCode()); - $this->assertEquals( - array('entityType' => 'entityCode', 'attributeCode' => 'attributeId'), - $e->getParams() + } catch (NoSuchEntityException $e) { + $this->assertSame( + "No such entity with entityType = entityCode, attributeCode = attributeId", + $e->getMessage() ); } } @@ -332,8 +331,10 @@ public function testGetCustomerAttributeMetadataWithoutAttributeMetadata() $service->getCustomerAttributeMetadata('attributeId'); $this->fail('Expected exception not thrown.'); } catch (NoSuchEntityException $e) { - $this->assertEquals(NoSuchEntityException::NO_SUCH_ENTITY, $e->getCode()); - $this->assertEquals(array('entityType' => 'customer', 'attributeCode' => 'attributeId'), $e->getParams()); + $this->assertSame( + "No such entity with entityType = customer, attributeCode = attributeId", + $e->getMessage() + ); } } @@ -369,10 +370,9 @@ public function testGetAddressAttributeMetadataWithoutAttributeMetadata() $service->getAddressAttributeMetadata('attributeId'); $this->fail('Expected exception not thrown.'); } catch (NoSuchEntityException $e) { - $this->assertEquals(NoSuchEntityException::NO_SUCH_ENTITY, $e->getCode()); - $this->assertEquals( - array('entityType' => 'customer_address', 'attributeCode' => 'attributeId'), - $e->getParams() + $this->assertSame( + "No such entity with entityType = customer_address, attributeCode = attributeId", + $e->getMessage() ); } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php index 890bb646f3f37..e19e605ae9859 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressConverterTest.php @@ -24,6 +24,7 @@ namespace Magento\Customer\Service\V1\Data; use Magento\Customer\Service\V1\CustomerMetadataService; +use Magento\Framework\Service\Data\Eav\AttributeValue; class AddressConverterTest extends \PHPUnit_Framework_TestCase { @@ -49,8 +50,8 @@ protected function setUp() )->will( $this->returnValue( array( - new \Magento\Object(array('attribute_code' => 'warehouse_zip')), - new \Magento\Object(array('attribute_code' => 'warehouse_alternate')) + new \Magento\Framework\Object(array('attribute_code' => 'warehouse_zip')), + new \Magento\Framework\Object(array('attribute_code' => 'warehouse_alternate')) ) ) ); @@ -85,8 +86,16 @@ public function testToFlatArrayCustomAttributes() 'firstname' => 'John', 'lastname' => 'Doe', 'unknown_key' => 'Golden Necklace', - 'warehouse_zip' => '78777', - 'warehouse_alternate' => '90051' + 'custom_attributes' => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78777' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ] ); $expected = array( @@ -106,13 +115,17 @@ public function testToFlatArrayCustomAttributes() ); $addressData = $this->_sampleAddressDataObject(); - $addressData = (new AddressBuilder( - new RegionBuilder(), - $this->_customerMetadataService - ))->mergeDataObjectWithArray( - $addressData, - $updatedAddressData + $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Service\Data\Eav\AttributeValueBuilder'); + /** @var \Magento\Customer\Service\V1\Data\AddressBuilder $addressDataBuilder */ + $addressDataBuilder = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\AddressBuilder', + [ + 'valueBuilder' => $valueBuilder, + 'regionBuilder' => new RegionBuilder(), + 'metadataService' => $this->_customerMetadataService + ] ); + $addressData = $addressDataBuilder->mergeDataObjectWithArray($addressData, $updatedAddressData); $result = AddressConverter::toFlatArray($addressData); $this->assertEquals($expected, $result); @@ -123,27 +136,33 @@ public function testToFlatArrayCustomAttributes() */ protected function _sampleAddressDataObject() { - $regionData = (new RegionBuilder())->setRegion('Texas')->setRegionId(1)->setRegionCode('TX'); - $addressData = (new AddressBuilder( - $regionData, - $this->_customerMetadataService - ))->setId( - '1' - )->setDefaultBilling( - true - )->setDefaultShipping( - false - )->setCity( - 'Austin' - )->setFirstname( - 'John' - )->setLastname( - 'Doe' - )->setCountryId( - 'US' - )->setStreet( - array('7700 W Parmer Ln') - ); + $regionBuilder = (new RegionBuilder())->setRegion('Texas')->setRegionId(1)->setRegionCode('TX'); + $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Service\Data\Eav\AttributeValueBuilder'); + /** @var \Magento\Customer\Service\V1\Data\AddressBuilder $addressData */ + $addressData = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\AddressBuilder', + [ + 'valueBuilder' => $valueBuilder, + 'regionBuilder' => $regionBuilder, + 'metadataService' => $this->_customerMetadataService + ] + )->setId( + '1' + )->setDefaultBilling( + true + )->setDefaultShipping( + false + )->setCity( + 'Austin' + )->setFirstname( + 'John' + )->setLastname( + 'Doe' + )->setCountryId( + 'US' + )->setStreet( + array('7700 W Parmer Ln') + ); return $addressData->create(); } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php index bc4a3e8e5dc96..1ddfe1eb67daf 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/AddressTest.php @@ -26,6 +26,8 @@ use Magento\Customer\Service\V1\Data\Address; use Magento\Customer\Service\V1\Data\AddressBuilder; use Magento\Customer\Service\V1\Data\RegionBuilder; +use Magento\Framework\Service\Data\Eav\AttributeValue; +use Magento\Framework\Service\Data\Eav\AttributeValueBuilder; class AddressTest extends \PHPUnit_Framework_TestCase { @@ -92,6 +94,14 @@ class AddressTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Service\V1\CustomerMetadataService */ private $_customerMetadataService; + /** @var \Magento\Framework\Service\Data\Eav\AttributeValueBuilder */ + private $_valueBuilder; + + /** + * @var \Magento\TestFramework\Helper\ObjectManager + */ + protected $objectManagerHelper; + protected function setUp() { $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -109,12 +119,21 @@ protected function setUp() )->will( $this->returnValue( array( - new \Magento\Object(array('attribute_code' => 'warehouse_zip')), - new \Magento\Object(array('attribute_code' => 'warehouse_alternate')) + new \Magento\Framework\Object(array('attribute_code' => 'warehouse_zip')), + new \Magento\Framework\Object(array('attribute_code' => 'warehouse_alternate')) ) ) ); - $this->_addressBuilder = new AddressBuilder($regionBuilder, $this->_customerMetadataService); + $this->_valueBuilder = $objectManagerHelper + ->getObject('Magento\Framework\Service\Data\Eav\AttributeValueBuilder'); + $this->_addressBuilder = $objectManagerHelper->getObject( + 'Magento\Customer\Service\V1\Data\AddressBuilder', + [ + 'valueBuilder' => $this->_valueBuilder, + 'regionBuilder' => $regionBuilder, + 'metadataService' => $this->_customerMetadataService + ] + ); } public function testMinimalAddress() @@ -266,35 +285,45 @@ public function testSetCustomAttribute() 'warehouse_alternate', '90051' )->create(); - $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')); - $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')); - - $attributes = array( - Address::CUSTOM_ATTRIBUTES_KEY => array('warehouse_zip' => '78777', 'warehouse_alternate' => '90051') - ); - $this->assertEquals($attributes[Customer::CUSTOM_ATTRIBUTES_KEY], $address->getCustomAttributes()); + $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')->getValue()); + $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')->getValue()); + + foreach ($address->getCustomAttributes() as $customAttribute) { + $attributes[Customer::CUSTOM_ATTRIBUTES_KEY][$customAttribute->getAttributeCode()] = [ + AttributeValue::ATTRIBUTE_CODE => $customAttribute->getAttributeCode(), + AttributeValue::VALUE => $customAttribute->getValue() + ]; + } $this->assertEquals($attributes, $address->__toArray()); } public function testSetCustomAttributes() { - $addressData = array( - 'email' => 'test@example.com', - 'firstname' => 'John', - 'lastname' => 'Doe', - 'unknown_key' => 'Golden Necklace', - 'warehouse_zip' => '78777', - 'warehouse_alternate' => '90051' - ); - $expectedData = array( - Address::CUSTOM_ATTRIBUTES_KEY => array('warehouse_zip' => '78777', 'warehouse_alternate' => '90051') - ); - $this->_addressBuilder->populateWithArray(array()); - $address = $this->_addressBuilder->setCustomAttributes($addressData)->create(); - $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')); - $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')); - $this->assertEquals($expectedData[Address::CUSTOM_ATTRIBUTES_KEY], $address->getCustomAttributes()); - $this->assertEquals($expectedData, $address->__toArray()); + $customerAttributes = [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78777' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ]; + + $attributeValue1 = $this->_valueBuilder + ->populateWithArray($customerAttributes['warehouse_zip']) + ->create(); + $attributeValue2 = $this->_valueBuilder + ->populateWithArray($customerAttributes['warehouse_alternate']) + ->create(); + + $address = $this->_addressBuilder + ->setCustomAttributes([$attributeValue1, $attributeValue2]) + ->create(); + + $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')->getValue()); + $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')->getValue()); + $this->assertEquals($customerAttributes, $address->__toArray()[Customer::CUSTOM_ATTRIBUTES_KEY]); } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php index 43998673157d3..dcd27dadff0b1 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerBuilderTest.php @@ -23,10 +23,10 @@ */ namespace Magento\Customer\Service\V1\Data; -use Magento\Customer\Service\V1\CustomerMetadataService; +use Magento\Framework\Service\Data\Eav\AttributeValue; use Magento\Customer\Service\V1\Data\Eav\AttributeMetadataBuilder; -use Magento\Service\Data\AbstractObject; -use Magento\Service\Data\AbstractObjectBuilder; +use Magento\Framework\Service\Data\AbstractObject; +use Magento\Framework\Service\Data\AbstractObjectBuilder; class CustomerBuilderTest extends \PHPUnit_Framework_TestCase { @@ -39,6 +39,9 @@ class CustomerBuilderTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Customer\Service\V1\CustomerMetadataService */ private $_customerMetadataService; + /** @var \Magento\Framework\Service\Data\Eav\AttributeValueBuilder */ + private $_valueBuilder; + protected function setUp() { $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); @@ -55,12 +58,21 @@ protected function setUp() )->will( $this->returnValue( array( - new \Magento\Object(array('attribute_code' => 'warehouse_zip')), - new \Magento\Object(array('attribute_code' => 'warehouse_alternate')) + new \Magento\Framework\Object(array('attribute_code' => 'warehouse_zip')), + new \Magento\Framework\Object(array('attribute_code' => 'warehouse_alternate')) ) ) ); - $this->_customerBuilder = new CustomerBuilder($this->_customerMetadataService); + $this->_valueBuilder = $this->_objectManager->getObject( + 'Magento\Framework\Service\Data\Eav\AttributeValueBuilder' + ); + $this->_customerBuilder = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + [ + 'valueBuilder' => $this->_valueBuilder, + 'metadataService' => $this->_customerMetadataService + ] + ); parent::setUp(); } @@ -150,15 +162,34 @@ public function testMergeDataObjectsWitArray() // @codingStandardsIgnoreEnd public function testPopulateException() { - $addressData = (new AddressBuilder(new RegionBuilder(), $this->_customerMetadataService))->create(); + $addressData = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\AddressBuilder', + [ + 'valueBuilder' => $this->_valueBuilder, + 'regionBuilder' => new RegionBuilder(), + 'metadataService' => $this->_customerMetadataService + ] + )->create(); $this->_customerBuilder->populate($addressData); } public function testPopulate() { $email = 'test@example.com'; - $customerBuilder1 = new CustomerBuilder($this->_customerMetadataService); - $customerBuilder2 = new CustomerBuilder($this->_customerMetadataService); + $customerBuilder1 = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + [ + 'valueBuilder' => $this->_valueBuilder, + 'metadataService' => $this->_customerMetadataService + ] + ); + $customerBuilder2 = $this->_objectManager->getObject( + 'Magento\Customer\Service\V1\Data\CustomerBuilder', + [ + 'valueBuilder' => $this->_valueBuilder, + 'metadataService' => $this->_customerMetadataService + ] + ); $customer = $customerBuilder1->setEmail($email)->create(); $customerBuilder2->setFirstname('fname')->setLastname('lname')->create(); //Make sure email is not populated as yet @@ -188,58 +219,97 @@ public function testPopulateWithArrayCustomAttributes() 'firstname' => 'John', 'lastname' => 'Doe', 'unknown_key' => 'Golden Necklace', - 'warehouse_zip' => '78777', - 'warehouse_alternate' => '90051' + Customer::CUSTOM_ATTRIBUTES_KEY => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78777' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ] ); $customer = $this->_customerBuilder->populateWithArray($customerData)->create(); - - $expectedData = array( - 'email' => 'test@example.com', - 'firstname' => 'John', - 'lastname' => 'Doe', - Customer::CUSTOM_ATTRIBUTES_KEY => array('warehouse_zip' => '78777', 'warehouse_alternate' => '90051') - ); - $this->assertEquals($expectedData, $customer->__toArray()); + unset($customerData['unknown_key']); + $this->assertEquals($customerData, $customer->__toArray()); } public function testSetCustomAttribute() { - $customer = $this->_customerBuilder->setCustomAttribute( + $this->_customerBuilder->populateWithArray(array()); + $address = $this->_customerBuilder->setCustomAttribute( 'warehouse_zip', '78777' )->setCustomAttribute( - 'warehouse_alternate', - '90051' - )->create(); - $this->assertEquals('78777', $customer->getCustomAttribute('warehouse_zip')); - $this->assertEquals('90051', $customer->getCustomAttribute('warehouse_alternate')); + 'warehouse_alternate', + '90051' + )->create(); + $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')->getValue()); + $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')->getValue()); - $customAttributes = array( - Customer::CUSTOM_ATTRIBUTES_KEY => array('warehouse_zip' => '78777', 'warehouse_alternate' => '90051') - ); - $this->assertEquals($customAttributes[Customer::CUSTOM_ATTRIBUTES_KEY], $customer->getCustomAttributes()); - $this->assertEquals($customAttributes, $customer->__toArray()); + foreach ($address->getCustomAttributes() as $customAttribute) { + $attributes[Customer::CUSTOM_ATTRIBUTES_KEY][$customAttribute->getAttributeCode()] = [ + AttributeValue::ATTRIBUTE_CODE => $customAttribute->getAttributeCode(), + AttributeValue::VALUE => $customAttribute->getValue() + ]; + } + $this->assertEquals($attributes, $address->__toArray()); } public function testSetCustomAttributes() { + + $customerAttributes = [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78777' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ]; + + $attributeValue1 = $this->_valueBuilder + ->populateWithArray($customerAttributes['warehouse_zip']) + ->create(); + $attributeValue2 = $this->_valueBuilder + ->populateWithArray($customerAttributes['warehouse_alternate']) + ->create(); + + $address = $this->_customerBuilder->setCustomAttributes([$attributeValue1, $attributeValue2]) + ->create(); + + $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')->getValue()); + $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')->getValue()); + $this->assertEquals($customerAttributes, $address->__toArray()[Customer::CUSTOM_ATTRIBUTES_KEY]); + } + + public function testToArrayCustomAttributes() + { + $customAttributes = [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78777' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ]; $customerData = array( 'email' => 'test@example.com', 'firstname' => 'John', 'lastname' => 'Doe', 'unknown_key' => 'Golden Necklace', - 'warehouse_zip' => '78777', - 'warehouse_alternate' => '90051' + Customer::CUSTOM_ATTRIBUTES_KEY => $customAttributes ); - $expectedData = array( - Customer::CUSTOM_ATTRIBUTES_KEY => array('warehouse_zip' => '78777', 'warehouse_alternate' => '90051') + $customer = $this->_customerBuilder->populateWithArray($customerData)->create(); + $this->assertEquals( + $customAttributes, + $customer->__toArray()[Customer::CUSTOM_ATTRIBUTES_KEY] ); - $customer = $this->_customerBuilder->setCustomAttributes($customerData)->create(); - - $this->assertEquals('78777', $customer->getCustomAttribute('warehouse_zip')); - $this->assertEquals('90051', $customer->getCustomAttribute('warehouse_alternate')); - $this->assertEquals($expectedData[Customer::CUSTOM_ATTRIBUTES_KEY], $customer->getCustomAttributes()); - $this->assertEquals($expectedData, $customer->__toArray()); } public function testMergeDataObjectWithArrayCustomData() @@ -249,23 +319,61 @@ public function testMergeDataObjectWithArrayCustomData() 'firstname' => 'John', 'lastname' => 'Doe', 'unknown_key' => 'Golden Necklace', - 'warehouse_zip' => '78777', - 'warehouse_alternate' => '90051' + Customer::CUSTOM_ATTRIBUTES_KEY => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78777' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ] + ); + $customer = $this->_customerBuilder->populateWithArray($customerData)->create(); + + $customer2 = $this->_customerBuilder->mergeDataObjectWithArray( + $customer, + [ + 'lastname' => 'Johnson', + 'unknown_key' => 'Golden Necklace', + Customer::CUSTOM_ATTRIBUTES_KEY => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78666' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ] + ] ); + $expectedData = array( 'email' => 'test@example.com', 'firstname' => 'John', 'lastname' => 'Johnson', - Customer::CUSTOM_ATTRIBUTES_KEY => array('warehouse_zip' => '78666', 'warehouse_alternate' => '90051') - ); - $customer = $this->_customerBuilder->populateWithArray($customerData)->create(); - $customer2 = $this->_customerBuilder->mergeDataObjectWithArray( - $customer, - array('unknown_key' => 'Golden Necklace', 'warehouse_zip' => '78666', 'lastname' => 'Johnson') + Customer::CUSTOM_ATTRIBUTES_KEY => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78666' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ] ); - $this->assertEquals('78666', $customer2->getCustomAttribute('warehouse_zip')); - $this->assertEquals('90051', $customer2->getCustomAttribute('warehouse_alternate')); - $this->assertEquals($expectedData[Customer::CUSTOM_ATTRIBUTES_KEY], $customer2->getCustomAttributes()); + + $this->assertEquals('78666', $customer2->getCustomAttribute('warehouse_zip')->getValue()); + $this->assertEquals('90051', $customer2->getCustomAttribute('warehouse_alternate')->getValue()); + foreach ($customer2->getCustomAttributes() as $customAttribute) { + $this->assertEquals( + $expectedData[Customer::CUSTOM_ATTRIBUTES_KEY][$customAttribute->getAttributeCode()]['value'], + $customAttribute->getValue() + ); + } $this->assertEquals($expectedData, $customer2->__toArray()); } @@ -276,29 +384,55 @@ public function testMergeDataObjectsCustomData() 'firstname' => 'John', 'lastname' => 'Doe', 'unknown_key' => 'Golden Necklace', - 'warehouse_zip' => '78777', - 'warehouse_alternate' => '90051' + Customer::CUSTOM_ATTRIBUTES_KEY => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78777' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ] ); $customer2Data = array( 'email' => 'test@example.com', 'firstname' => 'John', 'lastname' => 'Johnson', 'unknown_key' => 'Golden Necklace', - 'warehouse_zip' => '78666', - 'warehouse_alternate' => '90051' + Customer::CUSTOM_ATTRIBUTES_KEY => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78666' + ] + ] ); $expectedData = array( 'email' => 'test@example.com', 'firstname' => 'John', 'lastname' => 'Johnson', - Customer::CUSTOM_ATTRIBUTES_KEY => array('warehouse_zip' => '78666', 'warehouse_alternate' => '90051') + Customer::CUSTOM_ATTRIBUTES_KEY => [ + 'warehouse_zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', + AttributeValue::VALUE => '78666' + ], + 'warehouse_alternate' => [ + AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', + AttributeValue::VALUE => '90051' + ] + ] ); $customer1 = $this->_customerBuilder->populateWithArray($customer1Data)->create(); $customer2 = $this->_customerBuilder->populateWithArray($customer2Data)->create(); $customer3 = $this->_customerBuilder->mergeDataObjects($customer1, $customer2); - $this->assertEquals('78666', $customer3->getCustomAttribute('warehouse_zip')); - $this->assertEquals('90051', $customer3->getCustomAttribute('warehouse_alternate')); - $this->assertEquals($expectedData[Customer::CUSTOM_ATTRIBUTES_KEY], $customer3->getCustomAttributes()); + $this->assertEquals('78666', $customer3->getCustomAttribute('warehouse_zip')->getValue()); + $this->assertEquals('90051', $customer3->getCustomAttribute('warehouse_alternate')->getValue()); + foreach ($customer3->getCustomAttributes() as $customAttribute) { + $this->assertEquals( + $expectedData[Customer::CUSTOM_ATTRIBUTES_KEY][$customAttribute->getAttributeCode()]['value'], + $customAttribute->getValue() + ); + } $this->assertEquals($expectedData, $customer3->__toArray()); } @@ -321,6 +455,9 @@ public function testToFlatArray() ); $customer = $this->_customerBuilder->populateWithArray($customerData)->create(); - $this->assertEquals($expectedCustomerData, \Magento\Service\DataObjectConverter::toFlatArray($customer)); + $this->assertEquals( + $expectedCustomerData, + \Magento\Framework\Service\EavDataObjectConverter::toFlatArray($customer) + ); } } diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php index 8250eedbd294a..3db891667c643 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/CustomerTest.php @@ -23,6 +23,8 @@ */ namespace Magento\Customer\Service\V1\Data; +use Magento\Framework\Service\Data\Eav\AttributeValue; + /** * Customer * @@ -89,11 +91,18 @@ public function setUp() )->method( 'getCustomCustomerAttributeMetadata' )->will( - $this->returnValue(array()) + $this->returnValue([ + new \Magento\Framework\Object(['attribute_code' => 'zip']), + new \Magento\Framework\Object(['attribute_code' => 'locale']) + ]) ); + $valueBuilder = $this->_objectManager->getObject('Magento\Framework\Service\Data\Eav\AttributeValueBuilder'); $this->_customerBuilder = $this->_objectManager->getObject( 'Magento\Customer\Service\V1\Data\CustomerBuilder', - array('metadataService' => $customerMetadataService) + [ + 'valueBuilder' => $valueBuilder, + 'metadataService' => $customerMetadataService + ] ); } @@ -124,7 +133,7 @@ public function testGetAttributes() $customerData = $this->_createCustomerData(); $customer = $this->_customerBuilder->populateWithArray($customerData)->create(); - $actualAttributes = \Magento\Convert\ConvertArray::toFlatArray($customer->__toArray()); + $actualAttributes = \Magento\Framework\Convert\ConvertArray::toFlatArray($customer->__toArray()); $this->assertEquals( array( 'id' => self::ID, @@ -148,18 +157,49 @@ public function testGetAttributes() ); } - public function testGetCustomAttributes() + public function testInvalidCustomAttributes() { - $customAttributes = array('custom_attribute1' => 'value1', 'custom_attribute2' => 'value2'); + $customAttributes= [ + 'custom_attribute1' => [ + AttributeValue::ATTRIBUTE_CODE => 'custom_attribute1', + AttributeValue::VALUE => 'value1' + ], + 'custom_attribute2' => [ + AttributeValue::ATTRIBUTE_CODE => 'custom_attribute1', + AttributeValue::VALUE => 'value2' + ] + ]; $customerData = array('attribute1' => 'value1', Customer::CUSTOM_ATTRIBUTES_KEY => $customAttributes); $customerDataObject = $this->_customerBuilder->populateWithArray($customerData)->create(); $this->assertEquals( - $customAttributes, + [], $customerDataObject->getCustomAttributes(), - 'Invalid custom attributes.' + 'Unexpected custom attributes.' ); } + public function testGetCustomAttributes() + { + $customAttributes= [ + 'zip' => [ + AttributeValue::ATTRIBUTE_CODE => 'zip', + AttributeValue::VALUE => 'value1' + ], + 'locale' => [ + AttributeValue::ATTRIBUTE_CODE => 'locale', + AttributeValue::VALUE => 'value2' + ] + ]; + $customerData = array('attribute1' => 'value1', Customer::CUSTOM_ATTRIBUTES_KEY => $customAttributes); + $customerDataObject = $this->_customerBuilder->populateWithArray($customerData)->create(); + foreach ($customerDataObject->getCustomAttributes() as $attributeValue) { + $this->assertEquals( + $customAttributes[$attributeValue->getAttributeCode()][AttributeValue::VALUE], + $attributeValue->getValue() + ); + } + } + public function testPopulateFromPrototypeVsArray() { $customerFromArray = $this->_customerBuilder->populateWithArray( diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php index b0e14bd4a293b..bc65752f13849 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php @@ -78,14 +78,14 @@ public function testGetSetFrameUrl() public function testPrepareLayout() { $buttonTitle = 'Back'; - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $arguments = $this->_getBlockArguments(); $arguments['eventManager'] = $eventManager; /** @var $block \Magento\DesignEditor\Block\Adminhtml\Editor\Container */ $block = $this->_helper->getObject('Magento\DesignEditor\Block\Adminhtml\Editor\Container', $arguments); - $layout = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $layout = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $block->setLayout($layout); $expectedButtonData = array( diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php index 25e4f8aa8f602..373cfc20fd6ae 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Toolbar/Buttons/SaveTest.php @@ -42,16 +42,16 @@ class SaveTest extends \PHPUnit_Framework_TestCase protected function setUp() { - /** @var $escaper \Magento\Escaper|\PHPUnit_Framework_MockObject_MockObject */ + /** @var $escaper \Magento\Framework\Escaper|\PHPUnit_Framework_MockObject_MockObject */ $escaper = $this->getMockBuilder( - 'Magento\Escaper' + 'Magento\Framework\Escaper' )->disableOriginalConstructor()->setMethods( array('escapeHtml') )->getMock(); $escaper->expects($this->any())->method('escapeHtml')->will($this->returnArgument(0)); /** @var $urlBuilder \Magento\Core\Model\Url|\PHPUnit_Framework_MockObject_MockObject */ - $urlBuilder = $this->getMock('Magento\Url', array('getUrl'), array(), '', false); + $urlBuilder = $this->getMock('Magento\Framework\Url', array('getUrl'), array(), '', false); $urlBuilder->expects($this->any())->method('getUrl')->will($this->returnValue($this->_url)); $context = $this->getMockBuilder( @@ -121,7 +121,7 @@ public function initDataProvider() { return array( 'Physical theme' => array( - $this->_getThemeMock(\Magento\View\Design\ThemeInterface::TYPE_PHYSICAL), + $this->_getThemeMock(\Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL), array( 'button' => array( 'event' => 'assign', @@ -132,7 +132,7 @@ public function initDataProvider() array() ), 'Virtual assigned theme' => array( - $this->_getThemeMock(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL, true), + $this->_getThemeMock(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL, true), array( 'button' => array( 'event' => 'save', @@ -143,7 +143,7 @@ public function initDataProvider() array() ), 'Virtual unassigned theme' => array( - $this->_getThemeMock(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL, false), + $this->_getThemeMock(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL, false), array( 'button' => array( 'event' => 'save', @@ -178,7 +178,7 @@ public function initDataProvider() public function testInitStaging() { // 1. Get theme mock - $stagingTheme = $this->_getThemeMock(\Magento\View\Design\ThemeInterface::TYPE_STAGING); + $stagingTheme = $this->_getThemeMock(\Magento\Framework\View\Design\ThemeInterface::TYPE_STAGING); $block = $this->_block; @@ -195,7 +195,7 @@ protected function _getThemeMock($type, $isAssigned = null) { $themeId = 123; - if ($type == \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL) { + if ($type == \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL) { $theme = $this->_getVirtualThemeMock($type, $isAssigned); } else { $theme = $this->getMock('Magento\Core\Model\Theme', array('__sleep', '__wakeup'), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php index 5ce16a43c5c9f..5109ab7bb0943 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php @@ -85,7 +85,7 @@ protected function setUp() 'Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Custom', array( 'config' => $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'), - 'formFactory' => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false), + 'formFactory' => $this->getMock('Magento\Framework\Data\FormFactory', array(), array(), '', false), 'urlBuilder' => $this->_urlBuilder, 'themeContext' => $this->_themeContext ) @@ -143,12 +143,18 @@ public function testGetCustomCssContent() { $expectedContent = 'New file content'; - $customization = $this->getMock('Magento\View\Design\Theme\Customization', array(), array(), '', false); + $customization = $this->getMock( + 'Magento\Framework\View\Design\Theme\Customization', + array(), + array(), + '', + false + ); $this->_theme->expects($this->any())->method('getCustomization')->will($this->returnValue($customization)); - /** @var $cssFile \Magento\View\Design\Theme\Customization\File\Css */ + /** @var $cssFile \Magento\Framework\View\Design\Theme\Customization\File\Css */ $cssFile = $this->getMock( - 'Magento\View\Design\Theme\Customization\File\Css', + 'Magento\Framework\View\Design\Theme\Customization\File\Css', array('getContent'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php index e12f376d27c5c..db919dad13857 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php @@ -94,7 +94,7 @@ protected function setUp() array( 'urlBuilder' => $this->_urlBuilder, 'themeContext' => $this->_themeContext, - 'formFactory' => $this->getMock('Magento\Data\FormFactory', array(), array(), '', false), + 'formFactory' => $this->getMock('Magento\Framework\Data\FormFactory', array(), array(), '', false), 'coreHelper' => $this->_helperMock ) ); @@ -161,7 +161,13 @@ public function testGetTitle() */ public function testGetJsFiles() { - $customization = $this->getMock('Magento\View\Design\Theme\Customization', array(), array(), '', false); + $customization = $this->getMock( + 'Magento\Framework\View\Design\Theme\Customization', + array(), + array(), + '', + false + ); $this->_theme->expects($this->any())->method('getCustomization')->will($this->returnValue($customization)); $customization->expects( @@ -169,7 +175,7 @@ public function testGetJsFiles() )->method( 'getFilesByType' )->with( - \Magento\View\Design\Theme\Customization\File\Js::TYPE + \Magento\Framework\View\Design\Theme\Customization\File\Js::TYPE )->will( $this->returnValue(array()) ); diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractTest.php index 0cea0b8c70430..c0d5e327a8931 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Theme/Selector/SelectorList/AbstractTest.php @@ -90,8 +90,8 @@ public function testAddAssignButtonHtml() '', false ); - /** @var $layoutMock \Magento\View\LayoutInterface */ - $layoutMock = $this->getMock('Magento\View\Layout', array('createBlock'), array(), '', false); + /** @var $layoutMock \Magento\Framework\View\LayoutInterface */ + $layoutMock = $this->getMock('Magento\Framework\View\Layout', array('createBlock'), array(), '', false); /** @var $buttonMock \Magento\Backend\Block\Widget\Button */ $buttonMock = $this->getMock('Magento\Backend\Block\Widget\Button', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php index 6fb805543cc3c..ef6de09822063 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Adminhtml/System/Design/EditorTest.php @@ -44,16 +44,16 @@ class EditorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $request = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); $request->expects($this->any())->method('setActionName')->will($this->returnSelf()); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var $layoutMock \Magento\View\Layout|PHPUnit_Framework_MockObject_MockObject */ + /** @var $layoutMock \Magento\Framework\View\Layout|PHPUnit_Framework_MockObject_MockObject */ $layoutMock = $this->getMock( - 'Magento\View\Layout', + 'Magento\Framework\View\Layout', array( 'getBlock', 'getUpdate', @@ -68,17 +68,17 @@ protected function setUp() '', false ); - /** @var $layoutMock \Magento\View\LayoutInterface */ + /** @var $layoutMock \Magento\Framework\View\LayoutInterface */ $layoutMock->expects($this->any())->method('generateXml')->will($this->returnSelf()); $layoutMock->expects( $this->any() )->method( 'getNode' )->will( - $this->returnValue(new \Magento\Simplexml\Element('')) + $this->returnValue(new \Magento\Framework\Simplexml\Element('')) ); $blockMessage = $this->getMock( - 'Magento\View\Element\Messages', + 'Magento\Framework\View\Element\Messages', array('addMessages', 'setEscapeMessageFlag', 'addStorageType'), array(), '', @@ -87,7 +87,7 @@ protected function setUp() $layoutMock->expects($this->any())->method('getMessagesBlock')->will($this->returnValue($blockMessage)); $blockMock = $this->getMock( - 'Magento\View\Element\Template', + 'Magento\Framework\View\Element\Template', array('setActive', 'getMenuModel', 'getParentItems'), array(), '', @@ -137,7 +137,7 @@ protected function _getThemeCollectionFactory($countCustomization) )->method( 'addTypeFilter' )->with( - \Magento\View\Design\ThemeInterface::TYPE_VIRTUAL + \Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL )->will( $this->returnValue($themeCollectionMock) ); @@ -211,7 +211,7 @@ public function firstEntranceActionDataProvider() */ protected function _getObjectManagerMap($countCustomization) { - $translate = $this->getMock('Magento\TranslateInterface', array(), array(), '', false); + $translate = $this->getMock('Magento\Framework\TranslateInterface', array(), array(), '', false); $translate->expects($this->any())->method('translate')->will($this->returnSelf()); $storeManager = $this->getMock( @@ -223,9 +223,9 @@ protected function _getObjectManagerMap($countCustomization) ); $storeManager->expects($this->any())->method('getStore')->will($this->returnSelf()); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $configMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $authMock = $this->getMock('Magento\AuthorizationInterface'); + $authMock = $this->getMock('Magento\Framework\AuthorizationInterface'); $authMock->expects($this->any())->method('filterAclNodes')->will($this->returnSelf()); $backendSession = $this->getMock( 'Magento\Backend\Model\Session', @@ -239,10 +239,10 @@ protected function _getObjectManagerMap($countCustomization) )->method( 'getMessages' )->will( - $this->returnValue($this->getMock('Magento\Message\Collection', array(), array(), '', false)) + $this->returnValue($this->getMock('Magento\Framework\Message\Collection', array(), array(), '', false)) ); - $inlineMock = $this->getMock('Magento\Translate\Inline', array(), array(), '', false); + $inlineMock = $this->getMock('Magento\Framework\Translate\Inline', array(), array(), '', false); $aclFilterMock = $this->getMock('Magento\Backend\Model\Layout\Filter\Acl', array(), array(), '', false); return array( @@ -250,13 +250,13 @@ protected function _getObjectManagerMap($countCustomization) 'Magento\Core\Model\Resource\Theme\CollectionFactory', $this->_getThemeCollectionFactory($countCustomization) ), - array('Magento\TranslateInterface', $translate), + array('Magento\Framework\TranslateInterface', $translate), array('Magento\Framework\App\Config\ScopeConfigInterface', $configMock), - array('Magento\Event\ManagerInterface', $eventManager), + array('Magento\Framework\Event\ManagerInterface', $eventManager), array('Magento\Store\Model\StoreManager', $storeManager), - array('Magento\AuthorizationInterface', $authMock), + array('Magento\Framework\AuthorizationInterface', $authMock), array('Magento\Backend\Model\Session', $backendSession), - array('Magento\Translate\Inline', $inlineMock), + array('Magento\Framework\Translate\Inline', $inlineMock), array('Magento\Backend\Model\Layout\Filter\Acl', $aclFilterMock) ); } diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php index ffae7c85efe65..81b5ee44b99ad 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/AreaEmulatorTest.php @@ -37,14 +37,14 @@ class AreaEmulatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new AreaEmulator($this->_objectManager); } public function testEmulateLayoutArea() { $configuration = array( - 'Magento\View\Layout' => array( + 'Magento\Framework\View\Layout' => array( 'arguments' => array( 'area' => 'test_area' ) diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php index 4b1e837b066cd..f1ec891452054 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Config/Control/QuickStylesTest.php @@ -30,9 +30,9 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase { public function testGetSchemaFile() { - /** @var $moduleReader \Magento\Module\Dir\Reader|PHPUnit_Framework_MockObject_MockObject */ + /** @var $moduleReader \Magento\Framework\Module\Dir\Reader|PHPUnit_Framework_MockObject_MockObject */ $moduleReader = $this->getMockBuilder( - 'Magento\Module\Dir\Reader' + 'Magento\Framework\Module\Dir\Reader' )->setMethods( array('getModuleDir') )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/RendererTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/RendererTest.php index 58136ca1eeccd..6767d2eb04a44 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/RendererTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/RendererTest.php @@ -46,7 +46,7 @@ public function testRender($expectedResult, $data) false ); - $objectManager = $this->getMock('Magento\Object', array('get', 'toCss'), array(), '', false); + $objectManager = $this->getMock('Magento\Framework\Object', array('get', 'toCss'), array(), '', false); $objectManager->expects($this->exactly(4))->method('get')->will($this->returnValue($objectManager)); diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/StateTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/StateTest.php index 1ab2b7329e431..79bcedc2bcb72 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/StateTest.php @@ -31,10 +31,10 @@ class StateTest extends \PHPUnit_Framework_TestCase /** * Name of layout classes that will be used as main layout */ - const LAYOUT_NAVIGATION_CLASS_NAME = 'Magento\View\Layout'; + const LAYOUT_NAVIGATION_CLASS_NAME = 'Magento\Framework\View\Layout'; /** - * Url model classes that will be used instead of \Magento\UrlInterface in different vde modes + * Url model classes that will be used instead of \Magento\Framework\UrlInterface in different vde modes */ const URL_MODEL_NAVIGATION_MODE_CLASS_NAME = 'Magento\DesignEditor\Model\Url\NavigationMode'; @@ -160,7 +160,7 @@ protected function setUp() false ); - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $mutableConfig = $this->getMockForAbstractClass('\Magento\Framework\App\Config\MutableScopeConfigInterface'); $mutableConfig->expects( @@ -168,7 +168,7 @@ protected function setUp() )->method( 'setValue' )->with( - $this->equalTo(\Magento\View\DesignInterface::XML_PATH_THEME_ID), + $this->equalTo(\Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID), $this->equalTo(self::THEME_ID), $this->equalTo(\Magento\Store\Model\ScopeInterface::SCOPE_STORE) )->will( @@ -181,7 +181,7 @@ protected function setUp() )->method( 'setNode' )->with( - $this->equalTo('default/' . \Magento\View\DesignInterface::XML_PATH_THEME_ID), + $this->equalTo('default/' . \Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID), $this->equalTo(self::THEME_ID) )->will( $this->returnSelf() diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Theme/ContextTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Theme/ContextTest.php index 5bb4ace7095ed..05e8b8ad766a2 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Theme/ContextTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Theme/ContextTest.php @@ -105,14 +105,14 @@ public function testSetEditableThemeById() )->method( 'getType' )->will( - $this->returnValue(\Magento\View\Design\ThemeInterface::TYPE_PHYSICAL) + $this->returnValue(\Magento\Framework\View\Design\ThemeInterface::TYPE_PHYSICAL) ); $this->assertEquals($this->_model, $this->_model->setEditableThemeById(self::THEME_ID)); } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Wrong theme type set as editable */ public function testSetEditableThemeByIdWrongType() @@ -134,14 +134,14 @@ public function testSetEditableThemeByIdWrongType() )->method( 'getType' )->will( - $this->returnValue(\Magento\View\Design\ThemeInterface::TYPE_STAGING) + $this->returnValue(\Magento\Framework\View\Design\ThemeInterface::TYPE_STAGING) ); $this->_model->setEditableThemeById(self::THEME_ID); } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage We can't find theme "1". */ public function testSetEditableThemeByIdWrongThemeId() @@ -171,7 +171,7 @@ public function testGetEditableTheme() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Theme has not been set */ public function testGetEditableThemeNotSet() @@ -199,7 +199,7 @@ public function testGetStagingTheme() )->method( 'getDomainModel' )->with( - $this->equalTo(\Magento\View\Design\ThemeInterface::TYPE_VIRTUAL) + $this->equalTo(\Magento\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL) )->will( $this->returnValue($themeObj) ); @@ -214,7 +214,7 @@ public function testGetStagingThemeLazyTest() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Theme "" is not editable. */ public function testGetStagingThemeWrongType() @@ -265,7 +265,7 @@ protected function _setStagingTheme() { $writersProperty = new \ReflectionProperty($this->_model, '_stagingTheme'); $writersProperty->setAccessible(true); - $themeObject = $this->getMock('Magento\View\Design\ThemeInterface', array(), array(), '', false); + $themeObject = $this->getMock('Magento\Framework\View\Design\ThemeInterface', array(), array(), '', false); $writersProperty->setValue($this->_model, $themeObject); return $themeObject; } diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Translate/Inline/ProviderTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Translate/Inline/ProviderTest.php index 9941a5c826ffe..e0eeb512d971b 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Translate/Inline/ProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Translate/Inline/ProviderTest.php @@ -32,7 +32,7 @@ class ProviderTest extends \PHPUnit_Framework_TestCase protected $translateVde; /** - * @var \Magento\Translate\Inline + * @var \Magento\Framework\Translate\Inline */ protected $translateInline; @@ -44,7 +44,7 @@ class ProviderTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->translateVde = $this->getMock('Magento\DesignEditor\Model\Translate\Inline', [], [], '', false); - $this->translateInline = $this->getMock('Magento\Translate\Inline', [], [], '', false); + $this->translateInline = $this->getMock('Magento\Framework\Translate\Inline', [], [], '', false); $this->request = $this->getMock('Magento\Framework\App\RequestInterface', [], [], '', false); } @@ -77,7 +77,7 @@ public function testGet($isVde, $instanceName) public function dataProviderGet() { return [ - [false, 'Magento\Translate\Inline'], + [false, 'Magento\Framework\Translate\Inline'], [true, 'Magento\DesignEditor\Model\Translate\Inline'], ]; } diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/FactoryTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/FactoryTest.php index 75737c0c53abe..dc889cba4a915 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/FactoryTest.php @@ -34,19 +34,19 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new \Magento\DesignEditor\Model\Url\Factory($this->_objectManager); } public function testConstruct() { - $this->assertAttributeInstanceOf('Magento\ObjectManager', '_objectManager', $this->_model); + $this->assertAttributeInstanceOf('Magento\Framework\ObjectManager', '_objectManager', $this->_model); } public function testReplaceClassName() @@ -56,7 +56,7 @@ public function testReplaceClassName() )->method( 'configure' )->with( - array('preferences' => array('Magento\UrlInterface' => 'TestClass')) + array('preferences' => array('Magento\Framework\UrlInterface' => 'TestClass')) ); $this->assertEquals($this->_model, $this->_model->replaceClassName('TestClass')); @@ -69,7 +69,7 @@ public function testCreate() )->method( 'create' )->with( - 'Magento\UrlInterface', + 'Magento\Framework\UrlInterface', array() )->will( $this->returnValue('ModelInstance') diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php index 667b931e95d0e..7bbf59e477399 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Url/NavigationModeTest.php @@ -77,7 +77,7 @@ protected function setUp() ); $this->_routeParamsMock = $this->getMock( - 'Magento\Url\RouteParamsResolverFactory', + 'Magento\Framework\Url\RouteParamsResolverFactory', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php b/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php index 91793ff1e6253..1acc44b96dfd9 100644 --- a/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php +++ b/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php @@ -117,21 +117,21 @@ function ($data) { )->getMock(); $httpClient = $this->getMockBuilder( - '\Magento\HTTP\ZendClient' + '\Magento\Framework\HTTP\ZendClient' )->disableOriginalConstructor()->setMethods( array('request') )->getMock(); $httpClient->expects($this->any())->method('request')->will($this->returnValue($this->_httpResponse)); $httpClientFactory = $this->getMockBuilder( - '\Magento\HTTP\ZendClientFactory' + '\Magento\Framework\HTTP\ZendClientFactory' )->disableOriginalConstructor()->setMethods( array('create') )->getMock(); $httpClientFactory->expects($this->any())->method('create')->will($this->returnValue($httpClient)); $modulesDirectory = $this->getMockBuilder( - '\Magento\Filesystem\Directory\Read' + '\Magento\Framework\Filesystem\Directory\Read' )->disableOriginalConstructor()->setMethods( array('getRelativePath', 'readFile') )->getMock(); @@ -209,7 +209,7 @@ public function testPrepareShippingLabelContent() /** * @dataProvider prepareShippingLabelContentExceptionDataProvider - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Unable to retrieve shipping label */ public function testPrepareShippingLabelContentException(\SimpleXMLElement $xml) @@ -238,7 +238,7 @@ public function prepareShippingLabelContentExceptionDataProvider() /** * @param \SimpleXMLElement $xml - * @return \Magento\Object + * @return \Magento\Framework\Object */ protected function _invokePrepareShippingLabelContent(\SimpleXMLElement $xml) { diff --git a/dev/tests/unit/testsuite/Magento/Directory/Block/CurrencyTest.php b/dev/tests/unit/testsuite/Magento/Directory/Block/CurrencyTest.php index 4839887104f41..0108376744d3a 100644 --- a/dev/tests/unit/testsuite/Magento/Directory/Block/CurrencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Directory/Block/CurrencyTest.php @@ -43,22 +43,37 @@ class CurrencyTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->urlBuilder = $this->getMock('\Magento\UrlInterface\Proxy', array('getUrl'), array(), '', false); + $this->urlBuilder = $this->getMock( + '\Magento\Framework\UrlInterface\Proxy', + array('getUrl'), + array(), + '', + false + ); $this->urlBuilder->expects($this->any())->method('getUrl')->will($this->returnArgument(0)); - /** @var \Magento\View\Element\Template\Context $context */ - $context = $this->getMock('\Magento\View\Element\Template\Context', array('getUrlBuilder'), array(), '', false); + /** @var \Magento\Framework\View\Element\Template\Context $context */ + $context = $this->getMock( + '\Magento\Framework\View\Element\Template\Context', + array('getUrlBuilder'), + array(), + '', + false + ); $context->expects($this->any())->method('getUrlBuilder')->will($this->returnValue($this->urlBuilder)); /** @var \Magento\Directory\Model\CurrencyFactory $currencyFactory */ $currencyFactory = $this->getMock('\Magento\Directory\Model\CurrencyFactory', array(), array(), '', false); $this->postDataHelper = $this->getMock('\Magento\Core\Helper\PostData', array(), array(), '', false); - /** @var \Magento\Locale\ResolverInterface $localeResolver */ - $localeResolver = $this->getMock('\Magento\Locale\ResolverInterface', array(), array(), '', false); + /** @var \Magento\Framework\Locale\ResolverInterface $localeResolver */ + $localeResolver = $this->getMock('\Magento\Framework\Locale\ResolverInterface', array(), array(), '', false); $this->object = new Currency( - $context, $currencyFactory, $this->postDataHelper, $localeResolver + $context, + $currencyFactory, + $this->postDataHelper, + $localeResolver ); } diff --git a/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php index e6c74098be222..ed75a2751b19c 100644 --- a/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php @@ -118,8 +118,8 @@ public function setUp() public function testGetRegionJson() { $countries = array( - new \Magento\Object(array('country_id' => 'Country1')), - new \Magento\Object(array('country_id' => 'Country2')) + new \Magento\Framework\Object(array('country_id' => 'Country1')), + new \Magento\Framework\Object(array('country_id' => 'Country2')) ); $countryIterator = new \ArrayIterator($countries); $this->_countryCollection->expects( @@ -131,13 +131,13 @@ public function testGetRegionJson() ); $regions = array( - new \Magento\Object( + new \Magento\Framework\Object( array('country_id' => 'Country1', 'region_id' => 'r1', 'code' => 'r1-code', 'name' => 'r1-name') ), - new \Magento\Object( + new \Magento\Framework\Object( array('country_id' => 'Country1', 'region_id' => 'r2', 'code' => 'r2-code', 'name' => 'r2-name') ), - new \Magento\Object( + new \Magento\Framework\Object( array('country_id' => 'Country2', 'region_id' => 'r3', 'code' => 'r3-code', 'name' => 'r3-name') ) ); diff --git a/dev/tests/unit/testsuite/Magento/Directory/Model/Currency/Import/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Directory/Model/Currency/Import/FactoryTest.php index e00ba13c86581..a2146263c7993 100644 --- a/dev/tests/unit/testsuite/Magento/Directory/Model/Currency/Import/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Directory/Model/Currency/Import/FactoryTest.php @@ -31,7 +31,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $_objectManager; @@ -42,7 +42,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_importConfig = $this->getMock( 'Magento\Directory\Model\Currency\Import\Config', array(), diff --git a/dev/tests/unit/testsuite/Magento/Directory/Model/PriceCurrencyTest.php b/dev/tests/unit/testsuite/Magento/Directory/Model/PriceCurrencyTest.php index 80c37d742bb4d..b8f1e12c6c68e 100644 --- a/dev/tests/unit/testsuite/Magento/Directory/Model/PriceCurrencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Directory/Model/PriceCurrencyTest.php @@ -55,7 +55,7 @@ public function setUp() ->setMethods(['create']) ->getMock(); - $this->logger = $this->getMockBuilder('Magento\Logger') + $this->logger = $this->getMockBuilder('Magento\Framework\Logger') ->disableOriginalConstructor() ->getMock(); @@ -141,7 +141,7 @@ public function testConvertWithStoreCurrency() public function testFormat() { $amount = 5.6; - $precision = \Magento\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; + $precision = \Magento\Framework\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; $includeContainer = false; $store = null; $formattedAmount = '5.6 grn'; @@ -164,7 +164,7 @@ public function testFormat() public function testConvertAndFormat() { $amount = 5.6; - $precision = \Magento\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; + $precision = \Magento\Framework\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; $includeContainer = false; $store = null; $convertedAmount = 9.3; diff --git a/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php index 9355bc62298d0..837dc3050e31d 100644 --- a/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Directory/Model/Resource/Country/CollectionTest.php @@ -35,11 +35,11 @@ class CollectionTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $connection = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array(), array(), '', false); + $connection = $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', array(), array(), '', false); $select = $this->getMock('Zend_Db_Select', array(), array(), '', false); $connection->expects($this->once())->method('select')->will($this->returnValue($select)); - $resource = $this->getMockForAbstractClass('Magento\Model\Resource\Db\AbstractDb', + $resource = $this->getMockForAbstractClass('Magento\Framework\Model\Resource\Db\AbstractDb', array(), '', false, @@ -50,14 +50,14 @@ protected function setUp() $resource->expects($this->any())->method('getReadConnection')->will($this->returnValue($connection)); $resource->expects($this->any())->method('getTable')->will($this->returnArgument(0)); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); - $localeListsMock = $this->getMock('Magento\Locale\ListsInterface'); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); + $localeListsMock = $this->getMock('Magento\Framework\Locale\ListsInterface'); $localeListsMock->expects($this->any())->method('getCountryTranslation')->will($this->returnArgument(0)); - $fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface'); + $fetchStrategy = $this->getMockForAbstractClass('Magento\Framework\Data\Collection\Db\FetchStrategyInterface'); $entityFactory = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false); $scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $countryFactory = $this->getMock( 'Magento\Directory\Model\Resource\CountryFactory', array(), @@ -89,7 +89,7 @@ protected function setUp() public function testToOptionArray($optionsArray, $emptyLabel, $foregroundCountries, $expectedResults) { foreach ($optionsArray as $itemData) { - $this->_model->addItem(new \Magento\Object($itemData)); + $this->_model->addItem(new \Magento\Framework\Object($itemData)); } $this->_model->setForegroundCountries($foregroundCountries); diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php index 371ffb2baf47e..5d0c7041518c8 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php @@ -51,10 +51,10 @@ protected function setUp() } /** - * Test that getConfig method retrieve \Magento\Object object + * Test that getConfig method retrieve \Magento\Framework\Object object */ public function testGetConfig() { - $this->assertInstanceOf('Magento\Object', $this->_block->getConfig()); + $this->assertInstanceOf('Magento\Framework\Object', $this->_block->getConfig()); } } diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php index 6ee02cba4b63e..86a0767cab1c3 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php @@ -43,10 +43,10 @@ protected function setUp() } /** - * Test that getConfig method retrieve \Magento\Object object + * Test that getConfig method retrieve \Magento\Framework\Object object */ public function testGetConfig() { - $this->assertInstanceOf('Magento\Object', $this->_block->getConfig()); + $this->assertInstanceOf('Magento\Framework\Object', $this->_block->getConfig()); } } diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php index fbfabf1d167fb..536cba245166b 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Block/Catalog/Product/LinksTest.php @@ -43,7 +43,7 @@ class LinksTest extends \PHPUnit_Framework_TestCase protected $linkPriceMock; /** - * @var \Magento\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $amountMock; @@ -53,12 +53,12 @@ class LinksTest extends \PHPUnit_Framework_TestCase protected $salableItemMock; /** - * @var \Magento\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceInfoInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceInfoMock; /** - * @var \Magento\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $layout; @@ -67,12 +67,12 @@ public function setUp() $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $contextMock = $this->getMock('Magento\Catalog\Block\Product\Context', [], [], '', false, false); - $this->priceInfoMock = $this->getMock('Magento\Pricing\PriceInfo\Base', [], [], '', false); + $this->priceInfoMock = $this->getMock('Magento\Framework\Pricing\PriceInfo\Base', [], [], '', false); $this->linkPriceMock = $this->getMock('Magento\Downloadable\Pricing\Price\LinkPrice', [], [], '', false); $this->salableItemMock = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); - $this->amountMock = $this->getMock('Magento\Pricing\Amount\Base', [], [], '', false); + $this->amountMock = $this->getMock('Magento\Framework\Pricing\Amount\Base', [], [], '', false); $this->linkMock = $this->getMock('Magento\Downloadable\Model\Link', [], [], '', false); - $this->layout = $this->getMock('Magento\View\Layout', [], [], '', false); + $this->layout = $this->getMock('Magento\Framework\View\Layout', [], [], '', false); $contextMock->expects($this->once()) ->method('getLayout') ->will($this->returnValue($this->layout)); @@ -106,7 +106,7 @@ public function testGetLinkPrice() ->with($this->linkMock) ->will($this->returnValue($this->amountMock)); - $priceBoxMock = $this->getMock('Magento\Pricing\Render', ['renderAmount'], [], '', false, false); + $priceBoxMock = $this->getMock('Magento\Framework\Pricing\Render', ['renderAmount'], [], '', false, false); $this->layout->expects($this->once()) ->method('getBlock') diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php index 85a1e3235ce8b..7d91ade57577c 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php @@ -25,8 +25,8 @@ use Magento\Downloadable\Helper\Download as DownloadHelper; use Magento\Framework\App\Filesystem; -use Magento\Filesystem\File\ReadInterface as FileReadInterface; -use Magento\Filesystem\Directory\ReadInterface as DirReadInterface; +use Magento\Framework\Filesystem\File\ReadInterface as FileReadInterface; +use Magento\Framework\Filesystem\Directory\ReadInterface as DirReadInterface; use Magento\Downloadable\Helper\File as DownloadableFile; /** @@ -71,9 +71,15 @@ public function setUp() self::$mimeContentType = self::MIME_TYPE; $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_handleMock = $this->getMock('Magento\Filesystem\File\ReadInterface', array(), array(), '', false); + $this->_handleMock = $this->getMock( + 'Magento\Framework\Filesystem\File\ReadInterface', + array(), + array(), + '', + false + ); $this->_workingDirectoryMock = $this->getMock( - 'Magento\Filesystem\Directory\ReadInterface', + 'Magento\Framework\Filesystem\Directory\ReadInterface', array(), array(), '', @@ -100,7 +106,7 @@ public function testSetResourceInvalidPath() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @exectedExceptionMessage Please set resource file and link type. */ public function testGetFileSizeNoResource() @@ -109,7 +115,7 @@ public function testGetFileSizeNoResource() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Invalid download link type. */ public function testGetFileSizeInvalidLinkType() @@ -131,7 +137,7 @@ public function testGetFileSize() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Invalid download link type. */ public function testGetFileSizeNoFile() diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php index 0133702a510d7..0d21ef0892283 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php @@ -36,7 +36,7 @@ class TypeTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false); $downloadableFile = $this->getMockBuilder( 'Magento\Downloadable\Helper\File' )->disableOriginalConstructor()->getMock(); @@ -47,8 +47,8 @@ protected function setUp() $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem') ->disableOriginalConstructor() ->getMock(); - $coreRegistry = $this->getMock('Magento\Registry', array(), array(), '', false); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false); $sampleResFactory = $this->getMock( 'Magento\Downloadable\Model\Resource\SampleFactory', diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php index 7eb0c5363a3fa..b3d17d6e6363c 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php @@ -103,12 +103,18 @@ protected function setUp() false ); - $filterManager = $this->getMock('Magento\Filter\FilterManager', array('stripTags'), array(), '', false); + $filterManager = $this->getMock( + 'Magento\Framework\Filter\FilterManager', + array('stripTags'), + array(), + '', + false + ); $filterManager->expects($this->any())->method('stripTags')->will($this->returnArgument(0)); $modelConstructorArgs = $objectManager->getConstructArguments( 'Magento\Downloadable\Model\Sales\Order\Pdf\Items\Creditmemo', - array('string' => new \Magento\Stdlib\String(), 'filterManager' => $filterManager) + array('string' => new \Magento\Framework\Stdlib\String(), 'filterManager' => $filterManager) ); $this->_model = $this->getMock( @@ -166,7 +172,7 @@ public function testDraw() ); $this->_model->setItem( - new \Magento\Object( + new \Magento\Framework\Object( array( 'name' => 'Downloadable Documentation', 'sku' => 'downloadable-documentation', @@ -175,7 +181,7 @@ public function testDraw() 'qty' => 1, 'tax_amount' => 2.00, 'hidden_tax_amount' => 0.00, - 'order_item' => new \Magento\Object( + 'order_item' => new \Magento\Framework\Object( array( 'product_options' => array( 'options' => array(array('label' => 'Test Custom Option', 'value' => 'test value')) @@ -192,8 +198,10 @@ public function testDraw() 'getLinks' )->will( $this->returnValue( - new \Magento\Object( - array('purchased_items' => array(new \Magento\Object(array('link_title' => 'Magento User Guide')))) + new \Magento\Framework\Object( + array('purchased_items' => array( + new \Magento\Framework\Object(array('link_title' => 'Magento User Guide'))) + ) ) ) ); diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Pricing/Price/LinkPriceTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Pricing/Price/LinkPriceTest.php index ad1e8723d0e5c..722bee8f5bf62 100644 --- a/dev/tests/unit/testsuite/Magento/Downloadable/Pricing/Price/LinkPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Downloadable/Pricing/Price/LinkPriceTest.php @@ -36,7 +36,7 @@ class LinkPriceTest extends \PHPUnit_Framework_TestCase protected $linkPrice; /** - * @var \Magento\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $amountMock; @@ -46,7 +46,7 @@ class LinkPriceTest extends \PHPUnit_Framework_TestCase protected $salableItemMock; /** - * @var \Magento\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Adjustment\Calculator|\PHPUnit_Framework_MockObject_MockObject */ protected $calculatorMock; @@ -61,8 +61,8 @@ class LinkPriceTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->salableItemMock = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); - $this->amountMock = $this->getMock('Magento\Pricing\Amount\Base', [], [], '', false); - $this->calculatorMock = $this->getMock('Magento\Pricing\Adjustment\Calculator', [], [], '', false); + $this->amountMock = $this->getMock('Magento\Framework\Pricing\Amount\Base', [], [], '', false); + $this->calculatorMock = $this->getMock('Magento\Framework\Pricing\Adjustment\Calculator', [], [], '', false); $this->linkMock = $this->getMock( 'Magento\Downloadable\Model\Link', ['getPrice', 'getProduct', '__wakeup'], diff --git a/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php index 98207a4d09ce4..d20d48cfeef23 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php @@ -51,10 +51,10 @@ protected function setUp() public function testGetAttributeMetadata() { - $attribute = new \Magento\Object([ + $attribute = new \Magento\Framework\Object([ 'entity_type_id' => '1', 'attribute_id' => '2', - 'backend' => new \Magento\Object(['table' => 'customer_entity_varchar']), + 'backend' => new \Magento\Framework\Object(['table' => 'customer_entity_varchar']), 'backend_type' => 'varchar' ]); $this->_eavConfig->expects($this->once()) diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php index 14579e20574ff..24cb62988931b 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/TextTest.php @@ -35,10 +35,24 @@ class TextTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $locale = $this->getMock('Magento\Stdlib\DateTime\TimezoneInterface', array(), array(), '', false, false); - $localeResolver = $this->getMock('Magento\Locale\ResolverInterface', array(), array(), '', false, false); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false, false); - $helper = $this->getMock('Magento\Stdlib\String', array(), array(), '', false, false); + $locale = $this->getMock( + 'Magento\Framework\Stdlib\DateTime\TimezoneInterface', + array(), + array(), + '', + false, + false + ); + $localeResolver = $this->getMock( + 'Magento\Framework\Locale\ResolverInterface', + array(), + array(), + '', + false, + false + ); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false, false); + $helper = $this->getMock('Magento\Framework\Stdlib\String', array(), array(), '', false, false); $attributeData = array( 'store_label' => 'Test', diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php index a655ca0a7090b..09f76ce8cff6c 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php @@ -45,8 +45,8 @@ class AttributeFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - /** @var $objectManagerMock \Magento\ObjectManager */ - $objectManagerMock = $this->getMock('Magento\ObjectManager'); + /** @var $objectManagerMock \Magento\Framework\ObjectManager */ + $objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $objectManagerMock->expects( $this->any() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php index 8836152147531..69d2e8bbea0ab 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/AbstractTest.php @@ -42,9 +42,9 @@ protected function setUp() $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', array(), array(), '', false), - $this->getMock('\Magento\Locale\FormatInterface'), + $this->getMock('\Magento\Framework\Locale\FormatInterface'), $this->getMock('Magento\Eav\Model\Resource\Helper', array(), array(), '', false), - $this->getMock('Magento\Validator\UniversalFactory', array(), array(), '', false) + $this->getMock('Magento\Framework\Validator\UniversalFactory', array(), array(), '', false) ) ); } @@ -110,7 +110,7 @@ protected function _getAttributes() ); $mock->setAttributeId($code); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); /** @var $backendModel \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend */ $backendModel = $this->getMock( 'Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend', @@ -132,12 +132,12 @@ protected function _getAttributes() /** * Get adapter mock * - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\DB\Adapter\Pdo\Mysql + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\DB\Adapter\Pdo\Mysql */ private function _getAdapterMock() { $adapter = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('describeTable', 'lastInsertId', 'insert', 'prepareColumnValue', 'query', 'delete'), array(), '', @@ -238,7 +238,7 @@ public function testSave($attributeCode, $attributeSetId, $productData, $product $object->setData($productData); $object->expects($this->any())->method('getOrigData')->will($this->returnValue($productOrigData)); - $entityType = new \Magento\Object(); + $entityType = new \Magento\Framework\Object(); $entityType->setEntityTypeCode('test'); $entityType->setEntityTypeId(0); $entityType->setEntityTable('table'); @@ -247,7 +247,7 @@ public function testSave($attributeCode, $attributeSetId, $productData, $product $attribute = $this->_getAttributeMock($attributeCode, $attributeSetId); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); /** @var $backendModel \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend */ $backendModel = $this->getMock( 'Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend', @@ -292,9 +292,9 @@ public function testSave($attributeCode, $attributeSetId, $productData, $product $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false), $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', array(), array(), '', false), - $this->getMock('Magento\Locale\FormatInterface'), + $this->getMock('Magento\Framework\Locale\FormatInterface'), $this->getMock('Magento\Eav\Model\Resource\Helper', array(), array(), '', false), - $this->getMock('Magento\Validator\UniversalFactory', array(), array(), '', false), + $this->getMock('Magento\Framework\Validator\UniversalFactory', array(), array(), '', false), array('type' => $entityType, 'entityTable' => 'entityTable', 'attributesByCode' => $attributes) ); /** @var $model \PHPUnit_Framework_MockObject_MockObject */ diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/AbstractTest.php index b78e70d975bc2..44ba7b1f34c33 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/AbstractTest.php @@ -63,7 +63,7 @@ public function testGetAffectedFields() $this->_model->setAttribute($attribute); - $object = new \Magento\Object(); + $object = new \Magento\Framework\Object(); $this->_model->setValueId($valueId); $this->assertEquals( diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php index 876142aaea328..6025189fc26d6 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Backend/ArrayTest.php @@ -47,7 +47,7 @@ protected function setUp() '', false ); - $logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->_model = new \Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend($logger); $this->_model->setAttribute($this->_attribute); } @@ -58,7 +58,7 @@ protected function setUp() public function testValidate($data) { $this->_attribute->expects($this->atLeastOnce())->method('getAttributeCode')->will($this->returnValue('code')); - $product = new \Magento\Object(array('code' => $data)); + $product = new \Magento\Framework\Object(array('code' => $data)); $this->_model->validate($product); $this->assertEquals('1,2,3', $product->getCode()); } diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionStub.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionStub.php index 2e8fb4f87a5f1..a431c33b11812 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionStub.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionStub.php @@ -29,7 +29,7 @@ class AbstractCollectionStub extends \Magento\Eav\Model\Entity\Collection\Abstra * Retrieve item by id * * @param mixed $id - * @return \Magento\Object + * @return \Magento\Framework\Object */ public function getItemById($id) { @@ -46,6 +46,6 @@ public function getItemById($id) */ protected function _construct() { - return $this->_init('Magento\Object', 'test_entity_model'); + return $this->_init('Magento\Framework\Object', 'test_entity_model'); } } diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionTest.php index e6e835f9b3d97..cdb2e5424176e 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Collection/AbstractCollectionTest.php @@ -36,17 +36,17 @@ class AbstractCollectionTest extends \PHPUnit_Framework_TestCase protected $coreEntityFactoryMock; /** - * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject */ protected $loggerMock; /** - * @var \Magento\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $fetchStrategyMock; /** - * @var \Magento\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $eventManagerMock; @@ -71,22 +71,28 @@ class AbstractCollectionTest extends \PHPUnit_Framework_TestCase protected $resourceHelperMock; /** - * @var \Magento\Validator\UniversalFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Validator\UniversalFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $validatorFactoryMock; public function setUp() { $this->coreEntityFactoryMock = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false); - $this->loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->fetchStrategyMock = $this->getMock( - 'Magento\Data\Collection\Db\FetchStrategyInterface', + 'Magento\Framework\Data\Collection\Db\FetchStrategyInterface', + array(), + array(), + '', + false + ); + $this->eventManagerMock = $this->getMock( + 'Magento\Framework\Event\ManagerInterface', array(), array(), '', false ); - $this->eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); $this->configMock = $this->getMock('Magento\Eav\Model\Config', array(), array(), '', false); $this->coreResourceMock = $this->getMock( 'Magento\Framework\App\Resource', @@ -97,15 +103,15 @@ public function setUp() ); $this->resourceHelperMock = $this->getMock('Magento\Eav\Model\Resource\Helper', array(), array(), '', false); $this->validatorFactoryMock = $this->getMock( - 'Magento\Validator\UniversalFactory', + 'Magento\Framework\Validator\UniversalFactory', array(), array(), '', false ); $this->entityFactoryMock = $this->getMock('Magento\Eav\Model\EntityFactory', array(), array(), '', false); - /** @var \Magento\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject */ - $connectionMock = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array(), array(), '', false); + /** @var \Magento\Framework\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject */ + $connectionMock = $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', array(), array(), '', false); /** @var $selectMock \Zend_Db_Select|\PHPUnit_Framework_MockObject_MockObject */ $selectMock = $this->getMock('Zend_Db_Select', array(), array(), '', false); $this->coreEntityFactoryMock->expects( @@ -211,6 +217,6 @@ public function getItemsDataProvider() public function getMagentoObject() { - return new \Magento\Object(); + return new \Magento\Framework\Object(); } } diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/TypeTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/TypeTest.php index 24c4bf24d25ef..9ba80610beb47 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/TypeTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/TypeTest.php @@ -67,8 +67,8 @@ class TypeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->contextMock = $this->getMock('Magento\Model\Context', array(), array(), '', false); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->contextMock = $this->getMock('Magento\Framework\Model\Context', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->attrFactoryMock = $this->getMock( 'Magento\Eav\Model\Entity\AttributeFactory', array(), @@ -91,14 +91,14 @@ protected function setUp() false ); $this->universalFactoryMock = $this->getMock( - 'Magento\Validator\UniversalFactory', + 'Magento\Framework\Validator\UniversalFactory', array(), array(), '', false ); $this->resourceMock = $this->getMockForAbstractClass( - 'Magento\Model\Resource\Db\AbstractDb', + 'Magento\Framework\Model\Resource\Db\AbstractDb', array(), '', false, diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/FormTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/FormTest.php index f0a65013efcbd..cd7c2e6c3f7ec 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/FormTest.php @@ -53,7 +53,7 @@ class FormTest extends \PHPUnit_Framework_TestCase protected $_userAttribute = null; /** - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_entity = null; @@ -68,10 +68,10 @@ protected function setUp() array('_getFilteredFormAttributeCollection', '_getValidator', 'getEntity') )->disableOriginalConstructor()->getMock(); - $this->_userAttribute = new \Magento\Object( + $this->_userAttribute = new \Magento\Framework\Object( array('is_user_defined' => true, 'attribute_code' => 'attribute_visible_user', 'is_visible' => true) ); - $this->_systemAttribute = new \Magento\Object( + $this->_systemAttribute = new \Magento\Framework\Object( array('is_user_defined' => false, 'attribute_code' => 'attribute_invisible_system', 'is_visible' => false) ); $this->_attributes = array($this->_userAttribute, $this->_systemAttribute); @@ -83,7 +83,7 @@ protected function setUp() $this->returnValue($this->_attributes) ); - $this->_entity = new \Magento\Object(array('id' => 1, 'attribute_visible_user' => 'abc')); + $this->_entity = new \Magento\Framework\Object(array('id' => 1, 'attribute_visible_user' => 'abc')); $this->_model->expects($this->any())->method('getEntity')->will($this->returnValue($this->_entity)); } diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/Attribute/Option/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/Attribute/Option/CollectionTest.php index 61637e983d949..e67ba201eca24 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/Attribute/Option/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/Attribute/Option/CollectionTest.php @@ -36,17 +36,17 @@ class CollectionTest extends \PHPUnit_Framework_TestCase protected $entityFactoryMock; /** - * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject */ protected $loggerMock; /** - * @var \Magento\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $fetchStrategyMock; /** - * @var \Magento\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $eventManagerMock; @@ -61,12 +61,12 @@ class CollectionTest extends \PHPUnit_Framework_TestCase protected $storeManagerMock; /** - * @var \Magento\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject */ protected $connectionMock; /** - * @var \Magento\Model\Resource\Db\AbstractDb|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Model\Resource\Db\AbstractDb|\PHPUnit_Framework_MockObject_MockObject */ protected $resourceMock; @@ -78,15 +78,21 @@ class CollectionTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->entityFactoryMock = $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false); - $this->loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->fetchStrategyMock = $this->getMock( - 'Magento\Data\Collection\Db\FetchStrategyInterface', + 'Magento\Framework\Data\Collection\Db\FetchStrategyInterface', + array(), + array(), + '', + false + ); + $this->eventManagerMock = $this->getMock( + 'Magento\Framework\Event\ManagerInterface', array(), array(), '', false ); - $this->eventManagerMock = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false); $this->coreResourceMock = $this->getMock( 'Magento\Framework\App\Resource', array('getConnection', 'getTableName'), @@ -101,9 +107,9 @@ protected function setUp() '', false ); - $this->connectionMock = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array(), array(), '', false); + $this->connectionMock = $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', array(), array(), '', false); $this->resourceMock = $this->getMockForAbstractClass( - 'Magento\Model\Resource\Db\AbstractDb', + 'Magento\Framework\Model\Resource\Db\AbstractDb', array(), '', false, diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php index be370c7283f97..b5dae546afc67 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php @@ -53,10 +53,10 @@ public function testSaveOptionSystemAttribute() ); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var $model \Magento\Model\AbstractModel */ - $arguments = $objectManagerHelper->getConstructArguments('Magento\Model\AbstractModel'); + /** @var $model \Magento\Framework\Model\AbstractModel */ + $arguments = $objectManagerHelper->getConstructArguments('Magento\Framework\Model\AbstractModel'); $arguments['data'] = $attributeData; - $model = $this->getMock('Magento\Model\AbstractModel', null, $arguments); + $model = $this->getMock('Magento\Framework\Model\AbstractModel', null, $arguments); $model->setDefault(array('2')); $model->setOption(array('delete' => array(1 => '', 2 => ''))); @@ -122,10 +122,10 @@ public function testSaveOptionNewUserDefinedAttribute() $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var $model \Magento\Model\AbstractModel */ - $arguments = $objectManagerHelper->getConstructArguments('Magento\Model\AbstractModel'); + /** @var $model \Magento\Framework\Model\AbstractModel */ + $arguments = $objectManagerHelper->getConstructArguments('Magento\Framework\Model\AbstractModel'); $arguments['data'] = $attributeData; - $model = $this->getMock('Magento\Model\AbstractModel', null, $arguments); + $model = $this->getMock('Magento\Framework\Model\AbstractModel', null, $arguments); $model->setOption(array('value' => array('option_1' => array('Backend Label', 'Frontend Label')))); $adapter->expects( @@ -202,9 +202,9 @@ public function testSaveOptionNoValue() list($adapter, $resourceModel) = $this->_prepareResourceModel(); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - /** @var $model \Magento\Model\AbstractModel */ - $arguments = $objectManagerHelper->getConstructArguments('Magento\Model\AbstractModel'); - $model = $this->getMock('Magento\Model\AbstractModel', null, $arguments); + /** @var $model \Magento\Framework\Model\AbstractModel */ + $arguments = $objectManagerHelper->getConstructArguments('Magento\Framework\Model\AbstractModel'); + $model = $this->getMock('Magento\Framework\Model\AbstractModel', null, $arguments); $model->setOption('not-an-array'); $adapter->expects($this->once())->method('insert')->with('eav_attribute'); @@ -222,7 +222,7 @@ public function testSaveOptionNoValue() protected function _prepareResourceModel() { $adapter = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('_connect', 'delete', 'describeTable', 'fetchRow', 'insert', 'lastInsertId', 'quote', 'update'), array(), '', @@ -260,7 +260,10 @@ protected function _prepareResourceModel() )->with( true )->will( - $this->returnValue(array(new \Magento\Object(array('id' => 0)), new \Magento\Object(array('id' => 1)))) + $this->returnValue(array( + new \Magento\Framework\Object(array('id' => 0)), + new \Magento\Framework\Object(array('id' => 1))) + ) ); /** @var $resource \Magento\Framework\App\Resource */ diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php index df07544e90f71..19784443b00cb 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Validator/Attribute/DataTest.php @@ -56,8 +56,8 @@ public function testIsValid( 'Magento\Eav\Model\AttributeDataFactory', array('create'), array( - 'objectManager' => $this->getMock('Magento\ObjectManager'), - 'string' => $this->getMock('Magento\Stdlib\String') + 'objectManager' => $this->getMock('Magento\Framework\ObjectManager'), + 'string' => $this->getMock('Magento\Framework\Stdlib\String') ) ); @@ -161,9 +161,11 @@ public function testIsValidAttributesFromCollection() 'frontend_input' => 'text' ) ); - $collection = $this->getMockBuilder('Magento\Object')->setMethods(array('getItems'))->getMock(); + $collection = $this->getMockBuilder('Magento\Framework\Object')->setMethods(array('getItems'))->getMock(); $collection->expects($this->once())->method('getItems')->will($this->returnValue(array($attribute))); - $entityType = $this->getMockBuilder('Magento\Object')->setMethods(array('getAttributeCollection'))->getMock(); + $entityType = $this->getMockBuilder('Magento\Framework\Object') + ->setMethods(array('getAttributeCollection')) + ->getMock(); $entityType->expects($this->once())->method('getAttributeCollection')->will($this->returnValue($collection)); $entity = $this->_getEntityMock(); $entity->expects($this->once())->method('getResource')->will($this->returnValue($resource)); @@ -173,8 +175,8 @@ public function testIsValidAttributesFromCollection() 'Magento\Eav\Model\AttributeDataFactory', array('create'), array( - 'objectManager' => $this->getMock('Magento\ObjectManager'), - 'string' => $this->getMock('Magento\Stdlib\String') + 'objectManager' => $this->getMock('Magento\Framework\ObjectManager'), + 'string' => $this->getMock('Magento\Framework\Stdlib\String') ) ); $attrDataFactory->expects( @@ -220,8 +222,8 @@ public function testIsValidBlackListWhiteListChecks($callback) 'Magento\Eav\Model\AttributeDataFactory', array('create'), array( - 'objectManager' => $this->getMock('Magento\ObjectManager'), - 'string' => $this->getMock('Magento\Stdlib\String') + 'objectManager' => $this->getMock('Magento\Framework\ObjectManager'), + 'string' => $this->getMock('Magento\Framework\Stdlib\String') ) ); $attrDataFactory->expects( @@ -262,8 +264,8 @@ public function testSetAttributesWhiteList() 'Magento\Eav\Model\AttributeDataFactory', array(), array( - 'objectManager' => $this->getMock('Magento\ObjectManager'), - 'string' => $this->getMock('Magento\Stdlib\String') + 'objectManager' => $this->getMock('Magento\Framework\ObjectManager'), + 'string' => $this->getMock('Magento\Framework\Stdlib\String') ) ); $validator = new \Magento\Eav\Model\Validator\Attribute\Data($attrDataFactory); @@ -279,8 +281,8 @@ public function testSetAttributesBlackList() 'Magento\Eav\Model\AttributeDataFactory', array(), array( - 'objectManager' => $this->getMock('Magento\ObjectManager'), - 'string' => $this->getMock('Magento\Stdlib\String') + 'objectManager' => $this->getMock('Magento\Framework\ObjectManager'), + 'string' => $this->getMock('Magento\Framework\Stdlib\String') ) ); $validator = new \Magento\Eav\Model\Validator\Attribute\Data($attrDataFactory); @@ -313,8 +315,8 @@ public function testAddErrorMessages() 'Magento\Eav\Model\AttributeDataFactory', array('create'), array( - 'objectManager' => $this->getMock('Magento\ObjectManager'), - 'string' => $this->getMock('Magento\Stdlib\String') + 'objectManager' => $this->getMock('Magento\Framework\ObjectManager'), + 'string' => $this->getMock('Magento\Framework\Stdlib\String') ) ); $validator = new \Magento\Eav\Model\Validator\Attribute\Data($factory); @@ -453,7 +455,7 @@ protected function _getDataModelMock($returnValue, $argument = null) protected function _getEntityMock() { $entity = $this->getMockBuilder( - 'Magento\Model\AbstractModel' + 'Magento\Framework\Model\AbstractModel' )->setMethods( array('getAttribute', 'getResource', 'getEntityType', '__wakeup') )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php index eda5a1e9c7b86..b59fedfb40ed7 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php @@ -34,7 +34,7 @@ class EditTest extends \PHPUnit_Framework_TestCase protected $_block; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $_registryMock; @@ -70,8 +70,8 @@ class EditTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_registryMock = $this->getMock('Magento\Registry', array(), array(), '', false, false); - $layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false, false); + $this->_registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false, false); + $layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false, false); $helperMock = $this->getMock('Magento\Backend\Helper\Data', array(), array(), '', false, false); $menuConfigMock = $this->getMock('Magento\Backend\Model\Menu\Config', array(), array(), '', false, false); $menuMock = $this->getMock('Magento\Backend\Model\Menu', array(), array(), '', false, false); @@ -95,7 +95,13 @@ protected function setUp() false ); - $viewFilesystem = $this->getMock('\Magento\View\Filesystem', array('getFilename'), array(), '', false); + $viewFilesystem = $this->getMock( + '\Magento\Framework\View\Filesystem', + array('getFilename'), + array(), + '', + false + ); $viewFilesystem->expects( $this->any() )->method( @@ -261,7 +267,13 @@ public function testGetDefaultTemplatesAsOptionsArray() array(\Magento\Framework\App\Filesystem::THEMES_DIR, 'var\www/magento\rootdir\app/themes/') ); - $this->directoryMock = $this->getMock('\Magento\Filesystem\Directory\Read', array(), array(), '', false); + $this->directoryMock = $this->getMock( + '\Magento\Framework\Filesystem\Directory\Read', + array(), + array(), + '', + false + ); $this->directoryMock->expects($this->any())->method('isFile')->will($this->returnValue(false)); $this->directoryMock->expects($this->any())->method('getRelativePath')->will($this->returnValue('')); diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/AbstractTemplateTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/AbstractTemplateTest.php index 0fcea1ee3a52b..3d8240040e3d5 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/AbstractTemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/AbstractTemplateTest.php @@ -47,8 +47,8 @@ protected function setUp() $helper->getConstructArguments( 'Magento\Email\Model\AbstractTemplate', array( - 'design' => $this->getMock('Magento\View\DesignInterface'), - 'data' => array('area' => \Magento\Core\Model\App\Area::AREA_FRONTEND, 'store' => 1) + 'design' => $this->getMock('Magento\Framework\View\DesignInterface'), + 'data' => array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => 1) ) ) ); @@ -56,7 +56,7 @@ protected function setUp() /** * @param array $config - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @dataProvider invalidInputParametersDataProvider */ public function testSetDesignConfigWithInvalidInputParametersThrowsException($config) diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/FileIteratorTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/FileIteratorTest.php index 3c43453b312d3..663d7af7ab1ce 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/FileIteratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/FileIteratorTest.php @@ -25,7 +25,7 @@ /** * Class FileIteratorTest - * @package Magento\Config + * @package Magento\Framework\Config */ class FileIteratorTest extends \PHPUnit_Framework_TestCase { @@ -35,12 +35,12 @@ class FileIteratorTest extends \PHPUnit_Framework_TestCase protected $fileIterator; /** - * @var \Magento\Filesystem\Directory\Read | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read | \PHPUnit_Framework_MockObject_MockObject */ protected $directoryMock; /** - * @var \Magento\Module\Dir\ReverseResolver | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir\ReverseResolver | \PHPUnit_Framework_MockObject_MockObject */ protected $moduleDirResolverMock; @@ -54,8 +54,14 @@ class FileIteratorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->filePaths = ['/file1', '/file2']; - $this->directoryMock = $this->getMock('Magento\Filesystem\Directory\Read', [], [], '', false); - $this->moduleDirResolverMock = $this->getMock('Magento\Module\Dir\ReverseResolver', [], [], '', false); + $this->directoryMock = $this->getMock('Magento\Framework\Filesystem\Directory\Read', [], [], '', false); + $this->moduleDirResolverMock = $this->getMock( + 'Magento\Framework\Module\Dir\ReverseResolver', + [], + [], + '', + false + ); $this->fileIterator = new FileIterator( $this->directoryMock, diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ReaderTest.php index 3208480f2fcb6..92bf4a099a690 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/ReaderTest.php @@ -36,12 +36,12 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_converter; /** - * @var \Magento\Module\Dir\ReverseResolver|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir\ReverseResolver|\PHPUnit_Framework_MockObject_MockObject */ protected $_moduleDirResolver; /** - * @var \Magento\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject */ protected $_filesystemDirectoryMock; @@ -69,7 +69,13 @@ protected function setUp() $this->_converter = $this->getMock('Magento\Email\Model\Template\Config\Converter', array('convert')); - $moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $moduleReader = $this->getMock( + 'Magento\Framework\Module\Dir\Reader', + array('getModuleDir'), + array(), + '', + false + ); $moduleReader->expects( $this->once() )->method( @@ -82,12 +88,18 @@ protected function setUp() ); $schemaLocator = new \Magento\Email\Model\Template\Config\SchemaLocator($moduleReader); - $validationState = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationState = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationState->expects($this->once())->method('isValidated')->will($this->returnValue(false)); - $this->_moduleDirResolver = $this->getMock('Magento\Module\Dir\ReverseResolver', array(), array(), '', false); + $this->_moduleDirResolver = $this->getMock( + 'Magento\Framework\Module\Dir\ReverseResolver', + array(), + array(), + '', + false + ); $this->_filesystemDirectoryMock = $this->getMock( - '\Magento\Filesystem\Directory\Read', + '\Magento\Framework\Filesystem\Directory\Read', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/SchemaLocatorTest.php index 0074d1d9708f0..8bf8a2694809f 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/SchemaLocatorTest.php @@ -31,13 +31,19 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */ protected $_moduleReader; protected function setUp() { - $this->_moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $this->_moduleReader = $this->getMock( + 'Magento\Framework\Module\Dir\Reader', + array('getModuleDir'), + array(), + '', + false + ); $this->_moduleReader->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/XsdTest.php index b83e648b9ed4b..ea29383ef8af1 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/Config/XsdTest.php @@ -114,7 +114,7 @@ public function mergedXmlDataProvider() */ protected function _testXmlAgainstXsd($fixtureXml, $schemaFile, array $expectedErrors) { - $dom = new \Magento\Config\Dom($fixtureXml, array(), null, null, '%message%'); + $dom = new \Magento\Framework\Config\Dom($fixtureXml, array(), null, null, '%message%'); $actualResult = $dom->validate($schemaFile, $actualErrors); $this->assertEquals(empty($expectedErrors), $actualResult); $this->assertEquals($expectedErrors, $actualErrors); diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/Template/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/Template/ConfigTest.php index 8a2c7d6d75e40..15ae780b3e123 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/Template/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/Template/ConfigTest.php @@ -36,7 +36,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected $_dataStorage; /** - * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */ protected $_moduleReader; @@ -56,7 +56,13 @@ protected function setUp() )->will( $this->returnValue(require __DIR__ . '/Config/_files/email_templates_merged.php') ); - $this->_moduleReader = $this->getMock('Magento\Module\Dir\Reader', array('getModuleDir'), array(), '', false); + $this->_moduleReader = $this->getMock( + 'Magento\Framework\Module\Dir\Reader', + array('getModuleDir'), + array(), + '', + false + ); $this->_model = new \Magento\Email\Model\Template\Config($this->_dataStorage, $this->_moduleReader); } diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php index 13cea82a3dbe1..04871684fc27e 100644 --- a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php @@ -45,14 +45,14 @@ public function testGetType($templateType, $expectedResult) array('_init') )->setConstructorArgs( array( - $this->getMock('Magento\Model\Context', array(), array(), '', false), + $this->getMock('Magento\Framework\Model\Context', array(), array(), '', false), $this->getMock('Magento\Core\Model\View\Design', array(), array(), '', false), - $this->getMock('Magento\Registry', array(), array(), '', false), + $this->getMock('Magento\Framework\Registry', array(), array(), '', false), $this->getMock('Magento\Core\Model\App\Emulation', array(), array(), '', false), $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false), $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false), - $this->getMock('Magento\View\Url', array(), array(), '', false), - $this->getMock('Magento\View\FileSystem', array(), array(), '', false), + $this->getMock('Magento\Framework\View\Url', array(), array(), '', false), + $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false), $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'), $this->getMock('Magento\Email\Model\Template\FilterFactory', array(), array(), '', false), $emailConfig, diff --git a/dev/tests/unit/testsuite/Magento/Exception/InputExceptionTest.php b/dev/tests/unit/testsuite/Magento/Exception/InputExceptionTest.php deleted file mode 100644 index a7b91c5a21881..0000000000000 --- a/dev/tests/unit/testsuite/Magento/Exception/InputExceptionTest.php +++ /dev/null @@ -1,83 +0,0 @@ - 0) - ); - - $this->assertEquals(InputException::INPUT_EXCEPTION, $inputException->getCode()); - $this->assertStringStartsWith('One or more', $inputException->getMessage()); - $this->assertEquals( - array( - array( - 'minValue' => 0, - 'value' => -100, - 'fieldName' => 'quantity', - 'code' => InputException::INVALID_FIELD_RANGE - ) - ), - $inputException->getParams() - ); - } - - public function testAddError() - { - $inputException = InputException::create( - InputException::INVALID_FIELD_RANGE, - 'weight', - -100, - array('minValue' => 1) - ); - - $inputException->addError(InputException::REQUIRED_FIELD, 'name', ''); - - $this->assertEquals(InputException::INPUT_EXCEPTION, $inputException->getCode()); - $this->assertStringStartsWith('One or more', $inputException->getMessage()); - $this->assertEquals( - array( - array( - 'minValue' => 1, - 'value' => -100, - 'fieldName' => 'weight', - 'code' => InputException::INVALID_FIELD_RANGE - ), - array('fieldName' => 'name', 'code' => InputException::REQUIRED_FIELD, 'value' => '') - ), - $inputException->getParams() - ); - } -} diff --git a/dev/tests/unit/testsuite/Magento/Acl/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/BuilderTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Acl/BuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/BuilderTest.php index 66b23eb920ebc..ab3b68889e686 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/BuilderTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Acl; +namespace Magento\Framework\Acl; class BuilderTest extends \PHPUnit_Framework_TestCase { @@ -54,7 +54,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase protected $_resourceLoader; /** - * @var \Magento\Acl\Builder + * @var \Magento\Framework\Acl\Builder */ protected $_model; @@ -65,14 +65,14 @@ class BuilderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_aclMock = new \Magento\Acl(); - $this->_aclCacheMock = $this->getMock('Magento\Acl\CacheInterface'); - $this->_aclFactoryMock = $this->getMock('Magento\AclFactory', array(), array(), '', false); + $this->_aclMock = new \Magento\Framework\Acl(); + $this->_aclCacheMock = $this->getMock('Magento\Framework\Acl\CacheInterface'); + $this->_aclFactoryMock = $this->getMock('Magento\Framework\AclFactory', array(), array(), '', false); $this->_aclFactoryMock->expects($this->any())->method('create')->will($this->returnValue($this->_aclMock)); - $this->_roleLoader = $this->getMock('Magento\Acl\Loader\DefaultLoader'); - $this->_ruleLoader = $this->getMock('Magento\Acl\Loader\DefaultLoader'); - $this->_resourceLoader = $this->getMock('Magento\Acl\Loader\DefaultLoader'); - $this->_model = new \Magento\Acl\Builder( + $this->_roleLoader = $this->getMock('Magento\Framework\Acl\Loader\DefaultLoader'); + $this->_ruleLoader = $this->getMock('Magento\Framework\Acl\Loader\DefaultLoader'); + $this->_resourceLoader = $this->getMock('Magento\Framework\Acl\Loader\DefaultLoader'); + $this->_model = new \Magento\Framework\Acl\Builder( $this->_aclFactoryMock, $this->_aclCacheMock, $this->_roleLoader, diff --git a/dev/tests/unit/testsuite/Magento/Acl/Loader/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Loader/DefaultTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Acl/Loader/DefaultTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Loader/DefaultTest.php index e1c00a3c66c34..76df9a2ffdd9f 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Loader/DefaultTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Loader/DefaultTest.php @@ -23,23 +23,23 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Acl\Loader; +namespace Magento\Framework\Acl\Loader; class DefaultTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Acl\Loader\DefaultLoader + * @var \Magento\Framework\Acl\Loader\DefaultLoader */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Acl\Loader\DefaultLoader(); + $this->_model = new \Magento\Framework\Acl\Loader\DefaultLoader(); } public function testPopulateAclDoesntChangeAclObject() { - $aclMock = $this->getMock('Magento\Acl'); + $aclMock = $this->getMock('Magento\Framework\Acl'); $aclMock->expects($this->never())->method('addRole'); $aclMock->expects($this->never())->method('addResource'); $aclMock->expects($this->never())->method('allow'); diff --git a/dev/tests/unit/testsuite/Magento/Acl/Loader/ResourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Loader/ResourceTest.php similarity index 70% rename from dev/tests/unit/testsuite/Magento/Acl/Loader/ResourceTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Loader/ResourceTest.php index 32e169178bc79..627eeb9758bcb 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Loader/ResourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Loader/ResourceTest.php @@ -1,6 +1,6 @@ getMock('Magento\Acl\Resource', array(), array(), '', false); + /** @var $aclResource \Magento\Framework\Acl\Resource */ + $aclResource = $this->getMock('Magento\Framework\Acl\Resource', array(), array(), '', false); - /** @var $acl \Magento\Acl */ - $acl = $this->getMock('Magento\Acl', array('addResource'), array(), '', false); + /** @var $acl \Magento\Framework\Acl */ + $acl = $this->getMock('Magento\Framework\Acl', array('addResource'), array(), '', false); $acl->expects($this->exactly(2))->method('addResource'); $acl->expects($this->at(0))->method('addResource')->with($aclResource, null)->will($this->returnSelf()); $acl->expects( @@ -50,11 +50,17 @@ public function testPopulateAclOnValidObjects() $this->returnSelf() ); - $factoryObject = $this->getMock('Magento\Acl\ResourceFactory', array('createResource'), array(), '', false); + $factoryObject = $this->getMock( + 'Magento\Framework\Acl\ResourceFactory', + array('createResource'), + array(), + '', + false + ); $factoryObject->expects($this->any())->method('createResource')->will($this->returnValue($aclResource)); - /** @var $resourceProvider \Magento\Acl\Resource\ProviderInterface */ - $resourceProvider = $this->getMock('Magento\Acl\Resource\ProviderInterface'); + /** @var $resourceProvider \Magento\Framework\Acl\Resource\ProviderInterface */ + $resourceProvider = $this->getMock('Magento\Framework\Acl\Resource\ProviderInterface'); $resourceProvider->expects( $this->once() )->method( @@ -79,8 +85,8 @@ public function testPopulateAclOnValidObjects() ) ); - /** @var $loaderResource \Magento\Acl\Loader\Resource */ - $loaderResource = new \Magento\Acl\Loader\Resource($resourceProvider, $factoryObject); + /** @var $loaderResource \Magento\Framework\Acl\Loader\Resource */ + $loaderResource = new \Magento\Framework\Acl\Loader\Resource($resourceProvider, $factoryObject); $loaderResource->populateAcl($acl); } diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/DomTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/DomTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/DomTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/DomTest.php index a4bfac7a646d1..0c4712f6ead3b 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/DomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/DomTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Acl\Resource\Config\Converter; +namespace Magento\Framework\Acl\Resource\Config\Converter; class DomTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Acl\Resource\Config\Converter\Dom + * @var \Magento\Framework\Acl\Resource\Config\Converter\Dom */ protected $_converter; protected function setUp() { - $this->_converter = new \Magento\Acl\Resource\Config\Converter\Dom(); + $this->_converter = new \Magento\Framework\Acl\Resource\Config\Converter\Dom(); } /** diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/_files/converted_valid_acl.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/converted_valid_acl.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/_files/converted_valid_acl.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/converted_valid_acl.php diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/_files/valid_acl.xml b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/valid_acl.xml similarity index 98% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/_files/valid_acl.xml rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/valid_acl.xml index 5c9efe15cc976..d0caa3549f919 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/Converter/_files/valid_acl.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/Converter/_files/valid_acl.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/XsdTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/Config/XsdTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/XsdTest.php index 8bf95a232ece6..f9ff12a69332f 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/XsdTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Acl\Resource\Config; +namespace Magento\Framework\Acl\Resource\Config; class XsdTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Acl\Resource\Config\SchemaLocator + * @var \Magento\Framework\Acl\Resource\Config\SchemaLocator */ protected $_schemaLocator; @@ -43,7 +43,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_schemaLocator = new \Magento\Acl\Resource\Config\SchemaLocator(); + $this->_schemaLocator = new \Magento\Framework\Acl\Resource\Config\SchemaLocator(); $this->_xsdSchema = $this->_schemaLocator->getSchema(); $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/_files/invalidAclXmlArray.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/invalidAclXmlArray.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/Config/_files/invalidAclXmlArray.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/invalidAclXmlArray.php diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/_files/valid_acl.xml b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/valid_acl.xml similarity index 97% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/Config/_files/valid_acl.xml rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/valid_acl.xml index 0230575d0bae7..bd25fd6980b03 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Resource/Config/_files/valid_acl.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/Config/_files/valid_acl.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/ProviderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/ProviderTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/ProviderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/ProviderTest.php index 1115b2c5beaba..91c7260f4547d 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Resource/ProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/ProviderTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Acl\Resource; +namespace Magento\Framework\Acl\Resource; class ProviderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Acl\Resource\Provider + * @var \Magento\Framework\Acl\Resource\Provider */ protected $_model; @@ -42,9 +42,15 @@ class ProviderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_configReaderMock = $this->getMock('Magento\Config\ReaderInterface'); - $this->_treeBuilderMock = $this->getMock('Magento\Acl\Resource\TreeBuilder', array(), array(), '', false); - $this->_model = new \Magento\Acl\Resource\Provider($this->_configReaderMock, $this->_treeBuilderMock); + $this->_configReaderMock = $this->getMock('Magento\Framework\Config\ReaderInterface'); + $this->_treeBuilderMock = $this->getMock( + 'Magento\Framework\Acl\Resource\TreeBuilder', + array(), + array(), + '', + false + ); + $this->_model = new \Magento\Framework\Acl\Resource\Provider($this->_configReaderMock, $this->_treeBuilderMock); } public function testGetIfAclResourcesExist() diff --git a/dev/tests/unit/testsuite/Magento/Acl/Resource/TreeBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/TreeBuilderTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Acl/Resource/TreeBuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/TreeBuilderTest.php index 8eadb39179761..360ca73b7e964 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/Resource/TreeBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/Resource/TreeBuilderTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Acl\Resource; +namespace Magento\Framework\Acl\Resource; class TreeBuilderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Acl\Resource\TreeBuilder + * @var \Magento\Framework\Acl\Resource\TreeBuilder */ protected $_model; @@ -39,7 +39,7 @@ class TreeBuilderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_model = new \Magento\Acl\Resource\TreeBuilder(); + $this->_model = new \Magento\Framework\Acl\Resource\TreeBuilder(); $this->_fixturePath = realpath(__DIR__ . '/../../') . '/_files/Acl/Resource/'; } diff --git a/dev/tests/unit/testsuite/Magento/Acl/ResourceFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Acl/ResourceFactoryTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Acl/ResourceFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Acl/ResourceFactoryTest.php index e3a4f16c286eb..6c1346e4b4236 100644 --- a/dev/tests/unit/testsuite/Magento/Acl/ResourceFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Acl/ResourceFactoryTest.php @@ -1,6 +1,6 @@ _objectManager = $this->getMockForAbstractClass( - 'Magento\ObjectManager', + 'Magento\Framework\ObjectManager', array(), '', true, @@ -56,10 +56,10 @@ protected function setUp() array('create') ); - $this->_expectedObject = $this->getMock('Magento\Acl\Resource', array(), array(), '', false); + $this->_expectedObject = $this->getMock('Magento\Framework\Acl\Resource', array(), array(), '', false); $this->_model = $helper->getObject( - 'Magento\Acl\ResourceFactory', + 'Magento\Framework\Acl\ResourceFactory', array('objectManager' => $this->_objectManager) ); } @@ -72,7 +72,7 @@ public function testCreateResource() )->method( 'create' )->with( - 'Magento\Acl\Resource', + 'Magento\Framework\Acl\Resource', $arguments )->will( $this->returnValue($this->_expectedObject) diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php index 18f3a36cad4c3..095270a23827a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php @@ -86,7 +86,7 @@ public function testResponseHeaders() { $infoProcessorMock = $this->getMock('Magento\Framework\App\Request\PathInfoProcessorInterface'); $routerListMock = $this->getMock('Magento\Framework\App\Route\ConfigInterface'); - $cookieMock = $this->getMock('Magento\Stdlib\Cookie', array(), array(), '', false); + $cookieMock = $this->getMock('Magento\Framework\Stdlib\Cookie', array(), array(), '', false); $contextMock = $this->getMock('Magento\Framework\App\Http\Context', array(), array(), '', false); $request = new \Magento\Framework\App\Request\Http($routerListMock, $infoProcessorMock); $response = new \Magento\Framework\App\Response\Http($cookieMock, $contextMock); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php index 82b6a185402a6..d2678ac73c8f3 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/AreaListTest.php @@ -42,7 +42,7 @@ class AreaListTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_resolverFactory = $this ->getMock('\Magento\Framework\App\Area\FrontNameResolverFactory', array(), array(), '', false); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/ArgumentInterpreterTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/ArgumentInterpreterTest.php index 880e889065178..0924307d36840 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/ArgumentInterpreterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/ArgumentInterpreterTest.php @@ -32,7 +32,13 @@ class ArgumentInterpreterTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $const = $this->getMock('\Magento\Data\Argument\Interpreter\Constant', array('evaluate'), array(), '', false); + $const = $this->getMock( + '\Magento\Framework\Data\Argument\Interpreter\Constant', + array('evaluate'), + array(), + '', + false + ); $const->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php index 4cad0e16bba4b..fac3dd4178dcd 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php @@ -33,9 +33,15 @@ class PrimaryTest extends \PHPUnit_Framework_TestCase */ public function testGet(array $fileList, $scope, $filename) { - $directory = $this->getMock('Magento\Filesystem\Directory\Read', array('search'), array(), '', false); + $directory = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array('search'), array(), '', false); $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false); - $iteratorFactory = $this->getMock('Magento\Config\FileIteratorFactory', array('create'), array(), '', false); + $iteratorFactory = $this->getMock( + 'Magento\Framework\Config\FileIteratorFactory', + array('create'), + array(), + '', + false + ); $filesystem->expects( $this->once() diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php index b38ca0a4da9a4..2a6886527ae2c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php @@ -36,14 +36,14 @@ public function testCreate() $result = $model->create(array('backend' => 'Zend_Cache_Backend_BlackHole')); $this->assertInstanceOf( - 'Magento\Cache\FrontendInterface', + 'Magento\Framework\Cache\FrontendInterface', $result, - 'Created object must implement \Magento\Cache\FrontendInterface' + 'Created object must implement \Magento\Framework\Cache\FrontendInterface' ); $this->assertInstanceOf( - 'Magento\Cache\Core', + 'Magento\Framework\Cache\Core', $result->getLowLevelFrontend(), - 'Created object must have \Magento\Cache\Core frontend by default' + 'Created object must have \Magento\Framework\Cache\Core frontend by default' ); $this->assertInstanceOf( 'Zend_Cache_Backend_BlackHole', @@ -142,7 +142,7 @@ protected function _buildModelForCreate($enforcedOptions = array(), $decorators { $processFrontendFunc = function ($class, $params) { switch ($class) { - case 'Magento\Cache\Frontend\Adapter\Zend': + case 'Magento\Framework\Cache\Frontend\Adapter\Zend': return new $class($params['frontend']); case 'Magento\Framework\App\Cache\Frontend\FactoryTest\CacheDecoratorDummy': $frontend = $params['frontend']; @@ -154,7 +154,7 @@ protected function _buildModelForCreate($enforcedOptions = array(), $decorators } }; /** @var $objectManager \PHPUnit_Framework_MockObject_MockObject */ - $objectManager = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $objectManager = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $objectManager->expects($this->any())->method('create')->will($this->returnCallback($processFrontendFunc)); $map = array( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest/CacheDecoratorDummy.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest/CacheDecoratorDummy.php index 35e925cc20785..0e71eb9f0cf97 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest/CacheDecoratorDummy.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest/CacheDecoratorDummy.php @@ -27,7 +27,7 @@ */ namespace Magento\Framework\App\Cache\Frontend\FactoryTest; -class CacheDecoratorDummy extends \Magento\Cache\Frontend\Decorator\Bare +class CacheDecoratorDummy extends \Magento\Framework\Cache\Frontend\Decorator\Bare { /** * @var array @@ -35,10 +35,10 @@ class CacheDecoratorDummy extends \Magento\Cache\Frontend\Decorator\Bare protected $_params; /** - * @param \Magento\Cache\FrontendInterface $frontend + * @param \Magento\Framework\Cache\FrontendInterface $frontend * @param array $params */ - public function __construct(\Magento\Cache\FrontendInterface $frontend, array $params) + public function __construct(\Magento\Framework\Cache\FrontendInterface $frontend, array $params) { parent::__construct($frontend); $this->_params = $params; diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/PoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/PoolTest.php index f4eb4a18bedeb..9505df3b0393d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/PoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/PoolTest.php @@ -40,9 +40,9 @@ class PoolTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_frontendInstances = array( - Pool::DEFAULT_FRONTEND_ID => $this->getMock('Magento\Cache\FrontendInterface'), - 'resource1' => $this->getMock('Magento\Cache\FrontendInterface'), - 'resource2' => $this->getMock('Magento\Cache\FrontendInterface') + Pool::DEFAULT_FRONTEND_ID => $this->getMock('Magento\Framework\Cache\FrontendInterface'), + 'resource1' => $this->getMock('Magento\Framework\Cache\FrontendInterface'), + 'resource2' => $this->getMock('Magento\Framework\Cache\FrontendInterface') ); $frontendFactoryMap = array( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/StateTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/StateTest.php index afe38919d5521..14344781c3ec5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/StateTest.php @@ -36,7 +36,7 @@ class StateTest extends \PHPUnit_Framework_TestCase protected $_resource; /** - * @var \Magento\Cache\FrontendInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Cache\FrontendInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_cacheFrontend; @@ -114,7 +114,7 @@ protected function _buildModel( $appInstalled = true, $banAll = false ) { - $this->_cacheFrontend = $this->getMock('Magento\Cache\FrontendInterface'); + $this->_cacheFrontend = $this->getMock('Magento\Framework\Cache\FrontendInterface'); $this->_cacheFrontend->expects( $this->any() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/AccessProxyTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/AccessProxyTest.php index e54660f080885..c77cad8cd296a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/AccessProxyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/AccessProxyTest.php @@ -36,7 +36,7 @@ public function testProxyMethod($method, $params, $disabledResult, $enabledResul { $identifier = 'cache_type_identifier'; - $frontendMock = $this->getMock('Magento\Cache\FrontendInterface'); + $frontendMock = $this->getMock('Magento\Framework\Cache\FrontendInterface'); $cacheEnabler = $this->getMock('Magento\Framework\App\Cache\StateInterface'); $cacheEnabler->expects($this->at(0))->method('isEnabled')->with($identifier)->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/FrontendPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/FrontendPoolTest.php index a7285115f73db..63eecc9086ea8 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/FrontendPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/FrontendPoolTest.php @@ -31,7 +31,7 @@ class FrontendPoolTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $_objectManager; @@ -47,7 +47,7 @@ class FrontendPoolTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $this->_arguments = $this->getMock('Magento\Framework\App\Arguments', array(), array(), '', false); $this->_cachePool = $this->getMock('Magento\Framework\App\Cache\Frontend\Pool', array(), array(), '', false); $this->_model = new FrontendPool( @@ -77,7 +77,7 @@ public function testGet($fixtureFrontendId, $inputCacheType, $expectedFrontendId $this->returnValue($fixtureFrontendId) ); - $cacheFrontend = $this->getMock('Magento\Cache\FrontendInterface'); + $cacheFrontend = $this->getMock('Magento\Framework\Cache\FrontendInterface'); $this->_cachePool->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/GenericTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/GenericTest.php index 9c5753b2e1937..a33a30985998a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/GenericTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Type/GenericTest.php @@ -35,7 +35,7 @@ class GenericTest extends \PHPUnit_Framework_TestCase */ public function testConstructor($className) { - $frontendMock = $this->getMock('Magento\Cache\FrontendInterface'); + $frontendMock = $this->getMock('Magento\Framework\Cache\FrontendInterface'); $poolMock = $this->getMock('Magento\Framework\App\Cache\Type\FrontendPool', array(), array(), '', false); $poolMock->expects( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/CacheTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/CacheTest.php index 0ac0711ed3822..d363d15eed40d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/CacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/CacheTest.php @@ -48,7 +48,7 @@ protected function setUp() $this->_initCacheTypeMocks(); $this->_cacheFrontendMock = $this->getMockForAbstractClass( - 'Magento\Cache\FrontendInterface', + 'Magento\Framework\Cache\FrontendInterface', array(), '', true, @@ -85,12 +85,15 @@ protected function setUp() */ protected function _initCacheTypeMocks() { - $cacheTypes = array('Magento\Cache\Frontend\Decorator\TagScope', 'Magento\Cache\Frontend\Decorator\Bare'); + $cacheTypes = array( + 'Magento\Framework\Cache\Frontend\Decorator\TagScope', + 'Magento\Framework\Cache\Frontend\Decorator\Bare' + ); foreach ($cacheTypes as $type) { $this->_cacheTypeMocks[$type] = $this->getMock( $type, array('clean'), - array($this->getMockForAbstractClass('Magento\Cache\FrontendInterface'), 'FIXTURE_TAG') + array($this->getMockForAbstractClass('Magento\Framework\Cache\FrontendInterface'), 'FIXTURE_TAG') ); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php index 9ecd31ded51b7..30f27e772f1bf 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php @@ -36,13 +36,13 @@ class BackendModelPoolTest extends \PHPUnit_Framework_TestCase protected $_processorMock; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new \Magento\Framework\App\Config\Data\ProcessorFactory($this->_objectManager); $this->_processorMock = $this->getMockForAbstractClass('Magento\Framework\App\Config\Data\ProcessorInterface'); $this->_processorMock->expects($this->any())->method('processValue')->will($this->returnArgument(0)); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php index ba8470d7ba024..6c647a1f0d14c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php @@ -42,19 +42,19 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase /** * File iterator factory * - * @var \Magento\Config\FileIteratorFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\FileIteratorFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $iteratorFactory; /** - * @var \Magento\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */ protected $moduleReader; protected function setUp() { $this->iteratorFactory = $this->getMock( - 'Magento\Config\FileIteratorFactory', + 'Magento\Framework\Config\FileIteratorFactory', array(), array('getPath'), '', @@ -68,7 +68,7 @@ protected function setUp() false ); $this->moduleReader = $this->getMock( - 'Magento\Module\Dir\Reader', + 'Magento\Framework\Module\Dir\Reader', array(), array('getConfigurationFiles'), '', @@ -93,7 +93,7 @@ public function testGetPrimary($filename, $fileList) { $scope = 'primary'; $directory = $this->getMock( - 'Magento\Filesystem\Directory\Read', + 'Magento\Framework\Filesystem\Directory\Read', array('search', 'getRelativePath'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php index bb2ec6d91aa11..d9d0df301e93b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php @@ -33,7 +33,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Config\FileResolverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\FileResolverInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_fileResolverMock; @@ -48,14 +48,14 @@ class ReaderTest extends \PHPUnit_Framework_TestCase protected $_filePath; /** - * @var \Magento\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject */ protected $rootDirectory; protected function setUp() { $this->_filePath = __DIR__ . '/_files/'; - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); $this->_converterMock = $this->getMock('Magento\Framework\App\Config\Initial\Converter'); $schemaLocatorMock = $this->getMock( 'Magento\Framework\App\Config\Initial\SchemaLocator', @@ -64,12 +64,12 @@ protected function setUp() '', false ); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationStateMock->expects($this->once())->method('isValidated')->will($this->returnValue(true)); $schemaFile = $this->_filePath . 'config.xsd'; $schemaLocatorMock->expects($this->once())->method('getSchema')->will($this->returnValue($schemaFile)); $this->rootDirectory = $this->getMock( - 'Magento\Filesystem\Directory\Read', + 'Magento\Framework\Filesystem\Directory\Read', array('readFile', 'getRelativePath'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/config.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/config.xml index 3ad78a9db00d9..fd7961d0d664a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config1.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config1.xml index 333154422f0a5..6900f5682ad9f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config1.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config1.xml @@ -23,5 +23,5 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config2.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config2.xml index 333154422f0a5..6900f5682ad9f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config2.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/initial_config2.xml @@ -23,5 +23,5 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/valid_config.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/valid_config.xml index e26a759ca900e..a25044d2d6d27 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/valid_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/_files/valid_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/ScopePoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/ScopePoolTest.php index f565addfa4f8e..4675643fa2fff 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/ScopePoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/ScopePoolTest.php @@ -41,7 +41,7 @@ class ScopePoolTest extends \PHPUnit_Framework_TestCase protected $_dataFactory; /** - * @var \Magento\Cache\FrontendInterface|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Cache\FrontendInterface|PHPUnit_Framework_MockObject_MockObject */ protected $_cache; @@ -58,7 +58,7 @@ public function setUp() $this->_dataFactory = $this->getMockBuilder( '\Magento\Framework\App\Config\DataFactory' )->disableOriginalConstructor()->getMock(); - $this->_cache = $this->getMock('\Magento\Cache\FrontendInterface'); + $this->_cache = $this->getMock('\Magento\Framework\Cache\FrontendInterface'); $this->_object = $helper->getObject( '\Magento\Framework\App\Config\ScopePool', array( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml index c3b4bcf7c345d..e6d50c1f20cda 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/_files/valid_routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/CronTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/CronTest.php index d4e6600743ec3..a43cf1cd0bbb0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/CronTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/CronTest.php @@ -57,7 +57,7 @@ class CronTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface'); + $this->_eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface'); $this->_stateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); $this->_request = $this->getMock('Magento\Framework\App\Console\Request', array(), array(), '', false); $this->_responseMock = $this->getMock('Magento\Framework\App\Console\Response', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/EntryPoint/EntryPointTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/EntryPoint/EntryPointTest.php index 971b4ba1bf3ce..d7d83293e1f4d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/EntryPoint/EntryPointTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/EntryPoint/EntryPointTest.php @@ -53,7 +53,7 @@ class EntryPointTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_parameters = array('MAGE_MODE' => 'developer'); - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_responseMock = $this->getMock('Magento\Framework\App\Response\Http', array(), array(), '', false); $this->_rootDir = realpath(__DIR__ . '/../../../../../../../'); $this->_model = new \Magento\Framework\App\EntryPoint\EntryPoint( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Error/HandlerTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Error/HandlerTest.php index e1a5d67fc967a..da7af2a173e1c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Error/HandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Error/HandlerTest.php @@ -30,7 +30,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase /** * Logger mock * - * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; @@ -57,7 +57,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->logger = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); $this->appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); $this->handler = new \Magento\Framework\App\Error\Handler($this->logger, $this->filesystem, $this->appState); @@ -66,7 +66,7 @@ protected function setUp() /** * Test for processException method print * - * @covers \Magento\Error\Handler::processException + * @covers \Magento\Framework\Error\Handler::processException */ public function testProcessExceptionPrint() { @@ -89,7 +89,7 @@ public function testProcessExceptionPrint() /** * Test for processException method report * - * @covers \Magento\Error\Handler::processException + * @covers \Magento\Framework\Error\Handler::processException * @runInSeparateProcess */ public function testProcessExceptionReport() @@ -118,7 +118,7 @@ public function testProcessExceptionReport() /** * Test for setting error handler and logging * - * @covers \Magento\Error\Handler::handler + * @covers \Magento\Framework\Error\Handler::handler * @throws \Exception */ public function testErrorHandlerLogging() @@ -151,7 +151,7 @@ public function testErrorHandlerLogging() /** * Test for setting error handler and printing * - * @covers \Magento\Error\Handler::handler + * @covers \Magento\Framework\Error\Handler::handler * @expectedException \Exception * @throws \Exception */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php index 6a12858444609..b80391e8fd70e 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php @@ -61,12 +61,12 @@ public function testConfigure($pubDirIsConfigured) )->with( Configuration::XML_FILESYSTEM_WRAPPER_PATH )->will( - $this->returnValue(array(\Magento\Filesystem::HTTP => array('protocol' => 'http'))) + $this->returnValue(array(\Magento\Framework\Filesystem::HTTP => array('protocol' => 'http'))) ); /* Mock DirectoryList model */ $directoryList = $this->getMockBuilder( - 'Magento\Filesystem\DirectoryList' + 'Magento\Framework\Filesystem\DirectoryList' )->disableOriginalConstructor()->setMethods( array('addDirectory', 'isConfigured', 'addProtocol') )->getMock(); @@ -76,7 +76,7 @@ public function testConfigure($pubDirIsConfigured) )->method( 'addProtocol' )->with( - \Magento\Filesystem::HTTP, + \Magento\Framework\Filesystem::HTTP, array('protocol' => 'http') ); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php index cc5c823f19cb4..542006ab7cb5b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php @@ -81,7 +81,7 @@ public static function createAndVerifyDirectoriesDataProvider() * @param string $mode * @param array $expectedDirs * @dataProvider notWritableDataProvider - * @expectedException \Magento\BootstrapException + * @expectedException \Magento\Framework\BootstrapException */ public function testNotWritable($mode, $expectedDirs) { @@ -114,7 +114,7 @@ public static function notWritableDataProvider() * @param string $mode * @param array $expectedDirs * @dataProvider createExceptionDataProvider - * @expectedException \Magento\BootstrapException + * @expectedException \Magento\Framework\BootstrapException */ public function testCreateException($mode, $expectedDirs) { @@ -160,7 +160,7 @@ protected function getVerificationInstance(array $expectedDirs, $mode) * Get filesystem mock * * @param array $dirsToVerify - * @return \Magento\Filesystem | \PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Filesystem | \PHPUnit_Framework_MockObject_MockObject */ protected function getFilesystemMock(array $dirsToVerify) { @@ -195,12 +195,12 @@ protected function getFilesystemMock(array $dirsToVerify) * @param bool $writable * @param string $absolutePath * @param bool $createException - * @return \Magento\Filesystem\Directory\Write | \PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Filesystem\Directory\Write | \PHPUnit_Framework_MockObject_MockObject */ protected function getDirectoryMock($existing, $writable, $absolutePath, $createException) { $directory = $this->getMock( - 'Magento\Filesystem\Directory\Write', + 'Magento\Framework\Filesystem\Directory\Write', array('isExist', 'isWritable', 'getAbsolutePath', 'create'), array(), '', @@ -217,7 +217,7 @@ protected function getDirectoryMock($existing, $writable, $absolutePath, $create )->method( 'create' )->will( - $this->throwException(new \Magento\Filesystem\FilesystemException('')) + $this->throwException(new \Magento\Framework\Filesystem\FilesystemException('')) ); } return $directory; diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php index 001600a4de0dd..a0a868f23f5ca 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php @@ -28,22 +28,22 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase /** @var Filesystem */ protected $_filesystem; - /** @var \Magento\Filesystem\Directory\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\Directory\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $_dirReadFactoryMock; - /** @var \Magento\Filesystem\Directory\WriteFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\Directory\WriteFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $_dirWriteFactoryMock; /** @var \Magento\Framework\App\Filesystem\DirectoryList|\PHPUnit_Framework_MockObject_MockObject */ protected $_directoryListMock; - /** @var \Magento\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $_fileReadFactoryMock; public function setUp() { $this->_dirReadFactoryMock = $this->getMock( - 'Magento\Filesystem\Directory\ReadFactory', + 'Magento\Framework\Filesystem\Directory\ReadFactory', array(), array(), '', @@ -57,14 +57,14 @@ public function setUp() false ); $this->_dirWriteFactoryMock = $this->getMock( - 'Magento\Filesystem\Directory\WriteFactory', + 'Magento\Framework\Filesystem\Directory\WriteFactory', array(), array(), '', false ); $this->_fileReadFactoryMock = $this->getMock( - 'Magento\Filesystem\File\ReadFactory', + 'Magento\Framework\Filesystem\File\ReadFactory', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/HttpTest.php index d5a7e60264b20..106703fdabe1a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/HttpTest.php @@ -94,9 +94,10 @@ public function setUp() $configLoaderMock->expects($this->once())->method('load')->with($areaCode)->will( $this->returnValue($areaConfig) ); - $objectManagerMock = $this->getMockBuilder('Magento\ObjectManager')->disableOriginalConstructor()->setMethods( - ['configure', 'get', 'create'] - )->getMock(); + $objectManagerMock = $this->getMockBuilder('Magento\Framework\ObjectManager') + ->disableOriginalConstructor() + ->setMethods(['configure', 'get', 'create']) + ->getMock(); $objectManagerMock->expects($this->once())->method('configure')->with($areaConfig); $this->_responseMock = $this->getMockBuilder( 'Magento\Framework\App\Response\Http' @@ -114,7 +115,7 @@ public function setUp() $this->returnValue($this->_responseMock) ); $this->_eventManagerMock = $this->getMockBuilder( - 'Magento\Event\Manager' + 'Magento\Framework\Event\Manager' )->disableOriginalConstructor()->setMethods( ['dispatch'] )->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigCacheTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigCacheTest.php index 58e950ec59af6..0bbe955030239 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigCacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigCacheTest.php @@ -37,7 +37,7 @@ class ConfigCacheTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_cacheFrontendMock = $this->getMock('\Magento\Cache\FrontendInterface'); + $this->_cacheFrontendMock = $this->getMock('\Magento\Framework\Cache\FrontendInterface'); $this->_configCache = new \Magento\Framework\App\ObjectManager\ConfigCache($this->_cacheFrontendMock); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php index 6f7146d16f66d..d5307398d513c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php @@ -31,7 +31,7 @@ class ConfigLoaderTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\ObjectManager\Config\Reader\Dom + * @var \Magento\Framework\ObjectManager\Config\Reader\Dom */ protected $_readerMock; @@ -42,7 +42,13 @@ class ConfigLoaderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_readerMock = $this->getMock('Magento\ObjectManager\Config\Reader\Dom', array(), array(), '', false); + $this->_readerMock = $this->getMock( + 'Magento\Framework\ObjectManager\Config\Reader\Dom', + array(), + array(), + '', + false + ); $this->_cacheMock = $this->getMock('Magento\Framework\App\Cache\Type\Config', array(), array(), '', false); $this->_model = new \Magento\Framework\App\ObjectManager\ConfigLoader($this->_cacheMock, $this->_readerMock); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/FormKeyTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/FormKeyTest.php index 49f4e8aafc963..6deac76226069 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/FormKeyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/FormKeyTest.php @@ -40,7 +40,7 @@ class FormKeyTest extends \PHPUnit_Framework_TestCase /** * Cookie mock * - * @var \Magento\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject */ protected $cookieMock; @@ -49,7 +49,7 @@ class FormKeyTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->cookieMock = $this->getMock('Magento\Stdlib\Cookie', array('get'), array(), '', false); + $this->cookieMock = $this->getMock('Magento\Framework\Stdlib\Cookie', array('get'), array(), '', false); $this->formKey = new \Magento\Framework\App\PageCache\FormKey($this->cookieMock); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/KernelTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/KernelTest.php index 70d811202d812..aace18f580077 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/KernelTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/KernelTest.php @@ -101,7 +101,13 @@ public function loadProvider() return array( array($data, 'existing key', $data, true, false), array($data, 'existing key', $data, false, true), - array(new \Magento\Object($data), 'existing key', new \Magento\Object($data), true, false), + array( + new \Magento\Framework\Object($data), + 'existing key', + new \Magento\Framework\Object($data), + true, + false + ), array(false, 'existing key', $data, false, false), array(false, 'non existing key', false, true, false), array(false, 'non existing key', false, false, false) diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/VersionTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/VersionTest.php index 766583908e1e7..0fb9ba1342dda 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/VersionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/PageCache/VersionTest.php @@ -35,7 +35,7 @@ class VersionTest extends \PHPUnit_Framework_TestCase /** * Cookie mock * - * @var \Magento\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject */ protected $cookieMock; @@ -51,7 +51,7 @@ class VersionTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->cookieMock = $this->getMock('Magento\Stdlib\Cookie', array('set'), array(), '', false); + $this->cookieMock = $this->getMock('Magento\Framework\Stdlib\Cookie', array('set'), array(), '', false); $this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', array('isPost'), array(), '', false); $this->version = new Version($this->cookieMock, $this->requestMock); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/ReaderTest.php index 22e6c181d6f3b..255aac57dcbf0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/ReaderTest.php @@ -64,8 +64,8 @@ protected function setUp() { $this->_filePath = __DIR__ . '/_files/'; - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); - $this->_validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); + $this->_validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $this->_schemaLocatorMock = $this->getMock( 'Magento\Framework\App\Resource\Config\SchemaLocator', array(), diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml index 8ad07dd490af2..dd21e17c5b5ed 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/resources.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml index db51b6d8b3a25..2235259d7dd41 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/Config/_files/valid_resources.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/ConfigTest.php index 10f11e0373081..433499a8e7b1e 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Resource/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Resource/ConfigTest.php @@ -57,8 +57,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_scopeMock = $this->getMock('Magento\Config\ScopeInterface'); - $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface'); + $this->_scopeMock = $this->getMock('Magento\Framework\Config\ScopeInterface'); + $this->_cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); $this->_readerMock = $this->getMock('Magento\Framework\App\Resource\Config\Reader', array(), array(), '', false); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php index fb846711d935d..c549e8f790220 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ResourceTest.php @@ -65,7 +65,7 @@ public function setUp() 'Magento\Framework\App\Resource\ConnectionFactory' )->disableOriginalConstructor()->setMethods(['create'])->getMock(); $this->_connection = $this->getMockBuilder( - 'Magento\DB\Adapter\AdapterInterface' + 'Magento\Framework\DB\Adapter\AdapterInterface' )->disableOriginalConstructor()->setMethods( [] )->getMock(); @@ -100,19 +100,19 @@ public function testGetConnectionInitConnection() $this->returnValue($this->_connection) ); $this->_connection->expects($this->once())->method('setCacheAdapter')->with( - $this->isInstanceOf('Magento\Cache\FrontendInterface') + $this->isInstanceOf('Magento\Framework\Cache\FrontendInterface') ); $frontendInterface = $this->getMockBuilder( - 'Magento\Cache\FrontendInterface' + 'Magento\Framework\Cache\FrontendInterface' )->disableOriginalConstructor()->setMethods([])->getMock(); $this->_cache->expects($this->once())->method('getFrontend')->will($this->returnValue($frontendInterface)); $this->assertInstanceOf( - 'Magento\DB\Adapter\AdapterInterface', + 'Magento\Framework\DB\Adapter\AdapterInterface', $this->_resorce->getConnection(self::RESOURCE_NAME) ); $this->assertInstanceOf( - 'Magento\DB\Adapter\AdapterInterface', + 'Magento\Framework\DB\Adapter\AdapterInterface', $this->_resorce->getConnection(self::RESOURCE_NAME) ); } @@ -146,11 +146,15 @@ public function testGetIdxName() $fields = ['field']; $this->_connection->expects($this->once())->method('getIndexName')->with( - $expectedTableName, $fields, \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX + $expectedTableName, $fields, \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX )->will($this->returnValue('idxName')); $this->assertEquals( 'idxName', - $this->_resorce->getIdxName($modelEntity, $fields, \Magento\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX) + $this->_resorce->getIdxName( + $modelEntity, + $fields, + \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_INDEX + ) ); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php index 1d64fb5104340..96d144bb6a6fb 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php @@ -41,7 +41,7 @@ class FileFactoryTest extends \PHPUnit_Framework_TestCase protected $_responseMock; /** - * @var \Magento\Filesystem\Directory\WriteInterface + * @var \Magento\Framework\Filesystem\Directory\WriteInterface */ protected $_dirMock; @@ -55,7 +55,7 @@ protected function setUp() false ); $this->_dirMock = $this->getMockBuilder( - '\Magento\Filesystem\Directory\Write' + '\Magento\Framework\Filesystem\Directory\Write' )->disableOriginalConstructor()->getMock(); $this->_fileSystemMock->expects( diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php index dfa2efc55b01d..5ca1d4a12865a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php @@ -31,7 +31,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\Cookie|\PHPUnit_Framework_MockObject_MockObject */ protected $_cookieMock; @@ -42,7 +42,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_cookieMock = $this->getMock('Magento\Stdlib\Cookie', array(), array(), '', false); + $this->_cookieMock = $this->getMock('Magento\Framework\Stdlib\Cookie', array(), array(), '', false); $this->_context = new \Magento\Framework\App\Http\Context(); $this->_model = new Http($this->_cookieMock, $this->_context); $this->_model->headersSentThrowsException = false; diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ResponseFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ResponseFactoryTest.php index b8d38c9584b69..efdcb6347bd74 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ResponseFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ResponseFactoryTest.php @@ -42,7 +42,7 @@ class ResponseFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new \Magento\Framework\App\ResponseFactory($this->_objectManagerMock); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml b/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml index 471c1de450b21..09eccfdd040ee 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Route/Config/_files/routes.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigTest.php index 7c3b934943a0a..c9e8e5c4f4f0c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigTest.php @@ -53,8 +53,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_readerMock = $this->getMock('Magento\Framework\App\Route\Config\Reader', array(), array(), '', false); - $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface'); - $this->_configScopeMock = $this->getMock('\Magento\Config\ScopeInterface'); + $this->_cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); + $this->_configScopeMock = $this->getMock('\Magento\Framework\Config\ScopeInterface'); $this->_areaList = $this->getMock('\Magento\Framework\App\AreaList', array(), array(), '', false); $this->_configScopeMock->expects( $this->any() diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/RouterListTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/RouterListTest.php index 480f9ee4e3f32..57bb70a4d763f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/RouterListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/RouterListTest.php @@ -33,7 +33,7 @@ class RouterListTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManagerMock; @@ -50,7 +50,7 @@ protected function setUp() 'default' => array('class' => 'DefaultClass', 'disable' => false, 'sortOrder' => 5) ); - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_model = new \Magento\Framework\App\RouterList($this->_objectManagerMock, $this->_routerList); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php index 4f389d0e640f5..897adc77d41c0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php @@ -59,7 +59,7 @@ public function testGetException($scope) { $scopeResolver = $this->_helper->getObject('Magento\Framework\App\ScopeResolverPool', [ 'scopeResolvers' => [ - 'test' => new \Magento\Object() + 'test' => new \Magento\Framework\Object() ] ]); $scopeResolver->get($scope); diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php index 89a2c95839fcc..2a7245ef87ddd 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/StateTest.php @@ -31,14 +31,14 @@ class StateTest extends \PHPUnit_Framework_TestCase protected $_model; /** - * @var \Magento\Config\ScopeInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\ScopeInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_scopeMock; protected function setUp() { $this->_scopeMock = $this->getMockForAbstractClass( - 'Magento\Config\ScopeInterface', + 'Magento\Framework\Config\ScopeInterface', array('setCurrentScope'), '', false @@ -51,14 +51,14 @@ public function testSetAreaCode() $areaCode = 'some code'; $this->_scopeMock->expects($this->once())->method('setCurrentScope')->with($areaCode); $this->_model->setAreaCode($areaCode); - $this->setExpectedException('Magento\Exception'); + $this->setExpectedException('Magento\Framework\Exception'); $this->_model->setAreaCode('any code'); } public function testGetAreaCodeException() { $this->_scopeMock->expects($this->never())->method('setCurrentScope'); - $this->setExpectedException('Magento\Exception'); + $this->setExpectedException('Magento\Framework\Exception'); $this->_model->getAreaCode(); } diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ViewTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ViewTest.php index d4db19c775949..7df8f4bd21635 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ViewTest.php @@ -63,10 +63,10 @@ class ViewTest extends \PHPUnit_Framework_TestCase protected function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_layoutMock = $this->getMock('Magento\View\Layout', array(), array(), '', false); + $this->_layoutMock = $this->getMock('Magento\Framework\View\Layout', array(), array(), '', false); $this->_requestMock = $this->getMock('Magento\Framework\App\Request\Http', array(), array(), '', false); - $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface'); - $this->_layoutProcessor = $this->getMock('Magento\View\Layout\ProcessorInterface'); + $this->_configScopeMock = $this->getMock('Magento\Framework\Config\ScopeInterface'); + $this->_layoutProcessor = $this->getMock('Magento\Framework\View\Layout\ProcessorInterface'); $this->_layoutMock->expects( $this->any() )->method( @@ -75,7 +75,7 @@ protected function setUp() $this->returnValue($this->_layoutProcessor) ); $this->_actionFlagMock = $this->getMock('Magento\Framework\App\ActionFlag', array(), array(), '', false); - $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface'); + $this->_eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface'); $this->_view = $helper->getObject( 'Magento\Framework\App\View', array( diff --git a/dev/tests/unit/testsuite/Magento/Authorization/Policy/AclTest.php b/dev/tests/unit/testsuite/Magento/Framework/Authorization/Policy/AclTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Authorization/Policy/AclTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Authorization/Policy/AclTest.php index 3c2a987b0f276..fa4b822b5010f 100644 --- a/dev/tests/unit/testsuite/Magento/Authorization/Policy/AclTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Authorization/Policy/AclTest.php @@ -23,12 +23,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Authorization\Policy; +namespace Magento\Framework\Authorization\Policy; class AclTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Authorization\Policy\Acl + * @var \Magento\Framework\Authorization\Policy\Acl */ protected $_model; @@ -38,10 +38,10 @@ class AclTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_aclMock = $this->getMock('Magento\Acl'); - $this->_aclBuilderMock = $this->getMock('Magento\Acl\Builder', array(), array(), '', false); + $this->_aclMock = $this->getMock('Magento\Framework\Acl'); + $this->_aclBuilderMock = $this->getMock('Magento\Framework\Acl\Builder', array(), array(), '', false); $this->_aclBuilderMock->expects($this->any())->method('getAcl')->will($this->returnValue($this->_aclMock)); - $this->_model = new \Magento\Authorization\Policy\Acl($this->_aclBuilderMock); + $this->_model = new \Magento\Framework\Authorization\Policy\Acl($this->_aclBuilderMock); } public function testIsAllowedReturnsTrueIfResourceIsAllowedToRole() diff --git a/dev/tests/unit/testsuite/Magento/Authorization/Policy/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Framework/Authorization/Policy/DefaultTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Authorization/Policy/DefaultTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Authorization/Policy/DefaultTest.php index df6218c03966f..a5ce83cbc0278 100644 --- a/dev/tests/unit/testsuite/Magento/Authorization/Policy/DefaultTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Authorization/Policy/DefaultTest.php @@ -23,18 +23,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Authorization\Policy; +namespace Magento\Framework\Authorization\Policy; class DefaultTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Authorization\Policy\DefaultPolicy + * @var \Magento\Framework\Authorization\Policy\DefaultPolicy */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Authorization\Policy\DefaultPolicy(); + $this->_model = new \Magento\Framework\Authorization\Policy\DefaultPolicy(); } public function testIsAllowedReturnsTrueForAnyResource() diff --git a/dev/tests/unit/testsuite/Magento/AuthorizationTest.php b/dev/tests/unit/testsuite/Magento/Framework/AuthorizationTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/AuthorizationTest.php rename to dev/tests/unit/testsuite/Magento/Framework/AuthorizationTest.php index 57c82c0425b65..aeb1f1aad6458 100644 --- a/dev/tests/unit/testsuite/Magento/AuthorizationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/AuthorizationTest.php @@ -26,16 +26,16 @@ */ /** - * Test class for \Magento\AuthorizationInterface. + * Test class for \Magento\Framework\AuthorizationInterface. */ -namespace Magento; +namespace Magento\Framework; class AuthorizationTest extends \PHPUnit_Framework_TestCase { /** * Authorization model * - * @var \Magento\AuthorizationInterface + * @var \Magento\Framework\AuthorizationInterface */ protected $_model; @@ -46,10 +46,10 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_policyMock = $this->getMock('Magento\Authorization\Policy', array(), array(), '', false); - $roleLocatorMock = $this->getMock('Magento\Authorization\RoleLocator', array(), array(), '', false); + $this->_policyMock = $this->getMock('Magento\Framework\Authorization\Policy', array(), array(), '', false); + $roleLocatorMock = $this->getMock('Magento\Framework\Authorization\RoleLocator', array(), array(), '', false); $roleLocatorMock->expects($this->any())->method('getAclRoleId')->will($this->returnValue('U1')); - $this->_model = new \Magento\Authorization($this->_policyMock, $roleLocatorMock); + $this->_model = new \Magento\Framework\Authorization($this->_policyMock, $roleLocatorMock); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Magento/Autoload/ClassMapTest.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassMapTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Autoload/ClassMapTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassMapTest.php index ce72c4c4b8f2f..9c3980a6af798 100644 --- a/dev/tests/unit/testsuite/Magento/Autoload/ClassMapTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassMapTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Autoload; +namespace Magento\Framework\Autoload; class ClassMapTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Autoload\ClassMap + * @var \Magento\Framework\Autoload\ClassMap */ protected $_loader = null; protected function setUp() { - $this->_loader = new \Magento\Autoload\ClassMap(__DIR__ . '/ClassMapTest'); + $this->_loader = new \Magento\Framework\Autoload\ClassMap(__DIR__ . '/ClassMapTest'); } /** @@ -40,7 +40,7 @@ protected function setUp() */ public function testConstructNonExistent() { - new \Magento\Autoload\ClassMap('non_existent'); + new \Magento\Framework\Autoload\ClassMap('non_existent'); } /** @@ -48,7 +48,7 @@ public function testConstructNonExistent() */ public function testConstructNotDir() { - new \Magento\Autoload\ClassMap(__FILE__); + new \Magento\Framework\Autoload\ClassMap(__FILE__); } public function testGetFileAddMap() @@ -68,7 +68,7 @@ public function testLoad() $this->assertFalse(class_exists('Unknown_Class', false)); $this->_loader->load('TestMap'); $this->_loader->load('Unknown_Class'); - $this->assertTrue(class_exists('Magento\Autoload\ClassMapTest\TestMap', false)); + $this->assertTrue(class_exists('Magento\Framework\Autoload\ClassMapTest\TestMap', false)); $this->assertFalse(class_exists('Unknown_Class', false)); } } diff --git a/dev/tests/unit/testsuite/Magento/Autoload/ClassMapTest/TestMap.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassMapTest/TestMap.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Autoload/ClassMapTest/TestMap.php rename to dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassMapTest/TestMap.php index dc8fee2b12c59..8fc0835dab1df 100644 --- a/dev/tests/unit/testsuite/Magento/Autoload/ClassMapTest/TestMap.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Autoload/ClassMapTest/TestMap.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Autoload\ClassMapTest; +namespace Magento\Framework\Autoload\ClassMapTest; class TestMap { diff --git a/dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest.php index 95beca54d54ea..e4e3b56b9754c 100644 --- a/dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Autoload; +namespace Magento\Framework\Autoload; class IncludePathTest extends \PHPUnit_Framework_TestCase { @@ -47,9 +47,9 @@ protected function tearDown() */ public function testGetFile($class, $expectedValue) { - $this->assertFalse(\Magento\Autoload\IncludePath::getFile($class)); - \Magento\Autoload\IncludePath::addIncludePath(__DIR__ . '/_files'); - $this->assertEquals($expectedValue, \Magento\Autoload\IncludePath::getFile($class)); + $this->assertFalse(\Magento\Framework\Autoload\IncludePath::getFile($class)); + \Magento\Framework\Autoload\IncludePath::addIncludePath(__DIR__ . '/_files'); + $this->assertEquals($expectedValue, \Magento\Framework\Autoload\IncludePath::getFile($class)); } /** @@ -75,7 +75,7 @@ public function testAddIncludePath($fixturePath, $prepend, $expectedIncludePath) { $expectedIncludePath = str_replace('%include_path%', get_include_path(), $expectedIncludePath); $this->assertNotEquals($expectedIncludePath, get_include_path()); - \Magento\Autoload\IncludePath::addIncludePath($fixturePath, $prepend); + \Magento\Framework\Autoload\IncludePath::addIncludePath($fixturePath, $prepend); $this->assertEquals($expectedIncludePath, get_include_path()); } @@ -105,9 +105,9 @@ public function addIncludePathDataProvider() */ public function testLoad($class, $expectedValue) { - \Magento\Autoload\IncludePath::addIncludePath(__DIR__ . '/_files'); + \Magento\Framework\Autoload\IncludePath::addIncludePath(__DIR__ . '/_files'); $this->assertFalse(class_exists($class, false)); - \Magento\Autoload\IncludePath::load($class); + \Magento\Framework\Autoload\IncludePath::load($class); if ($expectedValue) { $this->assertTrue(class_exists($class, false)); } else { diff --git a/dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/Ns/TestClass.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/Ns/TestClass.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/Ns/TestClass.php rename to dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/Ns/TestClass.php index 7918500cd40e6..4f5cb3f336ddb 100644 --- a/dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/Ns/TestClass.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/Ns/TestClass.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Autoload\IncludePathTest\Ns; +namespace Magento\Framework\Autoload\IncludePathTest\Ns; class TestClass { diff --git a/dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/TestClass.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/TestClass.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/TestClass.php rename to dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/TestClass.php index ec593f5dd0508..b66e95e6d36fc 100644 --- a/dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/TestClass.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/TestClass.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Autoload\IncludePathTest; +namespace Magento\Framework\Autoload\IncludePathTest; class TestClass { diff --git a/dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/constant.php b/dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/constant.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Autoload/IncludePathTest/constant.php rename to dev/tests/unit/testsuite/Magento/Framework/Autoload/IncludePathTest/constant.php diff --git a/dev/tests/unit/testsuite/Magento/Backup/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/FactoryTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Backup/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/FactoryTest.php index b4a32522c4f1a..2a4a909921793 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/FactoryTest.php @@ -24,28 +24,28 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backup; +namespace Magento\Framework\Backup; class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Backup\Factory + * @var \Magento\Framework\Backup\Factory */ protected $_model; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; protected function setUp() { - $this->_objectManager = $this->getMock('Magento\ObjectManager'); - $this->_model = new \Magento\Backup\Factory($this->_objectManager); + $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager'); + $this->_model = new \Magento\Framework\Backup\Factory($this->_objectManager); } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testCreateWrongType() { diff --git a/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/MediaTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Backup/MediaTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/MediaTest.php index bfbc62c89df68..4c61607971a85 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/MediaTest.php @@ -24,13 +24,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backup; +namespace Magento\Framework\Backup; require_once __DIR__ . '/_files/Gz.php'; require_once __DIR__ . '/_files/Tar.php'; require_once __DIR__ . '/_files/Fs.php'; require_once __DIR__ . '/_files/Helper.php'; require_once __DIR__ . '/_files/io.php'; + class MediaTest extends \PHPUnit_Framework_TestCase { /** @@ -39,18 +40,18 @@ class MediaTest extends \PHPUnit_Framework_TestCase protected $_filesystemMock; /** - * @var \Magento\Backup\Factory + * @var \Magento\Framework\Backup\Factory */ protected $_backupFactoryMock; /** - * @var \Magento\Backup\Db + * @var \Magento\Framework\Backup\Db */ protected $_backupDbMock; protected function setUp() { - $this->_backupDbMock = $this->getMock('Magento\Backup\Db', array(), array(), '', false); + $this->_backupDbMock = $this->getMock('Magento\Framework\Backup\Db', array(), array(), '', false); $this->_backupDbMock->expects($this->any())->method('setBackupExtension')->will($this->returnSelf()); $this->_backupDbMock->expects($this->any())->method('setTime')->will($this->returnSelf()); @@ -70,7 +71,7 @@ protected function setUp() $this->_backupDbMock->expects($this->any())->method('create')->will($this->returnValue(true)); $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_backupFactoryMock = $this->getMock('Magento\Backup\Factory', array(), array(), '', false); + $this->_backupFactoryMock = $this->getMock('Magento\Framework\Backup\Factory', array(), array(), '', false); $this->_backupFactoryMock->expects( $this->once() )->method( @@ -90,7 +91,7 @@ public function testAction($action) $rootDir = __DIR__ . '/_files/data'; - $model = new \Magento\Backup\Media($this->_filesystemMock, $this->_backupFactoryMock); + $model = new \Magento\Framework\Backup\Media($this->_filesystemMock, $this->_backupFactoryMock); $model->setRootDir($rootDir); $model->{$action}(); $this->assertTrue($model->getIsSuccess()); diff --git a/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/NomediaTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/NomediaTest.php index 1c036e207d19c..101d687bcdfc3 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/NomediaTest.php @@ -24,13 +24,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backup; +namespace Magento\Framework\Backup; require_once __DIR__ . '/_files/Gz.php'; require_once __DIR__ . '/_files/Tar.php'; require_once __DIR__ . '/_files/Fs.php'; require_once __DIR__ . '/_files/Helper.php'; require_once __DIR__ . '/_files/io.php'; + class NomediaTest extends \PHPUnit_Framework_TestCase { /** @@ -39,18 +40,18 @@ class NomediaTest extends \PHPUnit_Framework_TestCase protected $_filesystemMock; /** - * @var \Magento\Backup\Factory + * @var \Magento\Framework\Backup\Factory */ protected $_backupFactoryMock; /** - * @var \Magento\Backup\Db + * @var \Magento\Framework\Backup\Db */ protected $_backupDbMock; protected function setUp() { - $this->_backupDbMock = $this->getMock('Magento\Backup\Db', array(), array(), '', false); + $this->_backupDbMock = $this->getMock('Magento\Framework\Backup\Db', array(), array(), '', false); $this->_backupDbMock->expects($this->any())->method('setBackupExtension')->will($this->returnSelf()); $this->_backupDbMock->expects($this->any())->method('setTime')->will($this->returnSelf()); @@ -70,7 +71,7 @@ protected function setUp() $this->_backupDbMock->expects($this->any())->method('create')->will($this->returnValue(true)); $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $this->_backupFactoryMock = $this->getMock('Magento\Backup\Factory', array(), array(), '', false); + $this->_backupFactoryMock = $this->getMock('Magento\Framework\Backup\Factory', array(), array(), '', false); $this->_backupFactoryMock->expects( $this->once() )->method( @@ -90,7 +91,7 @@ public function testAction($action) $rootDir = __DIR__ . '/_files/data'; - $model = new \Magento\Backup\Nomedia($this->_filesystemMock, $this->_backupFactoryMock); + $model = new \Magento\Framework\Backup\Nomedia($this->_filesystemMock, $this->_backupFactoryMock); $model->setRootDir($rootDir); $model->{$action}(); $this->assertTrue($model->getIsSuccess()); diff --git a/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/SnapshotTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/SnapshotTest.php index 8405448335ff3..baa02d3ce6098 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/SnapshotTest.php @@ -24,16 +24,16 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backup; +namespace Magento\Framework\Backup; class SnapshotTest extends \PHPUnit_Framework_TestCase { public function testGetDbBackupFilename() { $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $backupFactory = $this->getMock('Magento\Backup\Factory', array(), array(), '', false); + $backupFactory = $this->getMock('Magento\Framework\Backup\Factory', array(), array(), '', false); $manager = $this->getMock( - 'Magento\Backup\Snapshot', + 'Magento\Framework\Backup\Snapshot', array('getBackupFilename'), array($filesystem, $backupFactory) ); @@ -41,7 +41,7 @@ public function testGetDbBackupFilename() $file = 'var/backup/2.gz'; $manager->expects($this->once())->method('getBackupFilename')->will($this->returnValue($file)); - $model = new \Magento\Backup\Snapshot($filesystem, $backupFactory); + $model = new \Magento\Framework\Backup\Snapshot($filesystem, $backupFactory); $model->setDbBackupManager($manager); $this->assertEquals($file, $model->getDbBackupFilename()); } diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/Fs.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Fs.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Backup/_files/Fs.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Fs.php index 811dc58bf1e0b..676f15ef4b99a 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/_files/Fs.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Fs.php @@ -28,14 +28,14 @@ /** * Mock rollback worker for rolling back via local filesystem */ -namespace Magento\Backup\Filesystem\Rollback; +namespace Magento\Framework\Backup\Filesystem\Rollback; -class Fs extends AbstractRollback +class Fs extends \Magento\Framework\Backup\Filesystem\Rollback\AbstractRollback { /** * Mock Files rollback implementation via local filesystem * - * @see \Magento\Backup\Filesystem\Rollback\AbstractRollback::run() + * @see \Magento\Framework\Backup\Filesystem\Rollback\AbstractRollback::run() */ public function run() { diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/Ftp.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Ftp.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Backup/_files/Ftp.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Ftp.php index 1c22d67248eb7..04dad00900c20 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/_files/Ftp.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Ftp.php @@ -28,14 +28,14 @@ /** * Mock Rollback worker for rolling back via ftp */ -namespace Magento\Backup\Filesystem\Rollback; +namespace Magento\Framework\Backup\Filesystem\Rollback; -class Fs extends AbstractRollback +class Fs extends \Magento\Framework\Backup\Filesystem\Rollback\AbstractRollback { /** * Mock Files rollback implementation via ftp * - * @see \Magento\Backup\Filesystem\Rollback\AbstractRollback::run() + * @see \Magento\Framework\Backup\Filesystem\Rollback\AbstractRollback::run() */ public function run() { diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/Gz.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Gz.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Backup/_files/Gz.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Gz.php index 479103c5888c6..7cfc531576ee2 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/_files/Gz.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Gz.php @@ -28,7 +28,7 @@ /** * Mock class to work with gz archives */ -namespace Magento\Archive; +namespace Magento\Framework\Archive; class Gz { diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/Helper.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Helper.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Backup/_files/Helper.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Helper.php index 0f192c6dbdb94..d1e7237f9b867 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/_files/Helper.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Helper.php @@ -28,7 +28,7 @@ /** * Mock Filesystem helper */ -namespace Magento\Backup\Filesystem; +namespace Magento\Framework\Backup\Filesystem; class Helper { diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/Tar.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Tar.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Backup/_files/Tar.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Tar.php index d1ca0a158796e..9af983ff9ea77 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/_files/Tar.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/Tar.php @@ -28,7 +28,7 @@ /** * Mock class to work with tar archives */ -namespace Magento\Backup\Archive; +namespace Magento\Framework\Backup\Archive; class Tar { diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/data/code/.gitignore b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/code/.gitignore similarity index 100% rename from dev/tests/unit/testsuite/Magento/Backup/_files/data/code/.gitignore rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/code/.gitignore diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/data/media/.gitignore b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/media/.gitignore similarity index 100% rename from dev/tests/unit/testsuite/Magento/Backup/_files/data/media/.gitignore rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/media/.gitignore diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/data/pub/media/.gitignore b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/pub/media/.gitignore similarity index 100% rename from dev/tests/unit/testsuite/Magento/Backup/_files/data/pub/media/.gitignore rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/pub/media/.gitignore diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/data/var/log/.gitignore b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/var/log/.gitignore similarity index 100% rename from dev/tests/unit/testsuite/Magento/Backup/_files/data/var/log/.gitignore rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/data/var/log/.gitignore diff --git a/dev/tests/unit/testsuite/Magento/Backup/_files/io.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/io.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Backup/_files/io.php rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/io.php index ce4667d845720..ddc2951cdc121 100644 --- a/dev/tests/unit/testsuite/Magento/Backup/_files/io.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/io.php @@ -24,13 +24,13 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Backup; +namespace Magento\Framework\Backup; /** * Mock is_dir function * - * @see \Magento\Backup\Filesystem + * @see \Magento\Framework\Backup\Filesystem * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function is_dir($path) @@ -41,7 +41,7 @@ function is_dir($path) /** * Mock is_dir function * - * @see \Magento\Backup\Filesystem + * @see \Magento\Framework\Backup\Filesystem * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function is_writable($path) @@ -52,7 +52,7 @@ function is_writable($path) /** * Mock disk_free_space function * - * @see \Magento\Backup\Filesystem + * @see \Magento\Framework\Backup\Filesystem * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function disk_free_space($path) @@ -63,7 +63,7 @@ function disk_free_space($path) /** * Mock is_file function * - * @see \Magento\Backup\Filesystem + * @see \Magento\Framework\Backup\Filesystem * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function is_file($path) @@ -74,7 +74,7 @@ function is_file($path) /** * Mock filesize function * - * @see \Magento\Backup\Filesystem + * @see \Magento\Framework\Backup\Filesystem * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function filesize($path) @@ -85,7 +85,7 @@ function filesize($path) /** * Mock unlink function * - * @see \Magento\Backup\Filesystem + * @see \Magento\Framework\Backup\Filesystem * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function unlink($path) @@ -96,7 +96,7 @@ function unlink($path) /** * Mock rmdir function * - * @see \Magento\Backup\Filesystem + * @see \Magento\Framework\Backup\Filesystem * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ function rmdir($path) diff --git a/dev/tests/unit/testsuite/Magento/Cache/Backend/Decorator/CompressionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/Decorator/CompressionTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Cache/Backend/Decorator/CompressionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/Decorator/CompressionTest.php index 45f818a84ad21..7f35bf7f5c94f 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Backend/Decorator/CompressionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/Decorator/CompressionTest.php @@ -23,14 +23,14 @@ */ /** - * \Magento\Cache\Backend\Decorator\Compression test case + * \Magento\Framework\Cache\Backend\Decorator\Compression test case */ -namespace Magento\Cache\Backend\Decorator; +namespace Magento\Framework\Cache\Backend\Decorator; class CompressionTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Cache\Backend\Decorator\Compression + * @var \Magento\Framework\Cache\Backend\Decorator\Compression */ protected $_decorator; @@ -50,7 +50,7 @@ protected function setUp() 'concrete_backend' => $this->getMock('Zend_Cache_Backend_File'), 'compression_threshold' => strlen($this->_testString) ); - $this->_decorator = new \Magento\Cache\Backend\Decorator\Compression($options); + $this->_decorator = new \Magento\Framework\Cache\Backend\Decorator\Compression($options); } protected function tearDown() @@ -61,7 +61,7 @@ protected function tearDown() public function testCompressData() { - $method = new \ReflectionMethod('Magento\Cache\Backend\Decorator\Compression', '_compressData'); + $method = new \ReflectionMethod('Magento\Framework\Cache\Backend\Decorator\Compression', '_compressData'); $method->setAccessible(true); $this->assertStringStartsWith('CACHE_COMPRESSION', $method->invoke($this->_decorator, $this->_testString)); @@ -69,10 +69,16 @@ public function testCompressData() public function testDecompressData() { - $methodCompress = new \ReflectionMethod('Magento\Cache\Backend\Decorator\Compression', '_compressData'); + $methodCompress = new \ReflectionMethod( + 'Magento\Framework\Cache\Backend\Decorator\Compression', + '_compressData' + ); $methodCompress->setAccessible(true); - $methodDecompress = new \ReflectionMethod('Magento\Cache\Backend\Decorator\Compression', '_decompressData'); + $methodDecompress = new \ReflectionMethod( + 'Magento\Framework\Cache\Backend\Decorator\Compression', + '_decompressData' + ); $methodDecompress->setAccessible(true); $this->assertEquals( @@ -86,7 +92,10 @@ public function testDecompressData() public function testIsCompressionNeeded() { - $method = new \ReflectionMethod('Magento\Cache\Backend\Decorator\Compression', '_isCompressionNeeded'); + $method = new \ReflectionMethod( + 'Magento\Framework\Cache\Backend\Decorator\Compression', + '_isCompressionNeeded' + ); $method->setAccessible(true); $this->assertFalse($method->invoke($this->_decorator, $this->_testString)); @@ -98,7 +107,10 @@ public function testIsDecompressionNeeded() { $prefix = 'CACHE_COMPRESSION'; - $method = new \ReflectionMethod('Magento\Cache\Backend\Decorator\Compression', '_isDecompressionNeeded'); + $method = new \ReflectionMethod( + 'Magento\Framework\Cache\Backend\Decorator\Compression', + '_isDecompressionNeeded' + ); $method->setAccessible(true); $this->assertFalse($method->invoke($this->_decorator, $this->_testString)); @@ -117,7 +129,7 @@ public function testSaveLoad() $options = array('concrete_backend' => $backend, 'compression_threshold' => strlen($this->_testString)); - $decorator = new \Magento\Cache\Backend\Decorator\Compression($options); + $decorator = new \Magento\Framework\Cache\Backend\Decorator\Compression($options); $decorator->setOption('write_control', false); $decorator->setOption('automatic_cleaning_factor', 0); diff --git a/dev/tests/unit/testsuite/Magento/Cache/Backend/Decorator/DecoratorAbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/Decorator/DecoratorAbstractTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Cache/Backend/Decorator/DecoratorAbstractTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/Decorator/DecoratorAbstractTest.php index 408c14b45b21f..6fe9e3ebc36cf 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Backend/Decorator/DecoratorAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/Decorator/DecoratorAbstractTest.php @@ -23,9 +23,9 @@ */ /** - * \Magento\Cache\Backend\Decorator\AbstractDecorator test case + * \Magento\Framework\Cache\Backend\Decorator\AbstractDecorator test case */ -namespace Magento\Cache\Backend\Decorator; +namespace Magento\Framework\Cache\Backend\Decorator; class DecoratorAbstractTest extends \PHPUnit_Framework_TestCase { @@ -49,15 +49,18 @@ public function testConstructor() $options = array('concrete_backend' => $this->_mockBackend, 'testOption' => 'testOption'); $decorator = $this->getMockForAbstractClass( - 'Magento\Cache\Backend\Decorator\AbstractDecorator', + 'Magento\Framework\Cache\Backend\Decorator\AbstractDecorator', array($options) ); - $backendProperty = new \ReflectionProperty('Magento\Cache\Backend\Decorator\AbstractDecorator', '_backend'); + $backendProperty = new \ReflectionProperty( + 'Magento\Framework\Cache\Backend\Decorator\AbstractDecorator', + '_backend' + ); $backendProperty->setAccessible(true); $optionsProperty = new \ReflectionProperty( - 'Magento\Cache\Backend\Decorator\AbstractDecorator', + 'Magento\Framework\Cache\Backend\Decorator\AbstractDecorator', '_decoratorOptions' ); $optionsProperty->setAccessible(true); @@ -75,7 +78,7 @@ public function testConstructor() */ public function testConstructorException($options) { - $this->getMockForAbstractClass('Magento\Cache\Backend\Decorator\AbstractDecorator', array($options)); + $this->getMockForAbstractClass('Magento\Framework\Cache\Backend\Decorator\AbstractDecorator', array($options)); } public function constructorExceptionDataProvider() @@ -94,7 +97,7 @@ public function testAllMethods($methodName) $this->_mockBackend->expects($this->once())->method($methodName); $decorator = $this->getMockForAbstractClass( - 'Magento\Cache\Backend\Decorator\AbstractDecorator', + 'Magento\Framework\Cache\Backend\Decorator\AbstractDecorator', array(array('concrete_backend' => $this->_mockBackend)) ); diff --git a/dev/tests/unit/testsuite/Magento/Cache/Backend/MongoDbTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Cache/Backend/MongoDbTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php index 86cabc40cc527..3d3ff84e6b1a7 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Backend/MongoDbTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache\Backend; +namespace Magento\Framework\Cache\Backend; class MongoDbTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Cache\Backend\MongoDb|null + * @var \Magento\Framework\Cache\Backend\MongoDb|null */ protected $_model = null; @@ -44,7 +44,13 @@ protected function setUp() '', false ); - $this->_model = $this->getMock('Magento\Cache\Backend\MongoDb', array('_getCollection'), array(), '', false); + $this->_model = $this->getMock( + 'Magento\Framework\Cache\Backend\MongoDb', + array('_getCollection'), + array(), + '', + false + ); $this->_model->expects($this->any())->method('_getCollection')->will($this->returnValue($this->_collection)); } @@ -92,9 +98,9 @@ public function getTagsDataProvider() } /** - * @covers \Magento\Cache\Backend\MongoDb::getIdsMatchingTags - * @covers \Magento\Cache\Backend\MongoDb::getIdsNotMatchingTags - * @covers \Magento\Cache\Backend\MongoDb::getIdsMatchingAnyTags + * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingTags + * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsNotMatchingTags + * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingAnyTags * @dataProvider getIdsMatchingTagsDataProvider */ public function testGetIdsMatchingTags($method, $tags, $expectedInput) @@ -151,9 +157,9 @@ public function getIdsMatchingTagsDataProvider() } /** - * @covers \Magento\Cache\Backend\MongoDb::getIdsMatchingTags - * @covers \Magento\Cache\Backend\MongoDb::getIdsNotMatchingTags - * @covers \Magento\Cache\Backend\MongoDb::getIdsMatchingAnyTags + * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingTags + * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsNotMatchingTags + * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingAnyTags */ public function testGetIdsMatchingTagsNoInputTags() { diff --git a/dev/tests/unit/testsuite/Magento/Cache/Backend/_files/MongoBinData.txt b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/_files/MongoBinData.txt similarity index 100% rename from dev/tests/unit/testsuite/Magento/Cache/Backend/_files/MongoBinData.txt rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/_files/MongoBinData.txt diff --git a/dev/tests/unit/testsuite/Magento/Cache/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/ConverterTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Cache/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Config/ConverterTest.php index fdbd5bb0dfdd4..b1a7d4b6122ce 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/ConverterTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache\Config; +namespace Magento\Framework\Cache\Config; class ConverterTest extends \PHPUnit_Framework_TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Cache\Config\Converter + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Cache\Config\Converter */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Cache\Config\Converter(); + $this->_model = new \Magento\Framework\Cache\Config\Converter(); } public function testConvert() diff --git a/dev/tests/unit/testsuite/Magento/Cache/Config/_files/cache_config.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Cache/Config/_files/cache_config.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.php diff --git a/dev/tests/unit/testsuite/Magento/Cache/Config/_files/cache_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.xml similarity index 97% rename from dev/tests/unit/testsuite/Magento/Cache/Config/_files/cache_config.xml rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.xml index 1f767fe1eb36d..bdca9d6e724ab 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Config/_files/cache_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Config/_files/cache_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + System(config.xml, local.xml) and modules configuration files(config.xml). diff --git a/dev/tests/unit/testsuite/Magento/Cache/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/ConfigTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Cache/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/ConfigTest.php index a29c57e2e74d1..3ed5ddc6c6b47 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/ConfigTest.php @@ -21,24 +21,24 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache; +namespace Magento\Framework\Cache; class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Cache\Config\Data|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Cache\Config\Data|\PHPUnit_Framework_MockObject_MockObject */ protected $_storage; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Cache\Config + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Cache\Config */ protected $_model; protected function setUp() { - $this->_storage = $this->getMock('Magento\Cache\Config\Data', array('get'), array(), '', false); - $this->_model = new \Magento\Cache\Config($this->_storage); + $this->_storage = $this->getMock('Magento\Framework\Cache\Config\Data', array('get'), array(), '', false); + $this->_model = new \Magento\Framework\Cache\Config($this->_storage); } public function testGetTypes() diff --git a/dev/tests/unit/testsuite/Magento/Cache/CoreTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Cache/CoreTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php index 66fe3dec406fb..58ffeae5569a5 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/CoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/CoreTest.php @@ -23,14 +23,14 @@ */ /** - * \Magento\Cache\Core test case + * \Magento\Framework\Cache\Core test case */ -namespace Magento\Cache; +namespace Magento\Framework\Cache; class CoreTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Cache\Core + * @var \Magento\Framework\Cache\Core */ protected $_core; @@ -59,10 +59,10 @@ protected function tearDown() public function testSetBackendDefault() { - $core = new \Magento\Cache\Core(); + $core = new \Magento\Framework\Cache\Core(); $core->setBackend($this->_mockBackend); - $this->assertNotInstanceOf('Magento\Cache\Backend\Decorator\AbstractDecorator', $core->getBackend()); + $this->assertNotInstanceOf('Magento\Framework\Cache\Backend\Decorator\AbstractDecorator', $core->getBackend()); $this->assertEquals($this->_mockBackend, $core->getBackend()); } @@ -72,7 +72,7 @@ public function testSetBackendDefault() */ public function testSetBackendException($decorators) { - $core = new \Magento\Cache\Core(array('backend_decorators' => $decorators)); + $core = new \Magento\Framework\Cache\Core(array('backend_decorators' => $decorators)); $core->setBackend($this->_mockBackend); } @@ -91,7 +91,7 @@ public function testSaveDisabled() { $backendMock = $this->getMock('Zend_Cache_Backend_BlackHole'); $backendMock->expects($this->never())->method('save'); - $frontend = new \Magento\Cache\Core(array('disable_save' => true)); + $frontend = new \Magento\Framework\Cache\Core(array('disable_save' => true)); $frontend->setBackend($backendMock); $result = $frontend->save('data', 'id'); $this->assertTrue($result); diff --git a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Adapter/ZendTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Adapter/ZendTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Cache/Frontend/Adapter/ZendTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Adapter/ZendTest.php index ceef2a259b6d6..31ea472efbe80 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Adapter/ZendTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Adapter/ZendTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache\Frontend\Adapter; +namespace Magento\Framework\Cache\Frontend\Adapter; class ZendTest extends \PHPUnit_Framework_TestCase { @@ -35,7 +35,7 @@ class ZendTest extends \PHPUnit_Framework_TestCase public function testProxyMethod($method, $params, $expectedParams, $expectedResult) { $frontendMock = $this->getMock('Zend_Cache_Core'); - $object = new \Magento\Cache\Frontend\Adapter\Zend($frontendMock); + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendMock); $helper = new \Magento\TestFramework\Helper\ProxyTesting(); $result = $helper->invokeWithExpectations( $object, @@ -99,7 +99,7 @@ public static function proxyMethodDataProvider() public function testCleanException($cleaningMode, $expectedErrorMessage) { $this->setExpectedException('InvalidArgumentException', $expectedErrorMessage); - $object = new \Magento\Cache\Frontend\Adapter\Zend($this->getMock('Zend_Cache_Core')); + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($this->getMock('Zend_Cache_Core')); $object->clean($cleaningMode); } @@ -124,7 +124,7 @@ public function cleanExceptionDataProvider() public function testGetLowLevelFrontend() { $frontendMock = $this->getMock('Zend_Cache_Core'); - $object = new \Magento\Cache\Frontend\Adapter\Zend($frontendMock); + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendMock); $this->assertSame($frontendMock, $object->getLowLevelFrontend()); } } diff --git a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/BareTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/BareTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/BareTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/BareTest.php index 092c41124e1fb..7b27fe097f47e 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/BareTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/BareTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache\Frontend\Decorator; +namespace Magento\Framework\Cache\Frontend\Decorator; class BareTest extends \PHPUnit_Framework_TestCase { @@ -33,9 +33,9 @@ class BareTest extends \PHPUnit_Framework_TestCase */ public function testProxyMethod($method, $params, $expectedResult) { - $frontendMock = $this->getMock('Magento\Cache\FrontendInterface'); + $frontendMock = $this->getMock('Magento\Framework\Cache\FrontendInterface'); - $object = new \Magento\Cache\Frontend\Decorator\Bare($frontendMock); + $object = new \Magento\Framework\Cache\Frontend\Decorator\Bare($frontendMock); $helper = new \Magento\TestFramework\Helper\ProxyTesting(); $result = $helper->invokeWithExpectations($object, $frontendMock, $method, $params, $expectedResult); $this->assertSame($expectedResult, $result); diff --git a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/ProfilerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/ProfilerTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/ProfilerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/ProfilerTest.php index d96a96ec1a551..557ed00b74fa8 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/ProfilerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/ProfilerTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache\Frontend\Decorator; +namespace Magento\Framework\Cache\Frontend\Decorator; class ProfilerTest extends \PHPUnit_Framework_TestCase { protected function setUp() { - \Magento\Profiler::enable(); + \Magento\Framework\Profiler::enable(); } protected function tearDown() { - \Magento\Profiler::reset(); + \Magento\Framework\Profiler::reset(); } /** @@ -55,20 +55,20 @@ public function testProxyMethod( $expectedResult ) { // Cache frontend setup - $frontendMock = $this->getMock('Magento\Cache\FrontendInterface'); + $frontendMock = $this->getMock('Magento\Framework\Cache\FrontendInterface'); $frontendMock->expects($this->any())->method('getBackend')->will($this->returnValue($cacheBackend)); $frontendMock->expects($this->any())->method('getLowLevelFrontend')->will($this->returnValue($cacheFrontend)); // Profiler setup - $driver = $this->getMock('Magento\Profiler\DriverInterface'); + $driver = $this->getMock('Magento\Framework\Profiler\DriverInterface'); $driver->expects($this->once())->method('start')->with($expectedProfileId, $expectedProfilerTags); $driver->expects($this->once())->method('stop')->with($expectedProfileId); - \Magento\Profiler::add($driver); + \Magento\Framework\Profiler::add($driver); // Test - $object = new \Magento\Cache\Frontend\Decorator\Profiler($frontendMock, array('Zend_Cache_Backend_')); + $object = new \Magento\Framework\Cache\Frontend\Decorator\Profiler($frontendMock, array('Zend_Cache_Backend_')); $helper = new \Magento\TestFramework\Helper\ProxyTesting(); $result = $helper->invokeWithExpectations($object, $frontendMock, $method, $params, $expectedResult); $this->assertSame($expectedResult, $result); @@ -81,7 +81,7 @@ public static function proxyMethodDataProvider() { $backend = new \Zend_Cache_Backend_BlackHole(); $adaptee = \PHPUnit_Framework_MockObject_Generator::getMock('Zend_Cache_Core', array(), array(), '', false); - $lowLevelFrontend = new \Magento\Cache\Frontend\Adapter\Zend($adaptee); + $lowLevelFrontend = new \Magento\Framework\Cache\Frontend\Adapter\Zend($adaptee); return array( array( @@ -93,7 +93,7 @@ public static function proxyMethodDataProvider() array( 'group' => 'cache', 'operation' => 'cache:test', - 'frontend_type' => 'Magento\Cache\Frontend\Adapter\Zend', + 'frontend_type' => 'Magento\Framework\Cache\Frontend\Adapter\Zend', 'backend_type' => 'BlackHole' ), 111 @@ -107,7 +107,7 @@ public static function proxyMethodDataProvider() array( 'group' => 'cache', 'operation' => 'cache:load', - 'frontend_type' => 'Magento\Cache\Frontend\Adapter\Zend', + 'frontend_type' => 'Magento\Framework\Cache\Frontend\Adapter\Zend', 'backend_type' => 'BlackHole' ), '111' @@ -121,7 +121,7 @@ public static function proxyMethodDataProvider() array( 'group' => 'cache', 'operation' => 'cache:save', - 'frontend_type' => 'Magento\Cache\Frontend\Adapter\Zend', + 'frontend_type' => 'Magento\Framework\Cache\Frontend\Adapter\Zend', 'backend_type' => 'BlackHole' ), true @@ -135,7 +135,7 @@ public static function proxyMethodDataProvider() array( 'group' => 'cache', 'operation' => 'cache:remove', - 'frontend_type' => 'Magento\Cache\Frontend\Adapter\Zend', + 'frontend_type' => 'Magento\Framework\Cache\Frontend\Adapter\Zend', 'backend_type' => 'BlackHole' ), true @@ -149,7 +149,7 @@ public static function proxyMethodDataProvider() array( 'group' => 'cache', 'operation' => 'cache:clean', - 'frontend_type' => 'Magento\Cache\Frontend\Adapter\Zend', + 'frontend_type' => 'Magento\Framework\Cache\Frontend\Adapter\Zend', 'backend_type' => 'BlackHole' ), true diff --git a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/TagScopeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/TagScopeTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/TagScopeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/TagScopeTest.php index 9a34f1fd0f334..c68977457c72e 100644 --- a/dev/tests/unit/testsuite/Magento/Cache/Frontend/Decorator/TagScopeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Frontend/Decorator/TagScopeTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Cache\Frontend\Decorator; +namespace Magento\Framework\Cache\Frontend\Decorator; class TagScopeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Cache\Frontend\Decorator\TagScope + * @var \Magento\Framework\Cache\Frontend\Decorator\TagScope */ protected $_object; @@ -37,8 +37,8 @@ class TagScopeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_frontend = $this->getMock('Magento\Cache\FrontendInterface'); - $this->_object = new \Magento\Cache\Frontend\Decorator\TagScope($this->_frontend, 'enforced_tag'); + $this->_frontend = $this->getMock('Magento\Framework\Cache\FrontendInterface'); + $this->_object = new \Magento\Framework\Cache\Frontend\Decorator\TagScope($this->_frontend, 'enforced_tag'); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Magento/Code/Generator/CodeGenerator/ZendTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/CodeGenerator/ZendTest.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Code/Generator/CodeGenerator/ZendTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Generator/CodeGenerator/ZendTest.php index f8c1e4d355b48..569984ba6b838 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Generator/CodeGenerator/ZendTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/CodeGenerator/ZendTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Generator\CodeGenerator; +namespace Magento\Framework\Code\Generator\CodeGenerator; class ZendTest extends \PHPUnit_Framework_TestCase { @@ -44,7 +44,7 @@ class ZendTest extends \PHPUnit_Framework_TestCase /**#@-*/ /** - * @var \Magento\Code\Generator\CodeGenerator\Zend + * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend */ protected $_model; @@ -138,7 +138,7 @@ class ZendTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_model = new \Magento\Code\Generator\CodeGenerator\Zend(); + $this->_model = new \Magento\Framework\Code\Generator\CodeGenerator\Zend(); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Magento/Code/Generator/EntityAbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Code/Generator/EntityAbstractTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php index 3cc3f96db9101..c86b2c41a2961 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Generator/EntityAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php @@ -24,16 +24,16 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Generator; +namespace Magento\Framework\Code\Generator; class EntityAbstractTest extends \PHPUnit_Framework_TestCase { /**#@+ * Source and result class parameters */ - const SOURCE_CLASS = 'Magento\Object'; + const SOURCE_CLASS = 'Magento\Framework\Object'; - const RESULT_CLASS = 'Magento\Object_MyResult'; + const RESULT_CLASS = 'Magento\Framework\Object_MyResult'; const RESULT_FILE = 'MyResult/MyResult.php'; @@ -58,13 +58,13 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase /** * Model under test * - * @var \Magento\Code\Generator\EntityAbstract|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Generator\EntityAbstract|PHPUnit_Framework_MockObject_MockObject */ protected $_model; protected function setUp() { - $this->_model = $this->getMockForAbstractClass('Magento\Code\Generator\EntityAbstract'); + $this->_model = $this->getMockForAbstractClass('Magento\Framework\Code\Generator\EntityAbstract'); } protected function tearDown() @@ -77,29 +77,35 @@ public function testConstruct() // without parameters $this->assertAttributeEmpty('_sourceClassName', $this->_model); $this->assertAttributeEmpty('_resultClassName', $this->_model); - $this->assertAttributeInstanceOf('Magento\Code\Generator\Io', '_ioObject', $this->_model); + $this->assertAttributeInstanceOf('Magento\Framework\Code\Generator\Io', '_ioObject', $this->_model); $this->assertAttributeInstanceOf( - 'Magento\Code\Generator\CodeGenerator\Zend', + 'Magento\Framework\Code\Generator\CodeGenerator\Zend', '_classGenerator', $this->_model ); - $this->assertAttributeInstanceOf('Magento\Autoload\IncludePath', '_autoloader', $this->_model); + $this->assertAttributeInstanceOf('Magento\Framework\Autoload\IncludePath', '_autoloader', $this->_model); // with source class name $this->_model = $this->getMockForAbstractClass( - 'Magento\Code\Generator\EntityAbstract', + 'Magento\Framework\Code\Generator\EntityAbstract', array(self::SOURCE_CLASS) ); $this->assertAttributeEquals(self::SOURCE_CLASS, '_sourceClassName', $this->_model); $this->assertAttributeEquals(self::SOURCE_CLASS . 'Abstract', '_resultClassName', $this->_model); // with all arguments - $ioObject = $this->getMock('Magento\Code\Generator\Io', array(), array(), '', false); - $codeGenerator = $this->getMock('Magento\Code\Generator\CodeGenerator\Zend', array(), array(), '', false); - $autoloader = $this->getMock('Magento\Autoload\IncludePath', array(), array(), '', false); + $ioObject = $this->getMock('Magento\Framework\Code\Generator\Io', array(), array(), '', false); + $codeGenerator = $this->getMock( + 'Magento\Framework\Code\Generator\CodeGenerator\Zend', + array(), + array(), + '', + false + ); + $autoloader = $this->getMock('Magento\Framework\Autoload\IncludePath', array(), array(), '', false); $this->_model = $this->getMockForAbstractClass( - 'Magento\Code\Generator\EntityAbstract', + 'Magento\Framework\Code\Generator\EntityAbstract', array(self::SOURCE_CLASS, self::RESULT_CLASS, $ioObject, $codeGenerator, $autoloader) ); $this->assertAttributeEquals(self::RESULT_CLASS, '_resultClassName', $this->_model); @@ -176,17 +182,17 @@ public function generateDataProvider() * @param bool $isValid * * @dataProvider generateDataProvider - * @covers \Magento\Code\Generator\EntityAbstract::generate - * @covers \Magento\Code\Generator\EntityAbstract::getErrors - * @covers \Magento\Code\Generator\EntityAbstract::_getSourceClassName - * @covers \Magento\Code\Generator\EntityAbstract::_getResultClassName - * @covers \Magento\Code\Generator\EntityAbstract::_getDefaultResultClassName - * @covers \Magento\Code\Generator\EntityAbstract::_generateCode - * @covers \Magento\Code\Generator\EntityAbstract::_addError - * @covers \Magento\Code\Generator\EntityAbstract::_validateData - * @covers \Magento\Code\Generator\EntityAbstract::_getClassDocBlock - * @covers \Magento\Code\Generator\EntityAbstract::_getGeneratedCode - * @covers \Magento\Code\Generator\EntityAbstract::_fixCodeStyle + * @covers \Magento\Framework\Code\Generator\EntityAbstract::generate + * @covers \Magento\Framework\Code\Generator\EntityAbstract::getErrors + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getSourceClassName + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getResultClassName + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getDefaultResultClassName + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_generateCode + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_addError + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_validateData + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getClassDocBlock + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getGeneratedCode + * @covers \Magento\Framework\Code\Generator\EntityAbstract::_fixCodeStyle */ public function testGenerate( $errors = array(), @@ -211,7 +217,7 @@ public function testGenerate( } $abstractGetters = array('_getClassProperties', '_getClassMethods'); $this->_model = $this->getMockForAbstractClass( - 'Magento\Code\Generator\EntityAbstract', + 'Magento\Framework\Code\Generator\EntityAbstract', $arguments, '', true, @@ -253,7 +259,7 @@ protected function _prepareMocksForValidateData( $fileExists = false ) { $ioObject = $this->getMock( - 'Magento\Code\Generator\Io', + 'Magento\Framework\Code\Generator\Io', array( 'getResultFileName', 'makeGenerationDirectory', @@ -267,7 +273,7 @@ protected function _prepareMocksForValidateData( '', false ); - $autoloader = $this->getMock('Magento\Autoload\IncludePath', array('getFile'), array(), '', false); + $autoloader = $this->getMock('Magento\Framework\Autoload\IncludePath', array('getFile'), array(), '', false); $ioObject->expects( $this->any() @@ -402,7 +408,7 @@ protected function _prepareMocksForGenerateCode($isValid) $mocks = $this->_prepareMocksForValidateData(); $codeGenerator = $this->getMock( - 'Magento\Code\Generator\CodeGenerator\Zend', + 'Magento\Framework\Code\Generator\CodeGenerator\Zend', array('setName', 'addProperties', 'addMethods', 'setClassDocBlock', 'generate'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Code/Generator/IoTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/IoTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Code/Generator/IoTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Generator/IoTest.php index 023f781cf6647..78427a49813bb 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Generator/IoTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/IoTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Generator; +namespace Magento\Framework\Code\Generator; class IoTest extends \PHPUnit_Framework_TestCase { @@ -51,17 +51,17 @@ class IoTest extends \PHPUnit_Framework_TestCase protected $_generationDirectory; /** - * @var \Magento\Code\Generator\Io + * @var \Magento\Framework\Code\Generator\Io */ protected $_object; /** - * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ protected $_filesystemDriverMock; /** - * @var \Magento\Autoload\IncludePath|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Autoload\IncludePath|\PHPUnit_Framework_MockObject_MockObject */ protected $_autoLoaderMock; @@ -70,13 +70,13 @@ protected function setUp() $this->_generationDirectory = rtrim(self::GENERATION_DIRECTORY, '/') . '/'; $this->_filesystemDriverMock = $this->getMock( - 'Magento\Filesystem\Driver\File', + 'Magento\Framework\Filesystem\Driver\File', array('isWritable', 'filePutContents', 'createDirectory', 'isExists'), array() ); $this->_autoLoaderMock = $this->getMock( - 'Magento\Autoload\IncludePath', + 'Magento\Framework\Autoload\IncludePath', array('getFilePath'), array(), '', @@ -92,7 +92,7 @@ protected function setUp() $this->returnValue(self::CLASS_FILE_NAME) ); - $this->_object = new \Magento\Code\Generator\Io( + $this->_object = new \Magento\Framework\Code\Generator\Io( $this->_filesystemDriverMock, $this->_autoLoaderMock, self::GENERATION_DIRECTORY diff --git a/dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/ParentClass.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/ParentClass.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/ParentClass.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/ParentClass.php index c6a59bcedab4b..2d85867fd4447 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/ParentClass.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/ParentClass.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Generator\TestAsset; +namespace Magento\Framework\Code\Generator\TestAsset; use Zend\Code\Generator\DocBlockGenerator; diff --git a/dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/SourceClass.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/SourceClass.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/SourceClass.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/SourceClass.php index 22c47b6039f60..e9c4f8dc3e409 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/SourceClass.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/SourceClass.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Generator\TestAsset; +namespace Magento\Framework\Code\Generator\TestAsset; use Zend\Code\Generator\ClassGenerator; diff --git a/dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/TestGenerationClass.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/TestGenerationClass.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/TestGenerationClass.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/TestGenerationClass.php index 898f092f7ff70..4f1a9fe0e7e10 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Generator/TestAsset/TestGenerationClass.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/TestAsset/TestGenerationClass.php @@ -24,20 +24,20 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Generator\TestAsset; +namespace Magento\Framework\Code\Generator\TestAsset; class TestGenerationClass { /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) * - * @param \Magento\Code\Generator\TestAsset\ParentClass $parentClass - * @param \Magento\Code\Generator\TestAsset\SourceClass $sourceClass + * @param \Magento\Framework\Code\Generator\TestAsset\ParentClass $parentClass + * @param \Magento\Framework\Code\Generator\TestAsset\SourceClass $sourceClass * @param \Not_Existing_Class $notExistingClass */ public function __construct( - \Magento\Code\Generator\TestAsset\ParentClass $parentClass, - \Magento\Code\Generator\TestAsset\SourceClass $sourceClass, + \Magento\Framework\Code\Generator\TestAsset\ParentClass $parentClass, + \Magento\Framework\Code\Generator\TestAsset\SourceClass $sourceClass, \Not_Existing_Class $notExistingClass ) { } diff --git a/dev/tests/unit/testsuite/Magento/Code/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/Code/GeneratorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php index f872146c5b48b..2ba5c38285807 100644 --- a/dev/tests/unit/testsuite/Magento/Code/GeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code; +namespace Magento\Framework\Code; class GeneratorTest extends \PHPUnit_Framework_TestCase { @@ -39,20 +39,20 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_expectedEntities = array( - 'factory' => \Magento\ObjectManager\Code\Generator\Factory::ENTITY_TYPE, - 'proxy' => \Magento\ObjectManager\Code\Generator\Proxy::ENTITY_TYPE, - 'interceptor' => \Magento\Interception\Code\Generator\Interceptor::ENTITY_TYPE + 'factory' => \Magento\Framework\ObjectManager\Code\Generator\Factory::ENTITY_TYPE, + 'proxy' => \Magento\Framework\ObjectManager\Code\Generator\Proxy::ENTITY_TYPE, + 'interceptor' => \Magento\Framework\Interception\Code\Generator\Interceptor::ENTITY_TYPE ); /** * Model under test * - * @var \Magento\Code\Generator + * @var \Magento\Framework\Code\Generator */ protected $_model; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Autoload\IncludePath + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Autoload\IncludePath */ protected $_autoloader; @@ -68,9 +68,15 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_autoloader = $this->getMock('Magento\Autoload\IncludePath', array('getFile'), array(), '', false); + $this->_autoloader = $this->getMock( + 'Magento\Framework\Autoload\IncludePath', + array('getFile'), + array(), + '', + false + ); $this->_ioObjectMock = $this->getMockBuilder( - '\Magento\Code\Generator\Io' + '\Magento\Framework\Code\Generator\Io' )->disableOriginalConstructor()->getMock(); } @@ -82,7 +88,7 @@ protected function tearDown() public function testGetGeneratedEntities() { - $this->_model = new \Magento\Code\Generator( + $this->_model = new \Magento\Framework\Code\Generator( $this->_autoloader, $this->_ioObjectMock, array('factory', 'proxy', 'interceptor') @@ -91,7 +97,7 @@ public function testGetGeneratedEntities() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @dataProvider generateValidClassDataProvider */ public function testGenerateClass($className, $entityType) @@ -106,13 +112,13 @@ public function testGenerateClass($className, $entityType) $this->returnValue(false) ); - $this->_model = new \Magento\Code\Generator( + $this->_model = new \Magento\Framework\Code\Generator( $this->_autoloader, $this->_ioObjectMock, array( - 'factory' => '\Magento\ObjectManager\Code\Generator\Factory', - 'proxy' => '\Magento\ObjectManager\Code\Generator\Proxy', - 'interceptor' => '\Magento\Interception\Code\Generator\Interceptor' + 'factory' => '\Magento\Framework\ObjectManager\Code\Generator\Factory', + 'proxy' => '\Magento\Framework\ObjectManager\Code\Generator\Proxy', + 'interceptor' => '\Magento\Framework\Interception\Code\Generator\Interceptor' ) ); @@ -134,18 +140,18 @@ public function testGenerateClassWithExistName($className, $entityType) $this->returnValue(true) ); - $this->_model = new \Magento\Code\Generator( + $this->_model = new \Magento\Framework\Code\Generator( $this->_autoloader, $this->_ioObjectMock, array( - 'factory' => '\Magento\ObjectManager\Code\Generator\Factory', - 'proxy' => '\Magento\ObjectManager\Code\Generator\Proxy', - 'interceptor' => '\Magento\Interception\Code\Generator\Interceptor' + 'factory' => '\Magento\Framework\ObjectManager\Code\Generator\Factory', + 'proxy' => '\Magento\Framework\ObjectManager\Code\Generator\Proxy', + 'interceptor' => '\Magento\Framework\Interception\Code\Generator\Interceptor' ) ); $this->assertEquals( - \Magento\Code\Generator::GENERATION_SKIP, + \Magento\Framework\Code\Generator::GENERATION_SKIP, $this->_model->generateClass($className . $entityType) ); } @@ -154,28 +160,28 @@ public function testGenerateClassWithWrongName() { $this->_autoloader->staticExpects($this->never())->method('getFile'); - $this->_model = new \Magento\Code\Generator($this->_autoloader, $this->_ioObjectMock); + $this->_model = new \Magento\Framework\Code\Generator($this->_autoloader, $this->_ioObjectMock); $this->assertEquals( - \Magento\Code\Generator::GENERATION_ERROR, + \Magento\Framework\Code\Generator::GENERATION_ERROR, $this->_model->generateClass(self::SOURCE_CLASS) ); } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testGenerateClassWithError() { $this->_autoloader->staticExpects($this->once())->method('getFile')->will($this->returnValue(false)); - $this->_model = new \Magento\Code\Generator( + $this->_model = new \Magento\Framework\Code\Generator( $this->_autoloader, $this->_ioObjectMock, array( - 'factory' => '\Magento\ObjectManager\Code\Generator\Factory', - 'proxy' => '\Magento\ObjectManager\Code\Generator\Proxy', - 'interceptor' => '\Magento\Interception\Code\Generator\Interceptor' + 'factory' => '\Magento\Framework\ObjectManager\Code\Generator\Factory', + 'proxy' => '\Magento\Framework\ObjectManager\Code\Generator\Proxy', + 'interceptor' => '\Magento\Framework\Interception\Code\Generator\Interceptor' ) ); diff --git a/dev/tests/unit/testsuite/Magento/Code/Minifier/Adapter/Js/JsminTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Adapter/Js/JsminTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Code/Minifier/Adapter/Js/JsminTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Adapter/Js/JsminTest.php index a5f5654c13a89..dc0871b233c1d 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Minifier/Adapter/Js/JsminTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Adapter/Js/JsminTest.php @@ -21,14 +21,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Minifier\Adapter\Js; +namespace Magento\Framework\Code\Minifier\Adapter\Js; class JsminTest extends \PHPUnit_Framework_TestCase { public function testMinify() { $content = file_get_contents(__DIR__ . '/../../_files/js/original.js'); - $minifier = new \Magento\Code\Minifier\Adapter\Js\Jsmin(); + $minifier = new \Magento\Framework\Code\Minifier\Adapter\Js\Jsmin(); $actual = $minifier->minify($content); $expected = "\nvar one='one';var two='two';"; $this->assertEquals($expected, $actual); diff --git a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/GenerateTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/GenerateTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/GenerateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/GenerateTest.php index 9ccbd332cc20f..d190038ec5a85 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/GenerateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/GenerateTest.php @@ -21,11 +21,11 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Minifier\Strategy; +namespace Magento\Framework\Code\Minifier\Strategy; use Magento\Framework\App\Filesystem; -use Magento\Filesystem\Directory\Write; -use Magento\Filesystem\Directory\Read; +use Magento\Framework\Filesystem\Directory\Write; +use Magento\Framework\Filesystem\Directory\Read; class GenerateTest extends \PHPUnit_Framework_TestCase { @@ -45,7 +45,7 @@ class GenerateTest extends \PHPUnit_Framework_TestCase protected $pubViewCacheDir; /** - * @var \Magento\Code\Minifier\AdapterInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Minifier\AdapterInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $adapter; @@ -54,8 +54,20 @@ class GenerateTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->rootDirectory = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false); - $this->pubViewCacheDir = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false); + $this->rootDirectory = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Read', + array(), + array(), + '', + false + ); + $this->pubViewCacheDir = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Write', + array(), + array(), + '', + false + ); $this->filesystem = $this->getMock( 'Magento\Framework\App\Filesystem', array('getDirectoryWrite', 'getDirectoryRead', '__wakeup'), @@ -81,7 +93,12 @@ public function setUp() )->will( $this->returnValue($this->pubViewCacheDir) ); - $this->adapter = $this->getMockForAbstractClass('Magento\Code\Minifier\AdapterInterface', array(), '', false); + $this->adapter = $this->getMockForAbstractClass( + 'Magento\Framework\Code\Minifier\AdapterInterface', + array(), + '', + false + ); } /** diff --git a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/LiteTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/LiteTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/LiteTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/LiteTest.php index 8f17be11d50f4..e1e313c559e76 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/LiteTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/Strategy/LiteTest.php @@ -21,11 +21,11 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Minifier\Strategy; +namespace Magento\Framework\Code\Minifier\Strategy; use Magento\Framework\App\Filesystem; -use Magento\Filesystem\Directory\Read; -use Magento\Filesystem\Directory\Write; +use Magento\Framework\Filesystem\Directory\Read; +use Magento\Framework\Filesystem\Directory\Write; class LiteTest extends \PHPUnit_Framework_TestCase { @@ -45,7 +45,7 @@ class LiteTest extends \PHPUnit_Framework_TestCase protected $pubViewCacheDir; /** - * @var \Magento\Code\Minifier\AdapterInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Minifier\AdapterInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $adapter; @@ -54,8 +54,20 @@ class LiteTest extends \PHPUnit_Framework_TestCase */ public function setUp() { - $this->rootDirectory = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false); - $this->pubViewCacheDir = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false); + $this->rootDirectory = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Read', + array(), + array(), + '', + false + ); + $this->pubViewCacheDir = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Write', + array(), + array(), + '', + false + ); $this->filesystem = $this->getMock( 'Magento\Framework\App\Filesystem', array('getDirectoryWrite', 'getDirectoryRead', '__wakeup'), @@ -81,7 +93,12 @@ public function setUp() )->will( $this->returnValue($this->pubViewCacheDir) ); - $this->adapter = $this->getMockForAbstractClass('Magento\Code\Minifier\AdapterInterface', array(), '', false); + $this->adapter = $this->getMockForAbstractClass( + 'Magento\Framework\Code\Minifier\AdapterInterface', + array(), + '', + false + ); } /** diff --git a/dev/tests/unit/testsuite/Magento/Code/Minifier/_files/js/original.js b/dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/_files/js/original.js similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/Minifier/_files/js/original.js rename to dev/tests/unit/testsuite/Magento/Framework/Code/Minifier/_files/js/original.js diff --git a/dev/tests/unit/testsuite/Magento/Code/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/MinifierTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Code/MinifierTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/MinifierTest.php index af6a0923c4b4e..836fe2ced746c 100644 --- a/dev/tests/unit/testsuite/Magento/Code/MinifierTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/MinifierTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code; +namespace Magento\Framework\Code; class MinifierTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Code\Minifier\StrategyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Code\Minifier\StrategyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $strategy; @@ -46,12 +46,12 @@ class MinifierTest extends \PHPUnit_Framework_TestCase protected $minifyDir = 'pub/cache/minify'; /** - * @var \Magento\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject */ protected $rootDirectory; /** - * @var \Magento\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject */ protected $pubViewCacheDir; @@ -60,7 +60,7 @@ class MinifierTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->strategy = $this->getMockForAbstractClass('Magento\Code\Minifier\StrategyInterface'); + $this->strategy = $this->getMockForAbstractClass('Magento\Framework\Code\Minifier\StrategyInterface'); $this->filesystem = $this->getMock( 'Magento\Framework\App\Filesystem', array('getDirectoryRead', '__wakeup'), @@ -69,14 +69,14 @@ protected function setUp() false ); $this->rootDirectory = $this->getMock( - 'Magento\Filesystem\Directory\Read', + 'Magento\Framework\Filesystem\Directory\Read', array('getRelativePath', 'isExist', 'getAbsolutePath'), array(), '', false ); $this->pubViewCacheDir = $this->getMock( - 'Magento\Filesystem\Directory\Read', + 'Magento\Framework\Filesystem\Directory\Read', array('getAbsolutePath', 'getRelativePath'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Code/Model/File/Validator/NotProtectedExtensionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Model/File/Validator/NotProtectedExtensionTest.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Code/Model/File/Validator/NotProtectedExtensionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Model/File/Validator/NotProtectedExtensionTest.php index 98c395a4972c0..e49a79ddc4bb1 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Model/File/Validator/NotProtectedExtensionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Model/File/Validator/NotProtectedExtensionTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Model\File\Validator; +namespace Magento\Framework\Code\Model\File\Validator; class NotProtectedExtensionTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Code/NameBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/NameBuilderTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Code/NameBuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/NameBuilderTest.php index 317500640de20..ff3f7ed9a823d 100644 --- a/dev/tests/unit/testsuite/Magento/Code/NameBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/NameBuilderTest.php @@ -22,19 +22,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code; +namespace Magento\Framework\Code; class NameBuilderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Code\NameBuilder + * @var \Magento\Framework\Code\NameBuilder */ protected $nameBuilder; protected function setUp() { $nelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->nameBuilder = $nelper->getObject('Magento\Code\NameBuilder'); + $this->nameBuilder = $nelper->getObject('Magento\Framework\Code\NameBuilder'); } /** diff --git a/dev/tests/unit/testsuite/Magento/Code/Reader/ArgumentsReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Reader/ArgumentsReaderTest.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Code/Reader/ArgumentsReaderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Reader/ArgumentsReaderTest.php index 81773bec48695..ca98a422f9efb 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Reader/ArgumentsReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Reader/ArgumentsReaderTest.php @@ -22,20 +22,20 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Reader; +namespace Magento\Framework\Code\Reader; require_once __DIR__ . '/_files/ClassesForArgumentsReader.php'; class ArgumentsReaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Code\Reader\ArgumentsReader + * @var \Magento\Framework\Code\Reader\ArgumentsReader */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Code\Reader\ArgumentsReader(); + $this->_model = new \Magento\Framework\Code\Reader\ArgumentsReader(); } public function testGetConstructorArgumentsClassWithAllArgumentsType() diff --git a/dev/tests/unit/testsuite/Magento/Code/Reader/_files/ClassesForArgumentsReader.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Reader/_files/ClassesForArgumentsReader.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/Reader/_files/ClassesForArgumentsReader.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Reader/_files/ClassesForArgumentsReader.php diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/ArgumentSequenceTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ArgumentSequenceTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Code/Validator/ArgumentSequenceTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ArgumentSequenceTest.php index d34c649253bf4..529f162c01ca9 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/ArgumentSequenceTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ArgumentSequenceTest.php @@ -21,14 +21,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Validator; +namespace Magento\Framework\Code\Validator; require_once '_files/ClassesForArgumentSequence.php'; class ArgumentSequenceTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Code\Validator\ArgumentSequence + * @var \Magento\Framework\Code\Validator\ArgumentSequence */ protected $_validator; @@ -41,7 +41,7 @@ protected function setUp() { $path = realpath(__DIR__) . '/_files/ClassesForArgumentSequence.php'; $this->_fixturePath = str_replace('\\', '/', $path); - $this->_validator = new \Magento\Code\Validator\ArgumentSequence(); + $this->_validator = new \Magento\Framework\Code\Validator\ArgumentSequence(); /** Build internal cache */ $this->_validator->validate('\ArgumentSequence\ParentClass'); @@ -70,7 +70,7 @@ public function testInvalidSequence() 'Actual : %s' . PHP_EOL; $message = sprintf($message, '\ArgumentSequence\InvalidChildClass', $expectedSequence, $actualSequence); - $this->setExpectedException('\Magento\Code\ValidationException', $message); + $this->setExpectedException('\Magento\Framework\Code\ValidationException', $message); $this->_validator->validate('\ArgumentSequence\InvalidChildClass'); } } diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ConstructorIntegrityTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ConstructorIntegrityTest.php index 4fb6341052831..b30c7dce3e412 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/ConstructorIntegrityTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ConstructorIntegrityTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Validator; +namespace Magento\Framework\Code\Validator; require_once __DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Three/Test.php'; @@ -34,13 +34,13 @@ class ConstructorIntegrityTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Code\Validator\ConstructorIntegrity + * @var \Magento\Framework\Code\Validator\ConstructorIntegrity */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Code\Validator\ConstructorIntegrity(); + $this->_model = new \Magento\Framework\Code\Validator\ConstructorIntegrity(); } public function testValidateIfParentClassExist() @@ -63,7 +63,7 @@ public function testValidateIfClassHasExtraArgumentInTheParentConstructor() $fileName = realpath(__DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Four/Test.php'); $fileName = str_replace('\\', '/', $fileName); $this->setExpectedException( - '\Magento\Code\ValidationException', + '\Magento\Framework\Code\ValidationException', 'Extra parameters passed to parent construct: $factory. File: ' . $fileName ); $this->_model->validate('Magento\SomeModule\Model\Four\Test'); @@ -74,7 +74,7 @@ public function testValidateIfClassHasMissingRequiredArguments() $fileName = realpath(__DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Five/Test.php'); $fileName = str_replace('\\', '/', $fileName); $this->setExpectedException( - '\Magento\Code\ValidationException', + '\Magento\Framework\Code\ValidationException', 'Missed required argument factory in parent::__construct call. File: ' . $fileName ); $this->_model->validate('Magento\SomeModule\Model\Five\Test'); @@ -85,7 +85,7 @@ public function testValidateIfClassHasIncompatibleArguments() $fileName = realpath(__DIR__ . '/../_files/app/code/Magento/SomeModule/Model/Six/Test.php'); $fileName = str_replace('\\', '/', $fileName); $this->setExpectedException( - '\Magento\Code\ValidationException', + '\Magento\Framework\Code\ValidationException', 'Incompatible argument type: Required type: \Magento\SomeModule\Model\Proxy. ' . 'Actual type: \Magento\SomeModule\Model\ElementFactory; File: ' . PHP_EOL . @@ -99,7 +99,7 @@ public function testValidateWrongOrderForParentArguments() $fileName = realpath(__DIR__) . '/_files/ClassesForConstructorIntegrity.php'; $fileName = str_replace('\\', '/', $fileName); $this->setExpectedException( - '\Magento\Code\ValidationException', + '\Magento\Framework\Code\ValidationException', 'Incompatible argument type: Required type: \Context. ' . 'Actual type: \ClassA; File: ' . PHP_EOL . @@ -113,7 +113,7 @@ public function testValidateWrongOptionalParamsType() $fileName = realpath(__DIR__) . '/_files/ClassesForConstructorIntegrity.php'; $fileName = str_replace('\\', '/', $fileName); $this->setExpectedException( - '\Magento\Code\ValidationException', + '\Magento\Framework\Code\ValidationException', 'Incompatible argument type: Required type: array. ' . 'Actual type: \ClassB; File: ' . PHP_EOL . $fileName ); $this->_model->validate('ClassArgumentWithWrongParentArgumentsType'); diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/ContextAggregationTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ContextAggregationTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Code/Validator/ContextAggregationTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ContextAggregationTest.php index bfa444cab571e..6ce56ec320a77 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/ContextAggregationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/ContextAggregationTest.php @@ -22,14 +22,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Validator; +namespace Magento\Framework\Code\Validator; require_once __DIR__ . '/_files/ClassesForContextAggregation.php'; class ContextAggregationTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Code\Validator\ContextAggregation + * @var \Magento\Framework\Code\Validator\ContextAggregation */ protected $_model; @@ -40,7 +40,7 @@ class ContextAggregationTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_model = new \Magento\Code\Validator\ContextAggregation(); + $this->_model = new \Magento\Framework\Code\Validator\ContextAggregation(); $this->_fixturePath = str_replace('\\', '/', realpath(__DIR__) . '/_files/ClassesForContextAggregation.php'); } @@ -51,7 +51,7 @@ public function testClassArgumentAlreadyInjectedIntoContext() PHP_EOL . '\ClassFirst already exists in context object'; - $this->setExpectedException('\Magento\Code\ValidationException', $message); + $this->setExpectedException('\Magento\Framework\Code\ValidationException', $message); $this->_model->validate('ClassArgumentAlreadyInjectedInContext'); } @@ -72,7 +72,7 @@ public function testClassArgumentWithAlreadyInjectedInterface() PHP_EOL . '\\InterfaceFirst already exists in context object'; - $this->setExpectedException('\Magento\Code\ValidationException', $message); + $this->setExpectedException('\Magento\Framework\Code\ValidationException', $message); $this->_model->validate('ClassArgumentWithAlreadyInjectedInterface'); } } diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/TypeDuplicationTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/TypeDuplicationTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Code/Validator/TypeDuplicationTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/TypeDuplicationTest.php index e04bb94d9614b..a4f7a23e0db2b 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/TypeDuplicationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/TypeDuplicationTest.php @@ -21,14 +21,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Code\Validator; +namespace Magento\Framework\Code\Validator; require_once '_files/ClassesForTypeDuplication.php'; class TypeDuplicationTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Code\Validator\TypeDuplication + * @var \Magento\Framework\Code\Validator\TypeDuplication */ protected $_validator; @@ -41,7 +41,7 @@ protected function setUp() { $path = realpath(__DIR__) . '/' . '_files' . '/' . 'ClassesForTypeDuplication.php'; $this->_fixturePath = str_replace('\\', '/', $path); - $this->_validator = new \Magento\Code\Validator\TypeDuplication(); + $this->_validator = new \Magento\Framework\Code\Validator\TypeDuplication(); } /** @@ -68,7 +68,7 @@ public function testInvalidClass() $this->_fixturePath . PHP_EOL . 'Multiple type injection [\TypeDuplication\ArgumentBaseClass]'; - $this->setExpectedException('\Magento\Code\ValidationException', $message); + $this->setExpectedException('\Magento\Framework\Code\ValidationException', $message); $this->_validator->validate('\TypeDuplication\InvalidClassWithDuplicatedTypes'); } } diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php index 730c52b5d8f90..ffd4b33317862 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForArgumentSequence.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForArgumentSequence.php @@ -24,7 +24,7 @@ */ namespace ArgumentSequence; -class ContextObject implements \Magento\ObjectManager\ContextInterface +class ContextObject implements \Magento\Framework\ObjectManager\ContextInterface { } class ParentRequiredObject diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php index a3cb4071bbcb4..8c84d33eff4e1 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForConstructorIntegrity.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForConstructorIntegrity.php @@ -43,7 +43,7 @@ interface InterfaceB class ImplementationOfInterfaceB implements InterfaceB { } -class Context implements \Magento\ObjectManager\ContextInterface +class Context implements \Magento\Framework\ObjectManager\ContextInterface { /** * @var ClassA diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php index d9a47f05285cf..0a77f61908b90 100644 --- a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForContextAggregation.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForContextAggregation.php @@ -46,7 +46,7 @@ interface InterfaceSecond class ImplementationOfInterfaceSecond implements InterfaceSecond { } -class ContextFirst implements \Magento\ObjectManager\ContextInterface +class ContextFirst implements \Magento\Framework\ObjectManager\ContextInterface { /** * @var ClassFirst diff --git a/dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForTypeDuplication.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForTypeDuplication.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/Validator/_files/ClassesForTypeDuplication.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/Validator/_files/ClassesForTypeDuplication.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/ElementFactory.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Five/Test.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Four/Test.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/One/Test.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Proxy.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Six/Test.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Three/Test.php diff --git a/dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php b/dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php rename to dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModule/Model/Two/Test.php diff --git a/dev/tests/unit/testsuite/Magento/Config/Converter/Dom/FlatTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Converter/Dom/FlatTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Config/Converter/Dom/FlatTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/Converter/Dom/FlatTest.php index 6285c6fd5b237..398287d03f86b 100644 --- a/dev/tests/unit/testsuite/Magento/Config/Converter/Dom/FlatTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Converter/Dom/FlatTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config\Converter\Dom; +namespace Magento\Framework\Config\Converter\Dom; class FlatTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Config\Converter\Dom\Flat + * @var \Magento\Framework\Config\Converter\Dom\Flat */ protected $_model; @@ -39,8 +39,8 @@ class FlatTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $arrayNodeConfig = new \Magento\Config\Dom\ArrayNodeConfig( - new \Magento\Config\Dom\NodePathMatcher(), + $arrayNodeConfig = new \Magento\Framework\Config\Dom\ArrayNodeConfig( + new \Magento\Framework\Config\Dom\NodePathMatcher(), array( '/root/multipleNode' => 'id', '/root/wrongArray' => 'id', @@ -49,7 +49,7 @@ protected function setUp() '/root/node_one/subnode', ) ); - $this->_model = new \Magento\Config\Converter\Dom\Flat($arrayNodeConfig); + $this->_model = new \Magento\Framework\Config\Converter\Dom\Flat($arrayNodeConfig); $this->_fixturePath = realpath(__DIR__ . '/../../') . '/_files/converter/dom/flat/'; } diff --git a/dev/tests/unit/testsuite/Magento/Config/Converter/DomTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Converter/DomTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Config/Converter/DomTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/Converter/DomTest.php index 955869d88a85d..917657b885db7 100644 --- a/dev/tests/unit/testsuite/Magento/Config/Converter/DomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Converter/DomTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config\Converter; +namespace Magento\Framework\Config\Converter; class DomTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Config/Data/ScopedTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Data/ScopedTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Config/Data/ScopedTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/Data/ScopedTest.php index d9c7fef6e840a..a3b81ab96dd3b 100644 --- a/dev/tests/unit/testsuite/Magento/Config/Data/ScopedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Data/ScopedTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config\Data; +namespace Magento\Framework\Config\Data; class ScopedTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Config\Data\Scoped + * @var \Magento\Framework\Config\Data\Scoped */ protected $_model; @@ -47,11 +47,11 @@ class ScopedTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_readerMock = $this->getMock('Magento\Config\ReaderInterface'); - $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface'); - $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface'); + $this->_readerMock = $this->getMock('Magento\Framework\Config\ReaderInterface'); + $this->_configScopeMock = $this->getMock('Magento\Framework\Config\ScopeInterface'); + $this->_cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); - $this->_model = new \Magento\Config\Data\Scoped( + $this->_model = new \Magento\Framework\Config\Data\Scoped( $this->_readerMock, $this->_configScopeMock, $this->_cacheMock, diff --git a/dev/tests/unit/testsuite/Magento/Config/Dom/ArrayNodeConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Dom/ArrayNodeConfigTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Config/Dom/ArrayNodeConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/Dom/ArrayNodeConfigTest.php index 4f4fb8d086759..6ffb75d426062 100644 --- a/dev/tests/unit/testsuite/Magento/Config/Dom/ArrayNodeConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Dom/ArrayNodeConfigTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config\Dom; +namespace Magento\Framework\Config\Dom; class ArrayNodeConfigTest extends \PHPUnit_Framework_TestCase { @@ -37,7 +37,7 @@ class ArrayNodeConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->nodePathMatcher = $this->getMock('\Magento\Config\Dom\NodePathMatcher'); + $this->nodePathMatcher = $this->getMock('\Magento\Framework\Config\Dom\NodePathMatcher'); $this->object = new ArrayNodeConfig( $this->nodePathMatcher, array('/root/assoc/one' => 'name', '/root/assoc/two' => 'id', '/root/assoc/three' => 'key'), diff --git a/dev/tests/unit/testsuite/Magento/Config/Dom/NodeMergingConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Dom/NodeMergingConfigTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Config/Dom/NodeMergingConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/Dom/NodeMergingConfigTest.php index 1fbbf4606be53..d43c84f19f309 100644 --- a/dev/tests/unit/testsuite/Magento/Config/Dom/NodeMergingConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Dom/NodeMergingConfigTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config\Dom; +namespace Magento\Framework\Config\Dom; class NodeMergingConfigTest extends \PHPUnit_Framework_TestCase { @@ -37,7 +37,7 @@ class NodeMergingConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->nodePathMatcher = $this->getMock('\Magento\Config\Dom\NodePathMatcher'); + $this->nodePathMatcher = $this->getMock('\Magento\Framework\Config\Dom\NodePathMatcher'); $this->object = new NodeMergingConfig( $this->nodePathMatcher, array('/root/one' => 'name', '/root/two' => 'id', '/root/three' => 'key') diff --git a/dev/tests/unit/testsuite/Magento/Config/Dom/NodePathMatcherTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Dom/NodePathMatcherTest.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Config/Dom/NodePathMatcherTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/Dom/NodePathMatcherTest.php index 4f66f2f3f381f..5d2aeeebc79eb 100644 --- a/dev/tests/unit/testsuite/Magento/Config/Dom/NodePathMatcherTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Dom/NodePathMatcherTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config\Dom; +namespace Magento\Framework\Config\Dom; class NodePathMatcherTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Config/DomTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/DomTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Config/DomTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/DomTest.php index 07ef8cdd0ea1a..dc8eb28d62bb1 100644 --- a/dev/tests/unit/testsuite/Magento/Config/DomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/DomTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config; +namespace Magento\Framework\Config; class DomTest extends \PHPUnit_Framework_TestCase { @@ -40,7 +40,7 @@ public function testMerge($xmlFile, $newXmlFile, $ids, $typeAttributeName, $expe { $xml = file_get_contents(__DIR__ . "/_files/dom/{$xmlFile}"); $newXml = file_get_contents(__DIR__ . "/_files/dom/{$newXmlFile}"); - $config = new \Magento\Config\Dom($xml, $ids, $typeAttributeName); + $config = new \Magento\Framework\Config\Dom($xml, $ids, $typeAttributeName); $config->merge($newXml); $this->assertXmlStringEqualsXmlFile(__DIR__ . "/_files/dom/{$expectedXmlFile}", $config->getDom()->saveXML()); } @@ -101,14 +101,14 @@ public function mergeDataProvider() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage More than one node matching the query: /root/node/subnode */ public function testMergeException() { $xml = file_get_contents(__DIR__ . "/_files/dom/ambiguous_two.xml"); $newXml = file_get_contents(__DIR__ . "/_files/dom/ambiguous_new_one.xml"); - $config = new \Magento\Config\Dom($xml); + $config = new \Magento\Framework\Config\Dom($xml); $config->merge($newXml); } @@ -119,7 +119,7 @@ public function testMergeException() */ public function testValidate($xml, array $expectedErrors) { - $dom = new \Magento\Config\Dom($xml); + $dom = new \Magento\Framework\Config\Dom($xml); $actualResult = $dom->validate(__DIR__ . '/_files/sample.xsd', $actualErrors); $this->assertEquals(empty($expectedErrors), $actualResult); $this->assertEquals($expectedErrors, $actualErrors); @@ -146,7 +146,7 @@ public function testValidateCustomErrorFormat() $expectedErrors = array( "Error: `Element 'unknown_node': This element is not expected. Expected is ( node ).`" ); - $dom = new \Magento\Config\Dom($xml, array(), null, null, $errorFormat); + $dom = new \Magento\Framework\Config\Dom($xml, array(), null, null, $errorFormat); $actualResult = $dom->validate(__DIR__ . '/_files/sample.xsd', $actualErrors); $this->assertFalse($actualResult); $this->assertEquals($expectedErrors, $actualErrors); @@ -160,7 +160,7 @@ public function testValidateCustomErrorFormatInvalid() { $xml = ''; $errorFormat = '%message%,%unknown%'; - $dom = new \Magento\Config\Dom($xml, array(), null, null, $errorFormat); + $dom = new \Magento\Framework\Config\Dom($xml, array(), null, null, $errorFormat); $dom->validate(__DIR__ . '/_files/sample.xsd'); } @@ -168,7 +168,7 @@ public function testValidateUnknownError() { $xml = ''; $schemaFile = __DIR__ . '/_files/sample.xsd'; - $dom = new \Magento\Config\Dom($xml); + $dom = new \Magento\Framework\Config\Dom($xml); $domMock = $this->getMock('DOMDocument', array('schemaValidate'), array()); $domMock->expects($this->once()) ->method('schemaValidate') diff --git a/dev/tests/unit/testsuite/Magento/Config/FileIteratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/FileIteratorTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Config/FileIteratorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/FileIteratorTest.php index 1e4d9e3ba28e3..980f3312fd40c 100644 --- a/dev/tests/unit/testsuite/Magento/Config/FileIteratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/FileIteratorTest.php @@ -21,11 +21,13 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config; +namespace Magento\Framework\Config; + +use Magento\Framework\Config\FileIterator; /** * Class FileIteratorTest - * @package Magento\Config + * @package Magento\Framework\Config */ class FileIteratorTest extends \PHPUnit_Framework_TestCase { @@ -35,7 +37,7 @@ class FileIteratorTest extends \PHPUnit_Framework_TestCase protected $fileIterator; /** - * @var \Magento\Filesystem\Directory\Read | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\Read | \PHPUnit_Framework_MockObject_MockObject */ protected $directoryMock; @@ -49,7 +51,7 @@ class FileIteratorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->filePaths = ['/file1', '/file2']; - $this->directoryMock = $this->getMock('Magento\Filesystem\Directory\Read', [], [], '', false); + $this->directoryMock = $this->getMock('Magento\Framework\Filesystem\Directory\Read', [], [], '', false); $this->fileIterator = new FileIterator( $this->directoryMock, diff --git a/dev/tests/unit/testsuite/Magento/Config/Reader/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/Reader/FilesystemTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Config/Reader/FilesystemTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/Reader/FilesystemTest.php index 07852ff61547b..226e857a14b4c 100644 --- a/dev/tests/unit/testsuite/Magento/Config/Reader/FilesystemTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/Reader/FilesystemTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config\Reader; +namespace Magento\Framework\Config\Reader; class FilesystemTest extends \PHPUnit_Framework_TestCase { @@ -53,10 +53,16 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_file = file_get_contents(__DIR__ . '/../_files/reader/config.xml'); - $this->_fileResolverMock = $this->getMock('Magento\Config\FileResolverInterface'); - $this->_converterMock = $this->getMock('Magento\Config\ConverterInterface', array(), array(), '', false); - $this->_schemaLocatorMock = $this->getMock('Magento\Config\SchemaLocatorInterface'); - $this->_validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $this->_fileResolverMock = $this->getMock('Magento\Framework\Config\FileResolverInterface'); + $this->_converterMock = $this->getMock( + 'Magento\Framework\Config\ConverterInterface', + array(), + array(), + '', + false + ); + $this->_schemaLocatorMock = $this->getMock('Magento\Framework\Config\SchemaLocatorInterface'); + $this->_validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); } public function testRead() @@ -94,7 +100,7 @@ public function testReadWithoutFiles() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Invalid Document */ public function testReadWithInvalidDom() @@ -121,7 +127,7 @@ public function testReadWithInvalidDom() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Invalid XML in file */ public function testReadWithInvalidXml() diff --git a/dev/tests/unit/testsuite/Magento/Config/ScopeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/ScopeTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Config/ScopeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/ScopeTest.php index ef819f0fe5f14..97447591cdd5f 100644 --- a/dev/tests/unit/testsuite/Magento/Config/ScopeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/ScopeTest.php @@ -22,12 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config; +namespace Magento\Framework\Config; class ScopeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Config\Scope + * @var \Magento\Framework\Config\Scope */ protected $model; diff --git a/dev/tests/unit/testsuite/Magento/Config/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/ThemeTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Config/ThemeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/ThemeTest.php index f6c83e53fced4..7cfffb09733a7 100644 --- a/dev/tests/unit/testsuite/Magento/Config/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/ThemeTest.php @@ -24,13 +24,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config; +namespace Magento\Framework\Config; class ThemeTest extends \PHPUnit_Framework_TestCase { public function testGetSchemaFile() { - $config = new \Magento\Config\Theme(file_get_contents(__DIR__ . '/_files/area/default_default/theme.xml')); + $config = new \Magento\Framework\Config\Theme( + file_get_contents(__DIR__ . '/_files/area/default_default/theme.xml') + ); $this->assertFileExists($config->getSchemaFile()); } @@ -41,7 +43,9 @@ public function testGetSchemaFile() */ public function testGetThemeTitle($themePath, $expected) { - $config = new \Magento\Config\Theme(file_get_contents(__DIR__ . "/_files/area/{$themePath}/theme.xml")); + $config = new \Magento\Framework\Config\Theme( + file_get_contents(__DIR__ . "/_files/area/{$themePath}/theme.xml") + ); $this->assertSame($expected, $config->getThemeTitle()); } @@ -60,7 +64,9 @@ public function getThemeTitleDataProvider() */ public function testGetParentTheme($themePath, $expected) { - $config = new \Magento\Config\Theme(file_get_contents(__DIR__ . "/_files/area/{$themePath}/theme.xml")); + $config = new \Magento\Framework\Config\Theme( + file_get_contents(__DIR__ . "/_files/area/{$themePath}/theme.xml") + ); $this->assertSame($expected, $config->getParentTheme()); } @@ -85,7 +91,9 @@ public function getParentThemeDataProvider() public function testDataGetter($themePath, $expected) { $expected = reset($expected); - $config = new \Magento\Config\Theme(file_get_contents(__DIR__ . "/_files/area/$themePath/theme.xml")); + $config = new \Magento\Framework\Config\Theme( + file_get_contents(__DIR__ . "/_files/area/$themePath/theme.xml") + ); $this->assertSame($expected['version'], $config->getThemeVersion()); $this->assertSame($expected['media'], $config->getMedia()); } diff --git a/dev/tests/unit/testsuite/Magento/Config/ValidationStateTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/ValidationStateTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Config/ValidationStateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/ValidationStateTest.php index ec5dd05a2558e..ce1eaca5a0973 100644 --- a/dev/tests/unit/testsuite/Magento/Config/ValidationStateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/ValidationStateTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config; +namespace Magento\Framework\Config; class ValidationStateTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Config/ViewTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/ViewTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Config/ViewTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/ViewTest.php index b6c5ba111039a..7adf4a11a60b1 100644 --- a/dev/tests/unit/testsuite/Magento/Config/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/ViewTest.php @@ -24,18 +24,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config; +namespace Magento\Framework\Config; class ViewTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Config\View + * @var \Magento\Framework\Config\View */ protected $_model = null; protected function setUp() { - $this->_model = new \Magento\Config\View( + $this->_model = new \Magento\Framework\Config\View( array( file_get_contents(__DIR__ . '/_files/view_one.xml'), file_get_contents(__DIR__ . '/_files/view_two.xml') @@ -48,7 +48,7 @@ protected function setUp() */ public function testConstructException() { - new \Magento\Config\View(array()); + new \Magento\Framework\Config\View(array()); } public function testGetSchemaFile() @@ -70,10 +70,10 @@ public function testGetVarValue() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testInvalidXml() { - new \Magento\Config\View(array(file_get_contents(__DIR__ . '/_files/view_invalid.xml'))); + new \Magento\Framework\Config\View(array(file_get_contents(__DIR__ . '/_files/view_invalid.xml'))); } } diff --git a/dev/tests/unit/testsuite/Magento/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Config/XsdTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Config/XsdTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/XsdTest.php index d0b2e1f5c9661..15423729c5210 100644 --- a/dev/tests/unit/testsuite/Magento/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/XsdTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Config; +namespace Magento\Framework\Config; class XsdTest extends \PHPUnit_Framework_TestCase { @@ -39,7 +39,7 @@ public function testInvalidXmlFile($xsdFile, $invalidXmlFile, $expectedErrorsQty $dom = new \DOMDocument(); $dom->load(__DIR__ . "/_files/{$invalidXmlFile}"); libxml_use_internal_errors(true); - $result = $dom->schemaValidate(__DIR__ . "/../../../../../../lib/Magento/Config/etc/{$xsdFile}"); + $result = $dom->schemaValidate(__DIR__ . "/../../../../../../../lib/Magento/Framework/Config/etc/{$xsdFile}"); $errorsQty = count(libxml_get_errors()); libxml_use_internal_errors(false); diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/area/default_default/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_default/theme.xml similarity index 92% rename from dev/tests/unit/testsuite/Magento/Config/_files/area/default_default/theme.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_default/theme.xml index 9341a2afe7ed4..c46da4815a819 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/area/default_default/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_default/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.9 diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/area/default_test/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test/theme.xml similarity index 92% rename from dev/tests/unit/testsuite/Magento/Config/_files/area/default_test/theme.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test/theme.xml index a3f7dcec65698..17e972c3c07e6 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/area/default_test/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Test 2.1.0.0 default_default diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/area/default_test2/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test2/theme.xml similarity index 91% rename from dev/tests/unit/testsuite/Magento/Config/_files/area/default_test2/theme.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test2/theme.xml index 598d2b9d8a6bf..a3e075bd6c065 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/area/default_test2/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/default_test2/theme.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Test2 2.0.0.0 default_test diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/area/test_default/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_default/theme.xml similarity index 92% rename from dev/tests/unit/testsuite/Magento/Config/_files/area/test_default/theme.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_default/theme.xml index 69d2f7d346212..436b1e3482924 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/area/test_default/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_default/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.1.0 diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/area/test_external_package_descendant/theme.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_external_package_descendant/theme.xml similarity index 92% rename from dev/tests/unit/testsuite/Magento/Config/_files/area/test_external_package_descendant/theme.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_external_package_descendant/theme.xml index 16e67df1dc14b..37a058ae7f664 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/area/test_external_package_descendant/theme.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/area/test_external_package_descendant/theme.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 default_test2 diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/attributes.php b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/attributes.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/attributes.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/attributes.php diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/attributes.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/attributes.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/attributes.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/attributes.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/cdata.php b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/cdata.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/cdata.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/cdata.php diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/cdata.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/cdata.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/cdata.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/cdata.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/result.php b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/result.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/result.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/result.php diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/source.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/source.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/source.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/source.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/source_notuniq.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/source_notuniq.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/source_notuniq.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/source_notuniq.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/source_wrongarray.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/source_wrongarray.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/converter/dom/flat/source_wrongarray.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/converter/dom/flat/source_wrongarray.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_new_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_new_one.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_new_one.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_new_one.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_new_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_new_two.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_new_two.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_new_two.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_one.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_one.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_one.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_two.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ambiguous_two.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ambiguous_two.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/attributes.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/attributes.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/attributes.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/attributes.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/attributes_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/attributes_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/attributes_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/attributes_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/attributes_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/attributes_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/attributes_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/attributes_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/cdata.php b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/cdata.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/cdata.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/cdata.php diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/cdata.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/cdata.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/cdata.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/cdata.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/no_attributes.php b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/no_attributes.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/no_attributes.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/no_attributes.php diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/no_attributes.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/no_attributes.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/no_attributes.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/no_attributes.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/with_attributes.php b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/with_attributes.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/with_attributes.php rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/with_attributes.php diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/with_attributes.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/with_attributes.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/converter/with_attributes.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/converter/with_attributes.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ids.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ids.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ids.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ids.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ids_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ids_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ids_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ids_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/ids_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ids_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/ids_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/ids_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/namespaced.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/namespaced.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/namespaced.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/namespaced.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/namespaced_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/namespaced_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/namespaced_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/namespaced_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/namespaced_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/namespaced_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/namespaced_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/namespaced_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/no_ids.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/no_ids.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/no_ids.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/no_ids.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/no_ids_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/no_ids_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/no_ids_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/no_ids_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/no_ids_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/no_ids_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/no_ids_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/no_ids_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/override_node.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/override_node.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/override_node.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/override_node.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/override_node_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/override_node_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/override_node_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/override_node_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/override_node_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/override_node_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/override_node_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/override_node_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_deep.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_deep.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_deep.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_deep.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_deep_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_deep_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_deep_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_deep_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_deep_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_deep_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_deep_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_deep_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/recursive_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/recursive_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/text_node.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/text_node.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/text_node.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/text_node.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/text_node_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/text_node_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/text_node_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/text_node_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/text_node_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/text_node_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/text_node_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/text_node_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/types.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/types.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/types.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/types.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/types_merged.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/types_merged.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/types_merged.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/types_merged.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/dom/types_new.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/types_new.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/dom/types_new.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/dom/types_new.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/reader/config.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/reader/config.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/reader/config.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/reader/config.xml diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/reader/schema.xsd b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/reader/schema.xsd similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/reader/schema.xsd rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/reader/schema.xsd diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/sample.xsd b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/sample.xsd similarity index 100% rename from dev/tests/unit/testsuite/Magento/Config/_files/sample.xsd rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/sample.xsd diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/theme_invalid.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/theme_invalid.xml similarity index 92% rename from dev/tests/unit/testsuite/Magento/Config/_files/theme_invalid.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/theme_invalid.xml index d0e76744cc71f..c7dfe8ddf5829 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/theme_invalid.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/theme_invalid.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Default 2.0.0.0 some_theme diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_invalid.xml similarity index 93% rename from dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_invalid.xml index 385b640f19d5b..92a37a0ad4d4a 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_invalid.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Value1 Value1 diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/view_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_one.xml similarity index 93% rename from dev/tests/unit/testsuite/Magento/Config/_files/view_one.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_one.xml index c6e22b5ca0764..e59869fb77750 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/view_one.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_one.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Value One diff --git a/dev/tests/unit/testsuite/Magento/Config/_files/view_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_two.xml similarity index 93% rename from dev/tests/unit/testsuite/Magento/Config/_files/view_two.xml rename to dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_two.xml index 89bb4e39efd64..6b599b0eb23b3 100644 --- a/dev/tests/unit/testsuite/Magento/Config/_files/view_two.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Config/_files/view_two.xml @@ -26,7 +26,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + Value One Another diff --git a/dev/tests/unit/testsuite/Magento/Controller/Router/Route/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Controller/Router/Route/FactoryTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Controller/Router/Route/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Controller/Router/Route/FactoryTest.php index aec5d73f0578e..0326c05a14684 100644 --- a/dev/tests/unit/testsuite/Magento/Controller/Router/Route/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Controller/Router/Route/FactoryTest.php @@ -25,18 +25,18 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Controller\Router\Route; +namespace Magento\Framework\Controller\Router\Route; class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\ObjectManager */ protected $objectManager; public function setUp() { - $this->objectManager = $this->getMockBuilder('Magento\ObjectManager') + $this->objectManager = $this->getMockBuilder('Magento\Framework\ObjectManager') ->disableOriginalConstructor() ->getMock(); } @@ -72,7 +72,7 @@ public function testCreateRoute() ) ->will($this->returnValue($router)); - $object = new \Magento\Controller\Router\Route\Factory($this->objectManager); + $object = new \Magento\Framework\Controller\Router\Route\Factory($this->objectManager); $expectedRouter = $object->createRoute( $routerClass, $parameterRoute, @@ -95,7 +95,7 @@ public function testCreateRouteNegative() ->method('create') ->will($this->returnValue(new \StdClass)); - $object = new \Magento\Controller\Router\Route\Factory($this->objectManager); + $object = new \Magento\Framework\Controller\Router\Route\Factory($this->objectManager); $object->createRoute( 'routerClass', 'router' diff --git a/dev/tests/unit/testsuite/Magento/Convert/ConvertArrayTest.php b/dev/tests/unit/testsuite/Magento/Framework/Convert/ConvertArrayTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Convert/ConvertArrayTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Convert/ConvertArrayTest.php index 47285d9e20ed5..e708fceaa3af4 100644 --- a/dev/tests/unit/testsuite/Magento/Convert/ConvertArrayTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Convert/ConvertArrayTest.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Convert; +namespace Magento\Framework\Convert; class ConvertArrayTest extends \PHPUnit_Framework_TestCase { @@ -68,7 +68,7 @@ public function testAssocToXmlExceptionByKey() /** * @param array $array * @param string $rootName - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @dataProvider assocToXmlExceptionDataProvider */ public function testAssocToXmlException($array, $rootName = '_') diff --git a/dev/tests/unit/testsuite/Magento/Convert/ExcelTest.php b/dev/tests/unit/testsuite/Magento/Framework/Convert/ExcelTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Convert/ExcelTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Convert/ExcelTest.php index 4ffbb7a37882c..50de020d95aaa 100644 --- a/dev/tests/unit/testsuite/Magento/Convert/ExcelTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Convert/ExcelTest.php @@ -25,9 +25,9 @@ */ /** - * Magento_Convert Test Case for \Magento\Convert\Excel Export + * Magento_Convert Test Case for \Magento\Framework\Convert\Excel Export */ -namespace Magento\Convert; +namespace Magento\Framework\Convert; class ExcelTest extends \PHPUnit_Framework_TestCase { @@ -77,14 +77,14 @@ public function callbackMethod($row) } /** - * Test \Magento\Convert\Excel->convert() - * \Magento\Convert\Excel($iterator) + * Test \Magento\Framework\Convert\Excel->convert() + * \Magento\Framework\Convert\Excel($iterator) * * @return void */ public function testConvert() { - $convert = new \Magento\Convert\Excel(new \ArrayIterator($this->_testData)); + $convert = new \Magento\Framework\Convert\Excel(new \ArrayIterator($this->_testData)); $convert->setDataHeader($this->_testHeader); $convert->setDataFooter($this->_testFooter); $isEqual = (file_get_contents($this->_getSampleOutputFile()) == $convert->convert()); @@ -92,14 +92,17 @@ public function testConvert() } /** - * Test \Magento\Convert\Excel->convert() - * \Magento\Convert\Excel($iterator, $callbackMethod) + * Test \Magento\Framework\Convert\Excel->convert() + * \Magento\Framework\Convert\Excel($iterator, $callbackMethod) * * @return void */ public function testConvertCallback() { - $convert = new \Magento\Convert\Excel(new \ArrayIterator($this->_testData), array($this, 'callbackMethod')); + $convert = new \Magento\Framework\Convert\Excel( + new \ArrayIterator($this->_testData), + array($this, 'callbackMethod') + ); $this->assertContains('_TRUE_', $convert->convert(), 'Failed asserting that callback method is called.'); } @@ -114,15 +117,19 @@ protected function _writeFile($callback = false) $name = md5(microtime()); $file = TESTS_TEMP_DIR . '/' . $name . '.xml'; - $stream = new \Magento\Filesystem\File\Write($file, new \Magento\Filesystem\Driver\File(), 'w+'); + $stream = new \Magento\Framework\Filesystem\File\Write( + $file, + new \Magento\Framework\Filesystem\Driver\File(), + 'w+' + ); $stream->lock(); if (!$callback) { - $convert = new \Magento\Convert\Excel(new \ArrayIterator($this->_testData)); + $convert = new \Magento\Framework\Convert\Excel(new \ArrayIterator($this->_testData)); $convert->setDataHeader($this->_testHeader); $convert->setDataFooter($this->_testFooter); } else { - $convert = new \Magento\Convert\Excel( + $convert = new \Magento\Framework\Convert\Excel( new \ArrayIterator($this->_testData), array($this, 'callbackMethod') ); @@ -136,8 +143,8 @@ protected function _writeFile($callback = false) } /** - * Test \Magento\Convert\Excel->write() - * \Magento\Convert\Excel($iterator) + * Test \Magento\Framework\Convert\Excel->write() + * \Magento\Framework\Convert\Excel($iterator) * * @return void */ @@ -149,8 +156,8 @@ public function testWrite() } /** - * Test \Magento\Convert\Excel->write() - * \Magento\Convert\Excel($iterator, $callbackMethod) + * Test \Magento\Framework\Convert\Excel->write() + * \Magento\Framework\Convert\Excel($iterator, $callbackMethod) * * @return void */ diff --git a/dev/tests/unit/testsuite/Magento/Convert/ObjectTest.php b/dev/tests/unit/testsuite/Magento/Framework/Convert/ObjectTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Convert/ObjectTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Convert/ObjectTest.php index 9bf012b2491e7..9eaeeb665400f 100644 --- a/dev/tests/unit/testsuite/Magento/Convert/ObjectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Convert/ObjectTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Convert; +namespace Magento\Framework\Convert; class ObjectTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Convert\Object + * @var \Magento\Framework\Convert\Object */ protected $model; @@ -37,14 +37,14 @@ protected function setUp() public function testToOptionArray() { - $mockFirst = $this->getMock('Magento\Object', array('getId', 'getCode'), array()); + $mockFirst = $this->getMock('Magento\Framework\Object', array('getId', 'getCode'), array()); $mockFirst->expects($this->once()) ->method('getId') ->will($this->returnValue(1)); $mockFirst->expects($this->once()) ->method('getCode') ->will($this->returnValue('code1')); - $mockSecond = $this->getMock('Magento\Object', array('getId', 'getCode'), array()); + $mockSecond = $this->getMock('Magento\Framework\Object', array('getId', 'getCode'), array()); $mockSecond->expects($this->once()) ->method('getId') ->will($this->returnValue(2)); @@ -69,14 +69,14 @@ public function testToOptionArray() public function testToOptionHash() { - $mockFirst = $this->getMock('Magento\Object', array('getSome', 'getId'), array()); + $mockFirst = $this->getMock('Magento\Framework\Object', array('getSome', 'getId'), array()); $mockFirst->expects($this->once()) ->method('getId') ->will($this->returnValue(3)); $mockFirst->expects($this->once()) ->method('getSome') ->will($this->returnValue('code3')); - $mockSecond = $this->getMock('Magento\Object', array('getSome', 'getId'), array()); + $mockSecond = $this->getMock('Magento\Framework\Object', array('getSome', 'getId'), array()); $mockSecond->expects($this->once()) ->method('getId') ->will($this->returnValue(4)); @@ -103,8 +103,8 @@ public function testConvertDataToArray() { $object = new \stdClass(); $object->a = array(array(1)); - $mockFirst = $this->getMock('Magento\Object', array('getData')); - $mockSecond = $this->getMock('Magento\Object', array('getData')); + $mockFirst = $this->getMock('Magento\Framework\Object', array('getData')); + $mockSecond = $this->getMock('Magento\Framework\Object', array('getData')); $mockFirst->expects($this->any()) ->method('getData') diff --git a/dev/tests/unit/testsuite/Magento/Convert/XmlTest.php b/dev/tests/unit/testsuite/Magento/Framework/Convert/XmlTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Convert/XmlTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Convert/XmlTest.php index 81a7fd8c292ba..a5ddfdae4d9a3 100644 --- a/dev/tests/unit/testsuite/Magento/Convert/XmlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Convert/XmlTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Convert; +namespace Magento\Framework\Convert; class XmlTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Convert\Xml + * @var \Magento\Framework\Convert\Xml */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Convert\Xml(); + $this->_model = new \Magento\Framework\Convert\Xml(); } public function testXmlToAssoc() diff --git a/dev/tests/unit/testsuite/Magento/Convert/_files/output.txt b/dev/tests/unit/testsuite/Magento/Framework/Convert/_files/output.txt similarity index 100% rename from dev/tests/unit/testsuite/Magento/Convert/_files/output.txt rename to dev/tests/unit/testsuite/Magento/Framework/Convert/_files/output.txt diff --git a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/CacheTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/CacheTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/CacheTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/CacheTest.php index ed42594ebb34d..0c923faa9613f 100644 --- a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/CacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/CacheTest.php @@ -21,52 +21,52 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Css\PreProcessor\Cache\Import; +namespace Magento\Framework\Css\PreProcessor\Cache\Import; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; class CacheTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Css\PreProcessor\Cache\Import\Cache */ + /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\Cache */ protected $cache; /** @var ObjectManagerHelper */ protected $objectManagerHelper; - /** @var \Magento\Css\PreProcessor\Cache\Import\Map\Storage|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage|\PHPUnit_Framework_MockObject_MockObject */ protected $storageMock; - /** @var \Magento\Css\PreProcessor\Cache\Import\ImportEntityFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ImportEntityFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $importEntityFactoryMock; - /** @var \Magento\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $rootDirectory; protected function setUp() { $this->storageMock = $this->getMock( - 'Magento\Css\PreProcessor\Cache\Import\Map\Storage', + 'Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage', array(), array(), '', false ); $this->rootDirectory = $this->getMock( - 'Magento\Filesystem\Directory\ReadInterface', + 'Magento\Framework\Filesystem\Directory\ReadInterface', array(), array(), '', false ); $this->importEntityFactoryMock = $this->getMock( - 'Magento\Css\PreProcessor\Cache\Import\ImportEntityFactory', + 'Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntityFactory', array(), array(), '', false ); - $cssFile = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); + $cssFile = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); $cssFile->expects($this->once())->method('getFilePath')->will($this->returnValue('Magento_Core::style.css')); $cssFile->expects( $this->once() @@ -76,7 +76,7 @@ protected function setUp() $this->returnValue(array('theme' => 'some_theme', 'area' => 'frontend', 'locale' => 'en_US')) ); - $fileFactory = $this->getMock('Magento\View\Publisher\FileFactory', array(), array(), '', false); + $fileFactory = $this->getMock('Magento\Framework\View\Publisher\FileFactory', array(), array(), '', false); $fileFactory->expects($this->any())->method('create')->will($this->returnValue($cssFile)); $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); @@ -84,7 +84,7 @@ protected function setUp() $this->objectManagerHelper = new ObjectManagerHelper($this); $this->cache = $this->objectManagerHelper->getObject( - 'Magento\Css\PreProcessor\Cache\Import\Cache', + 'Magento\Framework\Css\PreProcessor\Cache\Import\Cache', array( 'storage' => $this->storageMock, 'importEntityFactory' => $this->importEntityFactoryMock, @@ -134,9 +134,9 @@ public function testGetCachedFile() $this->assertEmpty($property->getValue($this->cache)); $property->setValue( $this->cache, - $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false) + $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false) ); - $this->assertInstanceOf('\Magento\View\Publisher\CssFile', $this->cache->get()); + $this->assertInstanceOf('\Magento\Framework\View\Publisher\CssFile', $this->cache->get()); } /** @@ -155,7 +155,7 @@ public function testAddEntityToCache($params, $expectedResult) )->method( 'create' )->with( - $this->isInstanceOf('Magento\Less\PreProcessor\File\Less') + $this->isInstanceOf('Magento\Framework\Less\PreProcessor\File\Less') )->will( $this->returnValue('entity_object_here') ); @@ -230,7 +230,7 @@ public function addEntityToCacheDataProvider() /** * @param array $filesData - * @return \Magento\Less\PreProcessor\File\Less|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Less\PreProcessor\File\Less|\PHPUnit_Framework_MockObject_MockObject */ protected function getLessFile($filesData) { @@ -242,7 +242,13 @@ function () use (&$fileCounter) { } ); foreach ($filesData as $fileData) { - $readDirectory = $this->getMock('Magento\Filesystem\Directory\ReadInterface', array(), array(), '', false); + $readDirectory = $this->getMock( + 'Magento\Framework\Filesystem\Directory\ReadInterface', + array(), + array(), + '', + false + ); $readDirectory->expects( $this->any() )->method( @@ -252,7 +258,7 @@ function () use (&$fileCounter) { )->will( $this->returnValue(isset($fileData['mtime']) ? $fileData['mtime'] : null) ); - $lessFile = $this->getMock('Magento\Less\PreProcessor\File\Less', array(), array(), '', false); + $lessFile = $this->getMock('Magento\Framework\Less\PreProcessor\File\Less', array(), array(), '', false); $lessFile->expects($this->any())->method('getFilePath')->will($this->returnValue($fileData['filePath'])); $lessFile->expects( $this->any() @@ -269,7 +275,7 @@ function () use (&$fileCounter) { } /** - * @param \Magento\View\Publisher\CssFile $cssFile + * @param \Magento\Framework\View\Publisher\CssFile $cssFile * @param string $uniqueFileKey * @param array $expected * @dataProvider saveCacheDataProvider @@ -301,11 +307,11 @@ public function saveCacheDataProvider() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $arguments = $objectManager->getConstructArguments( - 'Magento\View\Publisher\CssFile', + 'Magento\Framework\View\Publisher\CssFile', array('viewParams' => array('area' => 'frontend')) ); - $cssFile = $objectManager->getObject('Magento\View\Publisher\CssFile', $arguments); + $cssFile = $objectManager->getObject('Magento\Framework\View\Publisher\CssFile', $arguments); return array( array( @@ -326,9 +332,9 @@ public function testIsValid($filesData, $baseTime, $expected) { $factoryCallback = $this->returnCallback( function ($lessFile) { - /** @var $lessFile \Magento\Less\PreProcessor\File\Less|\PHPUnit_Framework_MockObject_MockObject */ + /** @var $lessFile \Magento\Framework\Less\PreProcessor\File\Less */ $importEntity = $this->getMock( - 'Magento\Css\PreProcessor\Cache\Import\ImportEntity', + 'Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity', array(), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/ImportEntityTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/ImportEntityTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityTest.php index 6f89e7f156e96..88e399f7f70be 100644 --- a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/ImportEntityTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/ImportEntityTest.php @@ -21,27 +21,27 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Css\PreProcessor\Cache\Import; +namespace Magento\Framework\Css\PreProcessor\Cache\Import; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; class ImportEntityTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Css\PreProcessor\Cache\Import\ImportEntity */ + /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity */ protected $importEntity; /** - * @var \Magento\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $rootDirectory; /** @var ObjectManagerHelper */ protected $objectManagerHelper; - /** @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ protected $filesystemMock; - /** @var \Magento\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\View\FileSystem|\PHPUnit_Framework_MockObject_MockObject */ protected $fileSystemMock; /** @@ -64,7 +64,7 @@ protected function createMock($relativePath, $originalMtime) $this->absoluteFilePath = 'some_absolute_path'; $this->rootDirectory = $this->getMock( - 'Magento\Filesystem\Directory\ReadInterface', + 'Magento\Framework\Filesystem\Directory\ReadInterface', array(), array(), '', @@ -92,14 +92,14 @@ protected function createMock($relativePath, $originalMtime) $this->objectManagerHelper = new ObjectManagerHelper($this); - $lessFile = $this->getMock('Magento\Less\PreProcessor\File\Less', array(), array(), '', false); + $lessFile = $this->getMock('Magento\Framework\Less\PreProcessor\File\Less', array(), array(), '', false); $lessFile->expects($this->any())->method('getFilePath')->will($this->returnValue($filePath)); $lessFile->expects($this->any())->method('getSourcePath')->will($this->returnValue($this->absoluteFilePath)); $lessFile->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($this->rootDirectory)); - /** @var \Magento\Css\PreProcessor\Cache\Import\ImportEntity importEntity */ + /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity importEntity */ $this->importEntity = $this->objectManagerHelper->getObject( - 'Magento\Css\PreProcessor\Cache\Import\ImportEntity', + 'Magento\Framework\Css\PreProcessor\Cache\Import\ImportEntity', array('lessFile' => $lessFile) ); } diff --git a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/Map/StorageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/Map/StorageTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/Map/StorageTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/Map/StorageTest.php index b602d83bc134a..93b5018759ca1 100644 --- a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Import/Map/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Import/Map/StorageTest.php @@ -21,13 +21,13 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Css\PreProcessor\Cache\Import\Map; +namespace Magento\Framework\Css\PreProcessor\Cache\Import\Map; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; class StorageTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Css\PreProcessor\Cache\Import\Map\Storage */ + /** @var \Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage */ protected $storage; /** @var ObjectManagerHelper */ @@ -36,13 +36,13 @@ class StorageTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */ protected $filesystemMock; - /** @var \Magento\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $mapsDirectoryMock; protected function setUp() { $this->mapsDirectoryMock = $this->getMock( - 'Magento\Filesystem\Directory\WriteInterface', + 'Magento\Framework\Filesystem\Directory\WriteInterface', array(), array(), '', @@ -53,7 +53,7 @@ protected function setUp() )->method( 'isDirectory' )->with( - $this->equalTo(\Magento\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) + $this->equalTo(\Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) )->will( $this->returnValue(false) ); @@ -62,7 +62,7 @@ protected function setUp() )->method( 'create' )->with( - $this->equalTo(\Magento\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) + $this->equalTo(\Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) )->will( $this->returnSelf() ); @@ -81,7 +81,7 @@ protected function setUp() $this->objectManagerHelper = new ObjectManagerHelper($this); $this->storage = $this->objectManagerHelper->getObject( - 'Magento\Css\PreProcessor\Cache\Import\Map\Storage', + 'Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage', array('filesystem' => $this->filesystemMock) ); } @@ -195,7 +195,7 @@ public function testClearMaps() )->method( 'delete' )->with( - $this->equalTo(\Magento\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) + $this->equalTo(\Magento\Framework\Css\PreProcessor\Cache\Import\Map\Storage::MAPS_DIR) )->will( $this->returnSelf() ); diff --git a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Plugin/LessTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Plugin/LessTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Plugin/LessTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Plugin/LessTest.php index bc17847e19a4c..add592d7fe96c 100644 --- a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/Cache/Plugin/LessTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/Cache/Plugin/LessTest.php @@ -21,14 +21,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Css\PreProcessor\Cache\Plugin; +namespace Magento\Framework\Css\PreProcessor\Cache\Plugin; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; class LessTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Css\PreProcessor\Cache\Plugin\Less + * @var \Magento\Framework\Css\PreProcessor\Cache\Plugin\Less */ protected $plugin; @@ -38,12 +38,12 @@ class LessTest extends \PHPUnit_Framework_TestCase protected $objectManagerHelper; /** - * @var \Magento\Css\PreProcessor\Cache\CacheManager + * @var \Magento\Framework\Css\PreProcessor\Cache\CacheManager */ protected $cacheManagerMock; /** - * @var \Magento\Logger + * @var \Magento\Framework\Logger */ protected $loggerMock; @@ -51,15 +51,15 @@ protected function setUp() { $this->objectManagerHelper = new ObjectManagerHelper($this); $this->cacheManagerMock = $this->getMock( - 'Magento\Css\PreProcessor\Cache\CacheManager', + 'Magento\Framework\Css\PreProcessor\Cache\CacheManager', array(), array(), '', false ); - $this->loggerMock = $this->getMock('Magento\Logger', array(), array(), '', false); + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false); $this->plugin = $this->objectManagerHelper->getObject( - 'Magento\Css\PreProcessor\Cache\Plugin\Less', + 'Magento\Framework\Css\PreProcessor\Cache\Plugin\Less', array('cacheManager' => $this->cacheManagerMock, 'logger' => $this->loggerMock) ); } @@ -96,9 +96,9 @@ public function testAroundProcess(\Closure $proceed, $publisherFile, $targetDire } } $this->assertInstanceOf( - 'Magento\View\Publisher\CssFile', + 'Magento\Framework\View\Publisher\CssFile', $this->plugin->aroundProcess( - $this->getMock('\Magento\Css\PreProcessor\Less', array(), array(), '', false), + $this->getMock('\Magento\Framework\Css\PreProcessor\Less', array(), array(), '', false), $proceed, $publisherFile, $targetDirectory @@ -115,14 +115,14 @@ public function aroundProcessDataProvider() /** * Prepare first item */ - $cssFileFirst = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); + $cssFileFirst = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); $cssFileFirst->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); - $expectedFirst = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); + $expectedFirst = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); $cssFileFirst->expects($this->once())->method('buildUniquePath')->will($this->returnValue('expectedFirst')); $invChainFirst = function ( - \Magento\View\Publisher\CssFile $subject, + \Magento\Framework\View\Publisher\CssFile $subject, $directory ) use ( $cssFileFirst, @@ -137,7 +137,7 @@ public function aroundProcessDataProvider() /** * Prepare second item */ - $cssFileSecond = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); + $cssFileSecond = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); $cssFileSecond->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); $invChainSecond = function () { @@ -147,13 +147,13 @@ public function aroundProcessDataProvider() /** * Prepare third item */ - $cssFileThird = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); + $cssFileThird = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); $cssFileThird->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); - $expectedThird = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); + $expectedThird = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); $invChainThird = function ( - \Magento\View\Publisher\CssFile $subject, + \Magento\Framework\View\Publisher\CssFile $subject, $directory ) use ( $cssFileThird, @@ -196,13 +196,15 @@ public function aroundProcessDataProvider() public function testAroundProcessException() { $dir = 'targetDirectory'; - $cssFile = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); + $cssFile = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); $cssFile->expects($this->once())->method('getSourcePath')->will($this->returnValue(false)); $this->cacheManagerMock->expects($this->once())->method('getCachedFile')->will($this->returnValue(null)); - $exception = new \Magento\Filesystem\FilesystemException('Test Message'); - $proceed = function (\Magento\View\Publisher\CssFile $subject, $directory) use ($cssFile, $dir, $exception) { + $exception = new \Magento\Framework\Filesystem\FilesystemException('Test Message'); + $proceed = function ( + \Magento\Framework\View\Publisher\CssFile $subject, $directory + ) use ($cssFile, $dir, $exception) { $this->assertEquals($subject, $cssFile); $this->assertEquals($directory, $dir); throw $exception; @@ -220,7 +222,7 @@ public function testAroundProcessException() $this->assertNull( $this->plugin->aroundProcess( - $this->getMock('\Magento\Css\PreProcessor\Less', array(), array(), '', false), + $this->getMock('\Magento\Framework\Css\PreProcessor\Less', array(), array(), '', false), $proceed, $cssFile, $dir diff --git a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/CompositeTest.php similarity index 73% rename from dev/tests/unit/testsuite/Magento/Css/PreProcessor/CompositeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/CompositeTest.php index 3e93e63442fdf..77981ca4d817e 100644 --- a/dev/tests/unit/testsuite/Magento/Css/PreProcessor/CompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Css/PreProcessor/CompositeTest.php @@ -21,19 +21,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Css\PreProcessor; +namespace Magento\Framework\Css\PreProcessor; use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper; class CompositeTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Css\PreProcessor\Composite */ + /** @var \Magento\Framework\Css\PreProcessor\Composite */ protected $composite; /** @var ObjectManagerHelper */ protected $objectManagerHelper; - /** @var \Magento\View\Asset\PreProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\View\Asset\PreProcessorFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $preProcessorFactoryMock; /** @@ -44,7 +44,7 @@ class CompositeTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->preProcessorFactoryMock = $this->getMock( - 'Magento\View\Asset\PreProcessorFactory', + 'Magento\Framework\View\Asset\PreProcessorFactory', array(), array(), '', @@ -60,8 +60,14 @@ protected function setUp() */ public function testProcess($preProcessors, $createMap) { - $publisherFile = $this->getMock('Magento\View\Publisher\CssFile', array(), array(), '', false); - $targetDir = $this->getMock('Magento\Filesystem\Directory\WriteInterface', array(), array(), '', false); + $publisherFile = $this->getMock('Magento\Framework\View\Publisher\CssFile', array(), array(), '', false); + $targetDir = $this->getMock( + 'Magento\Framework\Filesystem\Directory\WriteInterface', + array(), + array(), + '', + false + ); foreach ($createMap as $className) { $this->callMap[$className] = $this->getMock($className, array(), array(), '', false); @@ -86,7 +92,7 @@ public function testProcess($preProcessors, $createMap) ); $this->composite = $this->objectManagerHelper->getObject( - 'Magento\Css\PreProcessor\Composite', + 'Magento\Framework\Css\PreProcessor\Composite', array('preProcessorFactory' => $this->preProcessorFactoryMock, 'preProcessors' => $preProcessors) ); @@ -97,7 +103,7 @@ public function testProcess($preProcessors, $createMap) * Create pre-processor callback * * @param string $className - * @return \Magento\View\Asset\PreProcessor\PreProcessorInterface[] + * @return \Magento\Framework\View\Asset\PreProcessor\PreProcessorInterface[] */ public function createProcessor($className) { @@ -111,15 +117,18 @@ public function processDataProvider() { return array( 'one processor - LESS' => array( - 'preProcessors' => array('css_source_processor' => 'Magento\Css\PreProcessor\Less'), - 'createMap' => array('Magento\Css\PreProcessor\Less') + 'preProcessors' => array('css_source_processor' => 'Magento\Framework\Css\PreProcessor\Less'), + 'createMap' => array('Magento\Framework\Css\PreProcessor\Less') ), 'list of pre-processors' => array( 'preProcessors' => array( - 'css_source_processor' => 'Magento\Css\PreProcessor\Less', - 'css_url_processor' => 'Magento\Css\PreProcessor\UrlResolver' + 'css_source_processor' => 'Magento\Framework\Css\PreProcessor\Less', + 'css_url_processor' => 'Magento\Framework\Css\PreProcessor\UrlResolver' ), - 'createMap' => array('Magento\Css\PreProcessor\Less', 'Magento\Css\PreProcessor\UrlResolver') + 'createMap' => array( + 'Magento\Framework\Css\PreProcessor\Less', + 'Magento\Framework\Css\PreProcessor\UrlResolver' + ) ), 'no processors' => array('preProcessors' => array(), 'createMap' => array()) ); diff --git a/dev/tests/unit/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php rename to dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php index dc2b1242c6e05..b9b0ecffda319 100644 --- a/dev/tests/unit/testsuite/Magento/DB/Adapter/Pdo/MysqlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php @@ -26,9 +26,9 @@ */ /** - * \Magento\DB\Adapter\Pdo\Mysql class test + * \Magento\Framework\DB\Adapter\Pdo\Mysql class test */ -namespace Magento\DB\Adapter\Pdo; +namespace Magento\Framework\DB\Adapter\Pdo; class MysqlTest extends \PHPUnit_Framework_TestCase { @@ -40,14 +40,14 @@ class MysqlTest extends \PHPUnit_Framework_TestCase /** * Adapter for test * - * @var \Magento\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject */ protected $_adapter; /** * Mock DB adapter for DDL query tests * - * @var \Magento\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\Pdo\Mysql|\PHPUnit_Framework_MockObject_MockObject */ protected $_mockAdapter; @@ -57,7 +57,7 @@ class MysqlTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_mockAdapter = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('beginTransaction', 'getTransactionLevel'), array(), '', @@ -69,7 +69,7 @@ protected function setUp() ->will($this->returnValue(1)); $this->_adapter = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('_connect', '_beginTransaction', '_commit', '_rollBack', 'query', '_debugWriteToFile', 'fetchRow'), array( 'dbname' => 'not_exists', @@ -143,7 +143,10 @@ public function testCheckNotDdlTransaction($query) try { $this->_mockAdapter->query($query); } catch (\Exception $e) { - $this->assertNotContains($e->getMessage(), \Magento\DB\Adapter\AdapterInterface::ERROR_DDL_MESSAGE); + $this->assertNotContains( + $e->getMessage(), + \Magento\Framework\DB\Adapter\AdapterInterface::ERROR_DDL_MESSAGE + ); } $select = new \Zend_Db_Select($this->_mockAdapter); @@ -151,7 +154,10 @@ public function testCheckNotDdlTransaction($query) try { $this->_mockAdapter->query($select); } catch (\Exception $e) { - $this->assertNotContains($e->getMessage(), \Magento\DB\Adapter\AdapterInterface::ERROR_DDL_MESSAGE); + $this->assertNotContains( + $e->getMessage(), + \Magento\Framework\DB\Adapter\AdapterInterface::ERROR_DDL_MESSAGE + ); } } @@ -204,7 +210,7 @@ public function testAsymmetricRollBackFailure() throw new \Exception('Test Failed!'); } catch (\Exception $e) { $this->assertEquals( - \Magento\DB\Adapter\AdapterInterface::ERROR_ASYMMETRIC_ROLLBACK_MESSAGE, + \Magento\Framework\DB\Adapter\AdapterInterface::ERROR_ASYMMETRIC_ROLLBACK_MESSAGE, $e->getMessage() ); } @@ -220,7 +226,7 @@ public function testAsymmetricCommitFailure() throw new \Exception('Test Failed!'); } catch (\Exception $e) { $this->assertEquals( - \Magento\DB\Adapter\AdapterInterface::ERROR_ASYMMETRIC_COMMIT_MESSAGE, + \Magento\Framework\DB\Adapter\AdapterInterface::ERROR_ASYMMETRIC_COMMIT_MESSAGE, $e->getMessage() ); } @@ -332,7 +338,7 @@ public function testIncompleteRollBackFailureOnCommit() throw new \Exception('Test Failed!'); } catch (\Exception $e) { $this->assertEquals( - \Magento\DB\Adapter\AdapterInterface::ERROR_ROLLBACK_INCOMPLETE_MESSAGE, + \Magento\Framework\DB\Adapter\AdapterInterface::ERROR_ROLLBACK_INCOMPLETE_MESSAGE, $e->getMessage() ); $this->_adapter->rollBack(); @@ -355,7 +361,7 @@ public function testIncompleteRollBackFailureOnBeginTransaction() throw new \Exception('Test Failed!'); } catch (\Exception $e) { $this->assertEquals( - \Magento\DB\Adapter\AdapterInterface::ERROR_ROLLBACK_INCOMPLETE_MESSAGE, + \Magento\Framework\DB\Adapter\AdapterInterface::ERROR_ROLLBACK_INCOMPLETE_MESSAGE, $e->getMessage() ); $this->_adapter->rollBack(); diff --git a/dev/tests/unit/testsuite/Magento/DB/Ddl/TriggerTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/Ddl/TriggerTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/DB/Ddl/TriggerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/DB/Ddl/TriggerTest.php index d80f51460cfe7..c25e65aff9f5e 100644 --- a/dev/tests/unit/testsuite/Magento/DB/Ddl/TriggerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/Ddl/TriggerTest.php @@ -22,18 +22,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\DB\Ddl; +namespace Magento\Framework\DB\Ddl; class TriggerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\DB\Ddl\Trigger + * @var \Magento\Framework\DB\Ddl\Trigger */ protected $_object; public function setUp() { - $this->_object = new \Magento\DB\Ddl\Trigger(); + $this->_object = new \Magento\Framework\DB\Ddl\Trigger(); } /** @@ -41,12 +41,12 @@ public function setUp() */ public function testGetListOfEvents() { - $actualEventTypes = \Magento\DB\Ddl\Trigger::getListOfEvents(); + $actualEventTypes = \Magento\Framework\DB\Ddl\Trigger::getListOfEvents(); $this->assertInternalType('array', $actualEventTypes); $this->assertCount(3, $actualEventTypes); - $this->assertTrue(in_array(\Magento\DB\Ddl\Trigger::EVENT_INSERT, $actualEventTypes)); - $this->assertTrue(in_array(\Magento\DB\Ddl\Trigger::EVENT_UPDATE, $actualEventTypes)); - $this->assertTrue(in_array(\Magento\DB\Ddl\Trigger::EVENT_DELETE, $actualEventTypes)); + $this->assertTrue(in_array(\Magento\Framework\DB\Ddl\Trigger::EVENT_INSERT, $actualEventTypes)); + $this->assertTrue(in_array(\Magento\Framework\DB\Ddl\Trigger::EVENT_UPDATE, $actualEventTypes)); + $this->assertTrue(in_array(\Magento\Framework\DB\Ddl\Trigger::EVENT_DELETE, $actualEventTypes)); } /** @@ -54,11 +54,11 @@ public function testGetListOfEvents() */ public function testGetListOfTimes() { - $actualTimeTypes = \Magento\DB\Ddl\Trigger::getListOfTimes(); + $actualTimeTypes = \Magento\Framework\DB\Ddl\Trigger::getListOfTimes(); $this->assertInternalType('array', $actualTimeTypes); $this->assertCount(2, $actualTimeTypes); - $this->assertTrue(in_array(\Magento\DB\Ddl\Trigger::TIME_AFTER, $actualTimeTypes)); - $this->assertTrue(in_array(\Magento\DB\Ddl\Trigger::TIME_BEFORE, $actualTimeTypes)); + $this->assertTrue(in_array(\Magento\Framework\DB\Ddl\Trigger::TIME_AFTER, $actualTimeTypes)); + $this->assertTrue(in_array(\Magento\Framework\DB\Ddl\Trigger::TIME_BEFORE, $actualTimeTypes)); } /** @@ -109,9 +109,9 @@ public function testSetTableWithException() public function testGetNameWithException() { $tableName = 'TEST_TABLE_NAME_' . mt_rand(100, 999); - $event = \Magento\DB\Ddl\Trigger::EVENT_INSERT; + $event = \Magento\Framework\DB\Ddl\Trigger::EVENT_INSERT; - $this->_object->setTable($tableName)->setTime(\Magento\DB\Ddl\Trigger::TIME_AFTER)->setEvent($event); + $this->_object->setTable($tableName)->setTime(\Magento\Framework\DB\Ddl\Trigger::TIME_AFTER)->setEvent($event); $this->_object->getName(); } @@ -125,7 +125,7 @@ public function testGetNameWithException() public function testGetTimeWithException() { $tableName = 'TEST_TABLE_NAME_' . mt_rand(100, 999); - $event = \Magento\DB\Ddl\Trigger::EVENT_INSERT; + $event = \Magento\Framework\DB\Ddl\Trigger::EVENT_INSERT; $this->_object->setTable($tableName)->setEvent($event); @@ -140,9 +140,9 @@ public function testGetTimeWithException() */ public function testGetTableWithException() { - $event = \Magento\DB\Ddl\Trigger::EVENT_INSERT; + $event = \Magento\Framework\DB\Ddl\Trigger::EVENT_INSERT; - $this->_object->setTime(\Magento\DB\Ddl\Trigger::TIME_AFTER)->setEvent($event); + $this->_object->setTime(\Magento\Framework\DB\Ddl\Trigger::TIME_AFTER)->setEvent($event); $this->_object->getTable(); } @@ -157,7 +157,7 @@ public function testGetEventWithException() { $tableName = 'TEST_TABLE_NAME_' . mt_rand(100, 999); - $this->_object->setTable($tableName)->setTime(\Magento\DB\Ddl\Trigger::TIME_AFTER); + $this->_object->setTable($tableName)->setTime(\Magento\Framework\DB\Ddl\Trigger::TIME_AFTER); $this->_object->getEvent(); } diff --git a/dev/tests/unit/testsuite/Magento/DB/ProfilerTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/ProfilerTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/DB/ProfilerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/DB/ProfilerTest.php index 6227869850e40..f5ca95185eecb 100644 --- a/dev/tests/unit/testsuite/Magento/DB/ProfilerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/ProfilerTest.php @@ -1,6 +1,6 @@ _profiler = new \Magento\DB\Profiler(true); + $this->_profiler = new \Magento\Framework\DB\Profiler(true); } public function testSetHost() @@ -64,7 +64,7 @@ public function testQueryEnd() $lastQueryId = $this->_profiler->queryStart('SELECT * FROM table'); $endResult = $this->_profiler->queryEnd($lastQueryId); $this->assertAttributeEquals(null, '_lastQueryId', $this->_profiler); - $this->assertEquals(\Magento\DB\Profiler::STORED, $endResult); + $this->assertEquals(\Magento\Framework\DB\Profiler::STORED, $endResult); } public function testQueryEndLast() @@ -72,9 +72,9 @@ public function testQueryEndLast() $this->_profiler->queryStart('SELECT * FROM table'); $endResult = $this->_profiler->queryEndLast(); $this->assertAttributeEquals(null, '_lastQueryId', $this->_profiler); - $this->assertEquals(\Magento\DB\Profiler::STORED, $endResult); + $this->assertEquals(\Magento\Framework\DB\Profiler::STORED, $endResult); $endResult = $this->_profiler->queryEndLast(); - $this->assertEquals(\Magento\DB\Profiler::IGNORED, $endResult); + $this->assertEquals(\Magento\Framework\DB\Profiler::IGNORED, $endResult); } } diff --git a/dev/tests/unit/testsuite/Magento/DB/SelectTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/SelectTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/DB/SelectTest.php rename to dev/tests/unit/testsuite/Magento/Framework/DB/SelectTest.php index e8cd95b3f0c02..a74847b8f631e 100644 --- a/dev/tests/unit/testsuite/Magento/DB/SelectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/SelectTest.php @@ -24,29 +24,29 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\DB; +namespace Magento\Framework\DB; class SelectTest extends \PHPUnit_Framework_TestCase { public function testWhere() { - $select = new \Magento\DB\Select($this->_getAdapterMockWithMockedQuote(1, "'5'")); + $select = new \Magento\Framework\DB\Select($this->_getAdapterMockWithMockedQuote(1, "'5'")); $select->from('test')->where('field = ?', 5); $this->assertEquals("SELECT `test`.* FROM `test` WHERE (field = '5')", $select->assemble()); - $select = new \Magento\DB\Select($this->_getAdapterMockWithMockedQuote(1, "''")); + $select = new \Magento\Framework\DB\Select($this->_getAdapterMockWithMockedQuote(1, "''")); $select->from('test')->where('field = ?'); $this->assertEquals("SELECT `test`.* FROM `test` WHERE (field = '')", $select->assemble()); - $select = new \Magento\DB\Select($this->_getAdapterMockWithMockedQuote(1, "'%?%'")); + $select = new \Magento\Framework\DB\Select($this->_getAdapterMockWithMockedQuote(1, "'%?%'")); $select->from('test')->where('field LIKE ?', '%value?%'); $this->assertEquals("SELECT `test`.* FROM `test` WHERE (field LIKE '%?%')", $select->assemble()); - $select = new \Magento\DB\Select($this->_getAdapterMockWithMockedQuote(0)); - $select->from('test')->where("field LIKE '%value?%'", null, \Magento\DB\Select::TYPE_CONDITION); + $select = new \Magento\Framework\DB\Select($this->_getAdapterMockWithMockedQuote(0)); + $select->from('test')->where("field LIKE '%value?%'", null, \Magento\Framework\DB\Select::TYPE_CONDITION); $this->assertEquals("SELECT `test`.* FROM `test` WHERE (field LIKE '%value?%')", $select->assemble()); - $select = new \Magento\DB\Select($this->_getAdapterMockWithMockedQuote(1, "'1', '2', '4', '8'")); + $select = new \Magento\Framework\DB\Select($this->_getAdapterMockWithMockedQuote(1, "'1', '2', '4', '8'")); $select->from('test')->where("id IN (?)", array(1, 2, 4, 8)); $this->assertEquals("SELECT `test`.* FROM `test` WHERE (id IN ('1', '2', '4', '8'))", $select->assemble()); } diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/ArrayTypeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/ArrayTypeTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/ArrayTypeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/ArrayTypeTest.php index 12c17ec5b27fc..a4a1c8a2339eb 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/ArrayTypeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/ArrayTypeTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument\Interpreter; +namespace Magento\Framework\Data\Argument\Interpreter; class ArrayTypeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Argument\InterpreterInterface + * @var \Magento\Framework\Data\Argument\InterpreterInterface */ protected $_interpreter; @@ -37,7 +37,7 @@ class ArrayTypeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_interpreter = $this->getMockForAbstractClass('Magento\Data\Argument\InterpreterInterface'); + $this->_interpreter = $this->getMockForAbstractClass('Magento\Framework\Data\Argument\InterpreterInterface'); $this->_model = new ArrayType($this->_interpreter); } diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/BooleanTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/BooleanTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/BooleanTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/BooleanTest.php index d98faf2031271..ea3c603a5d2f0 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/BooleanTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/BooleanTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument\Interpreter; +namespace Magento\Framework\Data\Argument\Interpreter; class BooleanTest extends \PHPUnit_Framework_TestCase { @@ -37,7 +37,7 @@ class BooleanTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_booleanUtils = $this->getMock('\Magento\Stdlib\BooleanUtils'); + $this->_booleanUtils = $this->getMock('\Magento\Framework\Stdlib\BooleanUtils'); $this->_model = new Boolean($this->_booleanUtils); } diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/CompositeTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/CompositeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/CompositeTest.php index fdd2c01ac8638..f3bfb7cedf629 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/CompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/CompositeTest.php @@ -21,17 +21,17 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument\Interpreter; +namespace Magento\Framework\Data\Argument\Interpreter; class CompositeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Argument\InterpreterInterface + * @var \Magento\Framework\Data\Argument\InterpreterInterface */ protected $_interpreterOne; /** - * @var \Magento\Data\Argument\InterpreterInterface + * @var \Magento\Framework\Data\Argument\InterpreterInterface */ protected $_interpreterTwo; @@ -42,8 +42,8 @@ class CompositeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_interpreterOne = $this->getMock('Magento\Data\Argument\InterpreterInterface'); - $this->_interpreterTwo = $this->getMock('Magento\Data\Argument\InterpreterInterface'); + $this->_interpreterOne = $this->getMock('Magento\Framework\Data\Argument\InterpreterInterface'); + $this->_interpreterTwo = $this->getMock('Magento\Framework\Data\Argument\InterpreterInterface'); $this->_model = new Composite( array('one' => $this->_interpreterOne, 'two' => $this->_interpreterTwo), 'interpreter' @@ -57,8 +57,8 @@ protected function setUp() public function testConstructWrongInterpreter() { $interpreters = array( - 'correct' => $this->getMock('Magento\Data\Argument\InterpreterInterface'), - 'wrong' => $this->getMock('Magento\ObjectManager') + 'correct' => $this->getMock('Magento\Framework\Data\Argument\InterpreterInterface'), + 'wrong' => $this->getMock('Magento\Framework\ObjectManager') ); new Composite($interpreters, 'interpreter'); } @@ -106,7 +106,7 @@ public function testEvaluate() public function testAddInterpreter() { $input = array('interpreter' => 'new', 'value' => 'test'); - $newInterpreter = $this->getMock('Magento\Data\Argument\InterpreterInterface'); + $newInterpreter = $this->getMock('Magento\Framework\Data\Argument\InterpreterInterface'); $this->_model->addInterpreter('new', $newInterpreter); $newInterpreter->expects($this->once())->method('evaluate')->with(array('value' => 'test')); $this->_model->evaluate($input); @@ -119,7 +119,7 @@ public function testAddInterpreter() */ public function testAddInterpreterException() { - $newInterpreter = $this->getMock('Magento\Data\Argument\InterpreterInterface'); + $newInterpreter = $this->getMock('Magento\Framework\Data\Argument\InterpreterInterface'); $this->_model->addInterpreter('one', $newInterpreter); } } diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/ConstantTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/ConstantTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/ConstantTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/ConstantTest.php index 45eb52b6efef5..6c2631cd08afc 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/ConstantTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/ConstantTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument\Interpreter; +namespace Magento\Framework\Data\Argument\Interpreter; class ConstantTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/NullTypeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/NullTypeTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/NullTypeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/NullTypeTest.php index b7dea50c28353..fd3996551251d 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/NullTypeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/NullTypeTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument\Interpreter; +namespace Magento\Framework\Data\Argument\Interpreter; class NullTypeTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/NumberTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/NumberTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/NumberTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/NumberTest.php index 532b0a518a053..500910202d6fd 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/Interpreter/NumberTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/Interpreter/NumberTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument\Interpreter; +namespace Magento\Framework\Data\Argument\Interpreter; class NumberTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/XsdTest.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Data/Argument/XsdTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/XsdTest.php index 1c8700b400739..bb5e2b66ddb45 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/XsdTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Argument; +namespace Magento\Framework\Data\Argument; class XsdTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/_files/typesInvalidArray.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/typesInvalidArray.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Data/Argument/_files/typesInvalidArray.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/typesInvalidArray.php diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/_files/types_schema.xsd b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_schema.xsd similarity index 91% rename from dev/tests/unit/testsuite/Magento/Data/Argument/_files/types_schema.xsd rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_schema.xsd index 9a5417f754ba4..f2c595ca5f6e4 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/_files/types_schema.xsd +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_schema.xsd @@ -27,6 +27,6 @@ */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Data/Argument/_files/types_valid.xml b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_valid.xml similarity index 98% rename from dev/tests/unit/testsuite/Magento/Data/Argument/_files/types_valid.xml rename to dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_valid.xml index d83dfac6d7192..287c0997a49cf 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Argument/_files/types_valid.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Argument/_files/types_valid.xml @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + String String with translate String with translate false diff --git a/dev/tests/unit/testsuite/Magento/Data/Collection/Db/FetchStrategy/CacheTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/Db/FetchStrategy/CacheTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Data/Collection/Db/FetchStrategy/CacheTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Collection/Db/FetchStrategy/CacheTest.php index f0ae926d3bc00..e1f774375e070 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Collection/Db/FetchStrategy/CacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/Db/FetchStrategy/CacheTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Collection\Db\FetchStrategy; +namespace Magento\Framework\Data\Collection\Db\FetchStrategy; class CacheTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Collection\Db\FetchStrategy\Cache + * @var \Magento\Framework\Data\Collection\Db\FetchStrategy\Cache */ private $_object; @@ -64,10 +64,12 @@ protected function setUp() $this->returnValue('SELECT * FROM fixture_table') ); - $this->_cache = $this->getMockForAbstractClass('Magento\Cache\FrontendInterface'); - $this->_fetchStrategy = $this->getMockForAbstractClass('Magento\Data\Collection\Db\FetchStrategyInterface'); + $this->_cache = $this->getMockForAbstractClass('Magento\Framework\Cache\FrontendInterface'); + $this->_fetchStrategy = $this->getMockForAbstractClass( + 'Magento\Framework\Data\Collection\Db\FetchStrategyInterface' + ); - $this->_object = new \Magento\Data\Collection\Db\FetchStrategy\Cache( + $this->_object = new \Magento\Framework\Data\Collection\Db\FetchStrategy\Cache( $this->_cache, $this->_fetchStrategy, 'fixture_', diff --git a/dev/tests/unit/testsuite/Magento/Data/Collection/Db/FetchStrategy/QueryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/Db/FetchStrategy/QueryTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Data/Collection/Db/FetchStrategy/QueryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Collection/Db/FetchStrategy/QueryTest.php index 7031ea2329122..ec55968c85502 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Collection/Db/FetchStrategy/QueryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/Db/FetchStrategy/QueryTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Collection\Db\FetchStrategy; +namespace Magento\Framework\Data\Collection\Db\FetchStrategy; class QueryTest extends \PHPUnit_Framework_TestCase { @@ -49,7 +49,7 @@ public function testFetchAll() )->will( $this->returnValue($expectedResult) ); - $object = new \Magento\Data\Collection\Db\FetchStrategy\Query(); + $object = new \Magento\Framework\Data\Collection\Db\FetchStrategy\Query(); $this->assertSame($expectedResult, $object->fetchAll($select, $bindParams)); } } diff --git a/dev/tests/unit/testsuite/Magento/Data/Collection/DbTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Data/Collection/DbTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php index 3fab3af764149..1be3ff0b44687 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Collection/DbTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php @@ -24,17 +24,17 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Collection; +namespace Magento\Framework\Data\Collection; class DbTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Collection\Db + * @var \Magento\Framework\Data\Collection\Db */ protected $collection; /** - * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject */ protected $loggerMock; @@ -44,20 +44,20 @@ class DbTest extends \PHPUnit_Framework_TestCase protected $entityFactoryMock; /** - * @var \Magento\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Collection\Db\FetchStrategyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $fetchStrategyMock; protected function setUp() { $this->fetchStrategyMock = $this->getMock( - 'Magento\Data\Collection\Db\FetchStrategy\Query', array('fetchAll'), array(), '', false + 'Magento\Framework\Data\Collection\Db\FetchStrategy\Query', array('fetchAll'), array(), '', false ); $this->entityFactoryMock = $this->getMock( 'Magento\Core\Model\EntityFactory', array('create'), array(), '', false ); - $this->loggerMock = $this->getMock('Magento\Logger', array('log'), array(), '', false); - $this->collection = new \Magento\Data\Collection\Db( + $this->loggerMock = $this->getMock('Magento\Framework\Logger', array('log'), array(), '', false); + $this->collection = new \Magento\Framework\Data\Collection\Db( $this->entityFactoryMock, $this->loggerMock, $this->fetchStrategyMock @@ -89,10 +89,10 @@ public function testSetAddOrder() $this->assertEmpty($select->getPart(\Zend_Db_Select::ORDER)); /* Direct access to select object is available and many places are using it for sort order declaration */ - $select->order('select_field', \Magento\Data\Collection::SORT_ORDER_ASC); - $this->collection->addOrder('some_field', \Magento\Data\Collection::SORT_ORDER_ASC); - $this->collection->setOrder('other_field', \Magento\Data\Collection::SORT_ORDER_ASC); - $this->collection->addOrder('other_field', \Magento\Data\Collection::SORT_ORDER_DESC); + $select->order('select_field', \Magento\Framework\Data\Collection::SORT_ORDER_ASC); + $this->collection->addOrder('some_field', \Magento\Framework\Data\Collection::SORT_ORDER_ASC); + $this->collection->setOrder('other_field', \Magento\Framework\Data\Collection::SORT_ORDER_ASC); + $this->collection->addOrder('other_field', \Magento\Framework\Data\Collection::SORT_ORDER_DESC); $this->collection->load(); $selectOrders = $select->getPart(\Zend_Db_Select::ORDER); @@ -111,8 +111,8 @@ public function testSetAddOrder() public function testUnshiftOrder($adapter) { $this->collection->setConnection($adapter); - $this->collection->addOrder('some_field', \Magento\Data\Collection::SORT_ORDER_ASC); - $this->collection->unshiftOrder('other_field', \Magento\Data\Collection::SORT_ORDER_ASC); + $this->collection->addOrder('some_field', \Magento\Framework\Data\Collection::SORT_ORDER_ASC); + $this->collection->unshiftOrder('other_field', \Magento\Framework\Data\Collection::SORT_ORDER_ASC); $this->collection->load(); $selectOrders = $this->collection->getSelect()->getPart(\Zend_Db_Select::ORDER); @@ -224,7 +224,9 @@ public function testAddFieldToFilterValueContainsQuestionMark() )->will( $this->returnValue('email LIKE \'%value?%\'') ); - $adapter->expects($this->once())->method('select')->will($this->returnValue(new \Magento\DB\Select($adapter))); + $adapter->expects($this->once()) + ->method('select') + ->will($this->returnValue(new \Magento\Framework\DB\Select($adapter))); $this->collection->setConnection($adapter); $select = $this->collection->getSelect()->from('test'); @@ -274,7 +276,7 @@ public function testAddFieldToFilterFieldIsQuoted() * Test that after cloning collection $this->_select in initial and cloned collections * do not reference the same object * - * @covers \Magento\Data\Collection\Db::__clone + * @covers \Magento\Framework\Data\Collection\Db::__clone */ public function testClone() { @@ -363,7 +365,7 @@ public function testFetchItem() $adapterMock = $this->getMock('Zend_Db_Adapter_Pdo_Mysql', array('select', 'query'), array(), '', false); $selectMock = $this->getMock( - 'Magento\DB\Select', array(), array('adapter' => $adapterMock) + 'Magento\Framework\DB\Select', array(), array('adapter' => $adapterMock) ); $adapterMock->expects($this->once()) ->method('query') @@ -376,13 +378,13 @@ public function testFetchItem() $this->collection->setConnection($adapterMock); $this->assertFalse($this->collection->fetchItem()); - $objectMock = $this->getMock('Magento\Object', array('setData'), array()); + $objectMock = $this->getMock('Magento\Framework\Object', array('setData'), array()); $objectMock->expects($this->once()) ->method('setData') ->with($data); $this->entityFactoryMock->expects($this->once()) ->method('create') - ->with('Magento\Object') + ->with('Magento\Framework\Object') ->will($this->returnValue($objectMock)); $this->assertEquals($objectMock, $this->collection->fetchItem()); @@ -399,7 +401,9 @@ public function testGetSize() false ); $selectMock = $this->getMock( - 'Magento\DB\Select', array('orWhere', 'where', 'reset', 'columns'), array('adapter' => $adapterMock) + 'Magento\Framework\DB\Select', + array('orWhere', 'where', 'reset', 'columns'), + array('adapter' => $adapterMock) ); $selectMock->expects($this->exactly(4)) ->method('reset'); @@ -422,7 +426,12 @@ public function testGetSize() ->method('where') ->will($this->returnValueMap(array( array('testValue2', $this->returnSelf()), - array('testField3 = testValue3', null, \Magento\DB\Select::TYPE_CONDITION, $this->returnSelf()), + array( + 'testField3 = testValue3', + null, + \Magento\Framework\DB\Select::TYPE_CONDITION, + $this->returnSelf() + ), array('testField4=testValue4', $this->returnSelf()), ))); $adapterMock->expects($this->once()) @@ -447,7 +456,7 @@ public function testGetSelectSql() { $adapterMock = $this->getMock('Zend_Db_Adapter_Pdo_Mysql', array('select'), array(), '', false); $selectMock = $this->getMock( - 'Magento\DB\Select', array('__toString'), array('adapter' => $adapterMock) + 'Magento\Framework\DB\Select', array('__toString'), array('adapter' => $adapterMock) ); $adapterMock->expects($this->once()) ->method('select') @@ -473,11 +482,13 @@ public function testGetData() false ); $selectMock = $this->getMock( - 'Magento\DB\Select', array('orWhere', 'where', 'reset', 'columns'), array('adapter' => $adapterMock) + 'Magento\Framework\DB\Select', + array('orWhere', 'where', 'reset', 'columns'), + array('adapter' => $adapterMock) ); $selectMock->expects($this->once()) ->method('where') - ->with('aliasField3 = testValue3', null, \Magento\DB\Select::TYPE_CONDITION) + ->with('aliasField3 = testValue3', null, \Magento\Framework\DB\Select::TYPE_CONDITION) ->will($this->returnSelf()); $adapterMock->expects($this->once()) @@ -502,7 +513,11 @@ public function testGetData() public function testDistinct($flag, $expectedFlag) { $adapterMock = $this->getMock('Zend_Db_Adapter_Pdo_Mysql', array('select'), array(), '', false); - $selectMock = $this->getMock('Magento\DB\Select', array('distinct'), array('adapter' => $adapterMock)); + $selectMock = $this->getMock( + 'Magento\Framework\DB\Select', + array('distinct'), + array('adapter' => $adapterMock) + ); $adapterMock->expects($this->once()) ->method('select') ->will($this->returnValue($selectMock)); @@ -528,7 +543,7 @@ public function testToOptionHash() $adapterMock = $this->getMock('Zend_Db_Adapter_Pdo_Mysql', array('select', 'query'), array(), '', false); $selectMock = $this->getMock( - 'Magento\DB\Select', array(), array('adapter' => $adapterMock) + 'Magento\Framework\DB\Select', array(), array('adapter' => $adapterMock) ); $adapterMock->expects($this->once()) ->method('select') @@ -539,7 +554,11 @@ public function testToOptionHash() ->with($selectMock, array()) ->will($this->returnValue(array($data))); - $objectMock = $this->getMock('Magento\Object', array('addData', 'setIdFieldName', 'getData'), array()); + $objectMock = $this->getMock( + 'Magento\Framework\Object', + array('addData', 'setIdFieldName', 'getData'), + array() + ); $objectMock->expects($this->once()) ->method('addData') ->with($data); @@ -551,7 +570,7 @@ public function testToOptionHash() ))); $this->entityFactoryMock->expects($this->once()) ->method('create') - ->with('Magento\Object') + ->with('Magento\Framework\Object') ->will($this->returnValue($objectMock)); $this->collection->setConnection($adapterMock); diff --git a/dev/tests/unit/testsuite/Magento/Data/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/CollectionTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Data/CollectionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/CollectionTest.php index 51ec46e58fa78..7b06f27c6c929 100644 --- a/dev/tests/unit/testsuite/Magento/Data/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/CollectionTest.php @@ -21,26 +21,26 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data; +namespace Magento\Framework\Data; class CollectionTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Collection + * @var \Magento\Framework\Data\Collection */ protected $_model; public function setUp() { - $this->_model = new \Magento\Data\Collection( + $this->_model = new \Magento\Framework\Data\Collection( $this->getMock('Magento\Core\Model\EntityFactory', array(), array(), '', false) ); } public function testRemoveAllItems() { - $this->_model->addItem(new \Magento\Object()); - $this->_model->addItem(new \Magento\Object()); + $this->_model->addItem(new \Magento\Framework\Object()); + $this->_model->addItem(new \Magento\Framework\Object()); $this->assertCount(2, $this->_model->getItems()); $this->_model->removeAllItems(); $this->assertEmpty($this->_model->getItems()); @@ -60,12 +60,12 @@ public function testSetItemObjectClass($class) */ public function setItemObjectClassDataProvider() { - return array(array('Magento\Url'), array('Magento\Object')); + return array(array('Magento\Framework\Url'), array('Magento\Framework\Object')); } /** * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Incorrect_ClassName does not extend \Magento\Object + * @expectedExceptionMessage Incorrect_ClassName does not extend \Magento\Framework\Object */ public function testSetItemObjectClassException() { diff --git a/dev/tests/unit/testsuite/Magento/Data/Form/Element/EditablemultiselectTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/EditablemultiselectTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Data/Form/Element/EditablemultiselectTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/EditablemultiselectTest.php index da5e8697ec137..4867dd28831cb 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Form/Element/EditablemultiselectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/EditablemultiselectTest.php @@ -24,26 +24,26 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Form\Element; +namespace Magento\Framework\Data\Form\Element; class EditablemultiselectTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Form\Element\Editablemultiselect + * @var \Magento\Framework\Data\Form\Element\Editablemultiselect */ protected $_model; protected function setUp() { $testHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_model = $testHelper->getObject('Magento\Data\Form\Element\Editablemultiselect'); + $this->_model = $testHelper->getObject('Magento\Framework\Data\Form\Element\Editablemultiselect'); $values = array( array('value' => 1, 'label' => 'Value1'), array('value' => 2, 'label' => 'Value2'), array('value' => 3, 'label' => 'Value3') ); $value = array(1, 3); - $this->_model->setForm(new \Magento\Object()); + $this->_model->setForm(new \Magento\Framework\Object()); $this->_model->setData(array('values' => $values, 'value' => $value)); } diff --git a/dev/tests/unit/testsuite/Magento/Data/Form/Element/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/FactoryTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Data/Form/Element/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/FactoryTest.php index 4cd76ea325733..a39248fddb9c0 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Form/Element/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/FactoryTest.php @@ -26,9 +26,9 @@ */ /** - * Tests for \Magento\Data\Form\Element\Factory + * Tests for \Magento\Framework\Data\Form\Element\Factory */ -namespace Magento\Data\Form\Element; +namespace Magento\Framework\Data\Form\Element; class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -38,20 +38,20 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected $_objectManagerMock; /** - * @var \Magento\Data\Form\Element\Factory + * @var \Magento\Framework\Data\Form\Element\Factory */ protected $_factory; protected function setUp() { $this->_objectManagerMock = $this->getMock( - 'Magento\ObjectManager\ObjectManager', + 'Magento\Framework\ObjectManager\ObjectManager', array('create'), array(), '', false ); - $this->_factory = new \Magento\Data\Form\Element\Factory($this->_objectManagerMock); + $this->_factory = new \Magento\Framework\Data\Form\Element\Factory($this->_objectManagerMock); } /** @@ -60,7 +60,7 @@ protected function setUp() */ public function testCreatePositive($type) { - $className = 'Magento\Data\Form\Element\\' . ucfirst($type); + $className = 'Magento\Framework\Data\Form\Element\\' . ucfirst($type); $elementMock = $this->getMock($className, array(), array(), '', false); $this->_objectManagerMock->expects( $this->once() @@ -82,7 +82,7 @@ public function testCreatePositive($type) public function testCreatePositiveWithNotEmptyConfig($type) { $config = array('data' => array('attr1' => 'attr1', 'attr2' => 'attr2')); - $className = 'Magento\Data\Form\Element\\' . ucfirst($type); + $className = 'Magento\Framework\Data\Form\Element\\' . ucfirst($type); $elementMock = $this->getMock($className, array(), array(), '', false); $this->_objectManagerMock->expects( $this->once() @@ -193,8 +193,8 @@ public function testCreateExceptionInvalidArgument($type) public function createExceptionInvalidArgumentDataProvider() { return array( - 'Magento\Data\Form\Element\Factory' => array('Magento\Data\Form\Element\Factory'), - 'Magento\Data\Form\Element\Collection' => array('Magento\Data\Form\Element\Collection') + 'Magento\Framework\Data\Form\Element\Factory' => array('Magento\Framework\Data\Form\Element\Factory'), + 'Magento\Framework\Data\Form\Element\Collection' => array('Magento\Framework\Data\Form\Element\Collection') ); } } diff --git a/dev/tests/unit/testsuite/Magento/Data/Form/Element/MultiselectTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/MultiselectTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Data/Form/Element/MultiselectTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/MultiselectTest.php index 0d12c8af0da63..481d91dd5ed78 100644 --- a/dev/tests/unit/testsuite/Magento/Data/Form/Element/MultiselectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/MultiselectTest.php @@ -24,26 +24,26 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data\Form\Element; +namespace Magento\Framework\Data\Form\Element; class MultiselectTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Form\Element\Multiselect + * @var \Magento\Framework\Data\Form\Element\Multiselect */ protected $_model; protected function setUp() { $testHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_model = $testHelper->getObject('Magento\Data\Form\Element\Editablemultiselect'); - $this->_model->setForm(new \Magento\Object()); + $this->_model = $testHelper->getObject('Magento\Framework\Data\Form\Element\Editablemultiselect'); + $this->_model->setForm(new \Magento\Framework\Object()); } /** * Verify that hidden input is present in multiselect * - * @covers \Magento\Data\Form\Element\Multiselect::getElementHtml + * @covers \Magento\Framework\Data\Form\Element\Multiselect::getElementHtml */ public function testHiddenFieldPresentInMultiSelect() { diff --git a/dev/tests/unit/testsuite/Magento/Data/FormFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/FormFactoryTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Data/FormFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/FormFactoryTest.php index fa4bad6ebed7d..0ff4438740048 100644 --- a/dev/tests/unit/testsuite/Magento/Data/FormFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/FormFactoryTest.php @@ -21,10 +21,10 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data; +namespace Magento\Framework\Data; /** - * Tests for \Magento\Data\FormFactory + * Tests for \Magento\Framework\Data\FormFactory */ class FormFactoryTest extends \PHPUnit_Framework_TestCase { @@ -35,12 +35,18 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager\ObjectManager', array(), array(), '', false); + $this->_objectManagerMock = $this->getMock( + 'Magento\Framework\ObjectManager\ObjectManager', + array(), + array(), + '', + false + ); } /** - * @expectedException \Magento\Exception - * @expectedExceptionMessage WrongClass doesn't extend \Magento\Data\Form + * @expectedException \Magento\Framework\Exception + * @expectedExceptionMessage WrongClass doesn't extend \Magento\Framework\Data\Form */ public function testWrongTypeException() { @@ -55,7 +61,7 @@ public function testWrongTypeException() public function testCreate() { - $className = 'Magento\Data\Form'; + $className = 'Magento\Framework\Data\Form'; $formMock = $this->getMock($className, array(), array(), '', false); $this->_objectManagerMock->expects( $this->once() diff --git a/dev/tests/unit/testsuite/Magento/Data/FormTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/FormTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Data/FormTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/FormTest.php index 296e015bdc064..402f010c25365 100644 --- a/dev/tests/unit/testsuite/Magento/Data/FormTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/FormTest.php @@ -21,10 +21,10 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data; +namespace Magento\Framework\Data; /** - * Tests for \Magento\Data\FormFactory + * Tests for \Magento\Framework\Data\FormFactory * @SuppressWarnings(PHPMD.LongVariable) */ class FormTest extends \PHPUnit_Framework_TestCase @@ -45,28 +45,34 @@ class FormTest extends \PHPUnit_Framework_TestCase protected $_formKeyMock; /** - * @var \Magento\Data\Form + * @var \Magento\Framework\Data\Form */ protected $_form; protected function setUp() { $this->_factoryElementMock = $this->getMock( - 'Magento\Data\Form\Element\Factory', + 'Magento\Framework\Data\Form\Element\Factory', array('create'), array(), '', false ); $this->_factoryCollectionMock = $this->getMock( - 'Magento\Data\Form\Element\CollectionFactory', + 'Magento\Framework\Data\Form\Element\CollectionFactory', array('create'), array(), '', false ); $this->_factoryCollectionMock->expects($this->any())->method('create')->will($this->returnValue(array())); - $this->_formKeyMock = $this->getMock('Magento\Data\Form\FormKey', array('getFormKey'), array(), '', false); + $this->_formKeyMock = $this->getMock( + 'Magento\Framework\Data\Form\FormKey', + array('getFormKey'), + array(), + '', + false + ); $this->_form = new Form($this->_factoryElementMock, $this->_factoryCollectionMock, $this->_formKeyMock); } diff --git a/dev/tests/unit/testsuite/Magento/Data/GraphTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/GraphTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Data/GraphTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/GraphTest.php index c72a30eddf7fb..a58ff126e3047 100644 --- a/dev/tests/unit/testsuite/Magento/Data/GraphTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/GraphTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data; +namespace Magento\Framework\Data; class GraphTest extends \PHPUnit_Framework_TestCase { @@ -33,7 +33,7 @@ class GraphTest extends \PHPUnit_Framework_TestCase */ public function testConstructorError($nodes, $relations) { - new \Magento\Data\Graph($nodes, $relations); + new \Magento\Framework\Data\Graph($nodes, $relations); } /** @@ -54,7 +54,7 @@ public function constructorErrorDataProvider() */ public function testAddRelation() { - $model = new \Magento\Data\Graph(array(1, 2, 3), array(array(1, 2), array(2, 3))); + $model = new \Magento\Framework\Data\Graph(array(1, 2, 3), array(array(1, 2), array(2, 3))); $this->assertEquals(array(1 => array(2 => 2), 2 => array(3 => 3)), $model->getRelations()); $this->assertSame($model, $model->addRelation(3, 1)); $this->assertEquals(array(1 => array(2 => 2), 2 => array(3 => 3), 3 => array(1 => 1)), $model->getRelations()); @@ -65,33 +65,33 @@ public function testGetRelations() // directional case is covered by testAddRelation() // inverse - $model = new \Magento\Data\Graph(array(1, 2, 3), array(array(1, 2), array(2, 3))); + $model = new \Magento\Framework\Data\Graph(array(1, 2, 3), array(array(1, 2), array(2, 3))); $this->assertEquals( array(2 => array(1 => 1), 3 => array(2 => 2)), - $model->getRelations(\Magento\Data\Graph::INVERSE) + $model->getRelations(\Magento\Framework\Data\Graph::INVERSE) ); // non-directional $this->assertEquals( array(1 => array(2 => 2), 2 => array(1 => 1, 3 => 3), 3 => array(2 => 2)), - $model->getRelations(\Magento\Data\Graph::NON_DIRECTIONAL) + $model->getRelations(\Magento\Framework\Data\Graph::NON_DIRECTIONAL) ); } public function testFindCycle() { $nodes = array(1, 2, 3, 4); - $model = new \Magento\Data\Graph($nodes, array(array(1, 2), array(2, 3), array(3, 4))); + $model = new \Magento\Framework\Data\Graph($nodes, array(array(1, 2), array(2, 3), array(3, 4))); $this->assertEquals(array(), $model->findCycle()); - $model = new \Magento\Data\Graph($nodes, array(array(1, 2), array(2, 3), array(3, 4), array(4, 2))); + $model = new \Magento\Framework\Data\Graph($nodes, array(array(1, 2), array(2, 3), array(3, 4), array(4, 2))); $this->assertEquals(array(), $model->findCycle(1)); $cycle = $model->findCycle(); sort($cycle); $this->assertEquals(array(2, 2, 3, 4), $cycle); $this->assertEquals(array(3, 4, 2, 3), $model->findCycle(3)); - $model = new \Magento\Data\Graph( + $model = new \Magento\Framework\Data\Graph( $nodes, array(array(1, 2), array(2, 3), array(3, 4), array(4, 2), array(3, 1)) ); @@ -105,7 +105,7 @@ public function testFindCycle() public function testDfs() { - $model = new \Magento\Data\Graph(array(1, 2, 3, 4, 5), array(array(1, 2), array(2, 3), array(4, 5))); + $model = new \Magento\Framework\Data\Graph(array(1, 2, 3, 4, 5), array(array(1, 2), array(2, 3), array(4, 5))); // directional $this->assertEquals(array(1, 2, 3), $model->dfs(1, 3)); @@ -114,12 +114,12 @@ public function testDfs() $this->assertEquals(array(), $model->dfs(1, 5)); // inverse - $this->assertEquals(array(3, 2, 1), $model->dfs(3, 1, \Magento\Data\Graph::INVERSE)); + $this->assertEquals(array(3, 2, 1), $model->dfs(3, 1, \Magento\Framework\Data\Graph::INVERSE)); // non-directional - $model = new \Magento\Data\Graph(array(1, 2, 3), array(array(2, 1), array(2, 3))); - $this->assertEquals(array(), $model->dfs(1, 3, \Magento\Data\Graph::DIRECTIONAL)); - $this->assertEquals(array(), $model->dfs(3, 1, \Magento\Data\Graph::INVERSE)); - $this->assertEquals(array(1, 2, 3), $model->dfs(1, 3, \Magento\Data\Graph::NON_DIRECTIONAL)); + $model = new \Magento\Framework\Data\Graph(array(1, 2, 3), array(array(2, 1), array(2, 3))); + $this->assertEquals(array(), $model->dfs(1, 3, \Magento\Framework\Data\Graph::DIRECTIONAL)); + $this->assertEquals(array(), $model->dfs(3, 1, \Magento\Framework\Data\Graph::INVERSE)); + $this->assertEquals(array(1, 2, 3), $model->dfs(1, 3, \Magento\Framework\Data\Graph::NON_DIRECTIONAL)); } } diff --git a/dev/tests/unit/testsuite/Magento/Data/StructureTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/StructureTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Data/StructureTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Data/StructureTest.php index 01ae1cd422ce5..798859ae8d023 100644 --- a/dev/tests/unit/testsuite/Magento/Data/StructureTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/StructureTest.php @@ -23,18 +23,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Data; +namespace Magento\Framework\Data; class StructureTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Data\Structure + * @var \Magento\Framework\Data\Structure */ protected $_structure; protected function setUp() { - $this->_structure = new \Magento\Data\Structure(); + $this->_structure = new \Magento\Framework\Data\Structure(); } /** @@ -46,7 +46,7 @@ public function testConstructImportExportElements($elements) $this->assertSame(array(), $this->_structure->exportElements()); $this->_structure->importElements($elements); $this->assertSame($elements, $this->_structure->exportElements()); - $structure = new \Magento\Data\Structure($elements); + $structure = new \Magento\Framework\Data\Structure($elements); $this->assertSame($elements, $structure->exportElements()); } @@ -60,19 +60,21 @@ public function importExportElementsDataProvider() array(array('element' => array('arbitrary_key' => 'value'))), array( array( - 'one' => array(\Magento\Data\Structure::CHILDREN => array('two' => 2, 'three' => 3)), - 'two' => array(\Magento\Data\Structure::PARENT => 'one'), - 'three' => array(\Magento\Data\Structure::PARENT => 'one'), - 'four' => array(\Magento\Data\Structure::CHILDREN => array()) + 'one' => array(\Magento\Framework\Data\Structure::CHILDREN => array('two' => 2, 'three' => 3)), + 'two' => array(\Magento\Framework\Data\Structure::PARENT => 'one'), + 'three' => array(\Magento\Framework\Data\Structure::PARENT => 'one'), + 'four' => array(\Magento\Framework\Data\Structure::CHILDREN => array()) ) ), array( array( 'one' => array( - \Magento\Data\Structure::CHILDREN => array('two' => 't.w.o.'), - \Magento\Data\Structure::GROUPS => array('group' => array('two' => 'two', 'three' => 'three')) + \Magento\Framework\Data\Structure::CHILDREN => array('two' => 't.w.o.'), + \Magento\Framework\Data\Structure::GROUPS => array( + 'group' => array('two' => 'two', 'three' => 'three') + ) ), - 'two' => array(\Magento\Data\Structure::PARENT => 'one'), + 'two' => array(\Magento\Framework\Data\Structure::PARENT => 'one'), 'three' => array() ) ) @@ -82,7 +84,7 @@ public function importExportElementsDataProvider() /** * @param array $elements * @dataProvider importExceptionDataProvider - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testImportException($elements) { @@ -93,56 +95,66 @@ public function importExceptionDataProvider() { return array( 'numeric id' => array(array('element')), - 'non-existing parent' => array(array('element' => array(\Magento\Data\Structure::PARENT => 'unknown'))), + 'non-existing parent' => array( + array('element' => array(\Magento\Framework\Data\Structure::PARENT => 'unknown')) + ), 'completely missing nested set' => array( - array('one' => array(\Magento\Data\Structure::PARENT => 'two'), 'two' => array()) + array('one' => array(\Magento\Framework\Data\Structure::PARENT => 'two'), 'two' => array()) ), 'messed up nested set' => array( array( - 'one' => array(\Magento\Data\Structure::PARENT => 'two'), - 'two' => array(\Magento\Data\Structure::CHILDREN => array('three' => 't.h.r.e.e.')), + 'one' => array(\Magento\Framework\Data\Structure::PARENT => 'two'), + 'two' => array(\Magento\Framework\Data\Structure::CHILDREN => array('three' => 't.h.r.e.e.')), 'three' => array() ) ), - 'nested set invalid data type' => array(array('one' => array(\Magento\Data\Structure::CHILDREN => ''))), + 'nested set invalid data type' => array( + array('one' => array(\Magento\Framework\Data\Structure::CHILDREN => '')) + ), 'duplicate aliases' => array( array( - 'one' => array(\Magento\Data\Structure::CHILDREN => array('two' => 'alias', 'three' => 'alias')), - 'two' => array(\Magento\Data\Structure::PARENT => 'one'), - 'three' => array(\Magento\Data\Structure::PARENT => 'one') + 'one' => array( + \Magento\Framework\Data\Structure::CHILDREN => array('two' => 'alias', 'three' => 'alias') + ), + 'two' => array(\Magento\Framework\Data\Structure::PARENT => 'one'), + 'three' => array(\Magento\Framework\Data\Structure::PARENT => 'one') ) ), 'missing child' => array( array( 'one' => array( - \Magento\Data\Structure::CHILDREN => array('two' => 't.w.o.', 'three' => 't.h.r.e.e.') + \Magento\Framework\Data\Structure::CHILDREN => array('two' => 't.w.o.', 'three' => 't.h.r.e.e.') ), - 'two' => array(\Magento\Data\Structure::PARENT => 'one') + 'two' => array(\Magento\Framework\Data\Structure::PARENT => 'one') ) ), 'missing reference back to parent' => array( - array('one' => array(\Magento\Data\Structure::CHILDREN => array('two' => 't.w.o.')), 'two' => array()) + array('one' => array( + \Magento\Framework\Data\Structure::CHILDREN => array('two' => 't.w.o.')), 'two' => array() + ) ), 'broken reference back to parent' => array( array( 'one' => array( - \Magento\Data\Structure::CHILDREN => array('two' => 't.w.o.', 'three' => 't.h.r.e.e.') + \Magento\Framework\Data\Structure::CHILDREN => array('two' => 't.w.o.', 'three' => 't.h.r.e.e.') ), - 'two' => array(\Magento\Data\Structure::PARENT => 'three'), - 'three' => array(\Magento\Data\Structure::PARENT => 'one') + 'two' => array(\Magento\Framework\Data\Structure::PARENT => 'three'), + 'three' => array(\Magento\Framework\Data\Structure::PARENT => 'one') ) ), - 'groups invalid data type' => array(array('one' => array(\Magento\Data\Structure::GROUPS => ''))), - 'group invalid data type' => array(array('one' => array(\Magento\Data\Structure::GROUPS => array(1)))), + 'groups invalid data type' => array(array('one' => array(\Magento\Framework\Data\Structure::GROUPS => ''))), + 'group invalid data type' => array( + array('one' => array(\Magento\Framework\Data\Structure::GROUPS => array(1))) + ), 'asymmetric group' => array( array( - 'one' => array(\Magento\Data\Structure::GROUPS => array('two' => 'three')), + 'one' => array(\Magento\Framework\Data\Structure::GROUPS => array('two' => 'three')), 'two' => array(), 'three' => array() ) ), 'group references to non-existing element' => array( - array('one' => array(\Magento\Data\Structure::GROUPS => array('two' => 'two'))) + array('one' => array(\Magento\Framework\Data\Structure::GROUPS => array('two' => 'two'))) ) ); } @@ -160,7 +172,7 @@ public function testCreateGetHasElement() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testCreateElementException() { @@ -195,7 +207,7 @@ public function testSetGetAttribute() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testSetAttributeNoElementException() { @@ -219,14 +231,14 @@ public function testSetAttributeArgumentException($attribute) public function setAttributeArgumentExceptionDataProvider() { return array( - array(\Magento\Data\Structure::CHILDREN), - array(\Magento\Data\Structure::PARENT), - array(\Magento\Data\Structure::GROUPS) + array(\Magento\Framework\Data\Structure::CHILDREN), + array(\Magento\Framework\Data\Structure::PARENT), + array(\Magento\Framework\Data\Structure::GROUPS) ); } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testGetAttributeNoElementException() { @@ -243,8 +255,14 @@ public function testRenameElement() $this->assertFalse($this->_structure->getElement('four.5')); $this->assertSame($this->_structure, $this->_structure->renameElement('four', 'four.5')); $this->assertSame($element, $this->_structure->getElement('four.5')); - $this->assertEquals('four.5', $this->_structure->getAttribute('two', \Magento\Data\Structure::PARENT)); - $this->assertEquals('four.5', $this->_structure->getAttribute('three', \Magento\Data\Structure::PARENT)); + $this->assertEquals( + 'four.5', + $this->_structure->getAttribute('two', \Magento\Framework\Data\Structure::PARENT) + ); + $this->assertEquals( + 'four.5', + $this->_structure->getAttribute('three', \Magento\Framework\Data\Structure::PARENT) + ); // rename element and see how parent got updated $this->_structure->renameElement('three', 'three.5'); @@ -317,7 +335,7 @@ public function setAsChildOffsetDataProvider() /** * @param string $elementId * @param string $parentId - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @dataProvider setAsChildExceptionDataProvider */ public function testSetAsChildException($elementId, $parentId) @@ -345,7 +363,7 @@ public function testUnsetChild() // specify element by name $this->_structure->unsetChild('five'); $this->assertFalse($this->_structure->getParentId('five')); - $this->assertArrayNotHasKey(\Magento\Data\Structure::CHILDREN, $this->_structure->getElement('six')); + $this->assertArrayNotHasKey(\Magento\Framework\Data\Structure::CHILDREN, $this->_structure->getElement('six')); // specify element by parent and alias $this->_structure->unsetChild('four', 'tw'); @@ -406,7 +424,7 @@ public function reorderChildDataProvider() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testReorderChildException() { @@ -458,7 +476,7 @@ public function reorderSiblingDataProvider() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testReorderToSiblingException() { @@ -501,8 +519,8 @@ public function testGetChildrenParentIdChildAlias() } /** - * @covers \Magento\Data\Structure::addToParentGroup - * @covers \Magento\Data\Structure::getGroupChildNames + * @covers \Magento\Framework\Data\Structure::addToParentGroup + * @covers \Magento\Framework\Data\Structure::getGroupChildNames */ public function testGroups() { @@ -550,11 +568,11 @@ protected function _populateSampleStructure() $this->_structure->importElements( array( 'one' => array(), - 'two' => array(\Magento\Data\Structure::PARENT => 'four', 'foo' => 'bar'), - 'three' => array(\Magento\Data\Structure::PARENT => 'four', 'bar' => 'baz'), - 'four' => array(\Magento\Data\Structure::CHILDREN => array('three' => 'th', 'two' => 'tw')), - 'five' => array(\Magento\Data\Structure::PARENT => 'six', 5), - 'six' => array(\Magento\Data\Structure::CHILDREN => array('five' => 'f')) + 'two' => array(\Magento\Framework\Data\Structure::PARENT => 'four', 'foo' => 'bar'), + 'three' => array(\Magento\Framework\Data\Structure::PARENT => 'four', 'bar' => 'baz'), + 'four' => array(\Magento\Framework\Data\Structure::CHILDREN => array('three' => 'th', 'two' => 'tw')), + 'five' => array(\Magento\Framework\Data\Structure::PARENT => 'six', 5), + 'six' => array(\Magento\Framework\Data\Structure::CHILDREN => array('five' => 'f')) ) ); } @@ -564,11 +582,11 @@ protected function _populateSampleStructure() */ protected function _populateSampleSortStructure() { - $child = array(\Magento\Data\Structure::PARENT => 'parent'); + $child = array(\Magento\Framework\Data\Structure::PARENT => 'parent'); $this->_structure->importElements( array( 'parent' => array( - \Magento\Data\Structure::CHILDREN => array( + \Magento\Framework\Data\Structure::CHILDREN => array( 'one' => 'e1', 'two' => 'e2', 'three' => 'e3', diff --git a/dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_cipher_info.php b/dev/tests/unit/testsuite/Magento/Framework/Encryption/Crypt/_files/_cipher_info.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_cipher_info.php rename to dev/tests/unit/testsuite/Magento/Framework/Encryption/Crypt/_files/_cipher_info.php diff --git a/dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_crypt_fixtures.php b/dev/tests/unit/testsuite/Magento/Framework/Encryption/Crypt/_files/_crypt_fixtures.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Encryption/Crypt/_files/_crypt_fixtures.php rename to dev/tests/unit/testsuite/Magento/Framework/Encryption/Crypt/_files/_crypt_fixtures.php diff --git a/dev/tests/unit/testsuite/Magento/Encryption/CryptTest.php b/dev/tests/unit/testsuite/Magento/Framework/Encryption/CryptTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Encryption/CryptTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Encryption/CryptTest.php index ec04697f6422f..fdae3f5497aab 100644 --- a/dev/tests/unit/testsuite/Magento/Encryption/CryptTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Encryption/CryptTest.php @@ -26,13 +26,13 @@ */ /** - * Test case for \Magento\Encryption\Crypt + * Test case for \Magento\Framework\Encryption\Crypt */ -namespace Magento\Encryption; +namespace Magento\Framework\Encryption; class CryptTest extends \PHPUnit_Framework_TestCase { - private $_key = __CLASS__; + private $_key; private static $_cipherInfo; @@ -46,6 +46,11 @@ class CryptTest extends \PHPUnit_Framework_TestCase MCRYPT_MODE_NOFB ); + protected function setUp() + { + $this->_key = substr(__CLASS__, -32, 32); + } + protected function _getRandomString($length) { $result = ''; @@ -111,7 +116,7 @@ public function testConstructor($cipher, $mode) /* Generate random init vector */ $initVector = $this->_getRandomString($this->_getInitVectorSize($cipher, $mode)); - $crypt = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, $initVector); + $crypt = new \Magento\Framework\Encryption\Crypt($this->_key, $cipher, $mode, $initVector); $this->assertEquals($cipher, $crypt->getCipher()); $this->assertEquals($mode, $crypt->getMode()); @@ -136,17 +141,17 @@ public function getConstructorExceptionData() /** * @dataProvider getConstructorExceptionData - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testConstructorException($key, $cipher, $mode, $initVector) { - new \Magento\Encryption\Crypt($key, $cipher, $mode, $initVector); + new \Magento\Framework\Encryption\Crypt($key, $cipher, $mode, $initVector); } public function testConstructorDefaults() { - $cryptExpected = new \Magento\Encryption\Crypt($this->_key, MCRYPT_BLOWFISH, MCRYPT_MODE_ECB, false); - $cryptActual = new \Magento\Encryption\Crypt($this->_key); + $cryptExpected = new \Magento\Framework\Encryption\Crypt($this->_key, MCRYPT_BLOWFISH, MCRYPT_MODE_ECB, false); + $cryptActual = new \Magento\Framework\Encryption\Crypt($this->_key); $this->assertEquals($cryptExpected->getCipher(), $cryptActual->getCipher()); $this->assertEquals($cryptExpected->getMode(), $cryptActual->getMode()); @@ -163,7 +168,7 @@ public function getCryptData() foreach ($this->_supportedModes as $mode) { $randomKey = $this->_getRandomString($this->_getKeySize($cipher, $mode)); $randomInitVector = $this->_getRandomString($this->_getInitVectorSize($cipher, $mode)); - $crypt = new \Magento\Encryption\Crypt($randomKey, $cipher, $mode, $randomInitVector); + $crypt = new \Magento\Framework\Encryption\Crypt($randomKey, $cipher, $mode, $randomInitVector); $fixtures[] = array( $randomKey, // Encryption key $cipher, @@ -191,7 +196,7 @@ public function getCryptData() */ public function testEncrypt($key, $cipher, $mode, $initVector, $inputData, $expectedData) { - $crypt = new \Magento\Encryption\Crypt($key, $cipher, $mode, $initVector); + $crypt = new \Magento\Framework\Encryption\Crypt($key, $cipher, $mode, $initVector); $actualData = $crypt->encrypt($inputData); $this->assertEquals($expectedData, $actualData); } @@ -201,7 +206,7 @@ public function testEncrypt($key, $cipher, $mode, $initVector, $inputData, $expe */ public function testDecrypt($key, $cipher, $mode, $initVector, $expectedData, $inputData) { - $crypt = new \Magento\Encryption\Crypt($key, $cipher, $mode, $initVector); + $crypt = new \Magento\Framework\Encryption\Crypt($key, $cipher, $mode, $initVector); $actualData = $crypt->decrypt($inputData); $this->assertEquals($expectedData, $actualData); } @@ -211,10 +216,10 @@ public function testDecrypt($key, $cipher, $mode, $initVector, $expectedData, $i */ public function testInitVectorRandom($cipher, $mode) { - $crypt1 = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, true); + $crypt1 = new \Magento\Framework\Encryption\Crypt($this->_key, $cipher, $mode, true); $initVector1 = $crypt1->getInitVector(); - $crypt2 = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, true); + $crypt2 = new \Magento\Framework\Encryption\Crypt($this->_key, $cipher, $mode, true); $initVector2 = $crypt2->getInitVector(); $expectedSize = $this->_getInitVectorSize($cipher, $mode); @@ -228,7 +233,7 @@ public function testInitVectorRandom($cipher, $mode) */ public function testInitVectorNone($cipher, $mode) { - $crypt = new \Magento\Encryption\Crypt($this->_key, $cipher, $mode, false); + $crypt = new \Magento\Framework\Encryption\Crypt($this->_key, $cipher, $mode, false); $actualInitVector = $crypt->getInitVector(); $expectedInitVector = str_repeat("\0", $this->_getInitVectorSize($cipher, $mode)); diff --git a/dev/tests/unit/testsuite/Magento/Encryption/EncryptorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Encryption/EncryptorTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Encryption/EncryptorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Encryption/EncryptorTest.php index 4f9b18df4f9f5..b7ebc31a45561 100644 --- a/dev/tests/unit/testsuite/Magento/Encryption/EncryptorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Encryption/EncryptorTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Encryption; +namespace Magento\Framework\Encryption; class EncryptorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Encryption\Encryptor + * @var \Magento\Framework\Encryption\Encryptor */ protected $_model; @@ -42,8 +42,8 @@ class EncryptorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_randomGenerator = $this->getMock('Magento\Math\Random', array(), array(), '', false); - $this->_cryptFactory = $this->getMock('Magento\Encryption\CryptFactory', array(), array(), '', false); + $this->_randomGenerator = $this->getMock('Magento\Framework\Math\Random', array(), array(), '', false); + $this->_cryptFactory = $this->getMock('Magento\Framework\Encryption\CryptFactory', array(), array(), '', false); $this->_model = new Encryptor($this->_randomGenerator, $this->_cryptFactory, 'cryptKey'); } @@ -161,7 +161,7 @@ public function encryptWithEmptyKeyDataProvider() */ public function testEncrypt($value, $expected) { - $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false); + $crypt = $this->getMock('Magento\Framework\Encryption\Crypt', array(), array(), '', false); $this->_cryptFactory->expects($this->once())->method('create')->will($this->returnValue($crypt)); $crypt->expects($this->once())->method('encrypt')->with($value)->will($this->returnArgument(0)); $actual = $this->_model->encrypt($value); @@ -181,7 +181,7 @@ public function encryptDataProvider() */ public function testDecrypt($value, $expected) { - $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false); + $crypt = $this->getMock('Magento\Framework\Encryption\Crypt', array(), array(), '', false); $this->_cryptFactory->expects($this->once())->method('create')->will($this->returnValue($crypt)); $crypt->expects($this->once())->method('decrypt')->with($expected)->will($this->returnValue($expected)); $actual = $this->_model->decrypt($value); @@ -195,7 +195,7 @@ public function decryptDataProvider() public function testValidateKey() { - $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false); + $crypt = $this->getMock('Magento\Framework\Encryption\Crypt', array(), array(), '', false); $this->_cryptFactory->expects( $this->once() )->method( @@ -210,7 +210,7 @@ public function testValidateKey() public function testValidateKeyDefault() { - $crypt = $this->getMock('Magento\Encryption\Crypt', array(), array(), '', false); + $crypt = $this->getMock('Magento\Framework\Encryption\Crypt', array(), array(), '', false); $this->_cryptFactory->expects( $this->once() )->method( diff --git a/dev/tests/unit/testsuite/Magento/Encryption/UrlCoderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Encryption/UrlCoderTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Encryption/UrlCoderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Encryption/UrlCoderTest.php index bc1fdf9498e29..41df11c1a2947 100644 --- a/dev/tests/unit/testsuite/Magento/Encryption/UrlCoderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Encryption/UrlCoderTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Encryption; +namespace Magento\Framework\Encryption; class UrlCoderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Encryption\UrlCoder + * @var \Magento\Framework\Encryption\UrlCoder */ protected $_urlCoder; @@ -47,8 +47,8 @@ class UrlCoderTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_urlMock = $this->getMock('Magento\UrlInterface', array(), array(), '', false); - $this->_urlCoder = new \Magento\Encryption\UrlCoder($this->_urlMock); + $this->_urlMock = $this->getMock('Magento\Framework\UrlInterface', array(), array(), '', false); + $this->_urlCoder = new \Magento\Framework\Encryption\UrlCoder($this->_urlMock); } public function testDecode() diff --git a/dev/tests/unit/testsuite/Magento/Framework/Error/HandlerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Error/HandlerTest.php new file mode 100644 index 0000000000000..5ae10e2aa64a5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Error/HandlerTest.php @@ -0,0 +1,117 @@ +object = new Handler(); + } + + public function testProcessException() + { + $expectedMessage = 'test message'; + + $this->expectOutputRegex('/(' . $expectedMessage . ')\s*?.*(internal function)((.*\s.*)*)({main})/'); + $this->object->processException(new \Exception($expectedMessage), []); + } + + /** + * @param int $errorNo + * @param string $errorStr + * @param string $errorFile + * @param bool $expectedResult + * @dataProvider handlerProvider + */ + public function testHandler($errorNo, $errorStr, $errorFile, $expectedResult) + { + $this->assertEquals($expectedResult, $this->object->handler($errorNo, $errorStr, $errorFile, 11)); + } + + public function handlerProvider() + { + return [ + [E_STRICT, 'error_string', 'pear', true], + [E_DEPRECATED, 'error_string', 'pear', true], + [E_STRICT, 'pear', 0, true], + [E_DEPRECATED, 'pear', 0, true], + [E_STRICT, 'pear', 'pear', true], + [E_DEPRECATED, 'pear', 'pear', true], + [E_WARNING, 'open_basedir', 'pear', true], + [0, 'DateTimeZone::__construct', 0, false], + [0, 0, 0, false] + ]; + } + + /** + * Test handler() method with 'false' result + * + * @param int $errorNo + * @param string $errorPhrase + * @dataProvider handlerProviderException + */ + public function testHandlerException($errorNo, $errorPhrase) + { + $errorStr = 'test_string'; + $errorFile = 'test_file'; + $errorLine = 'test_error_line'; + + $exceptedExceptionMessage = sprintf('%s: %s in %s on line %s', $errorPhrase, $errorStr, $errorFile, $errorLine); + $this->setExpectedException('Exception', $exceptedExceptionMessage); + + $this->object->handler($errorNo, $errorStr, $errorFile, $errorLine); + } + + public function handlerProviderException() + { + return [ + [E_ERROR, 'Error'], + [E_WARNING, 'Warning'], + [E_PARSE, 'Parse Error'], + [E_NOTICE, 'Notice'], + [E_CORE_ERROR, 'Core Error'], + [E_CORE_WARNING, 'Core Warning'], + [E_COMPILE_ERROR, 'Compile Error'], + [E_COMPILE_WARNING, 'Compile Warning'], + [E_USER_ERROR, 'User Error'], + [E_USER_WARNING, 'User Warning'], + [E_USER_NOTICE, 'User Notice'], + [E_STRICT, 'Strict Notice'], + [E_RECOVERABLE_ERROR, 'Recoverable Error'], + [E_DEPRECATED, 'Deprecated Functionality'], + [E_USER_DEPRECATED, 'User Deprecated Functionality'], + ['42', 'Unknown error (42)'] + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/EscaperTest.php b/dev/tests/unit/testsuite/Magento/Framework/EscaperTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/EscaperTest.php rename to dev/tests/unit/testsuite/Magento/Framework/EscaperTest.php index 4e8fff50616e1..e5ceeb33edb50 100644 --- a/dev/tests/unit/testsuite/Magento/EscaperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/EscaperTest.php @@ -21,15 +21,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento; +namespace Magento\Framework; /** - * \Magento\Escaper test case + * \Magento\Framework\Escaper test case */ class EscaperTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Escaper + * @var \Magento\Framework\Escaper */ protected $_escaper = null; @@ -39,7 +39,7 @@ protected function setUp() } /** - * @covers \Magento\Escaper::escapeHtml + * @covers \Magento\Framework\Escaper::escapeHtml * @dataProvider escapeHtmlDataProvider */ public function testEscapeHtml($data, $expected) @@ -67,7 +67,7 @@ public function escapeHtmlDataProvider() } /** - * @covers \Magento\Escaper::escapeUrl + * @covers \Magento\Framework\Escaper::escapeUrl */ public function testEscapeUrl() { @@ -78,7 +78,7 @@ public function testEscapeUrl() } /** - * @covers \Magento\Escaper::escapeJsQuote + * @covers \Magento\Framework\Escaper::escapeJsQuote */ public function testEscapeJsQuote() { @@ -89,7 +89,7 @@ public function testEscapeJsQuote() } /** - * @covers \Magento\Escaper::escapeQuote + * @covers \Magento\Framework\Escaper::escapeQuote */ public function testEscapeQuote() { diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/ConverterTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Event/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/ConverterTest.php index 16a7ca0ab14dc..803c08b4286b2 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/ConverterTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Event\Config; +namespace Magento\Framework\Event\Config; class ConverterTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Event\Config\Converter + * @var \Magento\Framework\Event\Config\Converter */ protected $_model; @@ -44,7 +44,7 @@ protected function setUp() { $this->_filePath = __DIR__ . '/_files/'; $this->_source = new \DOMDocument(); - $this->_model = new \Magento\Event\Config\Converter(); + $this->_model = new \Magento\Framework\Event\Config\Converter(); } public function testConvert() diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/DataTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/DataTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Event/Config/DataTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/DataTest.php index 9ffbd48f40e7c..78443ac9623d7 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Config/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/DataTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Event\Config; +namespace Magento\Framework\Event\Config; class DataTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Event\Config\Data + * @var \Magento\Framework\Event\Config\Data */ protected $_model; @@ -52,11 +52,11 @@ class DataTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_readerMock = $this->getMock('Magento\Event\Config\Reader', array(), array(), '', false); - $this->_configScopeMock = $this->getMock('Magento\Config\ScopeInterface'); - $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface'); + $this->_readerMock = $this->getMock('Magento\Framework\Event\Config\Reader', array(), array(), '', false); + $this->_configScopeMock = $this->getMock('Magento\Framework\Config\ScopeInterface'); + $this->_cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); $this->_appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->_model = new \Magento\Event\Config\Data( + $this->_model = new \Magento\Framework\Event\Config\Data( $this->_readerMock, $this->_configScopeMock, $this->_cacheMock, diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/SchemaLocatorTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Event/Config/SchemaLocatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/SchemaLocatorTest.php index 02db3b2f71568..0eebc952ccffd 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/SchemaLocatorTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Event\Config; +namespace Magento\Framework\Event\Config; class SchemaLocatorTest extends \PHPUnit_Framework_TestCase { @@ -31,18 +31,18 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected $_moduleReaderMock; /** - * @var \Magento\Event\Config\SchemaLocator + * @var \Magento\Framework\Event\Config\SchemaLocator */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Event\Config\SchemaLocator(); + $this->_model = new \Magento\Framework\Event\Config\SchemaLocator(); } public function testGetSchema() { - $expected = str_replace('\\', '/', BP . '/lib/Magento/Event/etc/events.xsd'); + $expected = str_replace('\\', '/', BP . '/lib/Magento/Framework/Event/etc/events.xsd'); $actual = str_replace('\\', '/', $this->_model->getSchema()); $this->assertEquals($expected, $actual); } @@ -50,7 +50,7 @@ public function testGetSchema() public function testGetPerFileSchema() { $actual = str_replace('\\', '/', $this->_model->getPerFileSchema()); - $expected = str_replace('\\', '/', BP . '/lib/Magento/Event/etc/events.xsd'); + $expected = str_replace('\\', '/', BP . '/lib/Magento/Framework/Event/etc/events.xsd'); $this->assertEquals($expected, $actual); } } diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/XsdTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Event/Config/XsdTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/XsdTest.php index ffa85f11d8e80..4550264b9593a 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/XsdTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Event\Config; +namespace Magento\Framework\Event\Config; class XsdTest extends \PHPUnit_Framework_TestCase { @@ -38,7 +38,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_xsdSchema = BP . '/lib/Magento/Event/etc/events.xsd'; + $this->_xsdSchema = BP . '/lib/Magento/Framework/Event/etc/events.xsd'; $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/_files/event_config.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Event/Config/_files/event_config.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.php diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/_files/event_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.xml similarity index 93% rename from dev/tests/unit/testsuite/Magento/Event/Config/_files/event_config.xml rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.xml index 88d7bc409bd20..54462574c4da8 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Config/_files/event_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/_files/event_invalid_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_invalid_config.xml similarity index 91% rename from dev/tests/unit/testsuite/Magento/Event/Config/_files/event_invalid_config.xml rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_invalid_config.xml index 7ce23d90601bd..2409e1fc93478 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Config/_files/event_invalid_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/event_invalid_config.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/Magento/Framework/Event/etc/events.xsd"> diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/_files/invalidEventsXmlArray.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/invalidEventsXmlArray.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Event/Config/_files/invalidEventsXmlArray.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/invalidEventsXmlArray.php diff --git a/dev/tests/unit/testsuite/Magento/Event/Config/_files/valid_events.xml b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/valid_events.xml similarity index 93% rename from dev/tests/unit/testsuite/Magento/Event/Config/_files/valid_events.xml rename to dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/valid_events.xml index 791d9f02a4f46..a5a5b64139bac 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Config/_files/valid_events.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Config/_files/valid_events.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Event/Invoker/InvokerDefaultTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Invoker/InvokerDefaultTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Event/Invoker/InvokerDefaultTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/Invoker/InvokerDefaultTest.php index 811b5b3aa89af..c97965c50dd0a 100644 --- a/dev/tests/unit/testsuite/Magento/Event/Invoker/InvokerDefaultTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Invoker/InvokerDefaultTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Event\Invoker; +namespace Magento\Framework\Event\Invoker; class InvokerDefaultTest extends \PHPUnit_Framework_TestCase { @@ -31,7 +31,7 @@ class InvokerDefaultTest extends \PHPUnit_Framework_TestCase protected $_observerFactoryMock; /** - * @var \Magento\Event\Observer|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\Observer|PHPUnit_Framework_MockObject_MockObject */ protected $_observerMock; @@ -46,14 +46,20 @@ class InvokerDefaultTest extends \PHPUnit_Framework_TestCase protected $_appStateMock; /** - * @var \Magento\Event\Invoker\InvokerDefault + * @var \Magento\Framework\Event\Invoker\InvokerDefault */ protected $_invokerDefault; protected function setUp() { - $this->_observerFactoryMock = $this->getMock('Magento\Event\ObserverFactory', array(), array(), '', false); - $this->_observerMock = $this->getMock('Magento\Event\Observer', array(), array(), '', false); + $this->_observerFactoryMock = $this->getMock( + 'Magento\Framework\Event\ObserverFactory', + array(), + array(), + '', + false + ); + $this->_observerMock = $this->getMock('Magento\Framework\Event\Observer', array(), array(), '', false); $this->_listenerMock = $this->getMock( 'Magento_Some_Model_Observer_Some', array('method_name'), @@ -63,7 +69,7 @@ protected function setUp() ); $this->_appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->_invokerDefault = new \Magento\Event\Invoker\InvokerDefault( + $this->_invokerDefault = new \Magento\Framework\Event\Invoker\InvokerDefault( $this->_observerFactoryMock, $this->_appStateMock ); diff --git a/dev/tests/unit/testsuite/Magento/Event/ManagerStub.php b/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerStub.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Event/ManagerStub.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/ManagerStub.php index ee46156751cb4..c0ce40df794ee 100644 --- a/dev/tests/unit/testsuite/Magento/Event/ManagerStub.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerStub.php @@ -25,9 +25,9 @@ /** * Event manager stub */ -namespace Magento\Event; +namespace Magento\Framework\Event; -class ManagerStub implements \Magento\Event\ManagerInterface +class ManagerStub implements \Magento\Framework\Event\ManagerInterface { /** * Stub dispatch event diff --git a/dev/tests/unit/testsuite/Magento/Event/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Event/ManagerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Event/ManagerTest.php index ae7c0364d313c..4802fb90ce855 100644 --- a/dev/tests/unit/testsuite/Magento/Event/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/ManagerTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Event; +namespace Magento\Framework\Event; class ManagerTest extends \PHPUnit_Framework_TestCase { @@ -56,16 +56,16 @@ class ManagerTest extends \PHPUnit_Framework_TestCase protected $_eventConfigMock; /** - * @var \Magento\Event\Manager + * @var \Magento\Framework\Event\Manager */ protected $_eventManager; protected function setUp() { - $this->_invoker = $this->getMock('Magento\Event\InvokerInterface'); - $this->_eventConfigMock = $this->getMock('Magento\Event\ConfigInterface'); + $this->_invoker = $this->getMock('Magento\Framework\Event\InvokerInterface'); + $this->_eventConfigMock = $this->getMock('Magento\Framework\Event\ConfigInterface'); - $this->_eventManager = new \Magento\Event\Manager($this->_invoker, $this->_eventConfigMock); + $this->_eventManager = new \Magento\Framework\Event\Manager($this->_invoker, $this->_eventConfigMock); } public function testDispatch() diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CollectionTest.php new file mode 100644 index 0000000000000..3f126d3a0b53f --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CollectionTest.php @@ -0,0 +1,141 @@ +observerCollection = new Collection(); + } + + protected function tearDown() + { + $this->observerCollection = null; + } + + /** + * Create universal observer mock. + * If event parameter is passed - observer mock expects dispatch method to be called with passed event. + * + * @param string $name + * @param \Magento\Framework\Event | null $event + * @return \Magento\Framework\Event\Observer |\PHPUnit_Framework_MockObject_MockObject + */ + protected function getObserverMock($name, $event = null) + { + $observer = $this->getMock('Magento\Framework\Event\Observer', [], [], '', false); + $observer->expects($this->any()) + ->method('getName') + ->will($this->returnValue($name)); + if ($event) { + $observer->expects($this->once()) + ->method('dispatch') + ->with($event); + } + return $observer; + } + + public function testAddObserver() + { + $observer = $this->getObserverMock('test_observer'); + $this->observerCollection->addObserver($observer); + $this->assertEquals($observer, $this->observerCollection->getObserverByName($observer->getName())); + } + + public function testGetAllObservers() + { + $observer1 = $this->getObserverMock('test_observer1'); + $observer2 = $this->getObserverMock('test_observer2'); + + $this->observerCollection->addObserver($observer1); + $this->observerCollection->addObserver($observer2); + + $this->assertEquals( + ['test_observer1' => $observer1, 'test_observer2' => $observer2], + $this->observerCollection->getAllObservers() + ); + } + + /** + * @dataProvider observerNameProvider + * @param string $name + */ + public function testGetObserverByName($name) + { + $observer = $this->getObserverMock($name); + $this->observerCollection->addObserver($observer); + $this->assertEquals($observer, $this->observerCollection->getObserverByName($name)); + } + + public function observerNameProvider() + { + return [ + ['simple_name'], + ['1234567890'], + ['~!@#$%^&*()_=-}{}'], + ['DjnJ2139540___ asdf'] + ]; + } + + public function testRemoveObserverByName() + { + $observer1 = $this->getObserverMock('test_observer1'); + $observer2 = $this->getObserverMock('test_observer2'); + + $this->observerCollection->addObserver($observer1); + $this->observerCollection->addObserver($observer2); + + $this->assertEquals( + ['test_observer1' => $observer1, 'test_observer2' => $observer2], + $this->observerCollection->getAllObservers() + ); + + $this->observerCollection->removeObserverByName($observer2->getName()); + + $this->assertEquals(['test_observer1' => $observer1], $this->observerCollection->getAllObservers()); + } + + public function testDispatch() + { + $eventMock = $this->getMock('Magento\Framework\Event', [], [], '', false); + + $observer1 = $this->getObserverMock('test_observer1', $eventMock); + $observer2 = $this->getObserverMock('test_observer2', $eventMock); + + $this->observerCollection->addObserver($observer1); + $this->observerCollection->addObserver($observer2); + + $this->observerCollection->dispatch($eventMock); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CronTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CronTest.php new file mode 100644 index 0000000000000..739d5e12ae178 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/CronTest.php @@ -0,0 +1,136 @@ +cron = new Cron(); + } + + protected function tearDown() + { + $this->cron = null; + } + + /** + * @dataProvider numericValueProvider + * @param string|int $value + * @param int|bool $expectedResult + */ + public function testGetNumeric($value, $expectedResult) + { + $this->assertEquals($expectedResult, $this->cron->getNumeric($value)); + } + + public function numericValueProvider() + { + return [ + ['jan', 1], + ['feb', 2], + ['mar', 3], + ['apr', 4], + ['may', 5], + ['jun', 6], + ['jul', 7], + ['aug', 8], + ['sep', 9], + ['oct', 10], + ['nov', 11], + ['dec', 12], + ['sun', 0], + ['mon', 1], + ['tue', 2], + ['wed', 3], + ['thu', 4], + ['fri', 5], + ['sat', 6], + ['negative', false], + ['SATupper-case & suffix', 6], + [154, 154], + [3.14, 3.14], + ['12', '12'] + ]; + } + + /** + * @dataProvider matchCronExpressionProvider + * @param string $expression + * @param int $number + * @param bool $expectedResult + */ + public function testMatchCronExpression($expression, $number, $expectedResult) + { + $this->assertEquals($expectedResult, $this->cron->matchCronExpression($expression, $number)); + } + + public function matchCronExpressionProvider() + { + return [ + ['mon-fri', 2, true], + ['mon-fri', 0, false], + ['january-june', 3, true], + ['january-june', 11, false], + [1, 1, true], + ['*', 1214, true], + [13, 11, false], + ]; + } + + /** + * @dataProvider isValidForProvider + * @param int $time + * @param string $expression + * @param bool $expectedResult + */ + public function testIsValidFor($time, $expression, $expectedResult) + { + $eventMock = $this->getMock('Magento\Framework\Event', [], [], '', false); + + $this->cron->setCronExpr($expression); + $this->cron->setNow($time); + + $this->assertEquals($expectedResult, $this->cron->isValidFor($eventMock)); + } + + public function isValidForProvider() + { + return [ + [mktime(0, 0, 12, 7, 1, 2000), '* * * * *', true], + [mktime(0, 0, 12, 7, 1, 2000), '* * * * * *', false], + [mktime(12, 0, 0, 7, 1, 2000), '0 12 * * *', true], + [mktime(11, 0, 0, 7, 1, 2000), '0 12 * * *', false] + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/RegexTest.php b/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/RegexTest.php new file mode 100644 index 0000000000000..d5c49eee848cd --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Event/Observer/RegexTest.php @@ -0,0 +1,71 @@ +regex = new Regex(); + } + + protected function tearDown() + { + $this->regex = null; + } + + /** + * @dataProvider isValidForProvider + * @param string $pattern + * @param string $name + * @param bool $expectedResult + */ + public function testIsValidFor($pattern, $name, $expectedResult) + { + $this->regex->setEventRegex($pattern); + $eventMock = $this->getMock('Magento\Framework\Event', [], [], '', false); + $eventMock->expects($this->any()) + ->method('getName') + ->will($this->returnValue($name)); + + $this->assertEquals($expectedResult, $this->regex->isValidFor($eventMock)); + } + + public function isValidForProvider() + { + return [ + ['~_name$~', 'event_name', true], + ['~_names$~', 'event_name', false] + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Event/EventFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/EventFactoryTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Event/EventFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/EventFactoryTest.php index 9667aca192a99..6d1b75deaca85 100644 --- a/dev/tests/unit/testsuite/Magento/Event/EventFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/EventFactoryTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Event; +namespace Magento\Framework; class EventFactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\EventFactory + * @var \Magento\Framework\EventFactory */ protected $_model; @@ -36,15 +36,15 @@ class EventFactoryTest extends \PHPUnit_Framework_TestCase protected $_objectManagerMock; /** - * @var \Magento\Event + * @var \Magento\Framework\Event */ protected $_expectedObject; protected function setUp() { - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); - $this->_model = new \Magento\EventFactory($this->_objectManagerMock); - $this->_expectedObject = $this->getMockBuilder('Magento\Event')->getMock(); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); + $this->_model = new \Magento\Framework\EventFactory($this->_objectManagerMock); + $this->_expectedObject = $this->getMockBuilder('Magento\Framework\Event')->getMock(); } public function testCreate() @@ -55,7 +55,7 @@ public function testCreate() )->method( 'create' )->with( - 'Magento\Event', + 'Magento\Framework\Event', $arguments )->will( $this->returnValue($this->_expectedObject) diff --git a/dev/tests/unit/testsuite/Magento/Exception/AuthorizationExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/AuthorizationExceptionTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Exception/AuthorizationExceptionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Exception/AuthorizationExceptionTest.php index b01a4cd66231d..a3d79c7c6a093 100644 --- a/dev/tests/unit/testsuite/Magento/Exception/AuthorizationExceptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/AuthorizationExceptionTest.php @@ -21,18 +21,16 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Exception; +namespace Magento\Framework\Exception; class AuthorizationExceptionTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $authorizationException = new AuthorizationException( - 'No access to delete this record.', - AuthorizationException::NO_RECORD_ACCESS + AuthorizationException::NOT_AUTHORIZED, + ['consumer_id' => 1, 'resources' => 'record2'] ); - - $this->assertSame(AuthorizationException::NO_RECORD_ACCESS, $authorizationException->getCode()); - $this->assertStringStartsWith('No access', $authorizationException->getMessage()); + $this->assertSame('Consumer ID 1 is not authorized to access record2', $authorizationException->getMessage()); } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/ErrorMessageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/ErrorMessageTest.php new file mode 100644 index 0000000000000..e8a7c438dc111 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/ErrorMessageTest.php @@ -0,0 +1,112 @@ +defaultRenderer = \Magento\Framework\Phrase::getRenderer(); + $rendererMock = $this->getMock('Magento\Framework\Phrase\Renderer\Placeholder', [], [], '', false); + $this->renderedMessage = 'rendered message'; + $rendererMock + ->expects($this->once())->method('render')->will($this->returnValue($this->renderedMessage)); + \Magento\Framework\Phrase::setRenderer($rendererMock); + } + + /** + * Restoration after each test runs. Reset the Phrase renderer back to the default one. + * + * @return void + */ + public function tearDown() + { + \Magento\Framework\Phrase::setRenderer($this->defaultRenderer); + } + + /** + * Verify that the constructor works properly and check all associated error message types. + * + * @param string $message The error message + * @param array $params The array of substitution parameters + * @param string $expectedLogMessage The expected output of ErrorMessage::getLogMessage() + * + * @return void + * @dataProvider errorMessageConstructorDataProvider + */ + public function testConstructor($message, $params, $expectedLogMessage) + { + $errorMessage = new ErrorMessage($message, $params); + + $this->assertEquals($this->renderedMessage, $errorMessage->getMessage()); + $this->assertEquals($message, $errorMessage->getRawMessage()); + $this->assertEquals($expectedLogMessage, $errorMessage->getLogMessage()); + $this->assertEquals($params, $errorMessage->getParameters()); + } + + /** + * Data provider for the constructor test. + * + * @return array + */ + public function errorMessageConstructorDataProvider() + { + return [ + 'withPositionalParameters' => [ + 'message %1 %2', + ['parameter1', 'parameter2'], + 'message parameter1 parameter2' + ], + 'withNamedParameters' => [ + 'message %key1 %key2', + ['key1' => 'parameter1', 'key2' => 'parameter2'], + 'message parameter1 parameter2' + ], + 'withNoParameters' => [ + 'message', + [], + 'message' + ] + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/InputExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/InputExceptionTest.php new file mode 100644 index 0000000000000..216767d4965d4 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/InputExceptionTest.php @@ -0,0 +1,183 @@ + 'quantity', 'value' => -100, 'minValue' => 0]; + $inputException = new InputException(InputException::INVALID_FIELD_MIN_VALUE, $params); + + $this->assertEquals(InputException::INVALID_FIELD_MIN_VALUE, $inputException->getRawMessage()); + $this->assertStringMatchesFormat('%s greater than or equal to %s', $inputException->getMessage()); + $this->assertEquals( + 'The quantity value of "-100" must be greater than or equal to 0.', + $inputException->getLogMessage() + ); + } + + /** + * Verify that adding multiple errors works correctly. + * + * @return void + */ + public function testAddError() + { + $inputException = new InputException(); + + $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getRawMessage()); + $this->assertEquals( + self::TRANSLATED_PREFIX . InputException::DEFAULT_MESSAGE, + $inputException->getMessage() + ); + $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getLogMessage()); + + $this->assertFalse($inputException->wasErrorAdded()); + $this->assertCount(0, $inputException->getErrors()); + + $inputException->addError( + InputException::INVALID_FIELD_MIN_VALUE, + ['fieldName' => 'weight', 'value' => -100, 'minValue' => 1] + ); + $this->assertTrue($inputException->wasErrorAdded()); + $this->assertCount(0, $inputException->getErrors()); + + $this->assertEquals(InputException::INVALID_FIELD_MIN_VALUE, $inputException->getRawMessage()); + $this->assertEquals( + self::TRANSLATED_PREFIX . + 'The weight value of "-100" must be greater than or equal to 1.', + $inputException->getMessage() + ); + $this->assertEquals( + 'The weight value of "-100" must be greater than or equal to 1.', + $inputException->getLogMessage() + ); + + $inputException->addError(InputException::REQUIRED_FIELD, ['fieldName' => 'name']); + $this->assertTrue($inputException->wasErrorAdded()); + $this->assertCount(2, $inputException->getErrors()); + + $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getRawMessage()); + $this->assertEquals( + self::TRANSLATED_PREFIX . InputException::DEFAULT_MESSAGE, + $inputException->getMessage() + ); + $this->assertEquals(InputException::DEFAULT_MESSAGE, $inputException->getLogMessage()); + + $errors = $inputException->getErrors(); + $this->assertCount(2, $errors); + + $this->assertEquals(InputException::INVALID_FIELD_MIN_VALUE, $errors[0]->getRawMessage()); + $this->assertEquals( + self::TRANSLATED_PREFIX . + 'The weight value of "-100" must be greater than or equal to 1.', + $errors[0]->getMessage() + ); + $this->assertEquals( + 'The weight value of "-100" must be greater than or equal to 1.', + $errors[0]->getLogMessage() + ); + + $this->assertEquals(InputException::REQUIRED_FIELD, $errors[1]->getRawMessage()); + $this->assertEquals(self::TRANSLATED_PREFIX . 'name is a required field.', $errors[1]->getMessage()); + $this->assertEquals('name is a required field.', $errors[1]->getLogMessage()); + } + + /** + * Verify the message and params are not used to determine the call count + * + * @return void + */ + public function testAddErrorWithSameMessage() + { + $rawMessage = 'Foo "%var"'; + $params = ['var' => 'Bar']; + $expectedProcessedMessage = 'Foo "Bar"'; + $inputException = new InputException($rawMessage, $params); + $this->assertEquals($rawMessage, $inputException->getRawMessage()); + $this->assertEquals(self::TRANSLATED_PREFIX . $expectedProcessedMessage, $inputException->getMessage()); + $this->assertEquals($expectedProcessedMessage, $inputException->getLogMessage()); + $this->assertFalse($inputException->wasErrorAdded()); + $this->assertCount(0, $inputException->getErrors()); + + $inputException->addError($rawMessage, $params); + $this->assertEquals(self::TRANSLATED_PREFIX . $expectedProcessedMessage, $inputException->getMessage()); + $this->assertEquals($expectedProcessedMessage, $inputException->getLogMessage()); + $this->assertTrue($inputException->wasErrorAdded()); + $this->assertCount(0, $inputException->getErrors()); + + $inputException->addError($rawMessage, $params); + $this->assertEquals(self::TRANSLATED_PREFIX . $expectedProcessedMessage, $inputException->getMessage()); + $this->assertEquals($expectedProcessedMessage, $inputException->getLogMessage()); + $this->assertTrue($inputException->wasErrorAdded()); + + $errors = $inputException->getErrors(); + $this->assertCount(2, $errors); + $this->assertEquals(self::TRANSLATED_PREFIX . $expectedProcessedMessage, $errors[0]->getMessage()); + $this->assertEquals($expectedProcessedMessage, $errors[0]->getLogMessage()); + $this->assertEquals(self::TRANSLATED_PREFIX . $expectedProcessedMessage, $errors[1]->getMessage()); + $this->assertEquals($expectedProcessedMessage, $errors[1]->getLogMessage()); + } + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php new file mode 100644 index 0000000000000..30368d7cee800 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Exception/LocalizedExceptionTest.php @@ -0,0 +1,94 @@ +defaultRenderer = \Magento\Framework\Phrase::getRenderer(); + $rendererMock = $this->getMockBuilder('Magento\Framework\Phrase\Renderer\Placeholder') + ->disableOriginalConstructor() + ->getMock(); + $this->renderedMessage = 'rendered message'; + $rendererMock->expects($this->once()) + ->method('render') + ->will($this->returnValue($this->renderedMessage)); + \Magento\Framework\Phrase::setRenderer($rendererMock); + } + + public function tearDown() + { + \Magento\Framework\Phrase::setRenderer($this->defaultRenderer); + } + + /** @dataProvider constructorParametersDataProvider */ + public function testConstructor($message, $params, $expectedLogMessage) + { + $cause = new \Exception(); + $localizeException = new LocalizedException( + $message, + $params, + $cause + ); + + $this->assertEquals(0, $localizeException->getCode()); + + $this->assertEquals($message, $localizeException->getRawMessage()); + $this->assertEquals($this->renderedMessage, $localizeException->getMessage()); + $this->assertEquals($expectedLogMessage, $localizeException->getLogMessage()); + + $this->assertSame($cause, $localizeException->getPrevious()); + } + + public function constructorParametersDataProvider() + { + return [ + 'withNoNameParameters' => [ + 'message %1 %2', + ['parameter1', + 'parameter2'], + 'message parameter1 parameter2', + ], + 'withNamedParameters' => [ + 'message %key1 %key2', + ['key1' => 'parameter1', + 'key2' => 'parameter2'], + 'message parameter1 parameter2', + ], + 'withoutParameters' => [ + 'message', + [], + 'message', + 'message', + ], + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/Directory/ReadTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Filesystem/Directory/ReadTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php index 589505ca01e44..3b6cd9e33bcde 100644 --- a/dev/tests/unit/testsuite/Magento/Filesystem/Directory/ReadTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php @@ -1,6 +1,6 @@ driver = $this->getMock('Magento\Filesystem\Driver\File', array(), array(), '', false); - $this->fileFactory = $this->getMock('Magento\Filesystem\File\ReadFactory', array(), array(), '', false); - $this->read = new \Magento\Filesystem\Directory\Read( + $this->driver = $this->getMock('Magento\Framework\Filesystem\Driver\File', array(), array(), '', false); + $this->fileFactory = $this->getMock( + 'Magento\Framework\Filesystem\File\ReadFactory', + array(), + array(), + '', + false + ); + $this->read = new \Magento\Framework\Filesystem\Directory\Read( array('path' => $this->path), $this->fileFactory, $this->driver @@ -116,7 +122,7 @@ public function testReadFileCustomProtocol() $protocol = 'ftp'; $contents = 'contents'; - $fileMock = $this->getMock('Magento\Filesystem\File\Read', [], [], '', false); + $fileMock = $this->getMock('Magento\Framework\Filesystem\File\Read', [], [], '', false); $fileMock->expects($this->once()) ->method('readAll') ->with($flag, $context) diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/Directory/WriteTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php similarity index 75% rename from dev/tests/unit/testsuite/Magento/Filesystem/Directory/WriteTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php index c024fd56adcb4..b1c4bb7ff7b01 100644 --- a/dev/tests/unit/testsuite/Magento/Filesystem/Directory/WriteTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php @@ -1,6 +1,6 @@ driver = $this->getMock('Magento\Filesystem\Driver\File', array(), array(), '', false); - $this->fileFactory = $this->getMock('Magento\Filesystem\File\WriteFactory', array(), array(), '', false); - $this->write = new \Magento\Filesystem\Directory\Write( + $this->driver = $this->getMock('Magento\Framework\Filesystem\Driver\File', array(), array(), '', false); + $this->fileFactory = $this->getMock( + 'Magento\Framework\Filesystem\File\WriteFactory', + array(), + array(), + '', + false + ); + $this->write = new \Magento\Framework\Filesystem\Directory\Write( array(), $this->fileFactory, $this->driver, @@ -74,9 +80,9 @@ protected function tearDown() public function testGetDriver() { $this->assertInstanceOf( - 'Magento\Filesystem\DriverInterface', + 'Magento\Framework\Filesystem\DriverInterface', $this->write->getDriver(), - 'getDriver method expected to return instance of Magento\Filesystem\DriverInterface' + 'getDriver method expected to return instance of Magento\Framework\Filesystem\DriverInterface' ); } diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryListTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Filesystem/DirectoryListTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php index 45ec6bb9a9fe2..61db15b422305 100644 --- a/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php @@ -21,9 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filesystem; +namespace Magento\Framework\Filesystem; -use Magento\Filesystem; +use Magento\Framework\Filesystem; use Magento\Framework\App\Filesystem as AppFilesystem; class DirectoryListTest extends \PHPUnit_Framework_TestCase @@ -47,7 +47,7 @@ public function testAddDirectoryGetConfig($root, array $directories, array $conf } /** - * @expectedException \Magento\Filesystem\FilesystemException + * @expectedException \Magento\Framework\Filesystem\FilesystemException */ public function testAddDefinedDirectory() { diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/Driver/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Driver/HttpTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Filesystem/Driver/HttpTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filesystem/Driver/HttpTest.php index b7d3ab62a5c5a..8317fe8e7371e 100644 --- a/dev/tests/unit/testsuite/Magento/Filesystem/Driver/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Driver/HttpTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filesystem\Driver; +namespace Magento\Framework\Filesystem\Driver; class HttpTest extends \PHPUnit_Framework_TestCase { @@ -136,7 +136,7 @@ public function testFilePutContents() } /** - * @expectedException \Magento\Filesystem\FilesystemException + * @expectedException \Magento\Framework\Filesystem\FilesystemException */ public function testFilePutContentsFail() { @@ -145,7 +145,7 @@ public function testFilePutContentsFail() } /** - * @expectedException \Magento\Filesystem\FilesystemException + * @expectedException \Magento\Framework\Filesystem\FilesystemException * @expectedExceptionMessage Please correct the download URL. */ public function testFileOpenInvalidUrl() diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php new file mode 100644 index 0000000000000..2a83a264fb167 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php @@ -0,0 +1,74 @@ +directoryList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false); + $this->driverFactory = new DriverFactory($this->directoryList); + } + + public function testGetByProtocolConfig() + { + $protocolCode = 'protocol'; + $expectedDriverClass = '\Magento\Framework\Filesystem\Driver\Zlib'; + $protocolConfig = ['driver' => $expectedDriverClass]; + + $this->directoryList->expects($this->once()) + ->method('getProtocolConfig') + ->with($protocolCode) + ->will($this->returnValue($protocolConfig)); + + $this->assertInstanceOf($expectedDriverClass, $this->driverFactory->get($protocolCode)); + } + + public function testGetSpecifiedDriver() + { + $driverClass = '\Magento\Framework\Filesystem\Driver\Http'; + $this->assertInstanceOf($driverClass, $this->driverFactory->get(null, $driverClass)); + } + + public function testGetDefault() + { + $this->assertInstanceOf('\Magento\Framework\Filesystem\Driver\File', $this->driverFactory->get()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php new file mode 100644 index 0000000000000..7fb82a956fb61 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php @@ -0,0 +1,83 @@ +driverFactory = $this->getMock('Magento\Framework\Filesystem\DriverFactory', [], [], '', false); + $this->factory = new ReadFactory($this->driverFactory); + } + + /** + * @dataProvider createProvider + * @param string|null $protocol + */ + public function testCreate($protocol) + { + $path = 'path'; + $directoryDriver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $directoryDriver->expects($this->once()) + ->method('isExists') + ->will($this->returnValue(true)); + + if ($protocol) { + $this->driverFactory->expects($this->once()) + ->method('get') + ->with($protocol, get_class($directoryDriver)) + ->will($this->returnValue($directoryDriver)); + } else { + $this->driverFactory->expects($this->never()) + ->method('get'); + } + + $this->assertInstanceOf( + 'Magento\Framework\Filesystem\File\Read', + $this->factory->create($path, $protocol, $directoryDriver) + ); + } + + public function createProvider() + { + return [ + [null], + ['custom_protocol'] + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadTest.php new file mode 100644 index 0000000000000..8d1d9d188f1be --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadTest.php @@ -0,0 +1,192 @@ +driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $this->resource = $this->getMock('resource'); + $this->driver->expects($this->any()) + ->method('isExists') + ->with($this->path) + ->will($this->returnValue(true)); + $this->driver->expects($this->once()) + ->method('fileOpen') + ->with($this->path, $this->mode) + ->will($this->returnValue($this->resource)); + $this->file = new Read($this->path, $this->driver); + } + + public function tearDown() + { + $this->file = null; + $this->driver = null; + } + + /** + * @expectedException \Magento\Framework\Filesystem\FilesystemException + */ + public function testInstanceFileNotExists() + { + $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $driver->expects($this->once()) + ->method('isExists') + ->with($this->path) + ->will($this->returnValue(false)); + $file = new Read($this->path, $driver); + $this->assertInstanceOf('Magento\Framework\Filesystem\File\Read', $file); + } + + public function testRead() + { + $length = 5; + $result = 'content'; + $this->driver->expects($this->once()) + ->method('fileRead') + ->with($this->resource, $length) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->read($length)); + } + + public function testReadAll() + { + $flag = 5; + $context = null; + $result = 'content'; + $this->driver->expects($this->once()) + ->method('fileGetContents') + ->with($this->path, $flag, $context) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->readAll($flag, $context)); + } + + public function testReadLine() + { + $length = 5; + $ending = '\n'; + $result = 'content'; + $this->driver->expects($this->once()) + ->method('fileReadLine') + ->with($this->resource, $length, $ending) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->readLine($length, $ending)); + } + + public function testReadCsv() + { + $length = 0; + $delimiter = ','; + $enclosure = '"'; + $escape = '\\'; + $result = 'content'; + $this->driver->expects($this->once()) + ->method('fileGetCsv') + ->with($this->resource, $length, $delimiter, $enclosure, $escape) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->readCsv($length, $delimiter, $enclosure, $escape)); + } + + public function testTell() + { + $result = 'content'; + $this->driver->expects($this->once()) + ->method('fileTell') + ->with($this->resource) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->tell()); + } + + public function testEof() + { + $result = 'content'; + $this->driver->expects($this->once()) + ->method('endOfFile') + ->with($this->resource) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->eof()); + } + + public function testClose() + { + $result = 'content'; + $this->driver->expects($this->once()) + ->method('fileClose') + ->with($this->resource) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->close()); + } + + public function testStat() + { + $result = 'content'; + $this->driver->expects($this->once()) + ->method('stat') + ->with($this->path) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->stat()); + } + + public function testSeek() + { + $offset = 5; + $whence = SEEK_SET; + $result = 'content'; + $this->driver->expects($this->once()) + ->method('fileSeek') + ->with($this->resource, $offset, $whence) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->seek($offset, $whence)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php new file mode 100644 index 0000000000000..5f13fec3df9f5 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php @@ -0,0 +1,81 @@ +driverFactory = $this->getMock('Magento\Framework\Filesystem\DriverFactory', [], [], '', false); + $this->factory = new WriteFactory($this->driverFactory); + } + + /** + * @dataProvider createProvider + * @param string|null $protocol + */ + public function testCreate($protocol) + { + $path = 'path'; + $directoryDriver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $mode = 'a+'; + + if ($protocol) { + $this->driverFactory->expects($this->once()) + ->method('get') + ->with($protocol, get_class($directoryDriver)) + ->will($this->returnValue($directoryDriver)); + } else { + $this->driverFactory->expects($this->never()) + ->method('get'); + } + + $this->assertInstanceOf( + 'Magento\Framework\Filesystem\File\Write', + $this->factory->create($path, $protocol, $directoryDriver, $mode) + ); + } + + public function createProvider() + { + return [ + [null], + ['custom_protocol'] + ]; + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteTest.php new file mode 100644 index 0000000000000..195e5bca99560 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteTest.php @@ -0,0 +1,200 @@ +driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $this->resource = $this->getMock('resource'); + $this->driver->expects($this->any()) + ->method('isExists') + ->with($this->path) + ->will($this->returnValue(true)); + $this->driver->expects($this->once()) + ->method('fileOpen') + ->with($this->path, $this->mode) + ->will($this->returnValue($this->resource)); + $this->file = new Write($this->path, $this->driver, $this->mode); + } + + public function tearDown() + { + $this->file = null; + $this->driver = null; + } + + /** + * @expectedException \Magento\Framework\Filesystem\FilesystemException + */ + public function testInstanceFileNotExists() + { + $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $driver->expects($this->once()) + ->method('isExists') + ->with($this->path) + ->will($this->returnValue(false)); + $file = new Write($this->path, $driver, 'r'); + $this->assertInstanceOf('Magento\Framework\Filesystem\File\Read', $file); + } + + /** + * @expectedException \Magento\Framework\Filesystem\FilesystemException + */ + public function testInstanceFileAlreadyExists() + { + $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + $driver->expects($this->once()) + ->method('isExists') + ->with($this->path) + ->will($this->returnValue(true)); + $file = new Write($this->path, $driver, 'x'); + $this->assertInstanceOf('Magento\Framework\Filesystem\File\Read', $file); + } + + public function testWrite() + { + $result = 4; + $data = 'data'; + $this->driver->expects($this->once()) + ->method('fileWrite') + ->with($this->resource, $data) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->write($data)); + } + + public function testWriteCsv() + { + $data = []; + $delimiter = ','; + $enclosure = '"'; + $result = 0; + $this->driver->expects($this->once()) + ->method('filePutCsv') + ->with($this->resource, $data, $delimiter, $enclosure) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->writeCsv($data, $delimiter, $enclosure)); + } + + public function testFlush() + { + $result = true; + $this->driver->expects($this->once()) + ->method('fileFlush') + ->with($this->resource) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->flush()); + } + + /** + * @expectedException \Magento\Framework\Filesystem\FilesystemException + */ + public function testWriteException() + { + $data = 'data'; + $this->driver->expects($this->once()) + ->method('fileWrite') + ->with($this->resource, $data) + ->will($this->throwException(new \Magento\Framework\Filesystem\FilesystemException())); + $this->file->write($data); + } + + /** + * @expectedException \Magento\Framework\Filesystem\FilesystemException + */ + public function testWriteCsvException() + { + $data = []; + $delimiter = ','; + $enclosure = '"'; + $this->driver->expects($this->once()) + ->method('filePutCsv') + ->with($this->resource, $data, $delimiter, $enclosure) + ->will($this->throwException(new \Magento\Framework\Filesystem\FilesystemException())); + $this->file->writeCsv($data, $delimiter, $enclosure); + } + + /** + * @expectedException \Magento\Framework\Filesystem\FilesystemException + */ + public function testFlushException() + { + $this->driver->expects($this->once()) + ->method('fileFlush') + ->with($this->resource) + ->will($this->throwException(new \Magento\Framework\Filesystem\FilesystemException())); + $this->file->flush(); + } + + public function testLock() + { + $lockMode = LOCK_EX; + $result = true; + $this->driver->expects($this->once()) + ->method('fileLock') + ->with($this->resource, $lockMode) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->lock($lockMode)); + } + + public function testUnlock() + { + $result = true; + $this->driver->expects($this->once()) + ->method('fileUnlock') + ->with($this->resource) + ->will($this->returnValue($result)); + $this->assertEquals($result, $this->file->unlock()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php new file mode 100644 index 0000000000000..21e4cf5e1aa5b --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php @@ -0,0 +1,44 @@ +driver = $driver; + } +} \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php new file mode 100644 index 0000000000000..e4f30dd720405 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php @@ -0,0 +1,64 @@ +directoryList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false); + $this->wrapperFactory = new WrapperFactory($this->directoryList); + } + + public function testGetByProtocolConfig() + { + $protocolCode = 'protocol'; + $expectedWrapperClass = '\Magento\Framework\Filesystem\Stub\Wrapper'; + $protocolConfig = ['driver' => $expectedWrapperClass]; + $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'); + + $this->directoryList->expects($this->once()) + ->method('getProtocolConfig') + ->with($protocolCode) + ->will($this->returnValue($protocolConfig)); + + $this->assertInstanceOf($expectedWrapperClass, $this->wrapperFactory->get($protocolCode, $driver)); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/_files/http_mock.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/_files/http_mock.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Filesystem/_files/http_mock.php rename to dev/tests/unit/testsuite/Magento/Framework/Filesystem/_files/http_mock.php index bf83a02225f8a..afb0e5a1588af 100644 --- a/dev/tests/unit/testsuite/Magento/Filesystem/_files/http_mock.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/_files/http_mock.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento/Filesystem + * @package Magento/Framework/Filesystem * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filesystem\Driver; +namespace Magento\Framework\Filesystem\Driver; /** diff --git a/dev/tests/unit/testsuite/Magento/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/FilesystemTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/FilesystemTest.php rename to dev/tests/unit/testsuite/Magento/Framework/FilesystemTest.php index 67f2162fbf7fc..b5e5ca617a856 100644 --- a/dev/tests/unit/testsuite/Magento/FilesystemTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/FilesystemTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento; +namespace Magento\Framework; use Magento\Framework\App\Filesystem as AppFilesystem; @@ -30,22 +30,22 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase /** @var Filesystem */ protected $_filesystem; - /** @var \Magento\Filesystem\Directory\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\Directory\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $_dirReadFactoryMock; - /** @var \Magento\Filesystem\Directory\WriteFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\Directory\WriteFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $_dirWriteFactoryMock; /** @var \Magento\Framework\App\Filesystem\DirectoryList|\PHPUnit_Framework_MockObject_MockObject */ protected $_directoryListMock; - /** @var \Magento\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $_fileReadFactoryMock; public function setUp() { $this->_dirReadFactoryMock = $this->getMock( - 'Magento\Filesystem\Directory\ReadFactory', + 'Magento\Framework\Filesystem\Directory\ReadFactory', array(), array(), '', @@ -59,14 +59,14 @@ public function setUp() false ); $this->_dirWriteFactoryMock = $this->getMock( - 'Magento\Filesystem\Directory\WriteFactory', + 'Magento\Framework\Filesystem\Directory\WriteFactory', array(), array(), '', false ); $this->_fileReadFactoryMock = $this->getMock( - 'Magento\Filesystem\File\ReadFactory', + 'Magento\Framework\Filesystem\File\ReadFactory', array(), array(), '', @@ -84,14 +84,14 @@ public function setUp() public function testGetDirectoryRead() { $this->_setupDirectoryListMock(array()); - /** @var \Magento\Filesystem\Directory\ReadInterface $dirReadMock */ - $dirReadMock = $this->getMock('Magento\Filesystem\Directory\ReadInterface'); + /** @var \Magento\Framework\Filesystem\Directory\ReadInterface $dirReadMock */ + $dirReadMock = $this->getMock('Magento\Framework\Filesystem\Directory\ReadInterface'); $this->_dirReadFactoryMock->expects($this->once())->method('create')->will($this->returnValue($dirReadMock)); $this->assertEquals($dirReadMock, $this->_filesystem->getDirectoryRead(AppFilesystem::ROOT_DIR)); } /** - * @expectedException \Magento\Filesystem\FilesystemException + * @expectedException \Magento\Framework\Filesystem\FilesystemException */ public function testGetDirectoryWriteReadOnly() { @@ -102,15 +102,15 @@ public function testGetDirectoryWriteReadOnly() public function testGetDirectoryWrite() { $this->_setupDirectoryListMock(array()); - /** @var \Magento\Filesystem\Directory\WriteInterface $dirWriteMock */ - $dirWriteMock = $this->getMock('Magento\Filesystem\Directory\WriteInterface'); + /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $dirWriteMock */ + $dirWriteMock = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface'); $this->_dirWriteFactoryMock->expects($this->once())->method('create')->will($this->returnValue($dirWriteMock)); $this->assertEquals($dirWriteMock, $this->_filesystem->getDirectoryWrite(AppFilesystem::ROOT_DIR)); } public function testGetRemoteResource() { - $fileReadMock = $this->getMock('Magento\Filesystem\File\ReadInterface', array(), array(), '', false); + $fileReadMock = $this->getMock('Magento\Framework\Filesystem\File\ReadInterface', array(), array(), '', false); $this->_fileReadFactoryMock->expects( $this->once() diff --git a/dev/tests/unit/testsuite/Magento/Filter/AbstractFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/AbstractFactoryTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Filter/AbstractFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/AbstractFactoryTest.php index a8eee09354049..83e8239789b22 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/AbstractFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/AbstractFactoryTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class AbstractFactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Filter\AbstractFactory + * @var \Magento\Framework\Filter\AbstractFactory */ protected $_factory; @@ -34,25 +34,28 @@ class AbstractFactoryTest extends \PHPUnit_Framework_TestCase * @var array */ protected $_invokableList = array( - 'sprintf' => 'Magento\Filter\Sprintf', - 'template' => 'Magento\Filter\Template', - 'arrayFilter' => 'Magento\Filter\ArrayFilter' + 'sprintf' => 'Magento\Framework\Filter\Sprintf', + 'template' => 'Magento\Framework\Filter\Template', + 'arrayFilter' => 'Magento\Framework\Filter\ArrayFilter' ); /** * @var array */ - protected $_sharedList = array('Magento\Filter\Template' => true, 'Magento\Filter\ArrayFilter' => false); + protected $_sharedList = array( + 'Magento\Framework\Filter\Template' => true, + 'Magento\Framework\Filter\ArrayFilter' => false + ); /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; public function setUp() { $this->_objectManager = $this->getMockForAbstractClass( - '\Magento\ObjectManager', + '\Magento\Framework\ObjectManager', array(), '', true, @@ -62,14 +65,14 @@ public function setUp() ); $this->_factory = $this->getMockForAbstractClass( - 'Magento\Filter\AbstractFactory', + 'Magento\Framework\Filter\AbstractFactory', array('objectManger' => $this->_objectManager) ); - $property = new \ReflectionProperty('Magento\Filter\AbstractFactory', 'invokableClasses'); + $property = new \ReflectionProperty('Magento\Framework\Filter\AbstractFactory', 'invokableClasses'); $property->setAccessible(true); $property->setValue($this->_factory, $this->_invokableList); - $property = new \ReflectionProperty('Magento\Filter\AbstractFactory', 'shared'); + $property = new \ReflectionProperty('Magento\Framework\Filter\AbstractFactory', 'shared'); $property->setAccessible(true); $property->setValue($this->_factory, $this->_sharedList); } @@ -108,9 +111,9 @@ public function testIsShared($alias, $expectedResult) public function isSharedDataProvider() { return array( - 'shared' => array('Magento\Filter\Template', true), - 'not shared' => array('Magento\Filter\ArrayFilter', false), - 'default value' => array('Magento\Filter\Sprintf', true) + 'shared' => array('Magento\Framework\Filter\Template', true), + 'not shared' => array('Magento\Framework\Filter\ArrayFilter', false), + 'default value' => array('Magento\Framework\Filter\Sprintf', true) ); } @@ -122,7 +125,7 @@ public function isSharedDataProvider() */ public function testCreateFilter($alias, $arguments, $isShared) { - $property = new \ReflectionProperty('Magento\Filter\AbstractFactory', 'sharedInstances'); + $property = new \ReflectionProperty('Magento\Framework\Filter\AbstractFactory', 'sharedInstances'); $property->setAccessible(true); $filterMock = $this->getMock('FactoryInterface', array('filter')); diff --git a/dev/tests/unit/testsuite/Magento/Filter/FilterManager/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/FilterManager/ConfigTest.php similarity index 75% rename from dev/tests/unit/testsuite/Magento/Filter/FilterManager/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/FilterManager/ConfigTest.php index 416a4c71f6303..80957058e6208 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/FilterManager/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/FilterManager/ConfigTest.php @@ -21,23 +21,27 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter\FilterManager; +namespace Magento\Framework\Filter\FilterManager; class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Filter\FilterManager\Config + * @var \Magento\Framework\Filter\FilterManager\Config */ protected $_config; protected function setUp() { - $this->_config = new \Magento\Filter\FilterManager\Config(array('test' => 'test')); + $this->_config = new \Magento\Framework\Filter\FilterManager\Config(array('test' => 'test')); } public function testGetFactories() { - $expectedConfig = array('test' => 'test', 'Magento\Filter\Factory', 'Magento\Filter\ZendFactory'); + $expectedConfig = array( + 'test' => 'test', + 'Magento\Framework\Filter\Factory', + 'Magento\Framework\Filter\ZendFactory' + ); $this->assertEquals($expectedConfig, $this->_config->getFactories()); } } diff --git a/dev/tests/unit/testsuite/Magento/Filter/FilterManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/FilterManagerTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Filter/FilterManagerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/FilterManagerTest.php index 137d97a8d0d92..bdd9b73eb1a15 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/FilterManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/FilterManagerTest.php @@ -21,33 +21,33 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class FilterManagerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Filter\FilterManager + * @var \Magento\Framework\Filter\FilterManager */ protected $_filterManager; /** - * @var \Magento\Filter\Factory + * @var \Magento\Framework\Filter\Factory */ protected $_factoryMock; /** - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager; /** - * @var \Magento\Filter\FilterManager\Config + * @var \Magento\Framework\Filter\FilterManager\Config */ protected $_config; protected function initMocks() { - $factoryName = 'Magento\Filter\Factory'; + $factoryName = 'Magento\Framework\Filter\Factory'; $this->_factoryMock = $this->getMock( $factoryName, array('canCreateFilter', 'createFilter'), @@ -56,7 +56,7 @@ protected function initMocks() false ); $this->_objectManager = $this->getMockForAbstractClass( - '\Magento\ObjectManager', + '\Magento\Framework\ObjectManager', array(), '', true, @@ -74,7 +74,7 @@ protected function initMocks() $this->returnValue($this->_factoryMock) ); $this->_config = $this->getMock( - '\Magento\Filter\FilterManager\Config', + '\Magento\Framework\Filter\FilterManager\Config', array('getFactories'), array(), '', @@ -87,13 +87,13 @@ protected function initMocks() )->will( $this->returnValue(array($factoryName)) ); - $this->_filterManager = new \Magento\Filter\FilterManager($this->_objectManager, $this->_config); + $this->_filterManager = new \Magento\Framework\Filter\FilterManager($this->_objectManager, $this->_config); } public function testGetFilterFactories() { $this->initMocks(); - $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'getFilterFactories'); + $method = new \ReflectionMethod('Magento\Framework\Filter\FilterManager', 'getFilterFactories'); $method->setAccessible(true); $this->assertEquals(array($this->_factoryMock), $method->invoke($this->_filterManager)); } @@ -104,10 +104,10 @@ public function testGetFilterFactories() */ public function testGetFilterFactoriesWrongInstance() { - $factoryName = 'Magento\Filter\Factory'; + $factoryName = 'Magento\Framework\Filter\Factory'; $this->_factoryMock = new \stdClass(); $this->_objectManager = $this->getMockForAbstractClass( - '\Magento\ObjectManager', + '\Magento\Framework\ObjectManager', array(), '', true, @@ -125,7 +125,7 @@ public function testGetFilterFactoriesWrongInstance() $this->returnValue($this->_factoryMock) ); $this->_config = $this->getMock( - '\Magento\Filter\FilterManager\Config', + '\Magento\Framework\Filter\FilterManager\Config', array('getFactories'), array(), '', @@ -138,9 +138,9 @@ public function testGetFilterFactoriesWrongInstance() )->will( $this->returnValue(array($factoryName)) ); - $this->_filterManager = new \Magento\Filter\FilterManager($this->_objectManager, $this->_config); + $this->_filterManager = new \Magento\Framework\Filter\FilterManager($this->_objectManager, $this->_config); - $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'getFilterFactories'); + $method = new \ReflectionMethod('Magento\Framework\Filter\FilterManager', 'getFilterFactories'); $method->setAccessible(true); $method->invoke($this->_filterManager); } @@ -152,7 +152,7 @@ public function testCreateFilterInstance() $this->configureFactoryMock($filterMock, 'alias', array('123')); - $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'createFilterInstance'); + $method = new \ReflectionMethod('Magento\Framework\Filter\FilterManager', 'createFilterInstance'); $method->setAccessible(true); $this->assertEquals($filterMock, $method->invoke($this->_filterManager, 'alias', array('123'))); } @@ -175,7 +175,7 @@ public function testCreateFilterInstanceWrongAlias() $this->returnValue(false) ); - $method = new \ReflectionMethod('Magento\Filter\FilterManager', 'createFilterInstance'); + $method = new \ReflectionMethod('Magento\Framework\Filter\FilterManager', 'createFilterInstance'); $method->setAccessible(true); $method->invoke($this->_filterManager, $filterAlias, array()); } diff --git a/dev/tests/unit/testsuite/Magento/Filter/RemoveAccentsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveAccentsTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Filter/RemoveAccentsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveAccentsTest.php index 353ca6257ba84..f1c025851643c 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/RemoveAccentsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveAccentsTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class RemoveAccentsTest extends \PHPUnit_Framework_TestCase { @@ -34,7 +34,7 @@ class RemoveAccentsTest extends \PHPUnit_Framework_TestCase */ public function testRemoveAccents($string, $german, $expected) { - $filter = new \Magento\Filter\RemoveAccents($german); + $filter = new \Magento\Framework\Filter\RemoveAccents($german); $this->assertEquals($expected, $filter->filter($string)); } diff --git a/dev/tests/unit/testsuite/Magento/Filter/RemoveTagsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveTagsTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Filter/RemoveTagsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveTagsTest.php index 707fc82462c29..8504c54d468f5 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/RemoveTagsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveTagsTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class RemoveTagsTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Filter\RemoveTags::filter - * @covers \Magento\Filter\RemoveTags::_convertEntities + * @covers \Magento\Framework\Filter\RemoveTags::filter + * @covers \Magento\Framework\Filter\RemoveTags::_convertEntities */ public function testRemoveTags() { $input = '
10
< 11 > 10'; - $removeTags = new \Magento\Filter\RemoveTags(); + $removeTags = new \Magento\Framework\Filter\RemoveTags(); $actual = $removeTags->filter($input); $expected = '10 < 11 > 10'; $this->assertSame($expected, $actual); diff --git a/dev/tests/unit/testsuite/Magento/Filter/SplitWordsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/SplitWordsTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Filter/SplitWordsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/SplitWordsTest.php index 7ad3d28da912a..1ed7f88d88c07 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/SplitWordsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/SplitWordsTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class SplitWordsTest extends \PHPUnit_Framework_TestCase { @@ -31,9 +31,9 @@ class SplitWordsTest extends \PHPUnit_Framework_TestCase public function testSplitWords() { $words = '123 123 45 789'; - $filter = new \Magento\Filter\SplitWords(false, 3); + $filter = new \Magento\Framework\Filter\SplitWords(false, 3); $this->assertEquals(array('123', '123', '45'), $filter->filter($words)); - $filter = new \Magento\Filter\SplitWords(true, 2); + $filter = new \Magento\Framework\Filter\SplitWords(true, 2); $this->assertEquals(array('123', '45'), $filter->filter($words)); } } diff --git a/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/StripTagsTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/StripTagsTest.php index 3bfc24d8f7093..a11e22409de98 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/StripTagsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/StripTagsTest.php @@ -21,16 +21,16 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class StripTagsTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Filter\StripTags::filter + * @covers \Magento\Framework\Filter\StripTags::filter */ public function testStripTags() { - $stripTags = new \Magento\Filter\StripTags(new \Magento\Escaper()); + $stripTags = new \Magento\Framework\Filter\StripTags(new \Magento\Framework\Escaper()); $this->assertEquals('three', $stripTags->filter('three')); } } diff --git a/dev/tests/unit/testsuite/Magento/Filter/Template/SimpleTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/Template/SimpleTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Filter/Template/SimpleTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/Template/SimpleTest.php index beb855ecfd11f..7d43316031b57 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/Template/SimpleTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/Template/SimpleTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter\Template; +namespace Magento\Framework\Filter\Template; class SimpleTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Filter\Template\Simple + * @var \Magento\Framework\Filter\Template\Simple */ protected $_filter; protected function setUp() { - $this->_filter = new \Magento\Filter\Template\Simple(); + $this->_filter = new \Magento\Framework\Filter\Template\Simple(); } public function testFilter() diff --git a/dev/tests/unit/testsuite/Magento/Filter/TranslitTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/TranslitTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Filter/TranslitTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/TranslitTest.php index 8bc8289b3cb07..68245127ec41d 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/TranslitTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/TranslitTest.php @@ -21,19 +21,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class TranslitTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Filter\Translit + * @var \Magento\Framework\Filter\Translit */ protected $model; protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Filter\Translit'); + $this->model = $objectManager->getObject('Magento\Framework\Filter\Translit'); } /** @@ -97,7 +97,7 @@ public function testFilterConfigured() ); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Filter\Translit', array('config' => $config)); + $this->model = $objectManager->getObject('Magento\Framework\Filter\Translit', array('config' => $config)); $this->assertEquals('TM', $this->model->filter('™')); } diff --git a/dev/tests/unit/testsuite/Magento/Filter/TranslitUrlTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/TranslitUrlTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Filter/TranslitUrlTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/TranslitUrlTest.php index 8593cec4cf603..1fb286f917c4c 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/TranslitUrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/TranslitUrlTest.php @@ -21,19 +21,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class TranslitUrlTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Filter\TranslitUrl + * @var \Magento\Framework\Filter\TranslitUrl */ protected $model; protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Filter\TranslitUrl'); + $this->model = $objectManager->getObject('Magento\Framework\Filter\TranslitUrl'); } /** diff --git a/dev/tests/unit/testsuite/Magento/Filter/TruncateTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/TruncateTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Filter/TruncateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Filter/TruncateTest.php index 99bea55210d9d..076ed007acc21 100644 --- a/dev/tests/unit/testsuite/Magento/Filter/TruncateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/TruncateTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Filter; +namespace Magento\Framework\Filter; class TruncateTest extends \PHPUnit_Framework_TestCase { @@ -35,7 +35,7 @@ class TruncateTest extends \PHPUnit_Framework_TestCase public function testTruncate($string, $args, $expected, $expectedReminder) { list($strLib, $length, $etc, $reminder, $breakWords) = $args; - $filter = new \Magento\Filter\Truncate($strLib, $length, $etc, $reminder, $breakWords); + $filter = new \Magento\Framework\Filter\Truncate($strLib, $length, $etc, $reminder, $breakWords); $this->assertEquals($expected, $filter->filter($string)); $this->assertEquals($expectedReminder, $reminder); @@ -48,10 +48,15 @@ public function truncateDataProvider() { $remainder = ''; return array( - '1' => array('1234567890', array(new \Magento\Stdlib\String(), 5, '...', '', true), '12...', '34567890'), + '1' => array( + '1234567890', + array(new \Magento\Framework\Stdlib\String(), 5, '...', '', true), + '12...', + '34567890' + ), '2' => array( '123 456 789', - array(new \Magento\Stdlib\String(), 8, '..', $remainder, false), + array(new \Magento\Framework\Stdlib\String(), 8, '..', $remainder, false), '123..', ' 456 789' ) diff --git a/dev/tests/unit/testsuite/Magento/Http/AuthenticationTest.php b/dev/tests/unit/testsuite/Magento/Framework/HTTP/AuthenticationTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Http/AuthenticationTest.php rename to dev/tests/unit/testsuite/Magento/Framework/HTTP/AuthenticationTest.php index 04622022954b1..9426753a18371 100644 --- a/dev/tests/unit/testsuite/Magento/Http/AuthenticationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/HTTP/AuthenticationTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Http; +namespace Magento\Framework\HTTP; class AuthenticationTest extends \PHPUnit_Framework_TestCase { @@ -39,7 +39,7 @@ public function testGetCredentials($server, $expectedLogin, $expectedPass) $request = $this->getMock('\Magento\Framework\App\Request\Http', array(), array(), '', false); $request->expects($this->once())->method('getServer')->will($this->returnValue($server)); $response = $this->getMock('\Magento\Framework\App\Response\Http', array(), array(), '', false); - $authentication = new \Magento\HTTP\Authentication($request, $response); + $authentication = new \Magento\Framework\HTTP\Authentication($request, $response); $this->assertSame(array($expectedLogin, $expectedPass), $authentication->getCredentials()); } @@ -90,10 +90,10 @@ public function getCredentialsDataProvider() public function testSetAuthenticationFailed() { $request = $this->getMock('\Magento\Framework\App\Request\Http', array(), array(), '', false); - $cookieMock = $this->getMock('Magento\Stdlib\Cookie', array(), array(), '', false); + $cookieMock = $this->getMock('Magento\Framework\Stdlib\Cookie', array(), array(), '', false); $contextMock = $this->getMock('Magento\Framework\App\Http\Context', array(), array(), '', false); $response = new \Magento\Framework\App\Response\Http($cookieMock, $contextMock); - $authentication = new \Magento\HTTP\Authentication($request, $response); + $authentication = new \Magento\Framework\HTTP\Authentication($request, $response); $realm = uniqid(); $response->headersSentThrowsException = false; $authentication->setAuthenticationFailed($realm); diff --git a/dev/tests/unit/testsuite/Magento/Http/HeaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/HTTP/HeaderTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Http/HeaderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/HTTP/HeaderTest.php index 7733164aa5ec3..933c0c33dc645 100644 --- a/dev/tests/unit/testsuite/Magento/Http/HeaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/HTTP/HeaderTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Http; +namespace Magento\Framework\HTTP; class HeaderTest extends \PHPUnit_Framework_TestCase { @@ -39,7 +39,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase protected $_request; /** - * @var \Magento\Stdlib\String + * @var \Magento\Framework\Stdlib\String */ protected $_converter; @@ -55,7 +55,7 @@ protected function setUp() false ); - $this->_converter = $this->getMock('\Magento\Stdlib\String', array('cleanString')); + $this->_converter = $this->getMock('\Magento\Framework\Stdlib\String', array('cleanString')); } /** @@ -65,11 +65,11 @@ protected function setUp() * * @dataProvider methodsDataProvider * - * @covers \Magento\HTTP\Header::getHttpHost - * @covers \Magento\HTTP\Header::getHttpUserAgent - * @covers \Magento\HTTP\Header::getHttpAcceptLanguage - * @covers \Magento\HTTP\Header::getHttpAcceptCharset - * @covers \Magento\HTTP\Header::getHttpReferer + * @covers \Magento\Framework\HTTP\Header::getHttpHost + * @covers \Magento\Framework\HTTP\Header::getHttpUserAgent + * @covers \Magento\Framework\HTTP\Header::getHttpAcceptLanguage + * @covers \Magento\Framework\HTTP\Header::getHttpAcceptCharset + * @covers \Magento\Framework\HTTP\Header::getHttpReferer */ public function testHttpMethods($method, $clean, $expectedValue) { @@ -78,11 +78,11 @@ public function testHttpMethods($method, $clean, $expectedValue) $this->_prepareCleanString($clean); $headerObject = $this->_objectManager->getObject( - '\Magento\HTTP\Header', + '\Magento\Framework\HTTP\Header', array('httpRequest' => $this->_request, 'converter' => $this->_converter) ); - $method = new \ReflectionMethod('\Magento\HTTP\Header', $method); + $method = new \ReflectionMethod('\Magento\Framework\HTTP\Header', $method); $result = $method->invokeArgs($headerObject, array('clean' => $clean)); $this->assertEquals($expectedValue, $result); @@ -160,7 +160,7 @@ public function testGetRequestUri($clean, $expectedValue) $this->_prepareCleanString($clean); $headerObject = $this->_objectManager->getObject( - '\Magento\HTTP\Header', + '\Magento\Framework\HTTP\Header', array('httpRequest' => $this->_request, 'converter' => $this->_converter) ); diff --git a/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/RemoteAddressTest.php b/dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/RemoteAddressTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/RemoteAddressTest.php rename to dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/RemoteAddressTest.php index aa6857c8e5a42..639a178f0742f 100644 --- a/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/RemoteAddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/RemoteAddressTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Http\PhpEnvironment; +namespace Magento\Framework\HTTP\PhpEnvironment; class RemoteAddressTest extends \PHPUnit_Framework_TestCase { @@ -55,7 +55,7 @@ protected function setUp() public function testGetRemoteAddress($alternativeHeaders, $serverValueMap, $expected, $ipToLong) { $remoteAddress = $this->_objectManager->getObject( - 'Magento\HTTP\PhpEnvironment\RemoteAddress', + 'Magento\Framework\HTTP\PhpEnvironment\RemoteAddress', array('httpRequest' => $this->_request, 'alternativeHeaders' => $alternativeHeaders) ); $this->_request->expects($this->any())->method('getServer')->will($this->returnValueMap($serverValueMap)); diff --git a/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/ServerAddressTest.php b/dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/ServerAddressTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/ServerAddressTest.php rename to dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/ServerAddressTest.php index 91eb51427b8cb..00435242d745c 100644 --- a/dev/tests/unit/testsuite/Magento/Http/PhpEnvironment/ServerAddressTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/ServerAddressTest.php @@ -24,12 +24,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Http\PhpEnvironment; +namespace Magento\Framework\HTTP\PhpEnvironment; class ServerAddressTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\HTTP\PhpEnvironment\ServerAddress + * @var \Magento\Framework\HTTP\PhpEnvironment\ServerAddress */ protected $_serverAddress; @@ -48,7 +48,7 @@ protected function setUp() $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_serverAddress = $objectManager->getObject( - 'Magento\HTTP\PhpEnvironment\ServerAddress', + 'Magento\Framework\HTTP\PhpEnvironment\ServerAddress', array('httpRequest' => $this->_request) ); } diff --git a/dev/tests/unit/testsuite/Magento/Image/Adapter/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Image/Adapter/AbstractTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php index 0601b2bef51bf..33b77844d4720 100644 --- a/dev/tests/unit/testsuite/Magento/Image/Adapter/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php @@ -26,30 +26,36 @@ */ /** - * Test class for \Magento\Image\Adapter\AbstractAdapter. + * Test class for \Magento\Framework\Image\Adapter\AbstractAdapter. */ -namespace Magento\Image\Adapter; +namespace Magento\Framework\Image\Adapter; class AbstractTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Image\Adapter\AbstractAdapter + * @var \Magento\Framework\Image\Adapter\AbstractAdapter */ protected $_model; /** - * @var \PHPUnit_Framework_MockObject_MockObject |\Magento\Filesystem\Directory\Write + * @var \PHPUnit_Framework_MockObject_MockObject |\Magento\Framework\Filesystem\Directory\Write */ protected $directoryWriteMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject |\Magento\Filesystem + * @var \PHPUnit_Framework_MockObject_MockObject |\Magento\Framework\Filesystem */ protected $filesystemMock; protected function setUp() { - $this->directoryWriteMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false); + $this->directoryWriteMock = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Write', + array(), + array(), + '', + false + ); $this->filesystemMock = $this->getMock( 'Magento\Framework\App\Filesystem', array('getDirectoryWrite', 'createDirectory'), @@ -66,7 +72,7 @@ protected function setUp() ); $this->_model = $this->getMockForAbstractClass( - 'Magento\Image\Adapter\AbstractAdapter', + 'Magento\Framework\Image\Adapter\AbstractAdapter', array($this->filesystemMock) ); } diff --git a/dev/tests/unit/testsuite/Magento/Image/Adapter/Gd2Test.php b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/Gd2Test.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Image/Adapter/Gd2Test.php rename to dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/Gd2Test.php index 5754c4ec79c56..b50669c8999ac 100644 --- a/dev/tests/unit/testsuite/Magento/Image/Adapter/Gd2Test.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/Gd2Test.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Image\Adapter; +namespace Magento\Framework\Image\Adapter; use Magento\TestFramework\Helper\ObjectManager; @@ -75,7 +75,7 @@ function call_user_func($callable, $param) return false; } /** - * \Magento\Image\Adapter\Gd2 class test + * \Magento\Framework\Image\Adapter\Gd2 class test */ class Gd2Test extends \PHPUnit_Framework_TestCase { @@ -93,7 +93,7 @@ class Gd2Test extends \PHPUnit_Framework_TestCase /** * Adapter for testing - * @var \Magento\Image\Adapter\Gd2 + * @var \Magento\Framework\Image\Adapter\Gd2 */ protected $adapter; @@ -108,7 +108,7 @@ class Gd2Test extends \PHPUnit_Framework_TestCase public function setUp() { $this->objectManager = new ObjectManager($this); - $this->adapter = $this->objectManager->getObject('\Magento\Image\Adapter\Gd2'); + $this->adapter = $this->objectManager->getObject('\Magento\Framework\Image\Adapter\Gd2'); } /** @@ -116,7 +116,7 @@ public function setUp() */ public function testParentClass() { - $this->assertInstanceOf('\Magento\Image\Adapter\AbstractAdapter', $this->adapter); + $this->assertInstanceOf('\Magento\Framework\Image\Adapter\AbstractAdapter', $this->adapter); } /** diff --git a/dev/tests/unit/testsuite/Magento/Image/Adapter/ImageMagickTest.php b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/ImageMagickTest.php similarity index 75% rename from dev/tests/unit/testsuite/Magento/Image/Adapter/ImageMagickTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/ImageMagickTest.php index daca67874f241..c74af1da52115 100644 --- a/dev/tests/unit/testsuite/Magento/Image/Adapter/ImageMagickTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/ImageMagickTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Image\Adapter; +namespace Magento\Framework\Image\Adapter; class ImageMagickTest extends \PHPUnit_Framework_TestCase { @@ -36,7 +36,7 @@ public function testWatermark($imagePath, $expectedMessage) $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem')->disableOriginalConstructor()->getMock(); $this->setExpectedException('LogicException', $expectedMessage); - $object = new \Magento\Image\Adapter\ImageMagick($filesystem); + $object = new \Magento\Framework\Image\Adapter\ImageMagick($filesystem); $object->watermark($imagePath); } @@ -46,9 +46,12 @@ public function testWatermark($imagePath, $expectedMessage) public function watermarkDataProvider() { return array( - array('', \Magento\Image\Adapter\ImageMagick::ERROR_WATERMARK_IMAGE_ABSENT), - array(__DIR__ . '/not_exists', \Magento\Image\Adapter\ImageMagick::ERROR_WATERMARK_IMAGE_ABSENT), - array(__DIR__ . '/_files/invalid_image.jpg', \Magento\Image\Adapter\ImageMagick::ERROR_WRONG_IMAGE) + array('', \Magento\Framework\Image\Adapter\ImageMagick::ERROR_WATERMARK_IMAGE_ABSENT), + array(__DIR__ . '/not_exists', \Magento\Framework\Image\Adapter\ImageMagick::ERROR_WATERMARK_IMAGE_ABSENT), + array( + __DIR__ . '/_files/invalid_image.jpg', + \Magento\Framework\Image\Adapter\ImageMagick::ERROR_WRONG_IMAGE + ) ); } } diff --git a/dev/tests/unit/testsuite/Magento/Image/Adapter/_files/invalid_image.jpg b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/_files/invalid_image.jpg similarity index 100% rename from dev/tests/unit/testsuite/Magento/Image/Adapter/_files/invalid_image.jpg rename to dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/_files/invalid_image.jpg diff --git a/dev/tests/unit/testsuite/Magento/Image/AdapterFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Image/AdapterFactoryTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Image/AdapterFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Image/AdapterFactoryTest.php index 1e68317f6f577..3c991ea63dbd1 100644 --- a/dev/tests/unit/testsuite/Magento/Image/AdapterFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Image/AdapterFactoryTest.php @@ -24,19 +24,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Image; +namespace Magento\Framework\Image; class AdapterFactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Image\Adapter\ConfigInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Image\Adapter\ConfigInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $configMock; public function setUp() { $this->configMock = $this->getMock( - 'Magento\Image\Adapter\ConfigInterface', + 'Magento\Framework\Image\Adapter\ConfigInterface', array('getAdapterAlias', 'getAdapters'), array(), '', @@ -50,8 +50,8 @@ public function setUp() )->will( $this->returnValue( array( - 'GD2' => array('class' => 'Magento\Image\Adapter\Gd2'), - 'IMAGEMAGICK' => array('class' => 'Magento\Image\Adapter\ImageMagick'), + 'GD2' => array('class' => 'Magento\Framework\Image\Adapter\Gd2'), + 'IMAGEMAGICK' => array('class' => 'Magento\Framework\Image\Adapter\ImageMagick'), 'wrongInstance' => array('class' => 'stdClass'), 'test' => array() ) @@ -67,7 +67,7 @@ public function setUp() public function testCreate($alias, $class) { $objectManagerMock = $this->getMock( - 'Magento\ObjectManager\ObjectManager', + 'Magento\Framework\ObjectManager\ObjectManager', array('create'), array(), '', @@ -98,23 +98,23 @@ public function testCreate($alias, $class) public function createDataProvider() { return array( - array('GD2', 'Magento\Image\Adapter\Gd2'), - array('IMAGEMAGICK', 'Magento\Image\Adapter\ImageMagick') + array('GD2', 'Magento\Framework\Image\Adapter\Gd2'), + array('IMAGEMAGICK', 'Magento\Framework\Image\Adapter\ImageMagick') ); } /** - * @covers \Magento\Image\AdapterFactory::create + * @covers \Magento\Framework\Image\AdapterFactory::create */ public function testCreateWithoutName() { $adapterAlias = 'IMAGEMAGICK'; - $adapterClass = 'Magento\Image\Adapter\ImageMagick'; + $adapterClass = 'Magento\Framework\Image\Adapter\ImageMagick'; $this->configMock->expects($this->once())->method('getAdapterAlias')->will($this->returnValue($adapterAlias)); $objectManagerMock = $this->getMock( - 'Magento\ObjectManager\ObjectManager', + 'Magento\Framework\ObjectManager\ObjectManager', array('create'), array(), '', @@ -139,7 +139,7 @@ public function testCreateWithoutName() } /** - * @covers \Magento\Image\AdapterFactory::create + * @covers \Magento\Framework\Image\AdapterFactory::create * @expectedException \InvalidArgumentException * @expectedExceptionMessage Image adapter is not selected. */ @@ -147,7 +147,7 @@ public function testInvalidArgumentException() { $this->configMock->expects($this->once())->method('getAdapterAlias')->will($this->returnValue('')); $objectManagerMock = $this->getMock( - 'Magento\ObjectManager\ObjectManager', + 'Magento\Framework\ObjectManager\ObjectManager', array('create'), array(), '', @@ -158,7 +158,7 @@ public function testInvalidArgumentException() } /** - * @covers \Magento\Image\AdapterFactory::create + * @covers \Magento\Framework\Image\AdapterFactory::create * @expectedException \InvalidArgumentException * @expectedExceptionMessage Image adapter for 'test' is not setup. */ @@ -166,7 +166,7 @@ public function testNonAdapterClass() { $alias = 'test'; $objectManagerMock = $this->getMock( - 'Magento\ObjectManager\ObjectManager', + 'Magento\Framework\ObjectManager\ObjectManager', array('create'), array(), '', @@ -178,16 +178,16 @@ public function testNonAdapterClass() } /** - * @covers \Magento\Image\AdapterFactory::create + * @covers \Magento\Framework\Image\AdapterFactory::create * @expectedException \InvalidArgumentException - * @expectedExceptionMessage stdClass is not instance of \Magento\Image\Adapter\AdapterInterface + * @expectedExceptionMessage stdClass is not instance of \Magento\Framework\Image\Adapter\AdapterInterface */ public function testWrongInstance() { $alias = 'wrongInstance'; $class = 'stdClass'; $objectManagerMock = $this->getMock( - 'Magento\ObjectManager\ObjectManager', + 'Magento\Framework\ObjectManager\ObjectManager', array('create'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Interception/Chain/ChainTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Chain/ChainTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Interception/Chain/ChainTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Chain/ChainTest.php index 6af4598ee5f11..297b812d9e734 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Chain/ChainTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Chain/ChainTest.php @@ -22,12 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Chain; +namespace Magento\Framework\Interception\Chain; class ChainTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Interception\Chain\Chain + * @var \Magento\Framework\Interception\Chain\Chain */ protected $_model; @@ -38,13 +38,19 @@ class ChainTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_pluginListMock = $this->getMock('\Magento\Interception\PluginList', array(), array(), '', false); - $this->_model = new \Magento\Interception\Chain\Chain($this->_pluginListMock); + $this->_pluginListMock = $this->getMock( + '\Magento\Framework\Interception\PluginList', + array(), + array(), + '', + false + ); + $this->_model = new \Magento\Framework\Interception\Chain\Chain($this->_pluginListMock); } /** - * @covers \Magento\Interception\Chain\Chain::invokeNext - * @covers \Magento\Interception\Chain\Chain::__construct + * @covers \Magento\Framework\Interception\Chain\Chain::invokeNext + * @covers \Magento\Framework\Interception\Chain\Chain::__construct */ public function testInvokeNextBeforePlugin() { @@ -62,7 +68,11 @@ public function testInvokeNextBeforePlugin() $this->_pluginListMock->expects($this->once()) ->method('getNext') ->with($type, $method, null) - ->will($this->returnValue(array(\Magento\Interception\Definition::LISTENER_BEFORE => array('code')))); + ->will( + $this->returnValue( + array(\Magento\Framework\Interception\Definition::LISTENER_BEFORE => array('code')) + ) + ); $this->_pluginListMock->expects($this->once()) ->method('getPlugin') @@ -78,7 +88,7 @@ public function testInvokeNextBeforePlugin() } /** - * @covers \Magento\Interception\Chain\Chain::invokeNext + * @covers \Magento\Framework\Interception\Chain\Chain::invokeNext */ public function testInvokeNextAroundPlugin() { @@ -96,7 +106,7 @@ public function testInvokeNextAroundPlugin() $this->_pluginListMock->expects($this->once()) ->method('getNext') ->with($type, $method, null) - ->will($this->returnValue(array(\Magento\Interception\Definition::LISTENER_AROUND => 'code'))); + ->will($this->returnValue(array(\Magento\Framework\Interception\Definition::LISTENER_AROUND => 'code'))); $this->_pluginListMock->expects($this->once()) ->method('getPlugin') @@ -107,7 +117,7 @@ public function testInvokeNextAroundPlugin() } /** - * @covers \Magento\Interception\Chain\Chain::invokeNext + * @covers \Magento\Framework\Interception\Chain\Chain::invokeNext */ public function testInvokeNextAfterPlugin() { @@ -125,7 +135,11 @@ public function testInvokeNextAfterPlugin() $this->_pluginListMock->expects($this->once()) ->method('getNext') ->with($type, $method, null) - ->will($this->returnValue(array(\Magento\Interception\Definition::LISTENER_AFTER => array('code')))); + ->will( + $this->returnValue( + array(\Magento\Framework\Interception\Definition::LISTENER_AFTER => array('code')) + ) + ); $this->_pluginListMock->expects($this->once()) ->method('getPlugin') diff --git a/dev/tests/unit/testsuite/Magento/Interception/Code/Generator/InterceptorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Interception/Code/Generator/InterceptorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php index 650bfa3810e3a..7ef1c4eb0e2c9 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Code/Generator/InterceptorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/Generator/InterceptorTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Code\Generator; +namespace Magento\Framework\Interception\Code\Generator; class InterceptorTest extends \PHPUnit_Framework_TestCase { @@ -43,16 +43,21 @@ class InterceptorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->ioObjectMock = $this->getMock('\Magento\Code\Generator\Io', array(), array(), '', false); - $this->classGeneratorMock = $this->getMock('\Magento\Code\Generator\CodeGenerator\CodeGeneratorInterface', - array(), array(), '', false); - $this->autoloaderMock = $this->getMock('\Magento\Autoload\IncludePath', array(), array(), '', false); + $this->ioObjectMock = $this->getMock('\Magento\Framework\Code\Generator\Io', array(), array(), '', false); + $this->classGeneratorMock = $this->getMock( + '\Magento\Framework\Code\Generator\CodeGenerator\CodeGeneratorInterface', + array(), + array(), + '', + false + ); + $this->autoloaderMock = $this->getMock('\Magento\Framework\Autoload\IncludePath', array(), array(), '', false); } public function testGetDefaultResultClassName() { // resultClassName should be stdClass_Interceptor - $model = $this->getMock('\Magento\Interception\Code\Generator\Interceptor', + $model = $this->getMock('\Magento\Framework\Interception\Code\Generator\Interceptor', array('_validateData'), array('Exception', null, $this->ioObjectMock, $this->classGeneratorMock, $this->autoloaderMock) ); diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php new file mode 100644 index 0000000000000..4e5cb13d2d03c --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php @@ -0,0 +1,150 @@ +argumentsReaderMock = $this->getMock( + '\Magento\Framework\Code\Reader\ArgumentsReader', array(), array(), '', false + ); + + $this->argumentsReaderMock->expects($this->any())->method('isCompatibleType') + ->will($this->returnCallback(function ($arg1, $arg2) { + return ltrim($arg1, '\\') == ltrim($arg2, '\\'); + })); + + $this->model = new InterfaceValidator($this->argumentsReaderMock); + } + + /** + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getMethodParameters + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getMethodType + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getOriginMethodName + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getParametersType + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::__construct + */ + public function testValidate() + { + $this->model->validate( + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin\ValidPlugin', + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments' + ); + } + + /** + * @expectedException \Magento\Framework\Interception\Code\ValidatorException + * @expectedExceptionMessage Incorrect interface in + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + */ + public function testValidateIncorrectInterface() + { + $this->model->validate( + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin\IncompatibleInterface', + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item' + ); + } + + /** + * @expectedException \Magento\Framework\Interception\Code\ValidatorException + * @expectedExceptionMessage Invalid [\Magento\Framework\Interception\Custom\Module\Model\Item] $subject type + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + */ + public function testValidateIncorrectSubjectType() + { + $this->model->validate( + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin\IncorrectSubject', + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item' + ); + } + + /** + * @expectedException \Magento\Framework\Interception\Code\ValidatorException + * @expectedExceptionMessage Invalid method signature. Invalid method parameters count + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validateMethodsParameters + */ + public function testValidateIncompatibleMethodArgumentsCount() + { + $this->model->validate( + '\Magento\Framework\Interception\Custom\Module\Model' + . '\InterfaceValidator\ItemPlugin\IncompatibleArgumentsCount', + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item' + ); + } + + /** + * @expectedException \Magento\Framework\Interception\Code\ValidatorException + * @expectedExceptionMessage Incompatible parameter type + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validateMethodsParameters + */ + public function testValidateIncompatibleMethodArgumentsType() + { + $this->model->validate( + '\Magento\Framework\Interception\Custom\Module\Model' + . '\InterfaceValidator\ItemPlugin\IncompatibleArgumentsType', + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments' + ); + } + + /** + * @expectedException \Magento\Framework\Interception\Code\ValidatorException + * @expectedExceptionMessage Invalid method signature. Detected extra parameters + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + */ + public function testValidateExtraParameters() + { + $this->model->validate( + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin\ExtraParameters', + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item' + ); + } + + /** + * @expectedException \Magento\Framework\Interception\Code\ValidatorException + * @expectedExceptionMessage Invalid [] $name type in + * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + */ + public function testValidateInvalidProceed() + { + $this->model->validate( + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin\InvalidProceed', + '\Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item' + ); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Interception/Config/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Config/ConfigTest.php similarity index 64% rename from dev/tests/unit/testsuite/Magento/Interception/Config/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Config/ConfigTest.php index cad76f1812862..e5432dacf149d 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Config/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Config/ConfigTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Config; +namespace Magento\Framework\Interception\Config; require_once __DIR__ . '/../Custom/Module/Model/Item.php'; @@ -60,11 +60,17 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->readerMock = $this->getMock('\Magento\ObjectManager\Config\Reader\Dom', array(), array(), '', false); - $this->configScopeMock = $this->getMock('Magento\Config\ScopeListInterface'); - $this->cacheMock = $this->getMock('Magento\Cache\FrontendInterface'); - $this->omConfigMock = $this->getMock('Magento\Interception\ObjectManager\Config'); - $this->definitionMock = $this->getMock('Magento\ObjectManager\Definition'); + $this->readerMock = $this->getMock( + '\Magento\Framework\ObjectManager\Config\Reader\Dom', + array(), + array(), + '', + false + ); + $this->configScopeMock = $this->getMock('Magento\Framework\Config\ScopeListInterface'); + $this->cacheMock = $this->getMock('Magento\Framework\Cache\FrontendInterface'); + $this->omConfigMock = $this->getMock('Magento\Framework\Interception\ObjectManager\Config'); + $this->definitionMock = $this->getMock('Magento\Framework\ObjectManager\Definition'); } /** @@ -90,41 +96,41 @@ public function testHasPluginsWhenDataIsNotCached($expectedResult, $type) ->will($this->returnValueMap( array( array( - 'Magento\Interception\Custom\Module\Model\ItemContainer', - 'Magento\Interception\Custom\Module\Model\ItemContainer', + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer', + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer', ), array( - 'Magento\Interception\Custom\Module\Model\Item', - 'Magento\Interception\Custom\Module\Model\Item', + 'Magento\Framework\Interception\Custom\Module\Model\Item', + 'Magento\Framework\Interception\Custom\Module\Model\Item', ), array( - 'Magento\Interception\Custom\Module\Model\Item\Enhanced', - 'Magento\Interception\Custom\Module\Model\Item\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\Item\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\Item\Enhanced', ), array( - 'Magento\Interception\Custom\Module\Model\ItemContainer\Enhanced', - 'Magento\Interception\Custom\Module\Model\ItemContainer\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer\Enhanced', ), array( - 'Magento\Interception\Custom\Module\Model\ItemProxy', - 'Magento\Interception\Custom\Module\Model\ItemProxy', + 'Magento\Framework\Interception\Custom\Module\Model\ItemProxy', + 'Magento\Framework\Interception\Custom\Module\Model\ItemProxy', ), array( 'virtual_custom_item', - 'Magento\Interception\Custom\Module\Model\Item', + 'Magento\Framework\Interception\Custom\Module\Model\Item', ), ) )); $this->definitionMock->expects($this->any())->method('getClasses')->will($this->returnValue( array( - 'Magento\Interception\Custom\Module\Model\ItemProxy', + 'Magento\Framework\Interception\Custom\Module\Model\ItemProxy', ) )); - $model = new \Magento\Interception\Config\Config( + $model = new \Magento\Framework\Interception\Config\Config( $this->readerMock, $this->configScopeMock, $this->cacheMock, - new \Magento\ObjectManager\Relations\Runtime(), + new \Magento\Framework\ObjectManager\Relations\Runtime(), $this->omConfigMock, $this->definitionMock, 'interception' @@ -142,11 +148,11 @@ public function testHasPluginsWhenDataIsCached($expectedResult, $type) { $cacheId = 'interception'; $interceptionData = array( - 'Magento\Interception\Custom\Module\Model\ItemContainer' => true, - 'Magento\Interception\Custom\Module\Model\Item' => true, - 'Magento\Interception\Custom\Module\Model\Item\Enhanced' => true, - 'Magento\Interception\Custom\Module\Model\ItemContainer\Enhanced' => true, - 'Magento\Interception\Custom\Module\Model\ItemProxy' => false, + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer' => true, + 'Magento\Framework\Interception\Custom\Module\Model\Item' => true, + 'Magento\Framework\Interception\Custom\Module\Model\Item\Enhanced' => true, + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer\Enhanced' => true, + 'Magento\Framework\Interception\Custom\Module\Model\ItemProxy' => false, 'virtual_custom_item' => true, ); $this->readerMock->expects($this->never())->method('read'); @@ -155,11 +161,11 @@ public function testHasPluginsWhenDataIsCached($expectedResult, $type) ->method('load') ->with($cacheId) ->will($this->returnValue(serialize($interceptionData))); - $model = new \Magento\Interception\Config\Config( + $model = new \Magento\Framework\Interception\Config\Config( $this->readerMock, $this->configScopeMock, $this->cacheMock, - new \Magento\ObjectManager\Relations\Runtime(), + new \Magento\Framework\ObjectManager\Relations\Runtime(), $this->omConfigMock, $this->definitionMock, $cacheId @@ -174,24 +180,24 @@ public function hasPluginsDataProvider() // item container has plugins only in the backend scope array( true, - 'Magento\Interception\Custom\Module\Model\ItemContainer', + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer', ), array( true, - 'Magento\Interception\Custom\Module\Model\Item', + 'Magento\Framework\Interception\Custom\Module\Model\Item', ), array( true, - 'Magento\Interception\Custom\Module\Model\Item\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\Item\Enhanced', ), array( // the following model has only inherited plugins true, - 'Magento\Interception\Custom\Module\Model\ItemContainer\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer\Enhanced', ), array( false, - 'Magento\Interception\Custom\Module\Model\ItemProxy', + 'Magento\Framework\Interception\Custom\Module\Model\ItemProxy', ), array( true, diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/Item.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/Item.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/Item.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/Item.php index deb61013149e9..361e70e954857 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/Item.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/Item.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator; class Item { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php index 43189e6f52072..2609c71691a8c 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ExtraParameters.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class ExtraParameters { /** - * @param \Magento\Interception\Custom\Module\Model\InterfaceValidator\Item $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item $subject * @param string $name * @param string $surname * @return string @@ -34,7 +34,7 @@ class ExtraParameters * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetItem( - \Magento\Interception\Custom\Module\Model\InterfaceValidator\Item $subject, $name, $surname + \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item $subject, $name, $surname ) { return $name . $surname; } diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php index 4dcf8aebb172f..afcc462843aad 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsCount.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class IncompatibleArgumentsCount { /** - * @param \Magento\Interception\Custom\Module\Model\InterfaceValidator\Item $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item $subject * @param string $name * @param string $surname * @return string @@ -34,7 +34,7 @@ class IncompatibleArgumentsCount * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeGetItem( - \Magento\Interception\Custom\Module\Model\InterfaceValidator\Item $subject, $name, $surname + \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item $subject, $name, $surname ) { return $name . $surname; } diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php index 338385155b325..859d3f41bbd73 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleArgumentsType.php @@ -21,19 +21,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class IncompatibleArgumentsType { /** - * @param \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject * @param array $names * @return int * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeGetItem( - \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, array $names + \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, array $names ) { return count($names); } diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleInterface.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleInterface.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleInterface.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleInterface.php index 626e646c58074..3dd1a6892caf2 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleInterface.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncompatibleInterface.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class IncompatibleInterface { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncorrectSubject.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncorrectSubject.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncorrectSubject.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncorrectSubject.php index 070662fde9ff9..09c046419fcb2 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncorrectSubject.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/IncorrectSubject.php @@ -21,17 +21,17 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class IncorrectSubject { /** - * @param \Magento\Interception\Custom\Module\Model\Item $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\Item $subject * @return bool * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function beforeGetItem(\Magento\Interception\Custom\Module\Model\Item $subject) + public function beforeGetItem(\Magento\Framework\Interception\Custom\Module\Model\Item $subject) { return true; } diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php index beacd67294fed..6414d5c12a787 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/InvalidProceed.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class InvalidProceed { /** - * @param \Magento\Interception\Custom\Module\Model\InterfaceValidator\Item $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item $subject * @param string $name * @param string $surname * @return string @@ -34,7 +34,7 @@ class InvalidProceed * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundGetItem( - \Magento\Interception\Custom\Module\Model\InterfaceValidator\Item $subject, $name, $surname + \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\Item $subject, $name, $surname ) { return $name . $surname; } diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php index e54bc6ca3b745..d7f76a5f53532 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemPlugin/ValidPlugin.php @@ -21,38 +21,38 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemPlugin; class ValidPlugin { /** - * @param \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject * @param string $result * @return string * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetItem( - \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, $result + \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, $result ) { return $result . '!'; } /** - * @param \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject * @param $name * @return string * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeGetItem( - \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, $name + \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, $name ) { return '|' . $name; } /** - * @param \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject + * @param \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject * @param Closure $proceed * @param string $name * @return string @@ -60,7 +60,7 @@ public function beforeGetItem( * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function aroundGetItem( - \Magento\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, + \Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator\ItemWithArguments $subject, \Closure $proceed, $name ) { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemWithArguments.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemWithArguments.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemWithArguments.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemWithArguments.php index 544ab5b4b2d65..9eb6f8fd2c564 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/InterfaceValidator/ItemWithArguments.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/InterfaceValidator/ItemWithArguments.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\InterfaceValidator; +namespace Magento\Framework\Interception\Custom\Module\Model\InterfaceValidator; class ItemWithArguments { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/Item.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/Item.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/Item.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/Item.php index c5328f73e34bd..9ee183182c6c0 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/Item.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/Item.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model; +namespace Magento\Framework\Interception\Custom\Module\Model; class Item { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/Item/Enhanced.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/Item/Enhanced.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/Item/Enhanced.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/Item/Enhanced.php index 1375847214106..86477215673cc 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/Item/Enhanced.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/Item/Enhanced.php @@ -21,9 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\Item; +namespace Magento\Framework\Interception\Custom\Module\Model\Item; -class Enhanced extends \Magento\Interception\Custom\Module\Model\Item +class Enhanced extends \Magento\Framework\Interception\Custom\Module\Model\Item { /** * @return string diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainer.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainer.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainer.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainer.php index 2c89127685a3f..d9aa9f0e0111d 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainer.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainer.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model; +namespace Magento\Framework\Interception\Custom\Module\Model; class ItemContainer { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainer/Enhanced.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainer/Enhanced.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainer/Enhanced.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainer/Enhanced.php index a7976948c8944..8de9b856c2d85 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainer/Enhanced.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainer/Enhanced.php @@ -21,9 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\ItemContainer; +namespace Magento\Framework\Interception\Custom\Module\Model\ItemContainer; -class Enhanced extends \Magento\Interception\Custom\Module\Model\ItemContainer +class Enhanced extends \Magento\Framework\Interception\Custom\Module\Model\ItemContainer { /** * @return string diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainerPlugin/Simple.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainerPlugin/Simple.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainerPlugin/Simple.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainerPlugin/Simple.php index 6c1f2b0876ba2..07a802c880eec 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemContainerPlugin/Simple.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemContainerPlugin/Simple.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\ItemContainerPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\ItemContainerPlugin; class Simple { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemPlugin/Advanced.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemPlugin/Advanced.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemPlugin/Advanced.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemPlugin/Advanced.php index 9c8b855746f59..a9d448334128d 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemPlugin/Advanced.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemPlugin/Advanced.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\ItemPlugin; class Advanced { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemPlugin/Simple.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemPlugin/Simple.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemPlugin/Simple.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemPlugin/Simple.php index 459c311390dc9..a339b548ff9da 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Custom/Module/Model/ItemPlugin/Simple.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Custom/Module/Model/ItemPlugin/Simple.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Custom\Module\Model\ItemPlugin; +namespace Magento\Framework\Interception\Custom\Module\Model\ItemPlugin; class Simple { diff --git a/dev/tests/unit/testsuite/Magento/Interception/Definition/CompiledTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Definition/CompiledTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Interception/Definition/CompiledTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/Definition/CompiledTest.php index 3ab782e4ffb8b..0221832c7d938 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/Definition/CompiledTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Definition/CompiledTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\Definition; +namespace Magento\Framework\Interception\Definition; class CompiledTest extends \PHPUnit_Framework_TestCase { @@ -31,12 +31,12 @@ class CompiledTest extends \PHPUnit_Framework_TestCase protected $_definitions = array('type' => 'definitions'); /** - * @covers \Magento\Interception\Definition\Compiled::getMethodList - * @covers \Magento\Interception\Definition\Compiled::__construct + * @covers \Magento\Framework\Interception\Definition\Compiled::getMethodList + * @covers \Magento\Framework\Interception\Definition\Compiled::__construct */ public function testGetMethodList() { - $model = new \Magento\Interception\Definition\Compiled($this->_definitions); + $model = new \Magento\Framework\Interception\Definition\Compiled($this->_definitions); $this->assertEquals('definitions', $model->getMethodList('type')); } } diff --git a/dev/tests/unit/testsuite/Magento/Interception/ObjectManager/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/ObjectManager/ConfigTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Interception/ObjectManager/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/ObjectManager/ConfigTest.php index a67258ee06e7a..b3b63da45f3e4 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/ObjectManager/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/ObjectManager/ConfigTest.php @@ -22,12 +22,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\ObjectManager; +namespace Magento\Framework\Interception\ObjectManager; class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Interception\ObjectManager\Config + * @var \Magento\Framework\Interception\ObjectManager\Config */ protected $model; @@ -38,7 +38,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->interceptionConfig = $this->getMock('\Magento\Interception\Config'); + $this->interceptionConfig = $this->getMock('\Magento\Framework\Interception\Config'); $this->model = new Config(); } diff --git a/dev/tests/unit/testsuite/Magento/Interception/PluginList/PluginListTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/PluginList/PluginListTest.php similarity index 66% rename from dev/tests/unit/testsuite/Magento/Interception/PluginList/PluginListTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/PluginList/PluginListTest.php index 4f42e5a9e3f6c..66865835bded4 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/PluginList/PluginListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/PluginList/PluginListTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Interception\PluginList; +namespace Magento\Framework\Interception\PluginList; require_once __DIR__ . '/../Custom/Module/Model/Item.php'; @@ -34,7 +34,7 @@ class PluginListTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Interception\PluginList\PluginList + * @var \Magento\Framework\Interception\PluginList\PluginList */ protected $_model; @@ -56,31 +56,31 @@ class PluginListTest extends \PHPUnit_Framework_TestCase protected function setUp() { $readerMap = include __DIR__ . '/../_files/reader_mock_map.php'; - $readerMock = $this->getMock('\Magento\ObjectManager\Config\Reader\Dom', array(), array(), '', false); + $readerMock = $this->getMock('\Magento\Framework\ObjectManager\Config\Reader\Dom', array(), array(), '', false); $readerMock->expects($this->any())->method('read')->will($this->returnValueMap($readerMap)); - $this->_configScopeMock = $this->getMock('\Magento\Config\ScopeInterface'); - $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface'); + $this->_configScopeMock = $this->getMock('\Magento\Framework\Config\ScopeInterface'); + $this->_cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); // turn cache off $this->_cacheMock->expects($this->any()) ->method('get') ->will($this->returnValue(false)); - $omConfigMock = $this->getMock('Magento\Interception\ObjectManager\Config'); + $omConfigMock = $this->getMock('Magento\Framework\Interception\ObjectManager\Config'); $omConfigMock->expects($this->any())->method('getOriginalInstanceType')->will($this->returnArgument(0)); - $this->_objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); $this->_objectManagerMock->expects($this->any())->method('get')->will($this->returnArgument(0)); - $definitions = new \Magento\ObjectManager\Definition\Runtime(); + $definitions = new \Magento\Framework\ObjectManager\Definition\Runtime(); - $this->_model = new \Magento\Interception\PluginList\PluginList( + $this->_model = new \Magento\Framework\Interception\PluginList\PluginList( $readerMock, $this->_configScopeMock, $this->_cacheMock, - new \Magento\ObjectManager\Relations\Runtime(), + new \Magento\Framework\ObjectManager\Relations\Runtime(), $omConfigMock, - new \Magento\Interception\Definition\Runtime(), + new \Magento\Framework\Interception\Definition\Runtime(), $this->_objectManagerMock, $definitions, array('global'), @@ -91,20 +91,23 @@ protected function setUp() public function testGetPlugin() { $this->_configScopeMock->expects($this->any())->method('getCurrentScope')->will($this->returnValue('backend')); - $this->_model->getNext('Magento\Interception\Custom\Module\Model\Item', 'getName'); - $this->_model->getNext('Magento\Interception\Custom\Module\Model\ItemContainer', 'getName'); + $this->_model->getNext('Magento\Framework\Interception\Custom\Module\Model\Item', 'getName'); + $this->_model->getNext('Magento\Framework\Interception\Custom\Module\Model\ItemContainer', 'getName'); $this->assertEquals( - 'Magento\Interception\Custom\Module\Model\ItemPlugin\Simple', - $this->_model->getPlugin('Magento\Interception\Custom\Module\Model\Item', 'simple_plugin') + 'Magento\Framework\Interception\Custom\Module\Model\ItemPlugin\Simple', + $this->_model->getPlugin('Magento\Framework\Interception\Custom\Module\Model\Item', 'simple_plugin') ); $this->assertEquals( - 'Magento\Interception\Custom\Module\Model\ItemPlugin\Advanced', - $this->_model->getPlugin('Magento\Interception\Custom\Module\Model\Item', 'advanced_plugin') + 'Magento\Framework\Interception\Custom\Module\Model\ItemPlugin\Advanced', + $this->_model->getPlugin('Magento\Framework\Interception\Custom\Module\Model\Item', 'advanced_plugin') ); $this->assertEquals( - 'Magento\Interception\Custom\Module\Model\ItemContainerPlugin\Simple', - $this->_model->getPlugin('Magento\Interception\Custom\Module\Model\ItemContainer', 'simple_plugin') + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainerPlugin\Simple', + $this->_model->getPlugin( + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer', + 'simple_plugin' + ) ); } @@ -136,46 +139,46 @@ public function getPluginsDataProvider() return array( array( array(4 => array('simple_plugin')), - 'Magento\Interception\Custom\Module\Model\Item', + 'Magento\Framework\Interception\Custom\Module\Model\Item', 'getName', 'global' ), array( // advanced plugin has lower sort order array(2 => 'advanced_plugin', 4 => array('advanced_plugin')), - 'Magento\Interception\Custom\Module\Model\Item', + 'Magento\Framework\Interception\Custom\Module\Model\Item', 'getName', 'backend' ), array( // advanced plugin has lower sort order array(4 => array('simple_plugin')), - 'Magento\Interception\Custom\Module\Model\Item', + 'Magento\Framework\Interception\Custom\Module\Model\Item', 'getName', 'backend', 'advanced_plugin' ), // simple plugin is disabled in configuration for - // \Magento\Interception\Custom\Module\Model\Item in frontend - array(null, 'Magento\Interception\Custom\Module\Model\Item', 'getName', 'frontend'), + // \Magento\Framework\Interception\Custom\Module\Model\Item in frontend + array(null, 'Magento\Framework\Interception\Custom\Module\Model\Item', 'getName', 'frontend'), // test plugin inheritance array( array(4 => array('simple_plugin')), - 'Magento\Interception\Custom\Module\Model\Item\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\Item\Enhanced', 'getName', 'global' ), array( // simple plugin is disabled in configuration for parent array(2 => 'advanced_plugin', 4 => array('advanced_plugin')), - 'Magento\Interception\Custom\Module\Model\Item\Enhanced', + 'Magento\Framework\Interception\Custom\Module\Model\Item\Enhanced', 'getName', 'frontend' ), - array(null, 'Magento\Interception\Custom\Module\Model\ItemContainer', 'getName', 'global'), + array(null, 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer', 'getName', 'global'), array( array(4 => array('simple_plugin')), - 'Magento\Interception\Custom\Module\Model\ItemContainer', + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer', 'getName', 'backend' ) @@ -184,8 +187,8 @@ public function getPluginsDataProvider() /** * @expectedException \InvalidArgumentException - * @covers \Magento\Interception\PluginList\PluginList::getNext - * @covers \Magento\Interception\PluginList\PluginList::_inheritPlugins + * @covers \Magento\Framework\Interception\PluginList\PluginList::getNext + * @covers \Magento\Framework\Interception\PluginList\PluginList::_inheritPlugins */ public function testInheritPluginsWithNonExistingClass() { @@ -197,8 +200,8 @@ public function testInheritPluginsWithNonExistingClass() } /** - * @covers \Magento\Interception\PluginList\PluginList::getNext - * @covers \Magento\Interception\PluginList\PluginList::_loadScopedData + * @covers \Magento\Framework\Interception\PluginList\PluginList::getNext + * @covers \Magento\Framework\Interception\PluginList\PluginList::_loadScopedData */ public function testLoadScopedDataCached() { diff --git a/dev/tests/unit/testsuite/Magento/Interception/_files/reader_mock_map.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/_files/reader_mock_map.php similarity index 71% rename from dev/tests/unit/testsuite/Magento/Interception/_files/reader_mock_map.php rename to dev/tests/unit/testsuite/Magento/Framework/Interception/_files/reader_mock_map.php index 179f56c9f5b54..bcbf125729b18 100644 --- a/dev/tests/unit/testsuite/Magento/Interception/_files/reader_mock_map.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/_files/reader_mock_map.php @@ -25,11 +25,11 @@ array( 'global', array( - 'Magento\Interception\Custom\Module\Model\Item' => array( + 'Magento\Framework\Interception\Custom\Module\Model\Item' => array( 'plugins' => array( 'simple_plugin' => array( 'sortOrder' => 10, - 'instance' => 'Magento\Interception\Custom\Module\Model\ItemPlugin\Simple' + 'instance' => 'Magento\Framework\Interception\Custom\Module\Model\ItemPlugin\Simple' ) ) ) @@ -38,19 +38,19 @@ array( 'backend', array( - 'Magento\Interception\Custom\Module\Model\Item' => array( + 'Magento\Framework\Interception\Custom\Module\Model\Item' => array( 'plugins' => array( 'advanced_plugin' => array( 'sortOrder' => 5, - 'instance' => 'Magento\Interception\Custom\Module\Model\ItemPlugin\Advanced' + 'instance' => 'Magento\Framework\Interception\Custom\Module\Model\ItemPlugin\Advanced' ) ) ), - 'Magento\Interception\Custom\Module\Model\ItemContainer' => array( + 'Magento\Framework\Interception\Custom\Module\Model\ItemContainer' => array( 'plugins' => array( 'simple_plugin' => array( 'sortOrder' => 15, - 'instance' => 'Magento\Interception\Custom\Module\Model\ItemContainerPlugin\Simple' + 'instance' => 'Magento\Framework\Interception\Custom\Module\Model\ItemContainerPlugin\Simple' ) ) ) @@ -59,14 +59,14 @@ array( 'frontend', array( - 'Magento\Interception\Custom\Module\Model\Item' => array( + 'Magento\Framework\Interception\Custom\Module\Model\Item' => array( 'plugins' => array('simple_plugin' => array('disabled' => true)) ), - 'Magento\Interception\Custom\Module\Model\Item\Enhanced' => array( + 'Magento\Framework\Interception\Custom\Module\Model\Item\Enhanced' => array( 'plugins' => array( 'advanced_plugin' => array( 'sortOrder' => 5, - 'instance' => 'Magento\Interception\Custom\Module\Model\ItemPlugin\Advanced' + 'instance' => 'Magento\Framework\Interception\Custom\Module\Model\ItemPlugin\Advanced' ) ) ), diff --git a/dev/tests/unit/testsuite/Magento/Less/File/FileList/CollatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/File/FileList/CollatorTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Less/File/FileList/CollatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Less/File/FileList/CollatorTest.php index 1e2051b872a84..916312e464804 100644 --- a/dev/tests/unit/testsuite/Magento/Less/File/FileList/CollatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/File/FileList/CollatorTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Less\File\FileList; +namespace Magento\Framework\Less\File\FileList; class CollatorTest extends \PHPUnit_Framework_TestCase { @@ -31,17 +31,17 @@ class CollatorTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\View\Layout\File[] + * @var \Magento\Framework\View\Layout\File[] */ protected $originFiles; /** - * @var \Magento\View\Layout\File + * @var \Magento\Framework\View\Layout\File */ protected $baseFile; /** - * @var \Magento\View\Layout\File + * @var \Magento\Framework\View\Layout\File */ protected $themeFile; @@ -62,16 +62,16 @@ protected function setUp() * @param string $filename * @param string $module * @param string|null $themeFullPath - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\View\Layout\File + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\View\Layout\File */ protected function createLayoutFile($filename, $module, $themeFullPath = null) { $theme = null; if ($themeFullPath !== null) { - $theme = $this->getMockForAbstractClass('Magento\View\Design\ThemeInterface'); + $theme = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); $theme->expects($this->any())->method('getFullPath')->will($this->returnValue($themeFullPath)); } - return new \Magento\View\Layout\File($filename, $module, $theme); + return new \Magento\Framework\View\Layout\File($filename, $module, $theme); } public function testCollate() diff --git a/dev/tests/unit/testsuite/Magento/Less/_files/invalid.less b/dev/tests/unit/testsuite/Magento/Framework/Less/_files/invalid.less similarity index 100% rename from dev/tests/unit/testsuite/Magento/Less/_files/invalid.less rename to dev/tests/unit/testsuite/Magento/Framework/Less/_files/invalid.less diff --git a/dev/tests/unit/testsuite/Magento/Less/_files/valid.less b/dev/tests/unit/testsuite/Magento/Framework/Less/_files/valid.less similarity index 100% rename from dev/tests/unit/testsuite/Magento/Less/_files/valid.less rename to dev/tests/unit/testsuite/Magento/Framework/Less/_files/valid.less diff --git a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/ConverterTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/ConverterTest.php index f49951df642de..aef69d9d1962b 100644 --- a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/ConverterTest.php @@ -24,12 +24,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Locale\Hierarchy\Config; +namespace Magento\Framework\Locale\Hierarchy\Config; class ConverterTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Locale\Hierarchy\Config\Converter + * @var \Magento\Framework\Locale\Hierarchy\Config\Converter */ protected $_model; @@ -40,7 +40,7 @@ class ConverterTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_model = new \Magento\Locale\Hierarchy\Config\Converter(); + $this->_model = new \Magento\Framework\Locale\Hierarchy\Config\Converter(); } /** diff --git a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/FileResolverTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/FileResolverTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/FileResolverTest.php index c2f7e537f52e2..9ce88eaa74641 100644 --- a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/FileResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/FileResolverTest.php @@ -21,22 +21,22 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Locale\Hierarchy\Config; +namespace Magento\Framework\Locale\Hierarchy\Config; class FileResolverTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Locale\Hierarchy\Config\FileResolver + * @var \Magento\Framework\Locale\Hierarchy\Config\FileResolver */ protected $_model; /** - * @var \Magento\Filesystem\Directory\Read + * @var \Magento\Framework\Filesystem\Directory\Read */ protected $_directoryMock; /** - * @var \Magento\Config\FileIteratorFactory + * @var \Magento\Framework\Config\FileIteratorFactory */ protected $iteratorFactory; @@ -44,7 +44,7 @@ protected function setUp() { $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false); $this->_directoryMock = $this->getMock( - '\Magento\Filesystem\Directory\Read', + '\Magento\Framework\Filesystem\Directory\Read', array('isExist', 'search'), array(), '', @@ -68,12 +68,21 @@ protected function setUp() )->will( $this->returnValue(true) ); - $this->iteratorFactory = $this->getMock('Magento\Config\FileIteratorFactory', array(), array(), '', false); - $this->_model = new \Magento\Locale\Hierarchy\Config\FileResolver($filesystem, $this->iteratorFactory); + $this->iteratorFactory = $this->getMock( + 'Magento\Framework\Config\FileIteratorFactory', + array(), + array(), + '', + false + ); + $this->_model = new \Magento\Framework\Locale\Hierarchy\Config\FileResolver( + $filesystem, + $this->iteratorFactory + ); } /** - * @covers \Magento\Locale\Hierarchy\Config\FileResolver::get + * @covers \Magento\Framework\Locale\Hierarchy\Config\FileResolver::get */ public function testGet() { diff --git a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/_files/custom/hierarchy_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/_files/custom/hierarchy_config.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/_files/custom/hierarchy_config.xml rename to dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/_files/custom/hierarchy_config.xml diff --git a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/_files/default/hierarchy_config.xml b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/_files/default/hierarchy_config.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Locale/Hierarchy/Config/_files/default/hierarchy_config.xml rename to dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/Config/_files/default/hierarchy_config.xml diff --git a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/ConfigTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/Locale/Hierarchy/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/ConfigTest.php index c39966f217262..a8f110ef276e5 100644 --- a/dev/tests/unit/testsuite/Magento/Locale/Hierarchy/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/Hierarchy/ConfigTest.php @@ -21,22 +21,22 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Locale\Hierarchy; +namespace Magento\Framework\Locale\Hierarchy; class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Locale\Hierarchy\Config + * @var \Magento\Framework\Locale\Hierarchy\Config */ protected $_model; /** - * @var \Magento\Locale\Hierarchy\Config\Reader + * @var \Magento\Framework\Locale\Hierarchy\Config\Reader */ protected $_configReaderMock; /** - * @var \Magento\Config\CacheInterface + * @var \Magento\Framework\Config\CacheInterface */ protected $_cacheMock; @@ -52,8 +52,14 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_configReaderMock = $this->getMock('\Magento\Config\ReaderInterface', array(), array(), '', false); - $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface'); + $this->_configReaderMock = $this->getMock( + '\Magento\Framework\Config\ReaderInterface', + array(), + array(), + '', + false + ); + $this->_cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); $this->_cacheId = 'customCacheId'; $this->_testData = array('key' => 'value'); @@ -68,7 +74,7 @@ protected function setUp() $this->returnValue(serialize($this->_testData)) ); - $this->_model = new \Magento\Locale\Hierarchy\Config( + $this->_model = new \Magento\Framework\Locale\Hierarchy\Config( $this->_configReaderMock, $this->_cacheMock, $this->_cacheId diff --git a/dev/tests/unit/testsuite/Magento/Locale/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Locale/ValidatorTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Locale/ValidatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Locale/ValidatorTest.php index 6f97a61573cfa..5bcf39b0406ce 100644 --- a/dev/tests/unit/testsuite/Magento/Locale/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/ValidatorTest.php @@ -24,18 +24,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Locale; +namespace Magento\Framework\Locale; class ValidatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Locale\Validator + * @var \Magento\Framework\Locale\Validator */ protected $_validatorModel; protected function setUp() { - $localeConfigMock = $this->getMock('Magento\Locale\ConfigInterface'); + $localeConfigMock = $this->getMock('Magento\Framework\Locale\ConfigInterface'); $localeConfigMock->expects( $this->any() )->method( @@ -44,7 +44,7 @@ protected function setUp() $this->returnValue(array('en_US', 'de_DE', 'es_ES')) ); - $this->_validatorModel = new \Magento\Locale\Validator($localeConfigMock); + $this->_validatorModel = new \Magento\Framework\Locale\Validator($localeConfigMock); } /** @@ -62,7 +62,7 @@ public function testIsValidDataProvider() * @dataProvider testIsValidDataProvider * @param string $locale * @param boolean $valid - * @covers \Magento\Locale\Validator::isValid + * @covers \Magento\Framework\Locale\Validator::isValid */ public function testIsValid($locale, $valid) { diff --git a/dev/tests/unit/testsuite/Magento/Mail/MessageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/MessageTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Mail/MessageTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mail/MessageTest.php index 8267d4df1c031..a11ed43c37074 100644 --- a/dev/tests/unit/testsuite/Magento/Mail/MessageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/MessageTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mail; +namespace Magento\Framework\Mail; class MessageTest extends \PHPUnit_Framework_TestCase { @@ -33,7 +33,7 @@ class MessageTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->_messageMock = $this->getMock( - '\Magento\Mail\Message', + '\Magento\Framework\Mail\Message', array('getBodyText', 'getBodyHtml', 'setBodyText', 'setBodyHtml') ); } @@ -42,8 +42,8 @@ public function setUp() * @param string $messageType * @param string $method * - * @covers \Magento\Mail\Message::setBody - * @covers \Magento\Mail\Message::setMessageType + * @covers \Magento\Framework\Mail\Message::setBody + * @covers \Magento\Framework\Mail\Message::setMessageType * @dataProvider setBodyDataProvider */ public function testSetBody($messageType, $method) @@ -78,8 +78,8 @@ public function setBodyDataProvider() * @param string $messageType * @param string $method * - * @covers \Magento\Mail\Message::getBody - * @covers \Magento\Mail\Message::setMessageType + * @covers \Magento\Framework\Mail\Message::getBody + * @covers \Magento\Framework\Mail\Message::setMessageType * @dataProvider getBodyDataProvider */ public function testGetBody($messageType, $method) diff --git a/dev/tests/unit/testsuite/Magento/Mail/Template/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/FactoryTest.php similarity index 67% rename from dev/tests/unit/testsuite/Magento/Mail/Template/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mail/Template/FactoryTest.php index 4a201358e79ab..42bfca7bf2a94 100644 --- a/dev/tests/unit/testsuite/Magento/Mail/Template/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/FactoryTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mail\Template; +namespace Magento\Framework\Mail\Template; class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -37,23 +37,23 @@ class FactoryTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->_objectManagerMock = $this->getMock('\Magento\ObjectManager'); - $this->_templateMock = $this->getMock('\Magento\Mail\TemplateInterface'); + $this->_objectManagerMock = $this->getMock('\Magento\Framework\ObjectManager'); + $this->_templateMock = $this->getMock('\Magento\Framework\Mail\TemplateInterface'); } /** - * @covers \Magento\Mail\Template\Factory::get - * @covers \Magento\Mail\Template\Factory::__construct + * @covers \Magento\Framework\Mail\Template\Factory::get + * @covers \Magento\Framework\Mail\Template\Factory::__construct */ public function testGet() { - $model = new \Magento\Mail\Template\Factory($this->_objectManagerMock); + $model = new \Magento\Framework\Mail\Template\Factory($this->_objectManagerMock); $this->_objectManagerMock->expects($this->once()) ->method('create') - ->with('Magento\Mail\TemplateInterface', array('data' => array('template_id' => 'identifier'))) + ->with('Magento\Framework\Mail\TemplateInterface', array('data' => array('template_id' => 'identifier'))) ->will($this->returnValue($this->_templateMock)); - $this->assertInstanceOf('\Magento\Mail\TemplateInterface', $model->get('identifier')); + $this->assertInstanceOf('\Magento\Framework\Mail\TemplateInterface', $model->get('identifier')); } } diff --git a/dev/tests/unit/testsuite/Magento/Mail/Template/TransportBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/TransportBuilderTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Mail/Template/TransportBuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mail/Template/TransportBuilderTest.php index 43fbd72c74ad7..d90ad92635fa8 100644 --- a/dev/tests/unit/testsuite/Magento/Mail/Template/TransportBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/TransportBuilderTest.php @@ -21,37 +21,37 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mail\Template; +namespace Magento\Framework\Mail\Template; class TransportBuilderTest extends \PHPUnit_Framework_TestCase { /** * @var string */ - protected $builderClassName = '\Magento\Mail\Template\TransportBuilder'; + protected $builderClassName = '\Magento\Framework\Mail\Template\TransportBuilder'; /** - * @var \Magento\Mail\Template\TransportBuilder + * @var \Magento\Framework\Mail\Template\TransportBuilder */ protected $builder; /** - * @var \Magento\Mail\Template\FactoryInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mail\Template\FactoryInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $templateFactoryMock; /** - * @var \Magento\Mail\Message | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mail\Message | \PHPUnit_Framework_MockObject_MockObject */ protected $messageMock; /** - * @var \Magento\ObjectManager | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager | \PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; /** - * @var \Magento\Mail\Template\SenderResolverInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mail\Template\SenderResolverInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $senderResolverMock; @@ -63,12 +63,12 @@ class TransportBuilderTest extends \PHPUnit_Framework_TestCase public function setUp() { $helper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->templateFactoryMock = $this->getMock('Magento\Mail\Template\FactoryInterface'); - $this->messageMock = $this->getMock('Magento\Mail\Message'); - $this->objectManagerMock = $this->getMock('Magento\ObjectManager'); - $this->senderResolverMock = $this->getMock('Magento\Mail\Template\SenderResolverInterface'); + $this->templateFactoryMock = $this->getMock('Magento\Framework\Mail\Template\FactoryInterface'); + $this->messageMock = $this->getMock('Magento\Framework\Mail\Message'); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); + $this->senderResolverMock = $this->getMock('Magento\Framework\Mail\Template\SenderResolverInterface'); $this->_mailTransportFactoryMock = $this->getMockBuilder( - 'Magento\Mail\TransportInterfaceFactory' + 'Magento\Framework\Mail\TransportInterfaceFactory' )->disableOriginalConstructor()->setMethods(['create'])->getMock(); $this->builder = $helper->getObject( $this->builderClassName, @@ -92,7 +92,7 @@ public function testGetTransport($templateType, $messageType, $bodyText) { $vars = array('reason' => 'Reason', 'customer' => 'Customer'); $options = array('area' => 'frontend', 'store' => 1); - $template = $this->getMock('\Magento\Mail\TemplateInterface'); + $template = $this->getMock('\Magento\Framework\Mail\TemplateInterface'); $template->expects($this->once())->method('setVars')->with($this->equalTo($vars))->will($this->returnSelf()); $template->expects( $this->once() @@ -145,7 +145,7 @@ public function testGetTransport($templateType, $messageType, $bodyText) $this->returnSelf() ); - $transport = $this->getMock('\Magento\Mail\TransportInterface'); + $transport = $this->getMock('\Magento\Framework\Mail\TransportInterface'); $this->_mailTransportFactoryMock->expects( $this->at(0) @@ -162,7 +162,7 @@ public function testGetTransport($templateType, $messageType, $bodyText) )->method( 'create' )->with( - $this->equalTo('Magento\Mail\Message') + $this->equalTo('Magento\Framework\Mail\Message') )->will( $this->returnValue($transport) ); @@ -171,7 +171,7 @@ public function testGetTransport($templateType, $messageType, $bodyText) $result = $this->builder->getTransport(); - $this->assertInstanceOf('Magento\Mail\TransportInterface', $result); + $this->assertInstanceOf('Magento\Framework\Mail\TransportInterface', $result); } public function getTransportDataProvider() @@ -179,12 +179,12 @@ public function getTransportDataProvider() return array( array( \Magento\Framework\App\TemplateTypesInterface::TYPE_TEXT, - \Magento\Mail\Message::TYPE_TEXT, + \Magento\Framework\Mail\Message::TYPE_TEXT, 'Plain text' ), array( \Magento\Framework\App\TemplateTypesInterface::TYPE_HTML, - \Magento\Mail\Message::TYPE_HTML, + \Magento\Framework\Mail\Message::TYPE_HTML, '

Html message

' ) ); @@ -224,7 +224,7 @@ public function testSetCc() } /** - * @covers \Magento\Mail\Template\TransportBuilder::addTo + * @covers \Magento\Framework\Mail\Template\TransportBuilder::addTo */ public function testAddTo() { @@ -237,7 +237,7 @@ public function testAddTo() } /** - * @covers \Magento\Mail\Template\TransportBuilder::addBcc + * @covers \Magento\Framework\Mail\Template\TransportBuilder::addBcc */ public function testAddBcc() { @@ -250,7 +250,7 @@ public function testAddBcc() } /** - * @covers \Magento\Mail\Template\TransportBuilder::setReplyTo + * @covers \Magento\Framework\Mail\Template\TransportBuilder::setReplyTo */ public function testSetReplyTo() { diff --git a/dev/tests/unit/testsuite/Magento/Mail/TransportTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/TransportTest.php similarity index 74% rename from dev/tests/unit/testsuite/Magento/Mail/TransportTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mail/TransportTest.php index 8406124e92117..c9d2c300aeadf 100644 --- a/dev/tests/unit/testsuite/Magento/Mail/TransportTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/TransportTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mail; +namespace Magento\Framework\Mail; class TransportTest extends \PHPUnit_Framework_TestCase { @@ -31,14 +31,14 @@ class TransportTest extends \PHPUnit_Framework_TestCase protected $_messageMock; /** - * @var \Magento\Mail\Transport + * @var \Magento\Framework\Mail\Transport */ protected $_transport; public function setUp() { - $this->_messageMock = $this->getMock('\Magento\Mail\Message', array(), array(), '', false); - $this->_transport = new \Magento\Mail\Transport($this->_messageMock); + $this->_messageMock = $this->getMock('\Magento\Framework\Mail\Message', array(), array(), '', false); + $this->_transport = new \Magento\Framework\Mail\Transport($this->_messageMock); } /** @@ -47,13 +47,13 @@ public function setUp() */ public function testTransportWithIncorrectMessageObject() { - $this->_messageMock = $this->getMock('\Magento\Mail\MessageInterface'); - $this->_transport = new \Magento\Mail\Transport($this->_messageMock); + $this->_messageMock = $this->getMock('\Magento\Framework\Mail\MessageInterface'); + $this->_transport = new \Magento\Framework\Mail\Transport($this->_messageMock); } /** - * @covers \Magento\Mail\Transport::sendMessage - * @expectedException \Magento\Mail\Exception + * @covers \Magento\Framework\Mail\Transport::sendMessage + * @expectedException \Magento\Framework\Mail\Exception * @expectedExceptionMessage No body specified */ public function testSendMessageBrokenMessage() diff --git a/dev/tests/unit/testsuite/Magento/Math/CalculatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Math/CalculatorTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Math/CalculatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Math/CalculatorTest.php index a2c030311c6e8..2c631b8969e52 100644 --- a/dev/tests/unit/testsuite/Magento/Math/CalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Math/CalculatorTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Math; +namespace Magento\Framework\Math; class CalculatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Math\Calculator + * @var \Magento\Framework\Math\Calculator */ protected $_model; @@ -44,7 +44,7 @@ public function setUp() return round($argument, 2); })); - $this->_model = new \Magento\Math\Calculator($this->_scopeMock); + $this->_model = new \Magento\Framework\Math\Calculator($this->_scopeMock); } /** @@ -52,8 +52,8 @@ public function setUp() * @param bool $negative * @param float $expected * @dataProvider deltaRoundDataProvider - * @covers \Magento\Math\Calculator::deltaRound - * @covers \Magento\Math\Calculator::__construct + * @covers \Magento\Framework\Math\Calculator::deltaRound + * @covers \Magento\Framework\Math\Calculator::__construct */ public function testDeltaRound($price, $negative, $expected) { diff --git a/dev/tests/unit/testsuite/Magento/Math/DivisionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Math/DivisionTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Math/DivisionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Math/DivisionTest.php index be04f2cde4340..c110013b9811f 100644 --- a/dev/tests/unit/testsuite/Magento/Math/DivisionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Math/DivisionTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Math; +namespace Magento\Framework\Math; class DivisionTest extends \PHPUnit_Framework_TestCase { @@ -30,7 +30,7 @@ class DivisionTest extends \PHPUnit_Framework_TestCase */ public function testGetExactDivision($dividend, $divisor, $expected) { - $mathDivision = new \Magento\Math\Division(); + $mathDivision = new \Magento\Framework\Math\Division(); $remainder = $mathDivision->getExactDivision($dividend, $divisor); $this->assertEquals($expected, $remainder); } diff --git a/dev/tests/unit/testsuite/Magento/Math/RandomTest.php b/dev/tests/unit/testsuite/Magento/Framework/Math/RandomTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Math/RandomTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Math/RandomTest.php index 5e92f7756b2f0..26f9fd3f02128 100644 --- a/dev/tests/unit/testsuite/Magento/Math/RandomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Math/RandomTest.php @@ -1,6 +1,6 @@ getRandomString($length, $chars); $this->assertEquals($length, strlen($string)); @@ -49,21 +49,21 @@ public function getRandomStringDataProvider() return array( array(0), array(10), - array(10, \Magento\Math\Random::CHARS_LOWERS), - array(10, \Magento\Math\Random::CHARS_UPPERS), - array(10, \Magento\Math\Random::CHARS_DIGITS), + array(10, \Magento\Framework\Math\Random::CHARS_LOWERS), + array(10, \Magento\Framework\Math\Random::CHARS_UPPERS), + array(10, \Magento\Framework\Math\Random::CHARS_DIGITS), array( 20, - \Magento\Math\Random::CHARS_LOWERS . - \Magento\Math\Random::CHARS_UPPERS . - \Magento\Math\Random::CHARS_DIGITS + \Magento\Framework\Math\Random::CHARS_LOWERS . + \Magento\Framework\Math\Random::CHARS_UPPERS . + \Magento\Framework\Math\Random::CHARS_DIGITS ) ); } public function testGetUniqueHash() { - $mathRandom = new \Magento\Math\Random(); + $mathRandom = new \Magento\Framework\Math\Random(); $hashOne = $mathRandom->getUniqueHash(); $hashTwo = $mathRandom->getUniqueHash(); $this->assertTrue(is_string($hashOne)); diff --git a/dev/tests/unit/testsuite/Magento/Message/AbstractMessageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/AbstractMessageTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Message/AbstractMessageTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/AbstractMessageTest.php index d299af854ca58..95c4f05245191 100644 --- a/dev/tests/unit/testsuite/Magento/Message/AbstractMessageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/AbstractMessageTest.php @@ -21,30 +21,30 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\AbstractMessage test case + * \Magento\Framework\Message\AbstractMessage test case */ class AbstractMessageTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\AbstractMessage + * @var \Magento\Framework\Message\AbstractMessage */ protected $model; public function setUp() { $this->model = $this->getMockBuilder( - 'Magento\Message\AbstractMessage' + 'Magento\Framework\Message\AbstractMessage' )->disableOriginalConstructor()->setMethods( array('getType') )->getMockForAbstractClass(); } /** - * @covers \Magento\Message\AbstractMessage::getText - * @covers \Magento\Message\AbstractMessage::setText + * @covers \Magento\Framework\Message\AbstractMessage::getText + * @covers \Magento\Framework\Message\AbstractMessage::setText * @dataProvider setTextGetTextProvider */ public function testSetTextGetText($text) @@ -62,8 +62,8 @@ public function setTextGetTextProvider() } /** - * @covers \Magento\Message\AbstractMessage::getIdentifier - * @covers \Magento\Message\AbstractMessage::setIdentifier + * @covers \Magento\Framework\Message\AbstractMessage::getIdentifier + * @covers \Magento\Framework\Message\AbstractMessage::setIdentifier * @dataProvider setIdentifierGetIdentifierProvider */ public function testSetIdentifierGetIdentifier($identifier) @@ -81,8 +81,8 @@ public function setIdentifierGetIdentifierProvider() } /** - * @covers \Magento\Message\AbstractMessage::getIsSticky - * @covers \Magento\Message\AbstractMessage::setIsSticky + * @covers \Magento\Framework\Message\AbstractMessage::getIsSticky + * @covers \Magento\Framework\Message\AbstractMessage::setIsSticky */ public function testSetIsStickyGetIsSticky() { @@ -92,7 +92,7 @@ public function testSetIsStickyGetIsSticky() } /** - * @covers \Magento\Message\AbstractMessage::toString + * @covers \Magento\Framework\Message\AbstractMessage::toString */ public function testToString() { diff --git a/dev/tests/unit/testsuite/Magento/Message/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/CollectionTest.php similarity index 56% rename from dev/tests/unit/testsuite/Magento/Message/CollectionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/CollectionTest.php index abf9b39221604..98865c6d6a539 100644 --- a/dev/tests/unit/testsuite/Magento/Message/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/CollectionTest.php @@ -21,15 +21,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Collection test case + * \Magento\Framework\Message\Collection test case */ class CollectionTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Collection + * @var \Magento\Framework\Message\Collection */ protected $model; @@ -41,19 +41,19 @@ class CollectionTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $this->objectManager->getObject('Magento\Message\Collection'); + $this->model = $this->objectManager->getObject('Magento\Framework\Message\Collection'); } /** - * @covers \Magento\Message\Collection::addMessage - * @covers \Magento\Message\Collection::getItemsByType + * @covers \Magento\Framework\Message\Collection::addMessage + * @covers \Magento\Framework\Message\Collection::getItemsByType */ public function testAddMessage() { $messages = array( - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Error') + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Error') ); foreach ($messages as $message) { @@ -67,19 +67,19 @@ public function testAddMessage() } /** - * @covers \Magento\Message\Collection::addMessage - * @covers \Magento\Message\Collection::getItems - * @covers \Magento\Message\Collection::getLastAddedMessage + * @covers \Magento\Framework\Message\Collection::addMessage + * @covers \Magento\Framework\Message\Collection::getItems + * @covers \Magento\Framework\Message\Collection::getLastAddedMessage */ public function testGetItems() { $messages = array( - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Notice'), - $this->objectManager->getObject('Magento\Message\Notice'), - $this->objectManager->getObject('Magento\Message\Warning'), - $this->objectManager->getObject('Magento\Message\Warning'), - $this->objectManager->getObject('Magento\Message\Success') + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Notice'), + $this->objectManager->getObject('Magento\Framework\Message\Notice'), + $this->objectManager->getObject('Magento\Framework\Message\Warning'), + $this->objectManager->getObject('Magento\Framework\Message\Warning'), + $this->objectManager->getObject('Magento\Framework\Message\Success') ); foreach ($messages as $message) { @@ -91,21 +91,21 @@ public function testGetItems() } /** - * @covers \Magento\Message\Collection::addMessage - * @covers \Magento\Message\Collection::getItemsByType - * @covers \Magento\Message\Collection::getCount - * @covers \Magento\Message\Collection::getCountByType + * @covers \Magento\Framework\Message\Collection::addMessage + * @covers \Magento\Framework\Message\Collection::getItemsByType + * @covers \Magento\Framework\Message\Collection::getCount + * @covers \Magento\Framework\Message\Collection::getCountByType */ public function testGetItemsByType() { $messages = array( - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Notice'), - $this->objectManager->getObject('Magento\Message\Success'), - $this->objectManager->getObject('Magento\Message\Notice'), - $this->objectManager->getObject('Magento\Message\Success'), - $this->objectManager->getObject('Magento\Message\Warning'), - $this->objectManager->getObject('Magento\Message\Error') + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Notice'), + $this->objectManager->getObject('Magento\Framework\Message\Success'), + $this->objectManager->getObject('Magento\Framework\Message\Notice'), + $this->objectManager->getObject('Magento\Framework\Message\Success'), + $this->objectManager->getObject('Magento\Framework\Message\Warning'), + $this->objectManager->getObject('Magento\Framework\Message\Error') ); $messageTypes = array( @@ -134,18 +134,18 @@ public function testGetItemsByType() } /** - * @covers \Magento\Message\Collection::addMessage - * @covers \Magento\Message\Collection::getErrors + * @covers \Magento\Framework\Message\Collection::addMessage + * @covers \Magento\Framework\Message\Collection::getErrors */ public function testGetErrors() { $messages = array( - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Notice'), - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Warning'), - $this->objectManager->getObject('Magento\Message\Error') + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Notice'), + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Warning'), + $this->objectManager->getObject('Magento\Framework\Message\Error') ); foreach ($messages as $message) { @@ -157,15 +157,15 @@ public function testGetErrors() } /** - * @covers \Magento\Message\Collection::getMessageByIdentifier - * @covers \Magento\Message\Collection::deleteMessageByIdentifier + * @covers \Magento\Framework\Message\Collection::getMessageByIdentifier + * @covers \Magento\Framework\Message\Collection::deleteMessageByIdentifier */ public function testGetMessageByIdentifier() { $messages = array( - $this->objectManager->getObject('Magento\Message\Error')->setIdentifier('error_id'), - $this->objectManager->getObject('Magento\Message\Notice')->setIdentifier('notice_id'), - $this->objectManager->getObject('Magento\Message\Warning')->setIdentifier('warning_id') + $this->objectManager->getObject('Magento\Framework\Message\Error')->setIdentifier('error_id'), + $this->objectManager->getObject('Magento\Framework\Message\Notice')->setIdentifier('notice_id'), + $this->objectManager->getObject('Magento\Framework\Message\Warning')->setIdentifier('warning_id') ); foreach ($messages as $message) { @@ -184,15 +184,15 @@ public function testGetMessageByIdentifier() } /** - * @covers \Magento\Message\Collection::clear + * @covers \Magento\Framework\Message\Collection::clear */ public function testClear() { $messages = array( - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Warning'), - $this->objectManager->getObject('Magento\Message\Notice'), - $this->objectManager->getObject('Magento\Message\Success') + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Warning'), + $this->objectManager->getObject('Magento\Framework\Message\Notice'), + $this->objectManager->getObject('Magento\Framework\Message\Success') ); foreach ($messages as $message) { @@ -205,15 +205,15 @@ public function testClear() } /** - * @covers \Magento\Message\Collection::clear + * @covers \Magento\Framework\Message\Collection::clear */ public function testClearWithSticky() { $messages = array( - $this->objectManager->getObject('Magento\Message\Error'), - $this->objectManager->getObject('Magento\Message\Warning'), - $this->objectManager->getObject('Magento\Message\Notice')->setIsSticky(true), - $this->objectManager->getObject('Magento\Message\Success') + $this->objectManager->getObject('Magento\Framework\Message\Error'), + $this->objectManager->getObject('Magento\Framework\Message\Warning'), + $this->objectManager->getObject('Magento\Framework\Message\Notice')->setIsSticky(true), + $this->objectManager->getObject('Magento\Framework\Message\Success') ); foreach ($messages as $message) { diff --git a/dev/tests/unit/testsuite/Magento/Message/ErrorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/ErrorTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Message/ErrorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/ErrorTest.php index 713712514cb09..901ca7a45d8a7 100644 --- a/dev/tests/unit/testsuite/Magento/Message/ErrorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/ErrorTest.php @@ -21,22 +21,22 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Error test case + * \Magento\Framework\Message\Error test case */ class ErrorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Error + * @var \Magento\Framework\Message\Error */ protected $model; public function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Message\Error'); + $this->model = $objectManager->getObject('Magento\Framework\Message\Error'); } public function testGetType() diff --git a/dev/tests/unit/testsuite/Magento/Message/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/FactoryTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Message/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/FactoryTest.php index cd21e45e8906d..cd38a019c53ed 100644 --- a/dev/tests/unit/testsuite/Magento/Message/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/FactoryTest.php @@ -22,12 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Factory + * @var \Magento\Framework\Message\Factory */ protected $factory; @@ -39,8 +39,8 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->objectManagerMock = $this->getMock('Magento\ObjectManager'); - $this->factory = new \Magento\Message\Factory( + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); + $this->factory = new \Magento\Framework\Message\Factory( $this->objectManagerMock ); } @@ -55,15 +55,15 @@ public function testCreateWithWrongTypeException() $this->factory->create('type', 'text'); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Magento\Message\Error doesn't implement \Magento\Message\MessageInterface - */ public function testCreateWithWrongInterfaceImplementation() { + $this->setExpectedException( + '\InvalidArgumentException', + 'Magento\Framework\Message\Error doesn\'t implement \Magento\Framework\Message\MessageInterface' + ); $messageMock = new \stdClass(); $type = 'error'; - $className = 'Magento\Message\\' . ucfirst($type); + $className = 'Magento\\Framework\\Message\\' . ucfirst($type); $this->objectManagerMock ->expects($this->once()) ->method('create') @@ -74,9 +74,9 @@ public function testCreateWithWrongInterfaceImplementation() public function testSuccessfulCreateMessage() { - $messageMock = $this->getMock('Magento\Message\Success', array(), array(), '', false); + $messageMock = $this->getMock('Magento\Framework\Message\Success', array(), array(), '', false); $type = 'success'; - $className = 'Magento\Message\\' . ucfirst($type); + $className = 'Magento\\Framework\\Message\\' . ucfirst($type); $this->objectManagerMock ->expects($this->once()) ->method('create') diff --git a/dev/tests/unit/testsuite/Magento/Message/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Message/ManagerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php index c8554441c4fb6..e26167e86a4eb 100644 --- a/dev/tests/unit/testsuite/Magento/Message/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/ManagerTest.php @@ -21,10 +21,10 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Manager test case + * \Magento\Framework\Message\Manager test case */ class ManagerTest extends \PHPUnit_Framework_TestCase { @@ -49,17 +49,17 @@ class ManagerTest extends \PHPUnit_Framework_TestCase protected $session; /** - * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Logger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; /** - * @var \Magento\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $eventManager; /** - * @var \Magento\Message\Manager + * @var \Magento\Framework\Message\Manager */ protected $model; @@ -71,35 +71,35 @@ class ManagerTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->messagesFactory = $this->getMockBuilder( - 'Magento\Message\CollectionFactory' + 'Magento\Framework\Message\CollectionFactory' )->disableOriginalConstructor()->setMethods( array('create') )->getMock(); $this->messageFactory = $this->getMockBuilder( - 'Magento\Message\Factory' + 'Magento\Framework\Message\Factory' )->disableOriginalConstructor()->setMethods( array('create') )->getMock(); $this->session = $this->getMockBuilder( - 'Magento\Message\Session' + 'Magento\Framework\Message\Session' )->disableOriginalConstructor()->setMethods( array('getData', 'setData') )->getMock(); $this->logger = $this->getMockBuilder( - 'Magento\Logger' + 'Magento\Framework\Logger' )->setMethods( array('logFile') )->disableOriginalConstructor()->getMock(); $this->eventManager = $this->getMockBuilder( - 'Magento\Event\Manager' + 'Magento\Framework\Event\Manager' )->setMethods( array('dispatch') )->disableOriginalConstructor()->getMock(); - $this->messageMock = $this->getMock('Magento\Message\MessageInterface'); + $this->messageMock = $this->getMock('Magento\Framework\Message\MessageInterface'); $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $this->objectManager->getObject( - 'Magento\Message\Manager', + 'Magento\Framework\Message\Manager', array( 'messagesFactory' => $this->messagesFactory, 'messageFactory' => $this->messageFactory, @@ -116,7 +116,7 @@ public function testGetDefaultGroup() $customDefaultGroup = 'some_group'; $customManager = $this->objectManager->getObject( - 'Magento\Message\Manager', + 'Magento\Framework\Message\Manager', array('defaultGroup' => $customDefaultGroup) ); $this->assertEquals($customDefaultGroup, $customManager->getDefaultGroup()); @@ -125,7 +125,7 @@ public function testGetDefaultGroup() public function testGetMessages() { $messageCollection = $this->getMockBuilder( - 'Magento\Message\Collection' + 'Magento\Framework\Message\Collection' )->disableOriginalConstructor()->setMethods( array('addMessage') )->getMock(); @@ -175,7 +175,7 @@ public function testGetMessages() public function testGetMessagesWithClear() { $messageCollection = $this->getMockBuilder( - 'Magento\Message\Collection' + 'Magento\Framework\Message\Collection' )->disableOriginalConstructor()->setMethods( array('addMessage', 'clear') )->getMock(); @@ -204,7 +204,7 @@ public function testAddException() $logText = "Exception message: {$exceptionMessage}\nTrace:"; $messageError = $this->getMockBuilder( - 'Magento\Message\Error' + 'Magento\Framework\Message\Error' )->setConstructorArgs( array('text' => $alternativeText) )->getMock(); @@ -227,11 +227,11 @@ public function testAddException() )->with( $this->stringStartsWith($logText), \Zend_Log::DEBUG, - \Magento\Logger::LOGGER_EXCEPTION + \Magento\Framework\Logger::LOGGER_EXCEPTION ); $messageCollection = $this->getMockBuilder( - 'Magento\Message\Collection' + 'Magento\Framework\Message\Collection' )->disableOriginalConstructor()->setMethods( array('addMessage') )->getMock(); @@ -260,7 +260,13 @@ public function testAddMessage($type, $methodName) { $this->assertFalse($this->model->hasMessages()); $message = 'Message'; - $messageCollection = $this->getMock('Magento\Message\Collection', array('addMessage'), array(), '', false); + $messageCollection = $this->getMock( + 'Magento\Framework\Message\Collection', + array('addMessage'), + array(), + '', + false + ); $this->session->expects($this->any()) ->method('getData') ->will($this->returnValue($messageCollection)); @@ -292,7 +298,7 @@ public function addMessageDataProvider() public function testAddUniqueMessagesWhenMessagesImplementMessageInterface($messages, $text, $expectation) { $messageCollection = - $this->getMock('Magento\Message\Collection', array('getItems', 'addMessage'), array(), '', false); + $this->getMock('Magento\Framework\Message\Collection', array('getItems', 'addMessage'), array(), '', false); $this->session->expects($this->any()) ->method('getData') ->will($this->returnValue($messageCollection)); @@ -309,9 +315,15 @@ public function testAddUniqueMessagesWhenMessagesImplementMessageInterface($mess public function addUniqueMessagesWhenMessagesImplementMessageInterfaceDataProvider() { return array( - 'message_text_is_unique' => array($this->getMock('Magento\Message\MessageInterface'), 'text1', 'once'), + 'message_text_is_unique' => array( + $this->getMock('Magento\Framework\Message\MessageInterface'), + 'text1', + 'once' + ), 'message_text_is_already_exist' => array( - $this->getMock('Magento\Message\MessageInterface'), 'text', 'never' + $this->getMock('Magento\Framework\Message\MessageInterface'), + 'text', + 'never' ) ); } @@ -323,7 +335,7 @@ public function addUniqueMessagesWhenMessagesImplementMessageInterfaceDataProvid public function testAddUniqueMessages($messages) { $messageCollection = - $this->getMock('Magento\Message\Collection', array('getItems', 'addMessage'), array(), '', false); + $this->getMock('Magento\Framework\Message\Collection', array('getItems', 'addMessage'), array(), '', false); $this->session->expects($this->any()) ->method('getData') ->will($this->returnValue($messageCollection)); @@ -345,8 +357,13 @@ public function addUniqueMessagesDataProvider() public function testAddMessages() { - $messageCollection - = $this->getMock('Magento\Message\Collection', array('getItems', 'addMessage'), array(), '', false); + $messageCollection = $this->getMock( + 'Magento\Framework\Message\Collection', + array('getItems', 'addMessage'), + array(), + '', + false + ); $this->session->expects($this->any()) ->method('getData') ->will($this->returnValue($messageCollection)); diff --git a/dev/tests/unit/testsuite/Magento/Message/NoticeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/NoticeTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Message/NoticeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/NoticeTest.php index 48596dcb6fe9a..cd865a05a7820 100644 --- a/dev/tests/unit/testsuite/Magento/Message/NoticeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/NoticeTest.php @@ -21,22 +21,22 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Notice test case + * \Magento\Framework\Message\Notice test case */ class NoticeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Notice + * @var \Magento\Framework\Message\Notice */ protected $model; public function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Message\Notice'); + $this->model = $objectManager->getObject('Magento\Framework\Message\Notice'); } public function testGetType() diff --git a/dev/tests/unit/testsuite/Magento/Message/SuccessTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/SuccessTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Message/SuccessTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/SuccessTest.php index d5c1d9c6d4e92..04b06f3ea658a 100644 --- a/dev/tests/unit/testsuite/Magento/Message/SuccessTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/SuccessTest.php @@ -21,22 +21,22 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Success test case + * \Magento\Framework\Message\Success test case */ class SuccessTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Success + * @var \Magento\Framework\Message\Success */ protected $model; public function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Message\Success'); + $this->model = $objectManager->getObject('Magento\Framework\Message\Success'); } public function testGetType() diff --git a/dev/tests/unit/testsuite/Magento/Message/WarningTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/WarningTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Message/WarningTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Message/WarningTest.php index 19b37234563fd..cb6dc18fa428f 100644 --- a/dev/tests/unit/testsuite/Magento/Message/WarningTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/WarningTest.php @@ -21,22 +21,22 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Message; +namespace Magento\Framework\Message; /** - * \Magento\Message\Warning test case + * \Magento\Framework\Message\Warning test case */ class WarningTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Message\Warning + * @var \Magento\Framework\Message\Warning */ protected $model; public function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Message\Warning'); + $this->model = $objectManager->getObject('Magento\Framework\Message\Warning'); } public function testGetType() diff --git a/dev/tests/unit/testsuite/Magento/Model/AbstractModelTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractModelTest.php similarity index 72% rename from dev/tests/unit/testsuite/Magento/Model/AbstractModelTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Model/AbstractModelTest.php index c6d8a527a298f..5ecd0b3d67997 100644 --- a/dev/tests/unit/testsuite/Magento/Model/AbstractModelTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractModelTest.php @@ -22,37 +22,37 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Model; +namespace Magento\Framework\Model; class AbstractModelTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Model\AbstractModel + * @var \Magento\Framework\Model\AbstractModel */ protected $model; /** - * @var \Magento\Model\Context|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Model\Context|\PHPUnit_Framework_MockObject_MockObject */ protected $contextMock; /** - * @var \Magento\Registry|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */ protected $registryMock; /** - * @var \Magento\Model\Resource\Db\AbstractDb|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Model\Resource\Db\AbstractDb|\PHPUnit_Framework_MockObject_MockObject */ protected $resourceMock; /** - * @var \Magento\Data\Collection\Db|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Data\Collection\Db|\PHPUnit_Framework_MockObject_MockObject */ protected $resourceCollectionMock; /** - * @var \Magento\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $adapterMock; @@ -64,18 +64,18 @@ class AbstractModelTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->actionValidatorMock = $this->getMock( - '\Magento\Model\ActionValidator\RemoveAction', array(), array(), '', false + '\Magento\Framework\Model\ActionValidator\RemoveAction', array(), array(), '', false ); - $this->contextMock = new \Magento\Model\Context( - $this->getMock('Magento\Logger', array(), array(), '', false), - $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false), + $this->contextMock = new \Magento\Framework\Model\Context( + $this->getMock('Magento\Framework\Logger', array(), array(), '', false), + $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false), $this->getMock('Magento\Framework\App\CacheInterface', array(), array(), '', false), $this->getMock('Magento\Framework\App\State', array(), array(), '', false), $this->actionValidatorMock ); - $this->registryMock = $this->getMock('Magento\Registry', array(), array(), '', false); + $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false); $this->resourceMock = $this->getMock( - 'Magento\Model\Resource\Db\AbstractDb', + 'Magento\Framework\Model\Resource\Db\AbstractDb', array( '_construct', '_getReadAdapter', @@ -90,12 +90,24 @@ protected function setUp() '', false ); - $this->resourceCollectionMock = $this->getMock('Magento\Data\Collection\Db', array(), array(), '', false); + $this->resourceCollectionMock = $this->getMock( + 'Magento\Framework\Data\Collection\Db', + array(), + array(), + '', + false + ); $this->model = $this->getMockForAbstractClass( - 'Magento\Model\AbstractModel', + 'Magento\Framework\Model\AbstractModel', array($this->contextMock, $this->registryMock, $this->resourceMock, $this->resourceCollectionMock) ); - $this->adapterMock = $this->getMock('Magento\DB\Adapter\AdapterInterface', array(), array(), '', false); + $this->adapterMock = $this->getMock( + 'Magento\Framework\DB\Adapter\AdapterInterface', + array(), + array(), + '', + false + ); $this->resourceMock->expects($this->any()) ->method('_getWriteAdapter') ->will($this->returnValue($this->adapterMock)); @@ -136,7 +148,7 @@ public function testDeleteRaiseException() } /** - * @expectedException \Magento\Model\Exception + * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Delete operation is forbidden for current area */ public function testDeleteOnModelThatCanNotBeRemoved() diff --git a/dev/tests/unit/testsuite/Magento/Model/ActionValidator/RemoveActionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/ActionValidator/RemoveActionTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Model/ActionValidator/RemoveActionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Model/ActionValidator/RemoveActionTest.php index 31f42b0eb42f5..4c989dae7a6b7 100644 --- a/dev/tests/unit/testsuite/Magento/Model/ActionValidator/RemoveActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Model/ActionValidator/RemoveActionTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Model\ActionValidator; +namespace Magento\Framework\Model\ActionValidator; class RemoveActionTest extends \PHPUnit_Framework_TestCase { @@ -32,16 +32,19 @@ class RemoveActionTest extends \PHPUnit_Framework_TestCase * @param bool $expectedResult * * @dataProvider isAllowedDataProvider - * @covers \Magento\Model\ActionValidator\RemoveAction::isAllowed - * @covers \Magento\Model\ActionValidator\RemoveAction::getBaseClassName + * @covers \Magento\Framework\Model\ActionValidator\RemoveAction::isAllowed + * @covers \Magento\Framework\Model\ActionValidator\RemoveAction::getBaseClassName */ public function testIsAllowed($modelToCheck, $protectedModel, $secureArea, $expectedResult) { - $registryMock = $this->getMock('\Magento\Registry', array(), array(), '', false); + $registryMock = $this->getMock('\Magento\Framework\Registry', array(), array(), '', false); $registryMock->expects($this->once()) ->method('registry')->with('isSecureArea')->will($this->returnValue($secureArea)); - $model = new \Magento\Model\ActionValidator\RemoveAction($registryMock, array('class' => $protectedModel)); + $model = new \Magento\Framework\Model\ActionValidator\RemoveAction( + $registryMock, + array('class' => $protectedModel) + ); $this->assertEquals($expectedResult, $model->isAllowed($modelToCheck)); } diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/DomTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/DomTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/DomTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/DomTest.php index 46ca37947ca46..d5d149bd33825 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/DomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/DomTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module\Declaration\Converter; +namespace Magento\Framework\Module\Declaration\Converter; class DomTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\Declaration\Converter\Dom + * @var \Magento\Framework\Module\Declaration\Converter\Dom */ protected $_converter; protected function setUp() { - $this->_converter = new \Magento\Module\Declaration\Converter\Dom(); + $this->_converter = new \Magento\Framework\Module\Declaration\Converter\Dom(); } public function testConvertWithValidDom() diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/converted_valid_module.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/converted_valid_module.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/converted_valid_module.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/converted_valid_module.php diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/valid_module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/valid_module.xml similarity index 97% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/valid_module.xml rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/valid_module.xml index 33edb09b28cc4..e85882661943b 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/Converter/_files/valid_module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Converter/_files/valid_module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml similarity index 95% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml index 12e5339c0f812..f94d8e4a569de 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Four/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml similarity index 96% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml index 11eef60efd053..b1fb42ab56562 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/One/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml similarity index 95% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml index 544bccd69a5fc..edbce17fee9d5 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Three/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml similarity index 96% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml index 70971582e2de6..365a0fe51d03a 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/code/Module/Two/etc/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml similarity index 96% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml index a5e78788c7f51..2b451757f4102 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolver/_files/app/etc/custom/module.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolverTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolverTest.php index 2e8438041c75f..dcba394b0c7a9 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolverTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module\Declaration; +namespace Magento\Framework\Module\Declaration; class FileResolverTest extends \PHPUnit_Framework_TestCase { @@ -79,11 +79,11 @@ protected function getFileResolver($baseDir) { $filesystem = new \Magento\Framework\App\Filesystem( new \Magento\Framework\App\Filesystem\DirectoryList($baseDir), - new \Magento\Filesystem\Directory\ReadFactory(), - new \Magento\Filesystem\Directory\WriteFactory() + new \Magento\Framework\Filesystem\Directory\ReadFactory(), + new \Magento\Framework\Filesystem\Directory\WriteFactory() ); - $iteratorFactory = new \Magento\Config\FileIteratorFactory(); + $iteratorFactory = new \Magento\Framework\Config\FileIteratorFactory(); - return new \Magento\Module\Declaration\FileResolver($filesystem, $iteratorFactory); + return new \Magento\Framework\Module\Declaration\FileResolver($filesystem, $iteratorFactory); } } diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Reader/FilesystemTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Reader/FilesystemTest.php index 4837c1badb794..8e40d7cd688a0 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Reader/FilesystemTest.php @@ -21,26 +21,32 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module\Declaration\Reader; +namespace Magento\Framework\Module\Declaration\Reader; class FilesystemTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\Declaration\Reader\Filesystem + * @var \Magento\Framework\Module\Declaration\Reader\Filesystem */ protected $_model; protected function setUp() { $fileResolver = $this->getFileResolver(__DIR__ . '/../FileResolver/_files'); - $converter = new \Magento\Module\Declaration\Converter\Dom(); - $schemaLocatorMock = $this->getMock('Magento\Module\Declaration\SchemaLocator', array(), array(), '', false); - $validationStateMock = $this->getMock('Magento\Config\ValidationStateInterface'); + $converter = new \Magento\Framework\Module\Declaration\Converter\Dom(); + $schemaLocatorMock = $this->getMock( + 'Magento\Framework\Module\Declaration\SchemaLocator', + array(), + array(), + '', + false + ); + $validationStateMock = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); $appStateMock->expects($this->any())->method('isInstalled')->will($this->returnValue(true)); - $dependencyManager = $this->getMock('Magento\Module\DependencyManagerInterface'); + $dependencyManager = $this->getMock('Magento\Framework\Module\DependencyManagerInterface'); $dependencyManager->expects( $this->any() )->method( @@ -49,7 +55,7 @@ protected function setUp() $this->returnValue(array()) ); - $this->_model = new \Magento\Module\Declaration\Reader\Filesystem( + $this->_model = new \Magento\Framework\Module\Declaration\Reader\Filesystem( $fileResolver, $converter, $schemaLocatorMock, @@ -102,17 +108,17 @@ public function testRead() * Get file resolver instance * * @param string $baseDir - * @return \Magento\Module\Declaration\FileResolver + * @return \Magento\Framework\Module\Declaration\FileResolver */ protected function getFileResolver($baseDir) { $filesystem = new \Magento\Framework\App\Filesystem( new \Magento\Framework\App\Filesystem\DirectoryList($baseDir), - new \Magento\Filesystem\Directory\ReadFactory(), - new \Magento\Filesystem\Directory\WriteFactory() + new \Magento\Framework\Filesystem\Directory\ReadFactory(), + new \Magento\Framework\Filesystem\Directory\WriteFactory() ); - $iteratorFactory = new \Magento\Config\FileIteratorFactory(); + $iteratorFactory = new \Magento\Framework\Config\FileIteratorFactory(); - return new \Magento\Module\Declaration\FileResolver($filesystem, $iteratorFactory); + return new \Magento\Framework\Module\Declaration\FileResolver($filesystem, $iteratorFactory); } } diff --git a/dev/tests/unit/testsuite/Magento/Module/DependencyManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/DependencyManagerTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Module/DependencyManagerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/DependencyManagerTest.php index a56bbb442967d..1eff7b96ba6ef 100644 --- a/dev/tests/unit/testsuite/Magento/Module/DependencyManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/DependencyManagerTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module; +namespace Magento\Framework\Module; class DependencyManagerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\DependencyManager + * @var \Magento\Framework\Module\DependencyManager */ protected $model; protected function setUp() { - $this->model = new \Magento\Module\DependencyManager(); + $this->model = new \Magento\Framework\Module\DependencyManager(); } /** diff --git a/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReaderTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReaderTest.php index 81b2352482dab..d1b6072e94886 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReaderTest.php @@ -24,17 +24,17 @@ */ /** - * Test class for \Magento\Module\Dir\File + * Test class for \Magento\Framework\Module\Dir\File */ -namespace Magento\Module\Dir; +namespace Magento\Framework\Module\Dir; use \Magento\Framework\App\Filesystem, - \Magento\Config\FileIteratorFactory; + \Magento\Framework\Config\FileIteratorFactory; class ReaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\Dir\Reader + * @var \Magento\Framework\Module\Dir\Reader */ protected $_model; @@ -78,16 +78,16 @@ protected function setUp() false, false ); - $this->_dirsMock = $this->getMock('Magento\Module\Dir', array(), array(), '', false, false); + $this->_dirsMock = $this->getMock('Magento\Framework\Module\Dir', array(), array(), '', false, false); $this->_baseConfigMock = $this->getMock('Magento\Framework\App\Config\Base', array(), array(), '', false, false); - $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface'); + $this->_moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface'); $this->_filesystemMock = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false, false); $this->_fileIteratorFactory = - $this->getMock('\Magento\Config\FileIteratorFactory', array(), array(), '', false, false); + $this->getMock('\Magento\Framework\Config\FileIteratorFactory', array(), array(), '', false, false); - $this->_model = new \Magento\Module\Dir\Reader( + $this->_model = new \Magento\Framework\Module\Dir\Reader( $this->_dirsMock, $this->_moduleListMock, $this->_filesystemMock, @@ -128,7 +128,7 @@ public function testGetConfigurationFiles() ), ); $configPath = 'app/code/Test/Module/etc/config.xml'; - $modulesDirectoryMock = $this->getMock('Magento\Filesystem\Directory\ReadInterface'); + $modulesDirectoryMock = $this->getMock('Magento\Framework\Filesystem\Directory\ReadInterface'); $modulesDirectoryMock->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0)); $modulesDirectoryMock->expects($this->any())->method('isExist') ->with($configPath) @@ -137,7 +137,7 @@ public function testGetConfigurationFiles() ->will($this->returnValue($modulesDirectoryMock)); $this->_moduleListMock->expects($this->once())->method('getModules')->will($this->returnValue($modules)); - $model = new \Magento\Module\Dir\Reader( + $model = new \Magento\Framework\Module\Dir\Reader( $this->_dirsMock, $this->_moduleListMock, $this->_filesystemMock, diff --git a/dev/tests/unit/testsuite/Magento/Module/Dir/ReverseResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReverseResolverTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Module/Dir/ReverseResolverTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReverseResolverTest.php index e5f73608a9bb2..491bc3ac4a98d 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Dir/ReverseResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReverseResolverTest.php @@ -21,30 +21,30 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module\Dir; +namespace Magento\Framework\Module\Dir; class ReverseResolverTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\Dir\ReverseResolver + * @var \Magento\Framework\Module\Dir\ReverseResolver */ protected $_model; /** - * @var \Magento\Module\ModuleListInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\ModuleListInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $_moduleList; /** - * @var \Magento\Module\Dir|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Module\Dir|\PHPUnit_Framework_MockObject_MockObject */ protected $_moduleDirs; protected function setUp() { - $this->_moduleList = $this->getMock('Magento\Module\ModuleListInterface'); - $this->_moduleDirs = $this->getMock('Magento\Module\Dir', array(), array(), '', false, false); - $this->_model = new \Magento\Module\Dir\ReverseResolver($this->_moduleList, $this->_moduleDirs); + $this->_moduleList = $this->getMock('Magento\Framework\Module\ModuleListInterface'); + $this->_moduleDirs = $this->getMock('Magento\Framework\Module\Dir', array(), array(), '', false, false); + $this->_model = new \Magento\Framework\Module\Dir\ReverseResolver($this->_moduleList, $this->_moduleDirs); } /** diff --git a/dev/tests/unit/testsuite/Magento/Module/DirTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/DirTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Module/DirTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/DirTest.php index 30cfa8ea07aef..c9a5f02e1f957 100644 --- a/dev/tests/unit/testsuite/Magento/Module/DirTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/DirTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module; +namespace Magento\Framework\Module; class DirTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\Dir + * @var \Magento\Framework\Module\Dir */ protected $_model; @@ -36,20 +36,27 @@ class DirTest extends \PHPUnit_Framework_TestCase protected $filesystemMock; /** - * @var \Magento\Stdlib\String|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Stdlib\String|\PHPUnit_Framework_MockObject_MockObject */ protected $_stringMock; /** - * @var \Magento\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Filesystem\Directory\ReadInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $directoryMock; protected function setUp() { $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false, false); - $this->directoryMock = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false, false); - $this->_stringMock = $this->getMock('Magento\Stdlib\String', array(), array(), '', false, false); + $this->directoryMock = $this->getMock( + 'Magento\Framework\Filesystem\Directory\Read', + array(), + array(), + '', + false, + false + ); + $this->_stringMock = $this->getMock('Magento\Framework\Stdlib\String', array(), array(), '', false, false); $this->_stringMock->expects($this->once())->method('upperCaseWords')->will($this->returnValue('Test/Module')); @@ -61,7 +68,7 @@ protected function setUp() $this->returnValue($this->directoryMock) ); - $this->_model = new \Magento\Module\Dir($this->filesystemMock, $this->_stringMock); + $this->_model = new \Magento\Framework\Module\Dir($this->filesystemMock, $this->_stringMock); } public function testGetDirModuleRoot() diff --git a/dev/tests/unit/testsuite/Magento/Module/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/ManagerTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Module/ManagerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/ManagerTest.php index f802f40ae036c..02a5f3035cbb5 100644 --- a/dev/tests/unit/testsuite/Magento/Module/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/ManagerTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module; +namespace Magento\Framework\Module; class ManagerTest extends \PHPUnit_Framework_TestCase { @@ -31,7 +31,7 @@ class ManagerTest extends \PHPUnit_Framework_TestCase const XML_PATH_OUTPUT_ENABLED = 'custom/is_module_output_enabled'; /** - * @var \Magento\Module\Manager + * @var \Magento\Framework\Module\Manager */ private $_model; @@ -47,14 +47,14 @@ class ManagerTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_moduleList = $this->getMockForAbstractClass('Magento\Module\ModuleListInterface'); - $this->_outputConfig = $this->getMockForAbstractClass('Magento\Module\Output\ConfigInterface'); - $this->_model = new \Magento\Module\Manager( + $this->_moduleList = $this->getMockForAbstractClass('Magento\Framework\Module\ModuleListInterface'); + $this->_outputConfig = $this->getMockForAbstractClass('Magento\Framework\Module\Output\ConfigInterface'); + $this->_model = new \Magento\Framework\Module\Manager( $this->_outputConfig, $this->_moduleList, array( 'Module_DisabledOutputOne' => self::XML_PATH_OUTPUT_ENABLED, - 'Module_DisabledOutputTwo' => 'Magento\Module\ManagerTest::XML_PATH_OUTPUT_ENABLED' + 'Module_DisabledOutputTwo' => 'Magento\Framework\Module\ManagerTest::XML_PATH_OUTPUT_ENABLED' ) ); } diff --git a/dev/tests/unit/testsuite/Magento/Module/ModuleListTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/ModuleListTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Module/ModuleListTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/ModuleListTest.php index e22a63fc6ca87..1403a34bbbf55 100644 --- a/dev/tests/unit/testsuite/Magento/Module/ModuleListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/ModuleListTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module; +namespace Magento\Framework\Module; class ModuleListTest extends \PHPUnit_Framework_TestCase { @@ -38,8 +38,14 @@ class ModuleListTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->cacheMock = $this->getMock('Magento\Config\CacheInterface'); - $this->readerMock = $this->getMock('Magento\Module\Declaration\Reader\Filesystem', array(), array(), '', false); + $this->cacheMock = $this->getMock('Magento\Framework\Config\CacheInterface'); + $this->readerMock = $this->getMock( + 'Magento\Framework\Module\Declaration\Reader\Filesystem', + array(), + array(), + '', + false + ); } public function testGetModulesWhenDataIsCached() diff --git a/dev/tests/unit/testsuite/Magento/Module/ResourceResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/ResourceResolverTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Module/ResourceResolverTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/ResourceResolverTest.php index 1a885a6dc56ba..f4678f0bf8d75 100644 --- a/dev/tests/unit/testsuite/Magento/Module/ResourceResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/ResourceResolverTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module; +namespace Magento\Framework\Module; class ResourceResolverTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Module\ResourceResolver + * @var \Magento\Framework\Module\ResourceResolver */ protected $_model; @@ -37,8 +37,8 @@ class ResourceResolverTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_moduleReaderMock = $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false); - $this->_model = new \Magento\Module\ResourceResolver($this->_moduleReaderMock); + $this->_moduleReaderMock = $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false); + $this->_model = new \Magento\Framework\Module\ResourceResolver($this->_moduleReaderMock); } public function testGetResourceList() diff --git a/dev/tests/unit/testsuite/Magento/Module/Setup/MigrationTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php similarity index 71% rename from dev/tests/unit/testsuite/Magento/Module/Setup/MigrationTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php index 509b3976ff9c5..4a7e8536f31d2 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Setup/MigrationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php @@ -28,13 +28,13 @@ /** * Tests for resource setup model needed for migration process between Magento versions */ -namespace Magento\Module\Setup; +namespace Magento\Framework\Module\Setup; class MigrationTest extends \PHPUnit_Framework_TestCase { /** * Result of update class aliases to compare with expected. - * Used in callback for \Magento\DB\Select::update. + * Used in callback for \Magento\Framework\DB\Select::update. * * @var array */ @@ -42,14 +42,14 @@ class MigrationTest extends \PHPUnit_Framework_TestCase /** * Where conditions to compare with expected. - * Used in callback for \Magento\DB\Select::where. + * Used in callback for \Magento\Framework\DB\Select::where. * * @var array */ protected $_actualWhere; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\DB\Select + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\DB\Select */ protected $_selectMock; @@ -71,7 +71,7 @@ protected function tearDown() */ protected function _getModelDependencies($tableRowsCount = 0, $tableData = array(), $aliasesMap = array()) { - $this->_selectMock = $this->getMock('Magento\DB\Select', array(), array(), '', false); + $this->_selectMock = $this->getMock('Magento\Framework\DB\Select', array(), array(), '', false); $this->_selectMock->expects($this->any())->method('from')->will($this->returnSelf()); $this->_selectMock->expects( $this->any() @@ -82,7 +82,7 @@ protected function _getModelDependencies($tableRowsCount = 0, $tableData = array ); $adapterMock = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('select', 'update', 'fetchAll', 'fetchOne'), array(), '', @@ -112,7 +112,7 @@ protected function _getModelDependencies($tableRowsCount = 0, $tableData = array } /** - * Callback for \Magento\DB\Select::update + * Callback for \Magento\Framework\DB\Select::update * * @param string $table * @param array $bind @@ -132,10 +132,10 @@ public function updateCallback($table, array $bind, $where) } /** - * Callback for \Magento\DB\Select::where + * Callback for \Magento\Framework\DB\Select::where * * @param string $condition - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\DB\Select + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\DB\Select */ public function whereCallback($condition) { @@ -156,36 +156,44 @@ public function whereCallback($condition) } /** - * @covers \Magento\Module\Setup\Migration::appendClassAliasReplace + * @covers \Magento\Framework\Module\Setup\Migration::appendClassAliasReplace */ public function testAppendClassAliasReplace() { - $moduleListMock = $this->getMock('Magento\Module\ModuleListInterface'); + $moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface'); $moduleListMock->expects($this->once())->method('getModule')->will($this->returnValue(array())); $filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false); - $modulesDirMock = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false); + $modulesDirMock = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false); $filesystemMock->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($modulesDirMock)); - $contextMock = $this->getMock('Magento\Module\Setup\Context', array(), array(), '', false); + $contextMock = $this->getMock('Magento\Framework\Module\Setup\Context', array(), array(), '', false); $contextMock->expects($this->any())->method('getFilesystem')->will($this->returnValue($filesystemMock)); $contextMock->expects($this->once()) ->method('getEventManager') - ->will($this->returnValue($this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false))); + ->will( + $this->returnValue( + $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false) + ) + ); $contextMock->expects($this->once()) ->method('getResourceModel') ->will($this->returnValue($this->getMock('Magento\Framework\App\Resource', array(), array(), '', false))); $contextMock->expects($this->once()) ->method('getLogger') - ->will($this->returnValue($this->getMock('Magento\Logger', array(), array(), '', false))); + ->will($this->returnValue($this->getMock('Magento\Framework\Logger', array(), array(), '', false))); $contextMock->expects($this->once()) ->method('getModulesReader') - ->will($this->returnValue($this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false))); + ->will( + $this->returnValue( + $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false) + ) + ); $contextMock->expects($this->once())->method('getModuleList')->will($this->returnValue($moduleListMock)); - $migrationData = $this->getMock('Magento\Module\Setup\MigrationData', array(), array(), '', false); + $migrationData = $this->getMock('Magento\Framework\Module\Setup\MigrationData', array(), array(), '', false); - $setupModel = new \Magento\Module\Setup\Migration( + $setupModel = new \Magento\Framework\Module\Setup\Migration( $contextMock, 'core_setup', 'Magento_Core', @@ -218,25 +226,25 @@ public function testAppendClassAliasReplace() /** * @dataProvider updateClassAliasesDataProvider - * @covers \Magento\Module\Setup\Migration::doUpdateClassAliases - * @covers \Magento\Module\Setup\Migration::_updateClassAliasesInTable - * @covers \Magento\Module\Setup\Migration::_getRowsCount - * @covers \Magento\Module\Setup\Migration::_applyFieldRule - * @covers \Magento\Module\Setup\Migration::_updateRowsData - * @covers \Magento\Module\Setup\Migration::_getTableData - * @covers \Magento\Module\Setup\Migration::_getReplacement - * @covers \Magento\Module\Setup\Migration::_getCorrespondingClassName - * @covers \Magento\Module\Setup\Migration::_getModelReplacement - * @covers \Magento\Module\Setup\Migration::_getPatternReplacement - * @covers \Magento\Module\Setup\Migration::_getClassName - * @covers \Magento\Module\Setup\Migration::_isFactoryName - * @covers \Magento\Module\Setup\Migration::_getModuleName - * @covers \Magento\Module\Setup\Migration::_getCompositeModuleName - * @covers \Magento\Module\Setup\Migration::_getAliasFromMap - * @covers \Magento\Module\Setup\Migration::_pushToMap - * @covers \Magento\Module\Setup\Migration::_getAliasesMap - * @covers \Magento\Module\Setup\Migration::_getAliasInSerializedStringReplacement - * @covers \Magento\Module\Setup\Migration::_parseSerializedString + * @covers \Magento\Framework\Module\Setup\Migration::doUpdateClassAliases + * @covers \Magento\Framework\Module\Setup\Migration::_updateClassAliasesInTable + * @covers \Magento\Framework\Module\Setup\Migration::_getRowsCount + * @covers \Magento\Framework\Module\Setup\Migration::_applyFieldRule + * @covers \Magento\Framework\Module\Setup\Migration::_updateRowsData + * @covers \Magento\Framework\Module\Setup\Migration::_getTableData + * @covers \Magento\Framework\Module\Setup\Migration::_getReplacement + * @covers \Magento\Framework\Module\Setup\Migration::_getCorrespondingClassName + * @covers \Magento\Framework\Module\Setup\Migration::_getModelReplacement + * @covers \Magento\Framework\Module\Setup\Migration::_getPatternReplacement + * @covers \Magento\Framework\Module\Setup\Migration::_getClassName + * @covers \Magento\Framework\Module\Setup\Migration::_isFactoryName + * @covers \Magento\Framework\Module\Setup\Migration::_getModuleName + * @covers \Magento\Framework\Module\Setup\Migration::_getCompositeModuleName + * @covers \Magento\Framework\Module\Setup\Migration::_getAliasFromMap + * @covers \Magento\Framework\Module\Setup\Migration::_pushToMap + * @covers \Magento\Framework\Module\Setup\Migration::_getAliasesMap + * @covers \Magento\Framework\Module\Setup\Migration::_getAliasInSerializedStringReplacement + * @covers \Magento\Framework\Module\Setup\Migration::_parseSerializedString */ public function testDoUpdateClassAliases($replaceRules, $tableData, $expected, $aliasesMap = array()) { @@ -245,19 +253,19 @@ public function testDoUpdateClassAliases($replaceRules, $tableData, $expected, $ $this->_actualUpdateResult = array(); $tableRowsCount = count($tableData); - $setupModel = new \Magento\Module\Setup\Migration( + $setupModel = new \Magento\Framework\Module\Setup\Migration( $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false, false), $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false), $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false), - $this->getMock('Magento\Logger', array(), array(), '', false), - $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false), + $this->getMock('Magento\Framework\Logger', array(), array(), '', false), + $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false), $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'), - $this->getMock('Magento\Module\ModuleListInterface'), - $this->getMock('Magento\Module\Dir\Reader', array(), array(), '', false, false), + $this->getMock('Magento\Framework\Module\ModuleListInterface'), + $this->getMock('Magento\Framework\Module\Dir\Reader', array(), array(), '', false, false), $this->getMock('Magento\Install\Model\Resource\Resource', array(), array(), '', false), $this->getMock('Magento\Core\Model\Resource\Theme\CollectionFactory', array(), array(), '', false), $this->getMock('Magento\Core\Model\Theme\CollectionFactory', array(), array(), '', false), - $this->getMock('Magento\Module\Setup\MigrationFactory', array(), array(), '', false), + $this->getMock('Magento\Framework\Module\Setup\MigrationFactory', array(), array(), '', false), 'core_setup', 'app/etc/aliases_to_classes_map.json', $this->_getModelDependencies($tableRowsCount, $tableData, $aliasesMap) diff --git a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_model.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_model.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_model.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_model.php index 54f026d1f8451..fe656ed118636 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_model.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_model.php @@ -30,8 +30,8 @@ array( 'table', 'field', - \Magento\Module\Setup\Migration::ENTITY_TYPE_MODEL, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_MODEL, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN ) ), '$tableData' => array( @@ -62,14 +62,14 @@ ) ), 'aliases_map' => array( - \Magento\Module\Setup\Migration::ENTITY_TYPE_MODEL => array( + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_MODEL => array( 'customer/customer' => 'Magento\Customer\Model\Customer_FROM_MAP', 'customer/attribute_data_postcode' => 'Magento\Customer\Model\Attribute\Data\Postcode' ) ) ), '$aliasesMap' => array( - \Magento\Module\Setup\Migration::ENTITY_TYPE_MODEL => array( + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_MODEL => array( 'customer/customer' => 'Magento\Customer\Model\Customer_FROM_MAP' ) ) diff --git a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_pk_fields.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_pk_fields.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_pk_fields.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_pk_fields.php index 072f2d4a14ec8..b4dfa648e6800 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_pk_fields.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_pk_fields.php @@ -30,8 +30,8 @@ array( 'table', 'collection', - \Magento\Module\Setup\Migration::ENTITY_TYPE_RESOURCE, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN, + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_RESOURCE, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN, array('pk_field1', 'pk_field2') ) ), @@ -48,7 +48,7 @@ ) ), 'aliases_map' => array( - \Magento\Module\Setup\Migration::ENTITY_TYPE_RESOURCE => array( + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_RESOURCE => array( 'customer/attribute_collection' => 'Magento\Customer\Model\Resource\Attribute\Collection' ) ) diff --git a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_resource.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_resource.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_resource.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_resource.php index ba91a7ce822e6..76633651a0e2a 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_plain_resource.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_plain_resource.php @@ -30,8 +30,8 @@ array( 'table', 'collection', - \Magento\Module\Setup\Migration::ENTITY_TYPE_RESOURCE, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN, + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_RESOURCE, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_PLAIN, array(), 'flag = 1' ) @@ -48,7 +48,7 @@ ), 'where' => array('flag = 1'), 'aliases_map' => array( - \Magento\Module\Setup\Migration::ENTITY_TYPE_RESOURCE => array( + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_RESOURCE => array( 'customer/attribute_collection' => 'Magento\Customer\Model\Resource\Attribute\Collection' ) ) diff --git a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_serialized.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_serialized.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_serialized.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_serialized.php index fac477557452c..5be53bcf139fa 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_serialized.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_serialized.php @@ -30,8 +30,8 @@ array( 'table', 'field', - \Magento\Module\Setup\Migration::ENTITY_TYPE_MODEL, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_SERIALIZED + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_MODEL, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_SERIALIZED ) ), '$tableData' => array( @@ -48,7 +48,7 @@ ) ), 'aliases_map' => array( - \Magento\Module\Setup\Migration::ENTITY_TYPE_MODEL => array( + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_MODEL => array( 'catalogrule/rule_condition_combine' => 'Magento\CatalogRule\Model\Rule\Condition\Combine' ) ) diff --git a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_wiki.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_wiki.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_wiki.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_wiki.php index 4a347d2c5145f..54d49d97f65a7 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_wiki.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_wiki.php @@ -30,8 +30,8 @@ array( 'table', 'field', - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_WIKI ) ), '$tableData' => array( @@ -55,7 +55,7 @@ ) ), 'aliases_map' => array( - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK => array( + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK => array( 'productalert/product_view' => 'Magento\ProductAlert\Block\Product\View', 'catalogSearch/result' => 'Magento\CatalogSearch\Block\Result' ) diff --git a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_xml.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_xml.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_xml.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_xml.php index 670d837a4a747..0fc5a2689df3b 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Setup/_files/data_content_xml.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/_files/data_content_xml.php @@ -30,8 +30,8 @@ array( 'table', 'field', - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK, - \Magento\Module\Setup\Migration::FIELD_CONTENT_TYPE_XML + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK, + \Magento\Framework\Module\Setup\Migration::FIELD_CONTENT_TYPE_XML ) ), '$tableData' => array( @@ -55,7 +55,7 @@ ) ), 'aliases_map' => array( - \Magento\Module\Setup\Migration::ENTITY_TYPE_BLOCK => array( + \Magento\Framework\Module\Setup\Migration::ENTITY_TYPE_BLOCK => array( 'catalog/product_newProduct' => 'Magento\Catalog\Block\Product\NewProduct', 'catalogSearch/result' => 'Magento\CatalogSearch\Block\Result' ) diff --git a/dev/tests/unit/testsuite/Magento/Module/Updater/SetupFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Updater/SetupFactoryTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Module/Updater/SetupFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/Updater/SetupFactoryTest.php index 84485802e904f..10cb256d62a43 100644 --- a/dev/tests/unit/testsuite/Magento/Module/Updater/SetupFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Updater/SetupFactoryTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module\Updater; +namespace Magento\Framework\Module\Updater; class SetupFactoryTest extends \PHPUnit_Framework_TestCase { @@ -32,7 +32,7 @@ class SetupFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->objectManagerMock = $this->getMock('Magento\ObjectManager'); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager'); } public function testCreateUsesDefaultSetupModelClassIfSetupModelIsNotDeclaredForGivenResource() @@ -45,7 +45,7 @@ public function testCreateUsesDefaultSetupModelClassIfSetupModelIsNotDeclaredFor $moduleName = 'module'; $this->objectManagerMock->expects($this->once())->method('create') ->with( - 'Magento\Module\Updater\SetupInterface', + 'Magento\Framework\Module\Updater\SetupInterface', array( 'resourceName' => $resourceName, 'moduleName' => $moduleName, @@ -56,7 +56,7 @@ public function testCreateUsesDefaultSetupModelClassIfSetupModelIsNotDeclaredFor /** * @expectedException \LogicException - * @expectedExceptionMessage \Not\Valid\Setup\Model is not a \Magento\Module\Updater\SetupInterface + * @expectedExceptionMessage \Not\Valid\Setup\Model is not a \Magento\Framework\Module\Updater\SetupInterface */ public function testCreateThrowsExceptionIfSetupModelIsNotValid() { diff --git a/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/UpdaterTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Module/UpdaterTest.php index 7fd163a4461be..d7df236618ff4 100644 --- a/dev/tests/unit/testsuite/Magento/Module/UpdaterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/UpdaterTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Module; +namespace Magento\Framework\Module; class UpdaterTest extends \PHPUnit_Framework_TestCase { @@ -51,16 +51,22 @@ class UpdaterTest extends \PHPUnit_Framework_TestCase protected $_resourceSetupMock; /** - * @var \Magento\Module\Updater + * @var \Magento\Framework\Module\Updater */ protected $_model; protected function setUp() { - $this->_factoryMock = $this->getMock('Magento\Module\Updater\SetupFactory', array(), array(), '', false); + $this->_factoryMock = $this->getMock( + 'Magento\Framework\Module\Updater\SetupFactory', + array(), + array(), + '', + false + ); $this->_appStateMock = $this->getMock('Magento\Framework\App\State', array(), array(), '', false); - $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface'); - $this->_resourceResolver = $this->getMock('Magento\Module\ResourceResolverInterface'); + $this->_moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface'); + $this->_resourceResolver = $this->getMock('Magento\Framework\Module\ResourceResolverInterface'); $this->_resourceSetupMock = $this->getMock( 'Magento\Catalog\Model\Resource\Setup', array(), @@ -94,7 +100,7 @@ protected function setUp() $this->returnValue($this->_resourceSetupMock) ); - $this->_model = new \Magento\Module\Updater( + $this->_model = new \Magento\Framework\Module\Updater( $this->_factoryMock, $this->_appStateMock, $this->_moduleListMock, @@ -104,7 +110,7 @@ protected function setUp() } /** - * @covers \Magento\Module\Updater::updateScheme + * @covers \Magento\Framework\Module\Updater::updateScheme */ public function testUpdateSchemeWithUpdateSkip() { @@ -123,7 +129,7 @@ public function testUpdateSchemeDoesNotApplyUpdatesIfApplicationIsInstalledButUp } /** - * @covers \Magento\Module\Updater::updateScheme + * @covers \Magento\Framework\Module\Updater::updateScheme */ public function testUpdateSchemeAppliesUpdatesIfApplicationIsNotInstalled() { @@ -147,7 +153,7 @@ public function testUpdateSchemeAppliesUpdatesIfApplicationIsNotInstalled() } /** - * @covers \Magento\Module\Updater::updateData + * @covers \Magento\Framework\Module\Updater::updateData */ public function testUpdateDataDoesNotApplyDataUpdatesIfSchemaIsNotUpdated() { diff --git a/dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_first_setup/.gitignore b/dev/tests/unit/testsuite/Magento/Framework/Module/_files/Module/data/module_first_setup/.gitignore similarity index 100% rename from dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_first_setup/.gitignore rename to dev/tests/unit/testsuite/Magento/Framework/Module/_files/Module/data/module_first_setup/.gitignore diff --git a/dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_second_setup/.gitignore b/dev/tests/unit/testsuite/Magento/Framework/Module/_files/Module/data/module_second_setup/.gitignore similarity index 100% rename from dev/tests/unit/testsuite/Magento/Module/_files/Module/data/module_second_setup/.gitignore rename to dev/tests/unit/testsuite/Magento/Framework/Module/_files/Module/data/module_second_setup/.gitignore diff --git a/dev/tests/unit/testsuite/Magento/Module/_files/Module/sql/module_first_setup/.gitignore b/dev/tests/unit/testsuite/Magento/Framework/Module/_files/Module/sql/module_first_setup/.gitignore similarity index 100% rename from dev/tests/unit/testsuite/Magento/Module/_files/Module/sql/module_first_setup/.gitignore rename to dev/tests/unit/testsuite/Magento/Framework/Module/_files/Module/sql/module_first_setup/.gitignore diff --git a/dev/tests/unit/testsuite/Magento/Mview/ActionFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/ActionFactoryTest.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/Mview/ActionFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/ActionFactoryTest.php index 3c217a09d0bfe..8410841739431 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/ActionFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/ActionFactoryTest.php @@ -21,29 +21,29 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview; +namespace Magento\Framework\Mview; class ActionFactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\ActionFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\ActionFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $model; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; protected function setUp() { - $this->objectManagerMock = $this->getMock('Magento\ObjectManager', array(), array(), '', false); - $this->model = new \Magento\Mview\ActionFactory($this->objectManagerMock); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); + $this->model = new \Magento\Framework\Mview\ActionFactory($this->objectManagerMock); } /** * @expectedException \InvalidArgumentException - * @expectedExceptionMessage NotAction doesn't implement \Magento\Mview\ActionInterface + * @expectedExceptionMessage NotAction doesn't implement \Magento\Framework\Mview\ActionInterface */ public function testGetWithException() { @@ -62,17 +62,22 @@ public function testGetWithException() public function testGet() { - $actionInterfaceMock = $this->getMockForAbstractClass('Magento\Mview\ActionInterface', array(), '', false); + $actionInterfaceMock = $this->getMockForAbstractClass( + 'Magento\Framework\Mview\ActionInterface', + array(), + '', + false + ); $this->objectManagerMock->expects( $this->once() )->method( 'get' )->with( - 'Magento\Mview\ActionInterface' + 'Magento\Framework\Mview\ActionInterface' )->will( $this->returnValue($actionInterfaceMock) ); - $this->model->get('Magento\Mview\ActionInterface'); - $this->assertInstanceOf('Magento\Mview\ActionInterface', $actionInterfaceMock); + $this->model->get('Magento\Framework\Mview\ActionInterface'); + $this->assertInstanceOf('Magento\Framework\Mview\ActionInterface', $actionInterfaceMock); } } diff --git a/dev/tests/unit/testsuite/Magento/Mview/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ConverterTest.php similarity index 89% rename from dev/tests/unit/testsuite/Magento/Mview/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ConverterTest.php index 162f338e6cf24..9744dfe741755 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ConverterTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\Config; +namespace Magento\Framework\Mview\Config; class ConverterTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\Config\Converter|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\Config\Converter|\PHPUnit_Framework_MockObject_MockObject */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Mview\Config\Converter(); + $this->_model = new \Magento\Framework\Mview\Config\Converter(); } public function testConvert() diff --git a/dev/tests/unit/testsuite/Magento/Mview/Config/Data/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/Data/ProxyTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Mview/Config/Data/ProxyTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/Config/Data/ProxyTest.php index f78c37a9cd013..9860d0221083a 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/Config/Data/ProxyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/Data/ProxyTest.php @@ -21,32 +21,32 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\Config\Data; +namespace Magento\Framework\Mview\Config\Data; class ProxyTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\Config\Data\Proxy + * @var \Magento\Framework\Mview\Config\Data\Proxy */ protected $model; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; /** - * @var \Magento\Mview\Config\Data|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\Config\Data|\PHPUnit_Framework_MockObject_MockObject */ protected $dataMock; protected function setUp() { $this->objectManagerMock = $this->getMock( - 'Magento\ObjectManager', array(), array(), '', false + 'Magento\Framework\ObjectManager', array(), array(), '', false ); $this->dataMock = $this->getMock( - 'Magento\Mview\Config\Data', array(), array(), '', false + 'Magento\Framework\Mview\Config\Data', array(), array(), '', false ); } @@ -54,7 +54,7 @@ public function testMergeShared() { $this->objectManagerMock->expects($this->once()) ->method('get') - ->with('Magento\Mview\Config\Data') + ->with('Magento\Framework\Mview\Config\Data') ->will($this->returnValue($this->dataMock)); $this->dataMock->expects($this->once()) ->method('merge') @@ -62,7 +62,7 @@ public function testMergeShared() $this->model = new Proxy( $this->objectManagerMock, - 'Magento\Mview\Config\Data', + 'Magento\Framework\Mview\Config\Data', true ); @@ -73,7 +73,7 @@ public function testMergeNonShared() { $this->objectManagerMock->expects($this->once()) ->method('create') - ->with('Magento\Mview\Config\Data') + ->with('Magento\Framework\Mview\Config\Data') ->will($this->returnValue($this->dataMock)); $this->dataMock->expects($this->once()) ->method('merge') @@ -81,7 +81,7 @@ public function testMergeNonShared() $this->model = new Proxy( $this->objectManagerMock, - 'Magento\Mview\Config\Data', + 'Magento\Framework\Mview\Config\Data', false ); @@ -92,7 +92,7 @@ public function testGetShared() { $this->objectManagerMock->expects($this->once()) ->method('get') - ->with('Magento\Mview\Config\Data') + ->with('Magento\Framework\Mview\Config\Data') ->will($this->returnValue($this->dataMock)); $this->dataMock->expects($this->once()) ->method('get') @@ -101,7 +101,7 @@ public function testGetShared() $this->model = new Proxy( $this->objectManagerMock, - 'Magento\Mview\Config\Data', + 'Magento\Framework\Mview\Config\Data', true ); @@ -112,7 +112,7 @@ public function testGetNonShared() { $this->objectManagerMock->expects($this->once()) ->method('create') - ->with('Magento\Mview\Config\Data') + ->with('Magento\Framework\Mview\Config\Data') ->will($this->returnValue($this->dataMock)); $this->dataMock->expects($this->once()) ->method('get') @@ -121,7 +121,7 @@ public function testGetNonShared() $this->model = new Proxy( $this->objectManagerMock, - 'Magento\Mview\Config\Data', + 'Magento\Framework\Mview\Config\Data', false ); diff --git a/dev/tests/unit/testsuite/Magento/Mview/Config/DataTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/DataTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Mview/Config/DataTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/Config/DataTest.php index ce27e6ad9978c..0b45abffa8a6b 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/Config/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/DataTest.php @@ -21,27 +21,27 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\Config; +namespace Magento\Framework\Mview\Config; class DataTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\Config\Data + * @var \Magento\Framework\Mview\Config\Data */ protected $model; /** - * @var \Magento\Mview\Config\Reader|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\Config\Reader|\PHPUnit_Framework_MockObject_MockObject */ protected $reader; /** - * @var \Magento\Config\CacheInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Config\CacheInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $cache; /** - * @var \Magento\Mview\View\State\CollectionInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\View\State\CollectionInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $stateCollection; @@ -57,9 +57,9 @@ class DataTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->reader = $this->getMock('Magento\Mview\Config\Reader', array('read'), array(), '', false); + $this->reader = $this->getMock('Magento\Framework\Mview\Config\Reader', array('read'), array(), '', false); $this->cache = $this->getMockForAbstractClass( - 'Magento\Config\CacheInterface', + 'Magento\Framework\Config\CacheInterface', array(), '', false, @@ -68,7 +68,7 @@ protected function setUp() array('test', 'load', 'save') ); $this->stateCollection = $this->getMockForAbstractClass( - 'Magento\Mview\View\State\CollectionInterface', + 'Magento\Framework\Mview\View\State\CollectionInterface', array(), '', false, @@ -93,7 +93,7 @@ public function testConstructorWithCache() $this->stateCollection->expects($this->never())->method('getItems'); - $this->model = new \Magento\Mview\Config\Data( + $this->model = new \Magento\Framework\Mview\Config\Data( $this->reader, $this->cache, $this->stateCollection, @@ -109,7 +109,7 @@ public function testConstructorWithoutCache() $this->reader->expects($this->once())->method('read')->will($this->returnValue($this->views)); $stateExistent = $this->getMock( - 'Magento\Mview\Indexer\State', + 'Magento\Framework\Mview\Indexer\State', array('getViewId', '__wakeup', 'delete'), array(), '', @@ -119,7 +119,7 @@ public function testConstructorWithoutCache() $stateExistent->expects($this->never())->method('delete'); $stateNonexistent = $this->getMock( - 'Magento\Mview\Indexer\State', + 'Magento\Framework\Mview\Indexer\State', array('getViewId', '__wakeup', 'delete'), array(), '', @@ -132,7 +132,7 @@ public function testConstructorWithoutCache() $this->stateCollection->expects($this->once())->method('getItems')->will($this->returnValue($states)); - $this->model = new \Magento\Mview\Config\Data( + $this->model = new \Magento\Framework\Mview\Config\Data( $this->reader, $this->cache, $this->stateCollection, diff --git a/dev/tests/unit/testsuite/Magento/Mview/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Mview/Config/ReaderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php index 4bca0c294f054..44dcef645fa12 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/Config/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php @@ -21,17 +21,17 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\Config; +namespace Magento\Framework\Mview\Config; class ReaderTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\Config\Reader + * @var \Magento\Framework\Mview\Config\Reader */ protected $_model; /** - * @var \Magento\Mview\Config\Converter|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\Config\Converter|\PHPUnit_Framework_MockObject_MockObject */ protected $_converter; @@ -50,9 +50,9 @@ protected function setUp() false ); - $this->_converter = $this->getMock('Magento\Mview\Config\Converter', array('convert')); + $this->_converter = $this->getMock('Magento\Framework\Mview\Config\Converter', array('convert')); - $fsDirList = $this->getMock('\Magento\Filesystem\DirectoryList', array('getDir'), array(), '', false); + $fsDirList = $this->getMock('\Magento\Framework\Filesystem\DirectoryList', array('getDir'), array(), '', false); $fsDirList->expects( $this->once() )->method( @@ -62,12 +62,12 @@ protected function setUp() )->will( $this->returnValue('stub') ); - $schemaLocator = new \Magento\Mview\Config\SchemaLocator($fsDirList); + $schemaLocator = new \Magento\Framework\Mview\Config\SchemaLocator($fsDirList); - $validationState = $this->getMock('Magento\Config\ValidationStateInterface'); + $validationState = $this->getMock('Magento\Framework\Config\ValidationStateInterface'); $validationState->expects($this->once())->method('isValidated')->will($this->returnValue(false)); - $this->_model = new \Magento\Mview\Config\Reader( + $this->_model = new \Magento\Framework\Mview\Config\Reader( $this->_fileResolverMock, $this->_converter, $schemaLocator, diff --git a/dev/tests/unit/testsuite/Magento/Mview/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Mview/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php index c84d1aed64ab2..9bc19fc82381f 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/ConfigTest.php @@ -21,24 +21,24 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview; +namespace Magento\Framework\Mview; class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\Config + * @var \Magento\Framework\Mview\Config */ protected $model; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Mview\Config\Data + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Mview\Config\Data */ protected $dataMock; protected function setUp() { $this->dataMock = $this->getMock( - 'Magento\Mview\Config\Data', array(), array(), '', false + 'Magento\Framework\Mview\Config\Data', array(), array(), '', false ); $this->model = new Config( $this->dataMock diff --git a/dev/tests/unit/testsuite/Magento/Mview/ProcessorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/ProcessorTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Mview/ProcessorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/ProcessorTest.php index 251473fd47930..9250658194937 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/ProcessorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/ProcessorTest.php @@ -21,41 +21,41 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview; +namespace Magento\Framework\Mview; class ProcessorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\Processor|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\Processor|\PHPUnit_Framework_MockObject_MockObject */ protected $model; /** - * @var \Magento\Mview\View\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\View\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $viewsFactoryMock; protected function setUp() { $this->viewsFactoryMock = $this->getMock( - 'Magento\Mview\View\CollectionFactory', + 'Magento\Framework\Mview\View\CollectionFactory', array('create'), array(), '', false ); - $this->model = new \Magento\Mview\Processor($this->viewsFactoryMock); + $this->model = new \Magento\Framework\Mview\Processor($this->viewsFactoryMock); } /** * Return array of mocked views * * @param string $method - * @return \Magento\Mview\ViewInterface[]|\PHPUnit_Framework_MockObject_MockObject[] + * @return \Magento\Framework\Mview\ViewInterface[]|\PHPUnit_Framework_MockObject_MockObject[] */ protected function getViews($method) { - $viewMock = $this->getMock('Magento\Mview\ViewInterface', array(), array(), '', false); + $viewMock = $this->getMock('Magento\Framework\Mview\ViewInterface', array(), array(), '', false); $viewMock->expects($this->exactly(2))->method($method); return array($viewMock, $viewMock); } @@ -63,11 +63,11 @@ protected function getViews($method) /** * Return view collection mock * - * @return \Magento\Mview\View\Collection|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Mview\View\Collection|\PHPUnit_Framework_MockObject_MockObject */ protected function getViewsMock() { - $viewsMock = $this->getMock('Magento\Mview\View\Collection', array(), array(), '', false); + $viewsMock = $this->getMock('Magento\Framework\Mview\View\Collection', array(), array(), '', false); $this->viewsFactoryMock->expects($this->once())->method('create')->will($this->returnValue($viewsMock)); return $viewsMock; } diff --git a/dev/tests/unit/testsuite/Magento/Mview/View/ChangelogTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/ChangelogTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Mview/View/ChangelogTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/View/ChangelogTest.php index 023561e07497d..e33fc1a2d0aec 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/View/ChangelogTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/ChangelogTest.php @@ -21,19 +21,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\View; +namespace Magento\Framework\Mview\View; class ChangelogTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\View\Changelog + * @var \Magento\Framework\Mview\View\Changelog */ protected $model; /** * Mysql PDO DB adapter mock * - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\DB\Adapter\Pdo\Mysql + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\DB\Adapter\Pdo\Mysql */ protected $connectionMock; @@ -44,7 +44,7 @@ class ChangelogTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->connectionMock = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array(), array(), '', false); + $this->connectionMock = $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', array(), array(), '', false); $this->resourceMock = $this->getMock( 'Magento\Framework\App\Resource', @@ -56,7 +56,7 @@ protected function setUp() ); $this->mockGetConnection($this->connectionMock); - $this->model = new \Magento\Mview\View\Changelog($this->resourceMock); + $this->model = new \Magento\Framework\Mview\View\Changelog($this->resourceMock); } public function testInstanceOf() @@ -64,8 +64,8 @@ public function testInstanceOf() $resourceMock = $this->getMock('Magento\Framework\App\Resource', array('getConnection'), array(), '', false, false); $resourceMock->expects($this->once())->method('getConnection')->will($this->returnValue(true)); - $model = new \Magento\Mview\View\Changelog($resourceMock); - $this->assertInstanceOf('\Magento\Mview\View\ChangelogInterface', $model); + $model = new \Magento\Framework\Mview\View\Changelog($resourceMock); + $this->assertInstanceOf('\Magento\Framework\Mview\View\ChangelogInterface', $model); } /** @@ -77,7 +77,7 @@ public function testCheckConnectionException() $resourceMock = $this->getMock('Magento\Framework\App\Resource', array('getConnection'), array(), '', false, false); $resourceMock->expects($this->once())->method('getConnection')->will($this->returnValue(null)); - $model = new \Magento\Mview\View\Changelog($resourceMock); + $model = new \Magento\Framework\Mview\View\Changelog($resourceMock); $model->setViewId('ViewIdTest'); $this->assertNull($model); } @@ -85,7 +85,10 @@ public function testCheckConnectionException() public function testGetName() { $this->model->setViewId('ViewIdTest'); - $this->assertEquals('ViewIdTest' . '_' . \Magento\Mview\View\Changelog::NAME_SUFFIX, $this->model->getName()); + $this->assertEquals( + 'ViewIdTest' . '_' . \Magento\Framework\Mview\View\Changelog::NAME_SUFFIX, + $this->model->getName() + ); } public function testGetViewId() @@ -105,7 +108,7 @@ public function testGetNameWithException() public function testGetColumnName() { - $this->assertEquals(\Magento\Mview\View\Changelog::COLUMN_NAME, $this->model->getColumnName()); + $this->assertEquals(\Magento\Framework\Mview\View\Changelog::COLUMN_NAME, $this->model->getColumnName()); } public function testGetVersion() @@ -183,7 +186,7 @@ public function testCreate() $this->mockIsTableExists($changelogTableName, false); $this->mockGetTableName(); - $tableMock = $this->getMock('Magento\DB\Ddl\Table', array(), array(), '', false, false); + $tableMock = $this->getMock('Magento\Framework\DB\Ddl\Table', array(), array(), '', false, false); $tableMock->expects($this->exactly(2)) ->method('addColumn') ->will($this->returnSelf()); @@ -217,7 +220,7 @@ public function testGetList() $this->mockIsTableExists($changelogTableName, true); $this->mockGetTableName(); - $selectMock = $this->getMock('Magento\DB\Select', array(), array(), '', false, false); + $selectMock = $this->getMock('Magento\Framework\DB\Select', array(), array(), '', false, false); $selectMock->expects($this->once()) ->method('distinct') ->with(true) diff --git a/dev/tests/unit/testsuite/Magento/Mview/View/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php similarity index 70% rename from dev/tests/unit/testsuite/Magento/Mview/View/CollectionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php index 861b5d4824927..c2f9d6a18a78f 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/View/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/CollectionTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\View; +namespace Magento\Framework\Mview\View; class CollectionTest extends \PHPUnit_Framework_TestCase { @@ -31,27 +31,27 @@ public function testLoadDataAndGetViewsByStateMode() $indexerIdSecond = 'second_indexer_id'; $entityFactory = $this->getMockBuilder( - 'Magento\Data\Collection\EntityFactoryInterface' + 'Magento\Framework\Data\Collection\EntityFactoryInterface' )->disableOriginalConstructor()->setMethods( array('create') )->getMock(); - $config = $this->getMockBuilder('Magento\Mview\ConfigInterface')->getMock(); + $config = $this->getMockBuilder('Magento\Framework\Mview\ConfigInterface')->getMock(); $statesFactory = $this->getMockBuilder( - 'Magento\Mview\View\State\CollectionFactory' + 'Magento\Framework\Mview\View\State\CollectionFactory' )->disableOriginalConstructor()->setMethods( array('create') )->getMock(); $states = $this->getMockBuilder( - 'Magento\Mview\View\State\Collection' + 'Magento\Framework\Mview\View\State\Collection' )->setMethods( array('getItems') )->disableOriginalConstructor()->getMock(); $state = $this->getMockForAbstractClass( - 'Magento\Mview\View\StateInterface', [], '', false, false, true, + 'Magento\Framework\Mview\View\StateInterface', [], '', false, false, true, ['getViewId', 'getMode', '__wakeup'] ); @@ -62,11 +62,11 @@ public function testLoadDataAndGetViewsByStateMode() )->method( 'getMode' )->will( - $this->returnValue(\Magento\Mview\View\StateInterface::MODE_DISABLED) + $this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED) ); $view = $this->getMockForAbstractClass( - 'Magento\Mview\ViewInterface', [], '', false, false, true, + 'Magento\Framework\Mview\ViewInterface', [], '', false, false, true, ['load', 'setState', 'getState', '__wakeup'] ); @@ -79,7 +79,7 @@ public function testLoadDataAndGetViewsByStateMode() )->method( 'create' )->with( - 'Magento\Mview\ViewInterface' + 'Magento\Framework\Mview\ViewInterface' )->will( $this->returnValue($view) ); @@ -96,15 +96,15 @@ public function testLoadDataAndGetViewsByStateMode() $states->expects($this->any())->method('getItems')->will($this->returnValue(array($state))); - $collection = new \Magento\Mview\View\Collection($entityFactory, $config, $statesFactory); - $this->assertInstanceOf('Magento\Mview\View\Collection', $collection->loadData()); + $collection = new \Magento\Framework\Mview\View\Collection($entityFactory, $config, $statesFactory); + $this->assertInstanceOf('Magento\Framework\Mview\View\Collection', $collection->loadData()); - $views = $collection->getViewsByStateMode(\Magento\Mview\View\StateInterface::MODE_DISABLED); + $views = $collection->getViewsByStateMode(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED); $this->assertCount(2, $views); - $this->assertInstanceOf('Magento\Mview\ViewInterface', $views[0]); - $this->assertInstanceOf('Magento\Mview\ViewInterface', $views[1]); + $this->assertInstanceOf('Magento\Framework\Mview\ViewInterface', $views[0]); + $this->assertInstanceOf('Magento\Framework\Mview\ViewInterface', $views[1]); - $views = $collection->getViewsByStateMode(\Magento\Mview\View\StateInterface::MODE_ENABLED); + $views = $collection->getViewsByStateMode(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED); $this->assertCount(0, $views); } } diff --git a/dev/tests/unit/testsuite/Magento/Mview/View/SubscriptionFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php similarity index 75% rename from dev/tests/unit/testsuite/Magento/Mview/View/SubscriptionFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php index 1a4971b8a3a1b..6a17897dd61f8 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/View/SubscriptionFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionFactoryTest.php @@ -21,34 +21,34 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\View; +namespace Magento\Framework\Mview\View; class SubscriptionFactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\View\SubscriptionFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Mview\View\SubscriptionFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $model; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; protected function setUp() { - $this->objectManagerMock = $this->getMock('Magento\ObjectManager', array(), array(), '', false); + $this->objectManagerMock = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false); $this->model = new SubscriptionFactory($this->objectManagerMock); } public function testCreate() { $subscriptionInterfaceMock = $this->getMockForAbstractClass( - 'Magento\Mview\View\SubscriptionInterface', array(), '', false + 'Magento\Framework\Mview\View\SubscriptionInterface', array(), '', false ); $this->objectManagerMock->expects($this->once()) ->method('create') - ->with('Magento\Mview\View\SubscriptionInterface', ['some_data']) + ->with('Magento\Framework\Mview\View\SubscriptionInterface', ['some_data']) ->will($this->returnValue($subscriptionInterfaceMock)); $this->assertEquals($subscriptionInterfaceMock, $this->model->create(['some_data'])); } diff --git a/dev/tests/unit/testsuite/Magento/Mview/View/SubscriptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Mview/View/SubscriptionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php index 23939165ae40a..cd39f653146a6 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/View/SubscriptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/View/SubscriptionTest.php @@ -21,19 +21,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview\View; +namespace Magento\Framework\Mview\View; class SubscriptionTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\View\Subscription + * @var \Magento\Framework\Mview\View\Subscription */ protected $model; /** * Mysql PDO DB adapter mock * - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\DB\Adapter\Pdo\Mysql + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\DB\Adapter\Pdo\Mysql */ protected $connectionMock; @@ -43,36 +43,36 @@ class SubscriptionTest extends \PHPUnit_Framework_TestCase protected $resourceMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\DB\Ddl\TriggerFactory + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\DB\Ddl\TriggerFactory */ protected $triggerFactoryMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Mview\View\CollectionInterface + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Mview\View\CollectionInterface */ protected $viewCollectionMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Mview\ViewInterface + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Mview\ViewInterface */ protected $viewMock; protected function setUp() { - $this->connectionMock = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', [], [], '', false); + $this->connectionMock = $this->getMock('Magento\Framework\DB\Adapter\Pdo\Mysql', [], [], '', false); $this->resourceMock = $this->getMock( 'Magento\Framework\App\Resource', array('getConnection', 'getTableName'), [], '', false, false ); $this->mockGetConnection($this->connectionMock); $this->triggerFactoryMock = $this->getMock( - 'Magento\DB\Ddl\TriggerFactory', [], [], '', false, false + 'Magento\Framework\DB\Ddl\TriggerFactory', [], [], '', false, false ); $this->viewCollectionMock = $this->getMockForAbstractClass( - 'Magento\Mview\View\CollectionInterface', [], '', false, false, true, [] + 'Magento\Framework\Mview\View\CollectionInterface', [], '', false, false, true, [] ); $this->viewMock = $this->getMockForAbstractClass( - 'Magento\Mview\ViewInterface', [], '', false, false, true, [] + 'Magento\Framework\Mview\ViewInterface', [], '', false, false, true, [] ); $this->connectionMock->expects($this->any()) @@ -109,7 +109,7 @@ public function testCreate() { $this->mockGetTableName(); - $triggerMock = $this->getMock('Magento\DB\Ddl\Trigger', [], [], '', false, false); + $triggerMock = $this->getMock('Magento\Framework\DB\Ddl\Trigger', [], [], '', false, false); $triggerMock->expects($this->exactly(3)) ->method('setName') ->will($this->returnSelf()); @@ -118,7 +118,7 @@ public function testCreate() ->will($this->returnValue('triggerName')); $triggerMock->expects($this->exactly(3)) ->method('setTime') - ->with(\Magento\DB\Ddl\Trigger::TIME_AFTER) + ->with(\Magento\Framework\DB\Ddl\Trigger::TIME_AFTER) ->will($this->returnSelf()); $triggerMock->expects($this->exactly(3)) ->method('setEvent') @@ -132,7 +132,7 @@ public function testCreate() ->will($this->returnSelf()); $changelogMock = $this->getMockForAbstractClass( - 'Magento\Mview\View\ChangelogInterface', [], '', false, false, true, [] + 'Magento\Framework\Mview\View\ChangelogInterface', [], '', false, false, true, [] ); $changelogMock->expects($this->exactly(3)) ->method('getName') @@ -150,7 +150,7 @@ public function testCreate() ->will($this->returnValue($triggerMock)); $otherChangelogMock = $this->getMockForAbstractClass( - 'Magento\Mview\View\ChangelogInterface', [], '', false, false, true, [] + 'Magento\Framework\Mview\View\ChangelogInterface', [], '', false, false, true, [] ); $otherChangelogMock->expects($this->exactly(3)) ->method('getName') @@ -160,7 +160,7 @@ public function testCreate() ->will($this->returnValue('entity_id')); $otherViewMock = $this->getMockForAbstractClass( - 'Magento\Mview\ViewInterface', [], '', false, false, true, [] + 'Magento\Framework\Mview\ViewInterface', [], '', false, false, true, [] ); $otherViewMock->expects($this->exactly(1)) ->method('getId') @@ -180,7 +180,7 @@ public function testCreate() $this->viewCollectionMock->expects($this->exactly(1)) ->method('getViewsByStateMode') - ->with(\Magento\Mview\View\StateInterface::MODE_ENABLED) + ->with(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED) ->will($this->returnValue([$this->viewMock, $otherViewMock])); $this->connectionMock->expects($this->exactly(3)) @@ -198,7 +198,7 @@ public function testRemove() { $this->mockGetTableName(); - $triggerMock = $this->getMock('Magento\DB\Ddl\Trigger', [], [], '', false, false); + $triggerMock = $this->getMock('Magento\Framework\DB\Ddl\Trigger', [], [], '', false, false); $triggerMock->expects($this->exactly(3)) ->method('setName') ->will($this->returnSelf()); @@ -207,7 +207,7 @@ public function testRemove() ->will($this->returnValue('triggerName')); $triggerMock->expects($this->exactly(3)) ->method('setTime') - ->with(\Magento\DB\Ddl\Trigger::TIME_AFTER) + ->with(\Magento\Framework\DB\Ddl\Trigger::TIME_AFTER) ->will($this->returnSelf()); $triggerMock->expects($this->exactly(3)) ->method('setEvent') @@ -225,7 +225,7 @@ public function testRemove() ->will($this->returnValue($triggerMock)); $otherChangelogMock = $this->getMockForAbstractClass( - 'Magento\Mview\View\ChangelogInterface', [], '', false, false, true, [] + 'Magento\Framework\Mview\View\ChangelogInterface', [], '', false, false, true, [] ); $otherChangelogMock->expects($this->exactly(3)) ->method('getName') @@ -235,7 +235,7 @@ public function testRemove() ->will($this->returnValue('entity_id')); $otherViewMock = $this->getMockForAbstractClass( - 'Magento\Mview\ViewInterface', [], '', false, false, true, [] + 'Magento\Framework\Mview\ViewInterface', [], '', false, false, true, [] ); $otherViewMock->expects($this->exactly(1)) ->method('getId') @@ -255,7 +255,7 @@ public function testRemove() $this->viewCollectionMock->expects($this->exactly(1)) ->method('getViewsByStateMode') - ->with(\Magento\Mview\View\StateInterface::MODE_ENABLED) + ->with(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED) ->will($this->returnValue([$this->viewMock, $otherViewMock])); $this->connectionMock->expects($this->exactly(3)) diff --git a/dev/tests/unit/testsuite/Magento/Mview/ViewTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/ViewTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Mview/ViewTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/ViewTest.php index fc85d7fb3bfd6..8105853a39c3a 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/ViewTest.php @@ -21,22 +21,22 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview; +namespace Magento\Framework\Mview; class ViewTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Mview\View + * @var \Magento\Framework\Mview\View */ protected $model; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Mview\ConfigInterface + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Mview\ConfigInterface */ protected $configMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Mview\ActionFactory + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Mview\ActionFactory */ protected $actionFactoryMock; @@ -46,19 +46,19 @@ class ViewTest extends \PHPUnit_Framework_TestCase protected $stateMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Mview\View\Changelog + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Mview\View\Changelog */ protected $changelogMock; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Mview\View\SubscriptionFactory + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Mview\View\SubscriptionFactory */ protected $subscriptionFactoryMock; protected function setUp() { $this->configMock = $this->getMockForAbstractClass( - 'Magento\Mview\ConfigInterface', + 'Magento\Framework\Mview\ConfigInterface', array(), '', false, @@ -66,7 +66,13 @@ protected function setUp() true, array('getView') ); - $this->actionFactoryMock = $this->getMock('Magento\Mview\ActionFactory', array('get'), array(), '', false); + $this->actionFactoryMock = $this->getMock( + 'Magento\Framework\Mview\ActionFactory', + array('get'), + array(), + '', + false + ); $this->stateMock = $this->getMock( 'Magento\Indexer\Model\Mview\View\State', array('getViewId', @@ -86,14 +92,14 @@ protected function setUp() false ); $this->changelogMock = $this->getMock( - 'Magento\Mview\View\Changelog', + 'Magento\Framework\Mview\View\Changelog', array('getViewId', 'setViewId', 'create', 'drop', 'getVersion', 'getList', 'clear'), array(), '', false ); $this->subscriptionFactoryMock = $this->getMock( - 'Magento\Mview\View\SubscriptionFactory', + 'Magento\Framework\Mview\View\SubscriptionFactory', array('create'), array(), '', @@ -138,7 +144,7 @@ public function testLoad() )->will( $this->returnValue($this->getViewData()) ); - $this->assertInstanceOf('Magento\Mview\View', $this->model->load($viewId)); + $this->assertInstanceOf('Magento\Framework\Mview\View', $this->model->load($viewId)); } /** @@ -164,14 +170,20 @@ public function testSubscribe() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_DISABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED)); $this->stateMock->expects($this->once()) ->method('setMode') - ->with(\Magento\Mview\View\StateInterface::MODE_ENABLED) + ->with(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED) ->will($this->returnSelf()); $this->changelogMock->expects($this->once()) ->method('create'); - $subscriptionMock = $this->getMock('Magento\Mview\View\Subscription', array('create'), array(), '', false); + $subscriptionMock = $this->getMock( + 'Magento\Framework\Mview\View\Subscription', + array('create'), + array(), + '', + false + ); $subscriptionMock->expects($this->exactly(1))->method('create'); $this->subscriptionFactoryMock->expects( $this->exactly(1) @@ -188,7 +200,7 @@ public function testSubscribeEnabled() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_ENABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED)); $this->stateMock->expects($this->never()) ->method('setMode'); $this->changelogMock->expects($this->never()) @@ -206,7 +218,7 @@ public function testSubscribeWithException() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_DISABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED)); $this->changelogMock->expects($this->once()) ->method('create') @@ -224,18 +236,24 @@ public function testUnsubscribe() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_ENABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED)); $this->stateMock->expects($this->once()) ->method('setVersionId') ->with(null) ->will($this->returnSelf()); $this->stateMock->expects($this->once()) ->method('setMode') - ->with(\Magento\Mview\View\StateInterface::MODE_DISABLED) + ->with(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED) ->will($this->returnSelf()); $this->changelogMock->expects($this->once()) ->method('drop'); - $subscriptionMock = $this->getMock('Magento\Mview\View\Subscription', array('remove'), array(), '', false); + $subscriptionMock = $this->getMock( + 'Magento\Framework\Mview\View\Subscription', + array('remove'), + array(), + '', + false + ); $subscriptionMock->expects($this->exactly(1))->method('remove'); $this->subscriptionFactoryMock->expects( $this->exactly(1) @@ -252,7 +270,7 @@ public function testUnsubscribeDisabled() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_DISABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED)); $this->stateMock->expects($this->never()) ->method('setVersionId'); $this->stateMock->expects($this->never()) @@ -272,9 +290,15 @@ public function testUnsubscribeWithException() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_ENABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED)); - $subscriptionMock = $this->getMock('Magento\Mview\View\Subscription', array('remove'), array(), '', false); + $subscriptionMock = $this->getMock( + 'Magento\Framework\Mview\View\Subscription', + array('remove'), + array(), + '', + false + ); $subscriptionMock->expects($this->exactly(1)) ->method('remove') ->will($this->returnCallback( @@ -306,10 +330,10 @@ public function testUpdate() ->will($this->returnSelf()); $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_ENABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED)); $this->stateMock->expects($this->exactly(2)) ->method('getStatus') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::STATUS_IDLE)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::STATUS_IDLE)); $this->stateMock->expects($this->exactly(2)) ->method('setStatus') ->will($this->returnSelf()); @@ -335,7 +359,7 @@ public function testUpdate() $this->returnValue($listId) ); - $actionMock = $this->getMock('Magento\Mview\Action', array('execute'), array(), '', false); + $actionMock = $this->getMock('Magento\Framework\Mview\Action', array('execute'), array(), '', false); $actionMock->expects($this->once())->method('execute')->with($listId)->will($this->returnSelf()); $this->actionFactoryMock->expects( $this->once() @@ -370,10 +394,10 @@ public function testUpdateWithException() ->method('setVersionId'); $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_ENABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED)); $this->stateMock->expects($this->exactly(2)) ->method('getStatus') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::STATUS_IDLE)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::STATUS_IDLE)); $this->stateMock->expects($this->exactly(2)) ->method('setStatus') ->will($this->returnSelf()); @@ -399,7 +423,7 @@ public function testUpdateWithException() $this->returnValue($listId) ); - $actionMock = $this->getMock('Magento\Mview\Action', array('execute'), array(), '', false); + $actionMock = $this->getMock('Magento\Framework\Mview\Action', array('execute'), array(), '', false); $actionMock->expects($this->once())->method('execute')->with($listId)->will( $this->returnCallback( function () { @@ -425,14 +449,14 @@ public function testSuspend() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_ENABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED)); $this->stateMock->expects($this->once()) ->method('setVersionId') ->with(11) ->will($this->returnSelf()); $this->stateMock->expects($this->once()) ->method('setStatus') - ->with(\Magento\Mview\View\StateInterface::STATUS_SUSPENDED) + ->with(\Magento\Framework\Mview\View\StateInterface::STATUS_SUSPENDED) ->will($this->returnSelf()); $this->stateMock->expects($this->once()) ->method('save') @@ -450,7 +474,7 @@ public function testSuspendDisabled() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_DISABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED)); $this->stateMock->expects($this->never()) ->method('setVersionId'); $this->stateMock->expects($this->never()) @@ -469,10 +493,10 @@ public function testResume() { $this->stateMock->expects($this->once()) ->method('getStatus') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::STATUS_SUSPENDED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::STATUS_SUSPENDED)); $this->stateMock->expects($this->once()) ->method('setStatus') - ->with(\Magento\Mview\View\StateInterface::STATUS_IDLE) + ->with(\Magento\Framework\Mview\View\StateInterface::STATUS_IDLE) ->will($this->returnSelf()); $this->stateMock->expects($this->once()) ->method('save') @@ -503,8 +527,8 @@ public function testResumeNotSuspended($status) public function dataProviderResumeNotSuspended() { return [ - [\Magento\Mview\View\StateInterface::STATUS_IDLE], - [\Magento\Mview\View\StateInterface::STATUS_WORKING], + [\Magento\Framework\Mview\View\StateInterface::STATUS_IDLE], + [\Magento\Framework\Mview\View\StateInterface::STATUS_WORKING], ]; } @@ -512,7 +536,7 @@ public function testClearChangelog() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_ENABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED)); $this->stateMock->expects($this->once()) ->method('getVersionId') ->will($this->returnValue(11)); @@ -528,7 +552,7 @@ public function testClearChangelogDisabled() { $this->stateMock->expects($this->once()) ->method('getMode') - ->will($this->returnValue(\Magento\Mview\View\StateInterface::MODE_DISABLED)); + ->will($this->returnValue(\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED)); $this->stateMock->expects($this->never()) ->method('getVersionId'); $this->changelogMock->expects($this->never()) @@ -559,8 +583,8 @@ public function testIsEnabled($mode, $result) public function dataProviderIsEnabled() { return [ - [\Magento\Mview\View\StateInterface::MODE_ENABLED, true], - [\Magento\Mview\View\StateInterface::MODE_DISABLED, false], + [\Magento\Framework\Mview\View\StateInterface::MODE_ENABLED, true], + [\Magento\Framework\Mview\View\StateInterface::MODE_DISABLED, false], ]; } @@ -580,9 +604,9 @@ public function testIsIdle($status, $result) public function dataProviderIsIdle() { return [ - [\Magento\Mview\View\StateInterface::STATUS_IDLE, true], - [\Magento\Mview\View\StateInterface::STATUS_WORKING, false], - [\Magento\Mview\View\StateInterface::STATUS_SUSPENDED, false], + [\Magento\Framework\Mview\View\StateInterface::STATUS_IDLE, true], + [\Magento\Framework\Mview\View\StateInterface::STATUS_WORKING, false], + [\Magento\Framework\Mview\View\StateInterface::STATUS_SUSPENDED, false], ]; } @@ -602,9 +626,9 @@ public function testIsWorking($status, $result) public function dataProviderIsWorking() { return [ - [\Magento\Mview\View\StateInterface::STATUS_IDLE, false], - [\Magento\Mview\View\StateInterface::STATUS_WORKING, true], - [\Magento\Mview\View\StateInterface::STATUS_SUSPENDED, false], + [\Magento\Framework\Mview\View\StateInterface::STATUS_IDLE, false], + [\Magento\Framework\Mview\View\StateInterface::STATUS_WORKING, true], + [\Magento\Framework\Mview\View\StateInterface::STATUS_SUSPENDED, false], ]; } @@ -624,9 +648,9 @@ public function testIsSuspended($status, $result) public function dataProviderIsSuspended() { return [ - [\Magento\Mview\View\StateInterface::STATUS_IDLE, false], - [\Magento\Mview\View\StateInterface::STATUS_WORKING, false], - [\Magento\Mview\View\StateInterface::STATUS_SUSPENDED, true], + [\Magento\Framework\Mview\View\StateInterface::STATUS_IDLE, false], + [\Magento\Framework\Mview\View\StateInterface::STATUS_WORKING, false], + [\Magento\Framework\Mview\View\StateInterface::STATUS_SUSPENDED, true], ]; } diff --git a/dev/tests/unit/testsuite/Magento/Mview/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/XsdTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Mview/XsdTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/XsdTest.php index c35c320566299..4c05df5ec8e6a 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/XsdTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Mview; +namespace Magento\Framework\Mview; class XsdTest extends \PHPUnit_Framework_TestCase { @@ -38,7 +38,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_xsdSchema = BP . '/lib/Magento/Mview/etc/mview.xsd'; + $this->_xsdSchema = BP . '/lib/Magento/Framework/Mview/etc/mview.xsd'; $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/invalidMviewXmlArray.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/invalidMviewXmlArray.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Mview/_files/invalidMviewXmlArray.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/invalidMviewXmlArray.php diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_config.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_config.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Mview/_files/mview_config.php rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_config.php diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_merged_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_one.xml similarity index 95% rename from dev/tests/unit/testsuite/Magento/Mview/_files/mview_merged_one.xml rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_one.xml index f51e05cc24645..df6e750643afc 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_merged_one.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_one.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_merged_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_two.xml similarity index 94% rename from dev/tests/unit/testsuite/Magento/Mview/_files/mview_merged_two.xml rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_two.xml index 431da5135982a..e666684c46ec9 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_merged_two.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_merged_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - +
diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_one.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_one.xml similarity index 93% rename from dev/tests/unit/testsuite/Magento/Mview/_files/mview_one.xml rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_one.xml index ecba7efe8522d..ef6b2d860f8e3 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_one.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_one.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - +
diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_three.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_three.xml similarity index 94% rename from dev/tests/unit/testsuite/Magento/Mview/_files/mview_three.xml rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_three.xml index 6c491cbb6328a..6630c2b113034 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_three.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_three.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - +
diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_two.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_two.xml similarity index 94% rename from dev/tests/unit/testsuite/Magento/Mview/_files/mview_two.xml rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_two.xml index 63a63f4d257d9..18bcf367ac9bd 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/_files/mview_two.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/mview_two.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - +
diff --git a/dev/tests/unit/testsuite/Magento/Mview/_files/valid_mview.xml b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/valid_mview.xml similarity index 94% rename from dev/tests/unit/testsuite/Magento/Mview/_files/valid_mview.xml rename to dev/tests/unit/testsuite/Magento/Framework/Mview/_files/valid_mview.xml index 5a77b72e45407..9f0c8a07bb9e0 100644 --- a/dev/tests/unit/testsuite/Magento/Mview/_files/valid_mview.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/_files/valid_mview.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - +
diff --git a/dev/tests/unit/testsuite/Magento/Object/CacheTest.php b/dev/tests/unit/testsuite/Magento/Framework/Object/CacheTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Object/CacheTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Object/CacheTest.php index 426c74c22b41c..b322018aabc1b 100644 --- a/dev/tests/unit/testsuite/Magento/Object/CacheTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/CacheTest.php @@ -22,18 +22,18 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Object; +namespace Magento\Framework\Object; class CacheTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Object\Cache + * @var \Magento\Framework\Object\Cache */ protected $cache; protected function setUp() { - $this->cache = new \Magento\Object\Cache(); + $this->cache = new \Magento\Framework\Object\Cache(); } public function testSaveWhenArgumentIsNotObject() @@ -42,7 +42,7 @@ public function testSaveWhenArgumentIsNotObject() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Object already exists in registry (#1). Old object class: stdClass */ public function testSaveWhenObjectAlreadyExistsInRegistry() @@ -74,7 +74,7 @@ public function testSaveAndDeleteWhenHashAlreadyExist() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage The reference already exists: refName. New index: idx, old index: idx */ public function testReferenceWhenReferenceAlreadyExist() diff --git a/dev/tests/unit/testsuite/Magento/Object/Copy/Config/ConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/ConverterTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Object/Copy/Config/ConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/ConverterTest.php index 7e73cf5e5e418..e19dd78ca60be 100644 --- a/dev/tests/unit/testsuite/Magento/Object/Copy/Config/ConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/ConverterTest.php @@ -1,6 +1,6 @@ _model = new \Magento\Object\Copy\Config\Converter(); + $this->_model = new \Magento\Framework\Object\Copy\Config\Converter(); } public function testConvert() diff --git a/dev/tests/unit/testsuite/Magento/Object/Copy/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/SchemaLocatorTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Object/Copy/Config/SchemaLocatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/SchemaLocatorTest.php index c24b9357b783c..faee879832f87 100644 --- a/dev/tests/unit/testsuite/Magento/Object/Copy/Config/SchemaLocatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/SchemaLocatorTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Object\Copy\Config; +namespace Magento\Framework\Object\Copy\Config; class SchemaLocatorTest extends \PHPUnit_Framework_TestCase { @@ -33,7 +33,7 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase protected $fileSystemMock; /** - * @var \Magento\Object\Copy\Config\SchemaLocator + * @var \Magento\Framework\Object\Copy\Config\SchemaLocator */ protected $model; @@ -48,8 +48,11 @@ protected function setUp() ->with(\Magento\Framework\App\Filesystem::ROOT_DIR) ->will($this->returnValue('schema_dir')); - $this->model = - new \Magento\Object\Copy\Config\SchemaLocator($this->fileSystemMock, 'schema.xsd', 'perFileSchema.xsd'); + $this->model = new \Magento\Framework\Object\Copy\Config\SchemaLocator( + $this->fileSystemMock, + 'schema.xsd', + 'perFileSchema.xsd' + ); } public function testGetSchema() diff --git a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset.xml similarity index 96% rename from dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml rename to dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset.xml index c9d97d40035f9..42a22fe849106 100644 --- a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/_files/Magento/Test/etc/fieldset.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset.xml @@ -24,7 +24,7 @@ */ --> + xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/Magento/Framework/Object/etc/fieldset.xsd">
diff --git a/dev/tests/unit/testsuite/Magento/Object/Copy/Config/_files/fieldset_config.php b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset_config.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/Object/Copy/Config/_files/fieldset_config.php rename to dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/_files/fieldset_config.php diff --git a/dev/tests/unit/testsuite/Magento/Object/Copy/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/ConfigTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Object/Copy/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Object/Copy/ConfigTest.php index d7045024c22dd..fda58e00dec34 100644 --- a/dev/tests/unit/testsuite/Magento/Object/Copy/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/ConfigTest.php @@ -1,6 +1,6 @@ _storageMock = $this->getMock('Magento\Object\Copy\Config\Data', array('get'), array(), '', false); + $this->_storageMock = $this->getMock( + 'Magento\Framework\Object\Copy\Config\Data', + array('get'), + array(), + '', + false + ); - $this->_model = new \Magento\Object\Copy\Config($this->_storageMock); + $this->_model = new \Magento\Framework\Object\Copy\Config($this->_storageMock); } public function testGetFieldsets() diff --git a/dev/tests/unit/testsuite/Magento/Object/CopyTest.php b/dev/tests/unit/testsuite/Magento/Framework/Object/CopyTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Object/CopyTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Object/CopyTest.php index a7e02c08e491a..cafcbeea61103 100644 --- a/dev/tests/unit/testsuite/Magento/Object/CopyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/CopyTest.php @@ -22,13 +22,13 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Object; +namespace Magento\Framework\Object; class CopyTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Object\Copy + * @var \Magento\Framework\Object\Copy */ protected $copy; @@ -55,11 +55,11 @@ class CopyTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->fieldsetConfigMock = $this->getMock('Magento\Object\Copy\Config', array(), array(), '', false); - $this->eventManagerMock = $this->getMock('Magento\Event\ManagerInterface'); - $this->sourceMock = $this->getMock('Magento\Object', array(), array(), '', false); - $this->targetMock = $this->getMock('Magento\Object', array(), array(), '', false); - $this->copy = new \Magento\Object\Copy( + $this->fieldsetConfigMock = $this->getMock('Magento\Framework\Object\Copy\Config', array(), array(), '', false); + $this->eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface'); + $this->sourceMock = $this->getMock('Magento\Framework\Object', array(), array(), '', false); + $this->targetMock = $this->getMock('Magento\Framework\Object', array(), array(), '', false); + $this->copy = new \Magento\Framework\Object\Copy( $this->eventManagerMock, $this->fieldsetConfigMock ); diff --git a/dev/tests/unit/testsuite/Magento/Object/MapperTest.php b/dev/tests/unit/testsuite/Magento/Framework/Object/MapperTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Object/MapperTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Object/MapperTest.php index 016a17895cd26..c12eb3512d75d 100644 --- a/dev/tests/unit/testsuite/Magento/Object/MapperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Object/MapperTest.php @@ -22,12 +22,12 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Object; +namespace Magento\Framework\Object; class MapperTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Object\Mapper + * @var \Magento\Framework\Object\Mapper */ protected $mapper; @@ -43,9 +43,9 @@ class MapperTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->fromMock = $this->getMock('Magento\Object', array(), array(), '', false); - $this->toMock = $this->getMock('Magento\Object', array(), array(), '', false); - $this->mapper = new \Magento\Object\Mapper(); + $this->fromMock = $this->getMock('Magento\Framework\Object', array(), array(), '', false); + $this->toMock = $this->getMock('Magento\Framework\Object', array(), array(), '', false); + $this->mapper = new \Magento\Framework\Object\Mapper(); } public function testAccumulateByMapWhenToIsArrayFromIsObject() diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/FactoryTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/FactoryTest.php index 705f3e5eff841..31293e11a4000 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/FactoryTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Code\Generator; +namespace Magento\Framework\ObjectManager\Code\Generator; class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -33,19 +33,20 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->ioObjectMock = $this->getMock('\Magento\Code\Generator\Io', array(), array(), '', false); + $this->ioObjectMock = $this->getMock('\Magento\Framework\Code\Generator\Io', array(), array(), '', false); } public function testGenerate() { require_once __DIR__ . '/_files/Sample.php'; - $model = $this->getMock('\Magento\ObjectManager\Code\Generator\Factory', + $model = $this->getMock('\Magento\Framework\ObjectManager\Code\Generator\Factory', array('_validateData'), - array('\Magento\ObjectManager\Code\Generator\Sample', null, $this->ioObjectMock, null, null) + array('\Magento\Framework\ObjectManager\Code\Generator\Sample', null, $this->ioObjectMock, null, null) ); $this->ioObjectMock->expects($this->once())->method('getResultFileName') - ->with('\Magento\ObjectManager\Code\Generator\SampleFactory')->will($this->returnValue('sample_file.php')); + ->with('\Magento\Framework\ObjectManager\Code\Generator\SampleFactory') + ->will($this->returnValue('sample_file.php')); $factoryCode = file_get_contents(__DIR__ . '/_files/SampleFactory.txt'); $this->ioObjectMock->expects($this->once())->method('writeResultFile') ->with('sample_file.php', $factoryCode); diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/ProxyTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/ProxyTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/ProxyTest.php index c55e2028c7708..da59d0722ed91 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/ProxyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/ProxyTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Code\Generator; +namespace Magento\Framework\ObjectManager\Code\Generator; class ProxyTest extends \PHPUnit_Framework_TestCase { @@ -33,20 +33,21 @@ class ProxyTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->ioObjectMock = $this->getMock('\Magento\Code\Generator\Io', array(), array(), '', false); + $this->ioObjectMock = $this->getMock('\Magento\Framework\Code\Generator\Io', array(), array(), '', false); } public function testGenerate() { require_once __DIR__ . '/_files/Sample.php'; - $model = $this->getMock('\Magento\ObjectManager\Code\Generator\Proxy', + $model = $this->getMock('\Magento\Framework\ObjectManager\Code\Generator\Proxy', array('_validateData'), - array('\Magento\ObjectManager\Code\Generator\Sample', null, $this->ioObjectMock, null, null) + array('\Magento\Framework\ObjectManager\Code\Generator\Sample', null, $this->ioObjectMock, null, null) ); $sampleProxyCode = file_get_contents(__DIR__ . '/_files/SampleProxy.txt'); $this->ioObjectMock->expects($this->once())->method('getResultFileName') - ->with('\Magento\ObjectManager\Code\Generator\Sample_Proxy')->will($this->returnValue('sample_file.php')); + ->with('\Magento\Framework\ObjectManager\Code\Generator\Sample_Proxy') + ->will($this->returnValue('sample_file.php')); $this->ioObjectMock->expects($this->once())->method('writeResultFile') ->with('sample_file.php', $sampleProxyCode); diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/Sample.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/Sample.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/Sample.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/Sample.php index 9e5a2ba14b047..d7a84997c65e4 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/Sample.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/Sample.php @@ -22,11 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Code\Generator; +namespace Magento\Framework\ObjectManager\Code\Generator; /** * Class Sample for Proxy and Factory generation - * @package Magento\ObjectManager\Code\Generator + * @package Magento\Framework\ObjectManager\Code\Generator */ class Sample { diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/SampleFactory.txt b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleFactory.txt similarity index 58% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/SampleFactory.txt rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleFactory.txt index 833c7d325dc82..d7732d7fd68a2 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/SampleFactory.txt +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleFactory.txt @@ -1,14 +1,14 @@ -namespace \Magento\ObjectManager\Code\Generator; +namespace \Magento\Framework\ObjectManager\Code\Generator; /** - * Factory class for \Magento\ObjectManager\Code\Generator\Sample + * Factory class for \Magento\Framework\ObjectManager\Code\Generator\Sample */ class SampleFactory { /** * Object Manager instance * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; @@ -22,10 +22,10 @@ class SampleFactory /** * Factory constructor * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param string $instanceName */ - public function __construct(\Magento\ObjectManager $objectManager, $instanceName = 'Magento\ObjectManager\Code\Generator\Sample') + public function __construct(\Magento\Framework\ObjectManager $objectManager, $instanceName = 'Magento\Framework\ObjectManager\Code\Generator\Sample') { $this->_objectManager = $objectManager; $this->_instanceName = $instanceName; @@ -35,7 +35,7 @@ class SampleFactory * Create class instance with specified parameters * * @param array $data - * @return \Magento\ObjectManager\Code\Generator\Sample + * @return \Magento\Framework\ObjectManager\Code\Generator\Sample */ public function create(array $data = array()) { diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/SampleProxy.txt b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleProxy.txt similarity index 73% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/SampleProxy.txt rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleProxy.txt index ca8a668ba7f82..ae58f25140a13 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Code/Generator/_files/SampleProxy.txt +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/SampleProxy.txt @@ -1,14 +1,14 @@ -namespace \Magento\ObjectManager\Code\Generator; +namespace \Magento\Framework\ObjectManager\Code\Generator; /** - * Proxy class for \Magento\ObjectManager\Code\Generator\Sample + * Proxy class for \Magento\Framework\ObjectManager\Code\Generator\Sample */ -class Sample_Proxy extends \Magento\ObjectManager\Code\Generator\Sample +class Sample_Proxy extends \Magento\Framework\ObjectManager\Code\Generator\Sample { /** * Object Manager instance * - * @var \Magento\ObjectManager + * @var \Magento\Framework\ObjectManager */ protected $_objectManager = null; @@ -22,7 +22,7 @@ class Sample_Proxy extends \Magento\ObjectManager\Code\Generator\Sample /** * Proxied instance * - * @var \Magento\ObjectManager\Code\Generator\Sample + * @var \Magento\Framework\ObjectManager\Code\Generator\Sample */ protected $_subject = null; @@ -36,11 +36,11 @@ class Sample_Proxy extends \Magento\ObjectManager\Code\Generator\Sample /** * Proxy constructor * - * @param \Magento\ObjectManager $objectManager + * @param \Magento\Framework\ObjectManager $objectManager * @param string $instanceName * @param bool $shared */ - public function __construct(\Magento\ObjectManager $objectManager, $instanceName = 'Magento\ObjectManager\Code\Generator\Sample', $shared = true) + public function __construct(\Magento\Framework\ObjectManager $objectManager, $instanceName = 'Magento\Framework\ObjectManager\Code\Generator\Sample', $shared = true) { $this->_objectManager = $objectManager; $this->_instanceName = $instanceName; @@ -74,7 +74,7 @@ class Sample_Proxy extends \Magento\ObjectManager\Code\Generator\Sample /** * Get proxied instance * - * @return \Magento\ObjectManager\Code\Generator\Sample + * @return \Magento\Framework\ObjectManager\Code\Generator\Sample */ protected function _getSubject() { diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/ConfigTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/ConfigTest.php index be87d25e1df24..ddd8665650404 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/ConfigTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Config; +namespace Magento\Framework\ObjectManager\Config; class ConfigTest extends \PHPUnit_Framework_TestCase { @@ -51,10 +51,10 @@ private function _assertFooTypeArguments(Config $config) public function testExtendWithCacheMock() { - $definitions = $this->getMockForAbstractClass('\Magento\ObjectManager\Definition'); + $definitions = $this->getMockForAbstractClass('\Magento\Framework\ObjectManager\Definition'); $definitions->expects($this->once())->method('getClasses')->will($this->returnValue(array('FooType'))); - $cache = $this->getMockForAbstractClass('\Magento\ObjectManager\ConfigCache'); + $cache = $this->getMockForAbstractClass('\Magento\Framework\ObjectManager\ConfigCache'); $cache->expects($this->once())->method('get')->will($this->returnValue(false)); $config = new Config(null, $definitions); diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/ArgumentParserTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/ArgumentParserTest.php similarity index 96% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/ArgumentParserTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/ArgumentParserTest.php index c8514fa4b2d36..d5223fd1fd079 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/ArgumentParserTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/ArgumentParserTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Config\Mapper; +namespace Magento\Framework\ObjectManager\Config\Mapper; class ArgumentParserTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/DomTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/DomTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/DomTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/DomTest.php index 798efab9fc3a3..ac148e937858e 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/DomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/DomTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Config\Mapper; +namespace Magento\Framework\ObjectManager\Config\Mapper; class DomTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager\Config\Mapper\Dom + * @var \Magento\Framework\ObjectManager\Config\Mapper\Dom */ protected $_mapper; @@ -37,7 +37,7 @@ class DomTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $argumentParser = $this->getMock('\Magento\ObjectManager\Config\Mapper\ArgumentParser'); + $argumentParser = $this->getMock('\Magento\Framework\ObjectManager\Config\Mapper\ArgumentParser'); $argumentParser->expects( $this->any() )->method( @@ -46,7 +46,7 @@ protected function setUp() $this->returnCallback(array($this, 'parserMockCallback')) ); - $booleanUtils = $this->getMock('\Magento\Stdlib\BooleanUtils'); + $booleanUtils = $this->getMock('\Magento\Framework\Stdlib\BooleanUtils'); $booleanUtils->expects( $this->any() )->method( @@ -55,7 +55,7 @@ protected function setUp() $this->returnValueMap(array(array('true', true), array('false', false))) ); - $this->argumentInterpreter = $this->getMock('Magento\Data\Argument\InterpreterInterface'); + $this->argumentInterpreter = $this->getMock('Magento\Framework\Data\Argument\InterpreterInterface'); $this->argumentInterpreter->expects( $this->any() )->method( diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/argument_parser.xml b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/argument_parser.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/argument_parser.xml rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/argument_parser.xml diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php index f80559d773d65..fc07ca170e0b6 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/mapped_simple_di_config.php @@ -23,7 +23,7 @@ */ return array( 'preferences' => array( - 'Magento\Module\UpdaterInterface' => 'Magento\Module\Updaterter', + 'Magento\Framework\Module\UpdaterInterface' => 'Magento\Framework\Module\Updaterter', 'Magento\Framework\App\RequestInterface' => 'Magento\Framework\App\Request\Http\Proxy', ), 'Magento\Framework\App\State' => array('arguments' => array('test name' => 'test value')), @@ -42,7 +42,17 @@ 'overridden_plugin' => array('sortOrder' => 30, 'disabled' => true) ) ), - 'Magento\Http\Handler\Composite' => array('shared' => false, 'arguments' => array('test name' => 'test value')), - 'customCacheInstance' => array('shared' => true, 'type' => 'Magento\Framework\App\Cache', 'arguments' => array()), - 'customOverriddenInstance' => array('shared' => false, 'arguments' => array()) + 'Magento\Framework\HTTP\Handler\Composite' => array( + 'shared' => false, + 'arguments' => array('test name' => 'test value') + ), + 'customCacheInstance' => array( + 'shared' => true, + 'type' => 'Magento\Framework\App\Cache', + 'arguments' => array() + ), + 'customOverriddenInstance' => array( + 'shared' => false, + 'arguments' => array() + ) ); diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/simple_di_config.xml b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/simple_di_config.xml similarity index 88% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/simple_di_config.xml rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/simple_di_config.xml index 60149f2b989e8..4d6a56f971cfa 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Mapper/_files/simple_di_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Mapper/_files/simple_di_config.xml @@ -23,9 +23,9 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + @@ -43,7 +43,7 @@ - + test value diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php index 95bba5f56c2ca..af929eac7c0f8 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Reader/DomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Config\Reader; +namespace Magento\Framework\ObjectManager\Config\Reader; require_once __DIR__ . '/_files/ConfigDomMock.php'; @@ -49,30 +49,36 @@ class DomTest extends \PHPUnit_Framework_TestCase protected $validationStateMock; /** - * @var \Magento\ObjectManager\Config\Reader\Dom + * @var \Magento\Framework\ObjectManager\Config\Reader\Dom */ protected $model; protected function setUp() { - $this->fileResolverMock = $this->getMock('\Magento\Config\FileResolverInterface'); - $this->converterMock = $this->getMock('\Magento\ObjectManager\Config\Mapper\Dom', array(), array(), '', false); + $this->fileResolverMock = $this->getMock('\Magento\Framework\Config\FileResolverInterface'); + $this->converterMock = $this->getMock( + '\Magento\Framework\ObjectManager\Config\Mapper\Dom', + array(), + array(), + '', + false + ); $this->schemaLocatorMock = $this->getMock( - '\Magento\ObjectManager\Config\SchemaLocator', + '\Magento\Framework\ObjectManager\Config\SchemaLocator', array(), array(), '', false ); $this->validationStateMock = $this->getMock( - '\Magento\Config\ValidationStateInterface', + '\Magento\Framework\Config\ValidationStateInterface', array(), array(), '', false ); - $this->model = new \Magento\ObjectManager\Config\Reader\Dom( + $this->model = new \Magento\Framework\ObjectManager\Config\Reader\Dom( $this->fileResolverMock, $this->converterMock, $this->schemaLocatorMock, @@ -84,7 +90,7 @@ protected function setUp() } /** - * @covers \Magento\ObjectManager\Config\Reader\Dom::_createConfigMerger() + * @covers \Magento\Framework\ObjectManager\Config\Reader\Dom::_createConfigMerger() */ public function testRead() { diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/Reader/_files/ConfigDomMock.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/Reader/_files/ConfigDomMock.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/XsdTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/XsdTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/XsdTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/XsdTest.php index ac3c0620720eb..42526007fc542 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/XsdTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/XsdTest.php @@ -21,12 +21,12 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Config; +namespace Magento\Framework\ObjectManager\Config; class XsdTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager\Config\SchemaLocator + * @var \Magento\Framework\ObjectManager\Config\SchemaLocator */ protected $_schemaLocator; @@ -43,7 +43,7 @@ class XsdTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->_schemaLocator = new \Magento\ObjectManager\Config\SchemaLocator(); + $this->_schemaLocator = new \Magento\Framework\ObjectManager\Config\SchemaLocator(); $this->_xsdSchema = $this->_schemaLocator->getSchema(); $this->_xsdValidator = new \Magento\TestFramework\Utility\XsdValidator(); } diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/_files/invalidConfigXmlArray.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/invalidConfigXmlArray.php similarity index 100% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/_files/invalidConfigXmlArray.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/invalidConfigXmlArray.php diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/_files/valid_config.xml b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/valid_config.xml similarity index 99% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Config/_files/valid_config.xml rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/valid_config.xml index b29402a4eb39f..e24752eb95ebe 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Config/_files/valid_config.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/_files/valid_config.xml @@ -23,7 +23,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Definition/Compiled/BinaryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Definition/Compiled/BinaryTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Definition/Compiled/BinaryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Definition/Compiled/BinaryTest.php index acfb9a307cba9..2001af546799a 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Definition/Compiled/BinaryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Definition/Compiled/BinaryTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Definition\Compiled; +namespace Magento\Framework\ObjectManager\Definition\Compiled; class BinaryTest extends \PHPUnit_Framework_TestCase { @@ -33,7 +33,7 @@ public function testGetParametersWithUnpacking() $checkString = 'packed code'; $signatures = array('wonderfulClass' => igbinary_serialize($checkString)); $definitions = array('wonderful' => 'wonderfulClass'); - $model = new \Magento\ObjectManager\Definition\Compiled\Binary(array($signatures, $definitions)); + $model = new \Magento\Framework\ObjectManager\Definition\Compiled\Binary(array($signatures, $definitions)); $this->assertEquals($checkString, $model->getParameters('wonderful')); } } \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Definition/Compiled/SerializedTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Definition/Compiled/SerializedTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Definition/Compiled/SerializedTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Definition/Compiled/SerializedTest.php index 3108cffe28691..7dd40436de069 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Definition/Compiled/SerializedTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Definition/Compiled/SerializedTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Definition\Compiled; +namespace Magento\Framework\ObjectManager\Definition\Compiled; class SerializedTest extends \PHPUnit_Framework_TestCase { @@ -29,7 +29,7 @@ public function testGetParametersWithoutDefinition() { $signatures = array(); $definitions = array('wonderful' => null); - $model = new \Magento\ObjectManager\Definition\Compiled\Serialized(array($signatures, $definitions)); + $model = new \Magento\Framework\ObjectManager\Definition\Compiled\Serialized(array($signatures, $definitions)); $this->assertEquals(null, $model->getParameters('wonderful')); } @@ -38,7 +38,7 @@ public function testGetParametersWithSignatureObject() $wonderfulSignature = new \stdClass(); $signatures = array('wonderfulClass' => $wonderfulSignature); $definitions = array('wonderful' => 'wonderfulClass'); - $model = new \Magento\ObjectManager\Definition\Compiled\Serialized(array($signatures, $definitions)); + $model = new \Magento\Framework\ObjectManager\Definition\Compiled\Serialized(array($signatures, $definitions)); $this->assertEquals($wonderfulSignature, $model->getParameters('wonderful')); } @@ -47,7 +47,7 @@ public function testGetParametersWithUnpacking() $checkString = 'code to pack'; $signatures = array('wonderfulClass' => serialize($checkString)); $definitions = array('wonderful' => 'wonderfulClass'); - $model = new \Magento\ObjectManager\Definition\Compiled\Serialized(array($signatures, $definitions)); + $model = new \Magento\Framework\ObjectManager\Definition\Compiled\Serialized(array($signatures, $definitions)); $this->assertEquals($checkString, $model->getParameters('wonderful')); } } \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/DefinitionFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/DefinitionFactoryTest.php similarity index 68% rename from dev/tests/unit/testsuite/Magento/ObjectManager/DefinitionFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/DefinitionFactoryTest.php index 71ada24ce071f..e6254ade52e44 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/DefinitionFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/DefinitionFactoryTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager; +namespace Magento\Framework\ObjectManager; class DefinitionFactoryTest extends \PHPUnit_Framework_TestCase { @@ -32,7 +32,7 @@ class DefinitionFactoryTest extends \PHPUnit_Framework_TestCase protected $filesystemDriverMock; /** - * @var \Magento\ObjectManager\DefinitionFactory + * @var \Magento\Framework\ObjectManager\DefinitionFactory */ protected $model; @@ -44,8 +44,14 @@ class DefinitionFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->sampleContent = serialize(array(1, 2, 3)); - $this->filesystemDriverMock = $this->getMock('Magento\Filesystem\Driver\File', array(), array(), '', false); - $this->model = new \Magento\ObjectManager\DefinitionFactory( + $this->filesystemDriverMock = $this->getMock( + 'Magento\Framework\Filesystem\Driver\File', + array(), + array(), + '', + false + ); + $this->model = new \Magento\Framework\ObjectManager\DefinitionFactory( $this->filesystemDriverMock, 'DefinitionDir', 'GenerationDir', @@ -53,26 +59,35 @@ protected function setUp() ); } - public function createClassDefinitionProvider() + + public function testCreateDefinitionsReadsCompiledDefinitions() { - return array( - 'from array' => array( - null, - '\Magento\ObjectManager\Definition\Runtime' - ), - 'from file' => array( - $this->sampleContent, - '\Magento\ObjectManager\Definition\Compiled\Serialized' - ), + $this->filesystemDriverMock->expects($this->once())->method('isReadable')->will($this->returnValue(false)); + $this->assertInstanceOf( + '\Magento\Framework\ObjectManager\Definition\Runtime', + $this->model->createClassDefinition(null, true) + ); + } + + public function testCreateDefinitionsDoesNotReadCompiledDefinitionsIfUseCompiledIsFalse() + { + $this->filesystemDriverMock->expects($this->never())->method('isReadable'); + $this->assertInstanceOf( + '\Magento\Framework\ObjectManager\Definition\Runtime', + $this->model->createClassDefinition(null, false) ); + $autoloadFunctions = spl_autoload_functions(); + spl_autoload_unregister(array_pop($autoloadFunctions)); } public function testCreateClassDefinitionFromString() { $this->assertInstanceOf( - '\Magento\ObjectManager\Definition\Compiled\Serialized', + '\Magento\Framework\ObjectManager\Definition\Compiled\Serialized', $this->model->createClassDefinition($this->sampleContent) ); + $autoloadFunctions = spl_autoload_functions(); + spl_autoload_unregister(array_pop($autoloadFunctions)); } /** @@ -98,12 +113,12 @@ public function createPluginsAndRelationsReadableDataProvider() 'relations' => array( 'DefinitionDir/relations.php', 'createRelations', - '\Magento\ObjectManager\Relations\Compiled' + '\Magento\Framework\ObjectManager\Relations\Compiled' ), 'plugins' => array( 'DefinitionDir/plugins.php', 'createPluginDefinition', - '\Magento\Interception\Definition\Compiled' + '\Magento\Framework\Interception\Definition\Compiled' ), ); } @@ -128,13 +143,13 @@ public function createPluginsAndRelationsNotReadableDataProvider() 'relations' => array( 'DefinitionDir/relations.php', 'createRelations', - '\Magento\ObjectManager\Relations\Runtime' + '\Magento\Framework\ObjectManager\Relations\Runtime' ), 'plugins' => array( 'DefinitionDir/plugins.php', 'createPluginDefinition', - '\Magento\Interception\Definition\Runtime' + '\Magento\Framework\Interception\Definition\Runtime' ), ); } -} \ No newline at end of file +} diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/FactoryTest.php similarity index 72% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Factory/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/FactoryTest.php index 9201e6528f827..ddf31470caf26 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/FactoryTest.php @@ -21,13 +21,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Factory; +namespace Magento\Framework\ObjectManager\Factory; -use Magento\ObjectManager\Config\Config; -use Magento\ObjectManager\ObjectManager; +use Magento\Framework\ObjectManager\Config\Config; +use Magento\Framework\ObjectManager\ObjectManager; class FactoryTest extends \PHPUnit_Framework_TestCase { + /** + * Expected exception message + */ + const EXCEPTION_MESSAGE = + 'Invalid parameter configuration provided for $firstParam argument of Magento\Framework\ObjectManager'; + /** * @var Factory */ @@ -58,17 +64,17 @@ public function testCreateNoArgs() /** * @expectedException \UnexpectedValueException - * @expectedExceptionMessage Invalid parameter configuration provided for $firstParam argument of Magento\ObjectMan + * @expectedExceptionMessage \Magento\Framework\ObjectManager\Factory\FactoryTest::EXCEPTION_MESSAGE */ public function testResolveArgumentsException() { - $configMock = $this->getMock('\Magento\ObjectManager\Config\Config', array(), array(), '', false); + $configMock = $this->getMock('\Magento\Framework\ObjectManager\Config\Config', array(), array(), '', false); $configMock->expects($this->once())->method('getArguments') ->will($this->returnValue(array( 'firstParam' => 1 ))); - $definitionsMock = $this->getMock('\Magento\ObjectManager\Definition', array(), array(), '', false); + $definitionsMock = $this->getMock('\Magento\Framework\ObjectManager\Definition', array(), array(), '', false); $definitionsMock->expects($this->once())->method('getParameters') ->will($this->returnValue(array(array( 'firstParam', 'string', true, 'default_val' @@ -81,14 +87,17 @@ public function testResolveArgumentsException() ); $this->objectManager = new ObjectManager($this->factory, $this->config); $this->factory->setObjectManager($this->objectManager); - $this->factory->create('Magento\ObjectManager\Factory\Fixture\OneScalar', array('foo' => 'bar')); + $this->factory->create('Magento\Framework\ObjectManager\Factory\Fixture\OneScalar', array('foo' => 'bar')); } public function testCreateOneArg() { - /** @var \Magento\ObjectManager\Factory\Fixture\OneScalar $result */ - $result = $this->factory->create('Magento\ObjectManager\Factory\Fixture\OneScalar', array('foo' => 'bar')); - $this->assertInstanceOf('\Magento\ObjectManager\Factory\Fixture\OneScalar', $result); + /** @var \Magento\Framework\ObjectManager\Factory\Fixture\OneScalar $result */ + $result = $this->factory->create( + 'Magento\Framework\ObjectManager\Factory\Fixture\OneScalar', + array('foo' => 'bar') + ); + $this->assertInstanceOf('\Magento\Framework\ObjectManager\Factory\Fixture\OneScalar', $result); $this->assertEquals('bar', $result->getFoo()); } @@ -97,15 +106,15 @@ public function testCreateWithInjectable() // let's imitate that One is injectable by providing DI configuration for it $this->config->extend( array( - 'Magento\ObjectManager\Factory\Fixture\OneScalar' => array( + 'Magento\Framework\ObjectManager\Factory\Fixture\OneScalar' => array( 'arguments' => array('foo' => 'bar') ) ) ); - /** @var \Magento\ObjectManager\Factory\Fixture\Two $result */ - $result = $this->factory->create('Magento\ObjectManager\Factory\Fixture\Two'); - $this->assertInstanceOf('\Magento\ObjectManager\Factory\Fixture\Two', $result); - $this->assertInstanceOf('\Magento\ObjectManager\Factory\Fixture\OneScalar', $result->getOne()); + /** @var \Magento\Framework\ObjectManager\Factory\Fixture\Two $result */ + $result = $this->factory->create('Magento\Framework\ObjectManager\Factory\Fixture\Two'); + $this->assertInstanceOf('\Magento\Framework\ObjectManager\Factory\Fixture\Two', $result); + $this->assertInstanceOf('\Magento\Framework\ObjectManager\Factory\Fixture\OneScalar', $result->getOne()); $this->assertEquals('bar', $result->getOne()->getFoo()); $this->assertEquals('optional', $result->getBaz()); } @@ -129,7 +138,7 @@ public function testCircular($startingClass, $terminationClass) */ public function circularDataProvider() { - $prefix = 'Magento\ObjectManager\Factory\Fixture\\'; + $prefix = 'Magento\Framework\ObjectManager\Factory\Fixture\\'; return array( array("{$prefix}CircularOne", "{$prefix}CircularThree"), array("{$prefix}CircularTwo", "{$prefix}CircularOne"), @@ -139,8 +148,8 @@ public function circularDataProvider() public function testCreateUsingReflection() { - $type = 'Magento\ObjectManager\Factory\Fixture\Polymorphous'; - $definitions = $this->getMockForAbstractClass('\Magento\ObjectManager\Definition'); + $type = 'Magento\Framework\ObjectManager\Factory\Fixture\Polymorphous'; + $definitions = $this->getMockForAbstractClass('\Magento\Framework\ObjectManager\Definition'); // should be more than defined in "switch" of create() method $definitions->expects($this->once())->method('getParameters')->with($type)->will($this->returnValue(array( array('one', null, false, null), array('two', null, false, null), array('three', null, false, null), diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularOne.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularOne.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularOne.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularOne.php index 8287963ac0533..c3d50ced23306 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularOne.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularOne.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Factory\Fixture; +namespace Magento\Framework\ObjectManager\Factory\Fixture; /** * Part of the chain for circular dependency test diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularThree.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularThree.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularThree.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularThree.php index 1a99b67c50701..b6e5cec18c31d 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularThree.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularThree.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Factory\Fixture; +namespace Magento\Framework\ObjectManager\Factory\Fixture; /** * Part of the chain for circular dependency test diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularTwo.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularTwo.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularTwo.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularTwo.php index c3edf9a80ccbe..3465c622424a7 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/CircularTwo.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/CircularTwo.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Factory\Fixture; +namespace Magento\Framework\ObjectManager\Factory\Fixture; /** * Part of the chain for circular dependency test diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/OneScalar.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/OneScalar.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/OneScalar.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/OneScalar.php index de616a870d4aa..cd53886bc767d 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/OneScalar.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/OneScalar.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Factory\Fixture; +namespace Magento\Framework\ObjectManager\Factory\Fixture; /** * A "value object" style constructor that requires one non-injectable argument diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/Polymorphous.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/Polymorphous.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/Polymorphous.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/Polymorphous.php index 7568f820d89e7..0b55465183c36 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/Polymorphous.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/Polymorphous.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Factory\Fixture; +namespace Magento\Framework\ObjectManager\Factory\Fixture; /** * Constructor with undefined number of arguments diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/Two.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/Two.php similarity index 96% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/Two.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/Two.php index f7ab39f33e2fc..3ad4d8eb40ec3 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Factory/Fixture/Two.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Factory/Fixture/Two.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Factory\Fixture; +namespace Magento\Framework\ObjectManager\Factory\Fixture; /** * A constructor with 2 dependencies: one injectable, another scalar diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/ObjectManagerTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/ObjectManager/ObjectManagerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php index 1fa30d9a6fbf2..089f9f44b448c 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/ObjectManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/ObjectManagerTest.php @@ -21,33 +21,35 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager; +namespace Magento\Framework\ObjectManager; -require __DIR__ . '/../_files/ChildInterface.php'; -require __DIR__ . '/../_files/DiParent.php'; -require __DIR__ . '/../_files/Child.php'; -require __DIR__ . '/../_files/Child/A.php'; -require __DIR__ . '/../_files/Child/Circular.php'; -require __DIR__ . '/../_files/Aggregate/AggregateInterface.php'; -require __DIR__ . '/../_files/Aggregate/AggregateParent.php'; -require __DIR__ . '/../_files/Aggregate/Child.php'; -require __DIR__ . '/../_files/Aggregate/WithOptional.php'; +require __DIR__ . '/../../_files/ChildInterface.php'; +require __DIR__ . '/../../_files/DiParent.php'; +require __DIR__ . '/../../_files/Child.php'; +require __DIR__ . '/../../_files/Child/A.php'; +require __DIR__ . '/../../_files/Child/Circular.php'; +require __DIR__ . '/../../_files/Aggregate/AggregateInterface.php'; +require __DIR__ . '/../../_files/Aggregate/AggregateParent.php'; +require __DIR__ . '/../../_files/Aggregate/Child.php'; +require __DIR__ . '/../../_files/Aggregate/WithOptional.php'; class ObjectManagerTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager\ObjectManager + * @var \Magento\Framework\ObjectManager\ObjectManager */ protected $_object; protected function setUp() { - $config = new \Magento\ObjectManager\Config\Config(new \Magento\ObjectManager\Relations\Runtime()); - $factory = new \Magento\ObjectManager\Factory\Factory($config, null, null, array( + $config = new \Magento\Framework\ObjectManager\Config\Config( + new \Magento\Framework\ObjectManager\Relations\Runtime() + ); + $factory = new \Magento\Framework\ObjectManager\Factory\Factory($config, null, null, array( 'first_param' => 'first_param_value', 'second_param' => 'second_param_value' )); - $this->_object = new \Magento\ObjectManager\ObjectManager($factory, $config); + $this->_object = new \Magento\Framework\ObjectManager\ObjectManager($factory, $config); $factory->setObjectManager($this->_object); } diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Relations/CompiledTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Relations/CompiledTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Relations/CompiledTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Relations/CompiledTest.php index aa8982d44c975..a58ea811e257f 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Relations/CompiledTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Relations/CompiledTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Relations; +namespace Magento\Framework\ObjectManager\Relations; class CompiledTest extends \PHPUnit_Framework_TestCase @@ -32,7 +32,7 @@ public function testHas() { $relations = array('amazing' => 'yes'); - $model = new \Magento\ObjectManager\Relations\Compiled($relations); + $model = new \Magento\Framework\ObjectManager\Relations\Compiled($relations); $this->assertEquals(true, $model->has('amazing')); $this->assertEquals(false, $model->has('fuzzy')); } @@ -41,7 +41,7 @@ public function testGetParents() { $relations = array('amazing' => 'parents'); - $model = new \Magento\ObjectManager\Relations\Compiled($relations); + $model = new \Magento\Framework\ObjectManager\Relations\Compiled($relations); $this->assertEquals('parents', $model->getParents('amazing')); } } \ No newline at end of file diff --git a/dev/tests/unit/testsuite/Magento/ObjectManager/Relations/RuntimeTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Relations/RuntimeTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/ObjectManager/Relations/RuntimeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Relations/RuntimeTest.php index bab10d58a913a..0dd57d6491d1f 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectManager/Relations/RuntimeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Relations/RuntimeTest.php @@ -21,21 +21,21 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\ObjectManager\Relations; +namespace Magento\Framework\ObjectManager\Relations; -require_once __DIR__ . '/../../_files/Child.php'; +require_once __DIR__ . '/../../../_files/Child.php'; class RuntimeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager\Relations\Runtime + * @var \Magento\Framework\ObjectManager\Relations\Runtime */ protected $_model; protected function setUp() { - $this->_model = new \Magento\ObjectManager\Relations\Runtime(); + $this->_model = new \Magento\Framework\ObjectManager\Relations\Runtime(); } /** diff --git a/dev/tests/unit/testsuite/Magento/ObjectTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/ObjectTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ObjectTest.php index 94375269465f4..c6432e5bf1a81 100644 --- a/dev/tests/unit/testsuite/Magento/ObjectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectTest.php @@ -27,14 +27,16 @@ */ /** - * \Magento\Object test case. + * \Magento\Framework\Object test case. */ -namespace Magento; +namespace Magento\Framework; + +use PHPUnit_Framework_TestCase; class ObjectTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Object + * @var \Magento\Framework\Object */ private $_object; @@ -44,7 +46,7 @@ class ObjectTest extends \PHPUnit_Framework_TestCase protected function setUp() { parent::setUp(); - $this->_object = new \Magento\Object(); + $this->_object = new \Magento\Framework\Object(); } /** @@ -57,20 +59,20 @@ protected function tearDown() } /** - * Tests \Magento\Object->__construct() + * Tests \Magento\Framework\Object->__construct() */ public function testConstruct() { - $object = new \Magento\Object(); + $object = new \Magento\Framework\Object(); $this->assertEquals(array(), $object->getData()); $data = array('test' => 'test'); - $object = new \Magento\Object($data); + $object = new \Magento\Framework\Object($data); $this->assertEquals($data, $object->getData()); } /** - * Tests \Magento\Object->isDeleted() + * Tests \Magento\Framework\Object->isDeleted() */ public function testIsDeleted() { @@ -82,7 +84,7 @@ public function testIsDeleted() } /** - * Tests \Magento\Object->hasDataChanges() + * Tests \Magento\Framework\Object->hasDataChanges() */ public function testHasDataChanges() { @@ -90,24 +92,24 @@ public function testHasDataChanges() $this->_object->setData('key', 'value'); $this->assertTrue($this->_object->hasDataChanges(), 'Data changed'); - $object = new \Magento\Object(array('key' => 'value')); + $object = new \Magento\Framework\Object(array('key' => 'value')); $object->setData('key', 'value'); $this->assertFalse($object->hasDataChanges(), 'Data not changed'); $object->setData(array('key' => 'value')); $this->assertFalse($object->hasDataChanges(), 'Data not changed (array)'); - $object = new \Magento\Object(); + $object = new \Magento\Framework\Object(); $object->unsetData(); $this->assertFalse($object->hasDataChanges(), 'Unset data'); - $object = new \Magento\Object(array('key' => null)); + $object = new \Magento\Framework\Object(array('key' => null)); $object->setData('key', null); $this->assertFalse($object->hasDataChanges(), 'Null data'); } /** - * Tests \Magento\Object->getId() + * Tests \Magento\Framework\Object->getId() */ public function testSetGetId() { @@ -116,7 +118,7 @@ public function testSetGetId() } /** - * Tests \Magento\Object->addData() + * Tests \Magento\Framework\Object->addData() */ public function testAddData() { @@ -131,7 +133,7 @@ public function testAddData() } /** - * Tests \Magento\Object->setData() + * Tests \Magento\Framework\Object->setData() */ public function testSetData() { @@ -149,7 +151,7 @@ public function testSetData() } /** - * Tests \Magento\Object->unsetData() + * Tests \Magento\Framework\Object->unsetData() */ public function testUnsetData() { @@ -170,7 +172,7 @@ public function testUnsetData() } /** - * Tests \Magento\Object->getData() + * Tests \Magento\Framework\Object->getData() */ public function testGetData() { @@ -180,7 +182,7 @@ public function testGetData() 'subkey2.1' => 'value2.1', 'subkey2.2' => 'multiline string', - 'subkey2.3' => new \Magento\Object(array('test_key' => 'test_value')) + 'subkey2.3' => new \Magento\Framework\Object(array('test_key' => 'test_value')) ), 'key3' => 5 ); @@ -204,7 +206,7 @@ public function testGetDataByPath() 'subkey2.1' => 'value2.1', 'subkey2.2' => 'multiline string', - 'subkey2.3' => new \Magento\Object(array('test_key' => 'test_value')) + 'subkey2.3' => new \Magento\Framework\Object(array('test_key' => 'test_value')) ) ) ); @@ -223,11 +225,11 @@ public function testGetDataByKey() } /** - * Tests \Magento\Object->setDataUsingMethod() + * Tests \Magento\Framework\Object->setDataUsingMethod() */ public function testSetGetDataUsingMethod() { - $mock = $this->getMock('Magento\Object', array('setTestData', 'getTestData')); + $mock = $this->getMock('Magento\Framework\Object', array('setTestData', 'getTestData')); $mock->expects($this->once())->method('setTestData')->with($this->equalTo('data')); $mock->expects($this->once())->method('getTestData'); @@ -236,7 +238,7 @@ public function testSetGetDataUsingMethod() } /** - * Tests \Magento\Object->getDataSetDefault() + * Tests \Magento\Framework\Object->getDataSetDefault() */ public function testGetDataSetDefault() { @@ -247,7 +249,7 @@ public function testGetDataSetDefault() } /** - * Tests \Magento\Object->hasData() + * Tests \Magento\Framework\Object->hasData() */ public function testHasData() { @@ -258,7 +260,7 @@ public function testHasData() } /** - * Tests \Magento\Object->toArray() + * Tests \Magento\Framework\Object->toArray() */ public function testToArray() { @@ -270,7 +272,7 @@ public function testToArray() } /** - * Tests \Magento\Object->toXml() + * Tests \Magento\Framework\Object->toXml() */ public function testToXml() { @@ -318,7 +320,7 @@ public function testToXml() } /** - * Tests \Magento\Object->toJson() + * Tests \Magento\Framework\Object->toJson() */ public function testToJson() { @@ -329,7 +331,7 @@ public function testToJson() } /** - * Tests \Magento\Object->toString() + * Tests \Magento\Framework\Object->toString() */ public function testToString() { @@ -339,9 +341,9 @@ public function testToString() } /** - * Tests \Magento\Object->__call() + * Tests \Magento\Framework\Object->__call() * - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception */ public function testCall() { @@ -359,7 +361,7 @@ public function testCall() } /** - * Tests \Magento\Object->__get() + * Tests \Magento\Framework\Object->__get() */ public function testGetSet() { @@ -371,7 +373,7 @@ public function testGetSet() } /** - * Tests \Magento\Object->isEmpty() + * Tests \Magento\Framework\Object->isEmpty() */ public function testIsEmpty() { @@ -381,7 +383,7 @@ public function testIsEmpty() } /** - * Tests \Magento\Object->serialize() + * Tests \Magento\Framework\Object->serialize() */ public function testSerialize() { @@ -394,7 +396,7 @@ public function testSerialize() } /** - * Tests \Magento\Object->setOrigData() + * Tests \Magento\Framework\Object->setOrigData() */ public function testOrigData() { @@ -410,7 +412,7 @@ public function testOrigData() } /** - * Tests \Magento\Object->setDataChanges() + * Tests \Magento\Framework\Object->setDataChanges() */ public function testSetDataChanges() { @@ -420,7 +422,7 @@ public function testSetDataChanges() } /** - * Tests \Magento\Object->debug() + * Tests \Magento\Framework\Object->debug() */ public function testDebug() { @@ -429,12 +431,12 @@ public function testDebug() $debug = $data; unset($debug['key3']); - $debug['key3 (Magento\Object)'] = '*** RECURSION ***'; + $debug['key3 (Magento\Framework\Object)'] = '*** RECURSION ***'; $this->assertEquals($debug, $this->_object->debug()); } /** - * Tests \Magento\Object->offsetSet() + * Tests \Magento\Framework\Object->offsetSet() */ public function testOffset() { diff --git a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Phrase/Renderer/CompositeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php index 8a358cac536c2..5d1376e4f54fe 100644 --- a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/CompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/CompositeTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Phrase\Renderer; +namespace Magento\Framework\Phrase\Renderer; class CompositeTest extends \PHPUnit_Framework_TestCase { @@ -42,9 +42,9 @@ class CompositeTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->rendererOne = $this->getMock('Magento\Phrase\RendererInterface'); - $this->rendererTwo = $this->getMock('Magento\Phrase\RendererInterface'); - $this->object = new \Magento\Phrase\Renderer\Composite(array($this->rendererOne, $this->rendererTwo)); + $this->rendererOne = $this->getMock('Magento\Framework\Phrase\RendererInterface'); + $this->rendererTwo = $this->getMock('Magento\Framework\Phrase\RendererInterface'); + $this->object = new \Magento\Framework\Phrase\Renderer\Composite(array($this->rendererOne, $this->rendererTwo)); } /** @@ -53,7 +53,7 @@ protected function setUp() */ public function testConstructorException() { - new \Magento\Phrase\Renderer\Composite(array(new \stdClass())); + new \Magento\Framework\Phrase\Renderer\Composite(array(new \stdClass())); } public function testRender() diff --git a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/InlineTest.php b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/InlineTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/Phrase/Renderer/InlineTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/InlineTest.php index 453b1de3b1b7d..72e2aca57d6e3 100644 --- a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/InlineTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/InlineTest.php @@ -21,31 +21,31 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Phrase\Renderer; +namespace Magento\Framework\Phrase\Renderer; class InlineTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\TranslateInterface + * @var \Magento\Framework\TranslateInterface */ protected $translator; /** - * @var \Magento\Phrase\Renderer\Translate + * @var \Magento\Framework\Phrase\Renderer\Translate */ protected $_renderer; /** - * @var \Magento\Translate\Inline\ProviderInterface + * @var \Magento\Framework\Translate\Inline\ProviderInterface */ protected $provider; protected function setUp() { - $this->translator = $this->getMock('Magento\TranslateInterface', [], [], '', false); - $this->provider = $this->getMock('Magento\Translate\Inline\ProviderInterface', [], [], '', false); + $this->translator = $this->getMock('Magento\Framework\TranslateInterface', [], [], '', false); + $this->provider = $this->getMock('Magento\Framework\Translate\Inline\ProviderInterface', [], [], '', false); - $this->renderer = new \Magento\Phrase\Renderer\Inline( + $this->renderer = new \Magento\Framework\Phrase\Renderer\Inline( $this->translator, $this->provider ); @@ -61,7 +61,7 @@ public function testRenderIfInlineTranslationIsAllowed() ->method('getTheme') ->will($this->returnValue($theme)); - $inlineTranslate = $this->getMock('Magento\Translate\InlineInterface', [], [], '', []); + $inlineTranslate = $this->getMock('Magento\Framework\Translate\InlineInterface', [], [], '', []); $inlineTranslate->expects($this->once()) ->method('isAllowed') ->will($this->returnValue(true)); @@ -77,7 +77,7 @@ public function testRenderIfInlineTranslationIsNotAllowed() { $text = 'test'; - $inlineTranslate = $this->getMock('Magento\Translate\InlineInterface', [], [], '', []); + $inlineTranslate = $this->getMock('Magento\Framework\Translate\InlineInterface', [], [], '', []); $inlineTranslate->expects($this->once()) ->method('isAllowed') ->will($this->returnValue(false)); diff --git a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/PlaceholderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/PlaceholderTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Phrase/Renderer/PlaceholderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/PlaceholderTest.php index d011a00e191f4..88ce8f3fe2610 100644 --- a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/PlaceholderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/PlaceholderTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Phrase\Renderer; +namespace Magento\Framework\Phrase\Renderer; class PlaceholderTest extends \PHPUnit_Framework_TestCase { @@ -31,7 +31,7 @@ class PlaceholderTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->_renderer = $objectManager->getObject('Magento\Phrase\Renderer\Placeholder'); + $this->_renderer = $objectManager->getObject('Magento\Framework\Phrase\Renderer\Placeholder'); } /** diff --git a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/TranslateTest.php b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/TranslateTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Phrase/Renderer/TranslateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/TranslateTest.php index e3ab5658d6fa9..e614b0342818c 100644 --- a/dev/tests/unit/testsuite/Magento/Phrase/Renderer/TranslateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Phrase/Renderer/TranslateTest.php @@ -21,27 +21,27 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Phrase\Renderer; +namespace Magento\Framework\Phrase\Renderer; class TranslateTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Translate|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Translate|PHPUnit_Framework_MockObject_MockObject */ protected $_translator; /** - * @var \Magento\Phrase\Renderer\Translate + * @var \Magento\Framework\Phrase\Renderer\Translate */ protected $_renderer; protected function setUp() { - $this->_translator = $this->getMock('Magento\TranslateInterface', array(), array(), '', false); + $this->_translator = $this->getMock('Magento\Framework\TranslateInterface', array(), array(), '', false); $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); $this->_renderer = $objectManagerHelper->getObject( - 'Magento\Phrase\Renderer\Translate', + 'Magento\Framework\Phrase\Renderer\Translate', array('translator' => $this->_translator) ); } diff --git a/dev/tests/unit/testsuite/Magento/PhraseTest.php b/dev/tests/unit/testsuite/Magento/Framework/PhraseTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/PhraseTest.php rename to dev/tests/unit/testsuite/Magento/Framework/PhraseTest.php index c5fa7379dfa91..7696360358c97 100644 --- a/dev/tests/unit/testsuite/Magento/PhraseTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/PhraseTest.php @@ -21,30 +21,30 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento; +namespace Magento\Framework; class PhraseTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Phrase + * @var \Magento\Framework\Phrase */ protected $phrase; /** - * @var \Magento\Phrase\RendererInterface|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Phrase\RendererInterface|PHPUnit_Framework_MockObject_MockObject */ protected $renderer; protected function setUp() { - $this->renderer = $this->getMock('Magento\Phrase\RendererInterface'); - \Magento\Phrase::setRenderer($this->renderer); + $this->renderer = $this->getMock('Magento\Framework\Phrase\RendererInterface'); + \Magento\Framework\Phrase::setRenderer($this->renderer); } protected function tearDown() { $this->removeRendererFromPhrase(); - \Magento\Phrase::setRenderer(new \Magento\Phrase\Renderer\Placeholder()); + \Magento\Framework\Phrase::setRenderer(new \Magento\Framework\Phrase\Renderer\Placeholder()); } public function testRendering() @@ -52,7 +52,7 @@ public function testRendering() $text = 'some text'; $arguments = ['arg1', 'arg2']; $result = 'rendered text'; - $this->phrase = new \Magento\Phrase($text, $arguments); + $this->phrase = new \Magento\Framework\Phrase($text, $arguments); $this->renderer->expects( $this->once() @@ -72,7 +72,7 @@ public function testRenderingWithoutRenderer() { $this->removeRendererFromPhrase(); $result = 'some text'; - $this->phrase = new \Magento\Phrase($result); + $this->phrase = new \Magento\Framework\Phrase($result); $this->assertEquals($result, $this->phrase->render()); } @@ -80,7 +80,7 @@ public function testRenderingWithoutRenderer() public function testDefersRendering() { $this->renderer->expects($this->never())->method('render'); - $this->phrase = new \Magento\Phrase('some text'); + $this->phrase = new \Magento\Framework\Phrase('some text'); } public function testThatToStringIsAliasToRender() @@ -88,7 +88,7 @@ public function testThatToStringIsAliasToRender() $text = 'some text'; $arguments = ['arg1', 'arg2']; $result = 'rendered text'; - $this->phrase = new \Magento\Phrase($text, $arguments); + $this->phrase = new \Magento\Framework\Phrase($text, $arguments); $this->renderer->expects( $this->once() @@ -106,7 +106,7 @@ public function testThatToStringIsAliasToRender() protected function removeRendererFromPhrase() { - $property = new \ReflectionProperty('Magento\Phrase', '_renderer'); + $property = new \ReflectionProperty('Magento\Framework\Phrase', '_renderer'); $property->setAccessible(true); $property->setValue($this->phrase, null); } diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/CalculatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/CalculatorTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Pricing/Adjustment/CalculatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/CalculatorTest.php index 6be42a00035b6..0b48e4bb7eda5 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/CalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/CalculatorTest.php @@ -18,37 +18,34 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Adjustment; +namespace Magento\Framework\Pricing\Adjustment; /** * Class CalculatorTest * - * @package Magento\Pricing\Adjustment + * @package Magento\Framework\Pricing\Adjustment */ class CalculatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Pricing\Adjustment\Calculator + * @var \Magento\Framework\Pricing\Adjustment\Calculator */ protected $model; /** - * @var \Magento\Pricing\Amount\AmountFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Amount\AmountFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $amountFactoryMock; public function setUp() { - $this->amountFactoryMock = $this->getMockBuilder('Magento\Pricing\Amount\AmountFactory') + $this->amountFactoryMock = $this->getMockBuilder('Magento\Framework\Pricing\Amount\AmountFactory') ->disableOriginalConstructor() ->getMock(); - $this->model = new \Magento\Pricing\Adjustment\Calculator($this->amountFactoryMock); + $this->model = new \Magento\Framework\Pricing\Adjustment\Calculator($this->amountFactoryMock); } /** @@ -106,7 +103,7 @@ public function testGetAmount() $adjustments = [$taxAdjustmentMock, $weeeAdjustmentMock]; - $priceInfoMock = $this->getMockBuilder('\Magento\Pricing\PriceInfoInterface') + $priceInfoMock = $this->getMockBuilder('\Magento\Framework\Pricing\PriceInfoInterface') ->disableOriginalConstructor() //->setMethods(['getPriceInfo']) ->getMock(); @@ -118,7 +115,7 @@ public function testGetAmount() ->method('getPriceInfo') ->will($this->returnValue($priceInfoMock)); - $amountBaseMock = $this->getMockBuilder('Magento\Pricing\Amount\Base') + $amountBaseMock = $this->getMockBuilder('Magento\Framework\Pricing\Amount\Base') ->disableOriginalConstructor() ->getMock(); @@ -127,6 +124,6 @@ public function testGetAmount() ->with($this->equalTo($newAmount), $this->equalTo($expectedAdjustments)) ->will($this->returnValue($amountBaseMock)); $result = $this->model->getAmount($amount, $productMock); - $this->assertInstanceOf('Magento\Pricing\Amount\AmountInterface', $result); + $this->assertInstanceOf('Magento\Framework\Pricing\Amount\AmountInterface', $result); } } diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/CollectionTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Pricing/Adjustment/CollectionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/CollectionTest.php index 30817dc398a25..0ed7b9423a5e5 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/CollectionTest.php @@ -18,18 +18,15 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Adjustment; +namespace Magento\Framework\Pricing\Adjustment; class CollectionTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Pricing\Adjustment\Pool + * @var \Magento\Framework\Pricing\Adjustment\Pool */ protected $adjustmentPool; @@ -40,22 +37,22 @@ class CollectionTest extends \PHPUnit_Framework_TestCase public function setUp() { - $adj1 = $this->getMock('Magento\Pricing\Adjustment\AdjustmentInterface'); + $adj1 = $this->getMock('Magento\Framework\Pricing\Adjustment\AdjustmentInterface'); $adj1->expects($this->any()) ->method('getSortOrder') ->will($this->returnValue(10)); - $adj2 = $this->getMock('Magento\Pricing\Adjustment\AdjustmentInterface'); + $adj2 = $this->getMock('Magento\Framework\Pricing\Adjustment\AdjustmentInterface'); $adj2->expects($this->any()) ->method('getSortOrder') ->will($this->returnValue(20)); - $adj3 = $this->getMock('Magento\Pricing\Adjustment\AdjustmentInterface'); + $adj3 = $this->getMock('Magento\Framework\Pricing\Adjustment\AdjustmentInterface'); $adj3->expects($this->any()) ->method('getSortOrder') ->will($this->returnValue(5)); - $adj4 = $this->getMock('Magento\Pricing\Adjustment\AdjustmentInterface'); + $adj4 = $this->getMock('Magento\Framework\Pricing\Adjustment\AdjustmentInterface'); $adj4->expects($this->any()) ->method('getSortOrder') - ->will($this->returnValue(\Magento\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER)); + ->will($this->returnValue(\Magento\Framework\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER)); $adjustmentsData = [ 'adj1' => $adj1, @@ -64,8 +61,8 @@ public function setUp() 'adj4' => $adj4, ]; - /** @var \Magento\Pricing\Adjustment\Pool|\PHPUnit_Framework_MockObject_MockObject $adjustmentPool */ - $adjustmentPool = $this->getMockBuilder('Magento\Pricing\Adjustment\Pool') + /** @var \Magento\Framework\Pricing\Adjustment\Pool|\PHPUnit_Framework_MockObject_MockObject $adjustmentPool */ + $adjustmentPool = $this->getMockBuilder('Magento\Framework\Pricing\Adjustment\Pool') ->disableOriginalConstructor() ->setMethods(['getAdjustmentByCode']) ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/FactoryTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Pricing/Adjustment/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/FactoryTest.php index c1f18de96600c..147567a255242 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/FactoryTest.php @@ -18,16 +18,13 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Adjustment; +namespace Magento\Framework\Pricing\Adjustment; /** - * Test class for \Magento\Pricing\Adjustment\Factory + * Test class for \Magento\Framework\Pricing\Adjustment\Factory */ class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -43,7 +40,7 @@ public function setUp() public function testCreate() { - $adjustmentInterface = 'Magento\Pricing\Adjustment\AdjustmentInterface'; + $adjustmentInterface = 'Magento\Framework\Pricing\Adjustment\AdjustmentInterface'; $adjustmentFactory = $this->prepareAdjustmentFactory($adjustmentInterface); $this->assertInstanceOf( @@ -59,18 +56,24 @@ public function testCreate() protected function prepareAdjustmentFactory($adjustmentInterface) { return $this->objectManager->getObject( - 'Magento\Pricing\Adjustment\Factory', + 'Magento\Framework\Pricing\Adjustment\Factory', ['objectManager' => $this->prepareObjectManager($adjustmentInterface)] ); } /** * @param string $adjustmentInterface - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager\ObjectManager + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\ObjectManager\ObjectManager */ protected function prepareObjectManager($adjustmentInterface) { - $objectManager = $this->getMock('Magento\ObjectManager\ObjectManager', array('create'), array(), '', false); + $objectManager = $this->getMock( + 'Magento\Framework\ObjectManager\ObjectManager', + array('create'), + array(), + '', + false + ); $objectManager->expects($this->any()) ->method('create') ->will($this->returnValue($this->getMockForAbstractClass($adjustmentInterface))); @@ -82,7 +85,7 @@ protected function prepareObjectManager($adjustmentInterface) */ public function testCreateWithException() { - $invalidAdjustmentInterface = 'Magento\Object'; + $invalidAdjustmentInterface = 'Magento\Framework\Object'; $adjustmentFactory = $this->prepareAdjustmentFactory($invalidAdjustmentInterface); $adjustmentFactory->create($invalidAdjustmentInterface); } diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/PoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/PoolTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Pricing/Adjustment/PoolTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/PoolTest.php index 4b3ecda4896c1..9bfe424bbb63f 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Adjustment/PoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Adjustment/PoolTest.php @@ -18,18 +18,15 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Adjustment; +namespace Magento\Framework\Pricing\Adjustment; class PoolTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Pricing\Adjustment\Pool + * @var \Magento\Framework\Pricing\Adjustment\Pool */ public $model; @@ -43,8 +40,8 @@ public function setUp() 'adj5' => ['className' => 'adj5_class'], ]; - /** @var \Magento\Pricing\Adjustment\Factory|\PHPUnit_Framework_MockObject_MockObject $adjustmentFactory */ - $adjustmentFactory = $this->getMockBuilder('Magento\Pricing\Adjustment\Factory') + /** @var $adjustmentFactory \Magento\Framework\Pricing\Adjustment\Factory */ + $adjustmentFactory = $this->getMockBuilder('Magento\Framework\Pricing\Adjustment\Factory') ->disableOriginalConstructor() ->setMethods(['create']) ->getMock(); @@ -65,8 +62,8 @@ public function testGetAdjustments() 'adj1' => 'adj1_class|10', 'adj2' => 'adj2_class|20', 'adj3' => 'adj3_class|5', - 'adj4' => 'adj4_class|' . \Magento\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER, - 'adj5' => 'adj5_class|' . \Magento\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER, + 'adj4' => 'adj4_class|' . \Magento\Framework\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER, + 'adj5' => 'adj5_class|' . \Magento\Framework\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER, ]; $result = $this->model->getAdjustments(); @@ -90,8 +87,8 @@ public function getAdjustmentByCodeDataProvider() ['adj1', 'adj1_class|10'], ['adj2', 'adj2_class|20'], ['adj3', 'adj3_class|5'], - ['adj4', 'adj4_class|' . \Magento\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER], - ['adj5', 'adj5_class|' . \Magento\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER], + ['adj4', 'adj4_class|' . \Magento\Framework\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER], + ['adj5', 'adj5_class|' . \Magento\Framework\Pricing\Adjustment\Pool::DEFAULT_SORT_ORDER], ]; } diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Amount/AmountFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Amount/AmountFactoryTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Pricing/Amount/AmountFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Amount/AmountFactoryTest.php index ab5357a6e0887..3d2f772380f62 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Amount/AmountFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Amount/AmountFactoryTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Amount; +namespace Magento\Framework\Pricing\Amount; /** * Class AmountFactoryTest @@ -30,7 +30,7 @@ class AmountFactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Pricing\Amount\AmountFactory + * @var \Magento\Framework\Pricing\Amount\AmountFactory */ protected $factory; @@ -40,7 +40,7 @@ class AmountFactoryTest extends \PHPUnit_Framework_TestCase protected $objectManagerMock; /** - * @var \Magento\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $amountMock; @@ -50,8 +50,8 @@ class AmountFactoryTest extends \PHPUnit_Framework_TestCase public function setUp() { $this->objectManagerMock = $this->getMock('Magento\Framework\App\ObjectManager', [], [], '', false); - $this->amountMock = $this->getMock('Magento\Pricing\Amount\Base', [], [], '', false); - $this->factory = new \Magento\Pricing\Amount\AmountFactory($this->objectManagerMock); + $this->amountMock = $this->getMock('Magento\Framework\Pricing\Amount\Base', [], [], '', false); + $this->factory = new \Magento\Framework\Pricing\Amount\AmountFactory($this->objectManagerMock); } /** @@ -62,7 +62,7 @@ public function testCreate() $this->objectManagerMock->expects($this->once()) ->method('create') ->with( - $this->equalTo('Magento\Pricing\Amount\AmountInterface'), + $this->equalTo('Magento\Framework\Pricing\Amount\AmountInterface'), $this->equalTo( [ 'amount' => 'this-is-float-amount', @@ -87,7 +87,7 @@ public function testCreateException() $this->objectManagerMock->expects($this->once()) ->method('create') ->with( - $this->equalTo('Magento\Pricing\Amount\AmountInterface'), + $this->equalTo('Magento\Framework\Pricing\Amount\AmountInterface'), $this->equalTo( [ 'amount' => 'this-is-float-amount', diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Amount/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Amount/BaseTest.php similarity index 95% rename from dev/tests/unit/testsuite/Magento/Pricing/Amount/BaseTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Amount/BaseTest.php index 769b3c2e0c3e4..ab82450311845 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Amount/BaseTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Amount/BaseTest.php @@ -18,18 +18,15 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Amount; +namespace Magento\Framework\Pricing\Amount; /** * Class BaseTest * - * @package Magento\Pricing\Amount + * @package Magento\Framework\Pricing\Amount */ class BaseTest extends \PHPUnit_Framework_TestCase { @@ -178,6 +175,6 @@ public function testHasAdjustment() */ protected function createEntity($amount, array $adjustmentAmounts = []) { - return new \Magento\Pricing\Amount\Base($amount, $adjustmentAmounts); + return new \Magento\Framework\Pricing\Amount\Base($amount, $adjustmentAmounts); } } diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Price/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Price/FactoryTest.php similarity index 73% rename from dev/tests/unit/testsuite/Magento/Pricing/Price/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Price/FactoryTest.php index 40eb7dcd2671e..382c8e23835e4 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Price/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Price/FactoryTest.php @@ -18,17 +18,14 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Price; +namespace Magento\Framework\Pricing\Price; /** - * Test class for \Magento\Pricing\Factory + * Test class for \Magento\Framework\Pricing\Factory */ class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -38,18 +35,18 @@ class FactoryTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; public function setUp() { - $this->objectManagerMock = $this->getMockBuilder('Magento\ObjectManager') + $this->objectManagerMock = $this->getMockBuilder('Magento\Framework\ObjectManager') ->disableOriginalConstructor() ->getMock(); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Pricing\Price\Factory', array( + $this->model = $objectManager->getObject('Magento\Framework\Pricing\Price\Factory', array( 'objectManager' => $this->objectManagerMock )); } @@ -57,9 +54,9 @@ public function setUp() public function testCreate() { $quantity = 2.2; - $className = 'Magento\Pricing\Price\PriceInterface'; + $className = 'Magento\Framework\Pricing\Price\PriceInterface'; $priceMock = $this->getMock($className); - $salableItem = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $salableItem = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); $arguments = []; $argumentsResult = array_merge($arguments, ['salableItem' => $salableItem, 'quantity' => $quantity]); @@ -72,16 +69,19 @@ public function testCreate() $this->assertEquals($priceMock, $this->model->create($salableItem, $className, $quantity, $arguments)); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Magento\Pricing\PriceInfo\Base doesn't implement \Magento\Pricing\Price\PriceInterface - */ public function testCreateWithException() { + $this->setExpectedException( + 'InvalidArgumentException', + sprintf( + 'Magento\Framework\Pricing\PriceInfo\Base doesn\'t implement %s', + '\Magento\Framework\Pricing\Price\PriceInterface' + ) + ); $quantity = 2.2; - $className = 'Magento\Pricing\PriceInfo\Base'; + $className = 'Magento\Framework\Pricing\PriceInfo\Base'; $priceMock = $this->getMockBuilder($className)->disableOriginalConstructor()->getMock(); - $salableItem = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $salableItem = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); $arguments = []; $argumentsResult = array_merge($arguments, ['salableItem' => $salableItem, 'quantity' => $quantity]); diff --git a/dev/tests/unit/testsuite/Magento/Pricing/PriceCompositeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceCompositeTest.php similarity index 84% rename from dev/tests/unit/testsuite/Magento/Pricing/PriceCompositeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceCompositeTest.php index c6bffccc3c5b6..7c77bf7b51db1 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/PriceCompositeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceCompositeTest.php @@ -18,21 +18,18 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing; +namespace Magento\Framework\Pricing; -use Magento\Pricing\Price\Factory as PriceFactory; +use Magento\Framework\Pricing\Price\Factory as PriceFactory; use Magento\Catalog\Pricing\Price\FinalPriceInterface; use Magento\Catalog\Pricing\Price\GroupPriceInterface; use Magento\Catalog\Pricing\Price\SpecialPriceInterface; /** - * Test class for \Magento\Pricing\PriceComposite + * Test class for \Magento\Framework\Pricing\PriceComposite */ class PriceCompositeTest extends \PHPUnit_Framework_TestCase { @@ -53,7 +50,7 @@ class PriceCompositeTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->priceFactory = $this->getMockBuilder('Magento\Pricing\Price\Factory') + $this->priceFactory = $this->getMockBuilder('Magento\Framework\Pricing\Price\Factory') ->disableOriginalConstructor() ->getMock(); @@ -64,7 +61,7 @@ public function setUp() ); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManager->getObject('Magento\Pricing\PriceComposite', array( + $this->model = $objectManager->getObject('Magento\Framework\Pricing\PriceComposite', array( 'priceFactory' => $this->priceFactory, 'metadata' => $this->metadata )); @@ -87,11 +84,11 @@ public function testGetMetadata() public function testCreatePriceObject() { - $saleable = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $saleable = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); $priceCode = FinalPriceInterface::PRICE_TYPE_FINAL; $quantity = 2.4; - $price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); $this->priceFactory->expects($this->once()) ->method('create') @@ -107,7 +104,7 @@ public function testCreatePriceObject() */ public function testCreatePriceObjectWithException() { - $saleable = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $saleable = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); $priceCode = 'wrong_price'; $quantity = 2.4; diff --git a/dev/tests/unit/testsuite/Magento/Pricing/PriceInfo/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/BaseTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/Pricing/PriceInfo/BaseTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/BaseTest.php index 494904df12d60..5491e1780b0c0 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/PriceInfo/BaseTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/BaseTest.php @@ -18,32 +18,29 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\PriceInfo; +namespace Magento\Framework\Pricing\PriceInfo; /** - * Test class for \Magento\Pricing\PriceInfo\Base + * Test class for \Magento\Framework\Pricing\PriceInfo\Base */ class BaseTest extends \PHPUnit_Framework_TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Pricing\Object\SaleableInterface + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Pricing\Object\SaleableInterface */ protected $saleableItem; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Pricing\PriceComposite + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Pricing\PriceComposite */ protected $prices; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Pricing\Adjustment\Collection + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Pricing\Adjustment\Collection */ protected $adjustmentCollection; @@ -53,7 +50,7 @@ class BaseTest extends \PHPUnit_Framework_TestCase protected $quantity; /** - * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Pricing\Amount\AmountFactory + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Pricing\Amount\AmountFactory */ protected $amountFactory; @@ -64,10 +61,16 @@ class BaseTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->saleableItem = $this->getMock('Magento\Pricing\Object\SaleableInterface', [], [], '', false); - $this->prices = $this->getMock('Magento\Pricing\PriceComposite', [], [], '', false); - $this->adjustmentCollection = $this->getMock('Magento\Pricing\Adjustment\Collection', [], [], '', false); - $this->amountFactory = $this->getMock('Magento\Pricing\Amount\AmountFactory', [], [], '', false); + $this->saleableItem = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface', [], [], '', false); + $this->prices = $this->getMock('Magento\Framework\Pricing\PriceComposite', [], [], '', false); + $this->adjustmentCollection = $this->getMock( + 'Magento\Framework\Pricing\Adjustment\Collection', + [], + [], + '', + false + ); + $this->amountFactory = $this->getMock('Magento\Framework\Pricing\Amount\AmountFactory', [], [], '', false); $this->quantity = 3.; $this->model = new Base( $this->saleableItem, @@ -79,9 +82,9 @@ public function setUp() } /** - * @covers \Magento\Pricing\PriceInfo\Base::__construct - * @covers \Magento\Pricing\PriceInfo\Base::initPrices - * @covers \Magento\Pricing\PriceInfo\Base::getPrices + * @covers \Magento\Framework\Pricing\PriceInfo\Base::__construct + * @covers \Magento\Framework\Pricing\PriceInfo\Base::initPrices + * @covers \Magento\Framework\Pricing\PriceInfo\Base::getPrices */ public function testGetPrices() { @@ -96,8 +99,8 @@ public function testGetPrices() } /** - * @covers \Magento\Pricing\PriceInfo\Base::__construct - * @covers \Magento\Pricing\PriceInfo\Base::getPrice + * @covers \Magento\Framework\Pricing\PriceInfo\Base::__construct + * @covers \Magento\Framework\Pricing\PriceInfo\Base::getPrice * @dataProvider providerGetPrice */ public function testGetPrice($entryParams, $createCount) @@ -145,7 +148,7 @@ public function providerGetPrice() } /** - * @covers \Magento\Pricing\PriceInfo\Base::getAdjustments + * @covers \Magento\Framework\Pricing\PriceInfo\Base::getAdjustments */ public function testGetAdjustments() { @@ -154,7 +157,7 @@ public function testGetAdjustments() } /** - * @covers \Magento\Pricing\PriceInfo\Base::getAdjustment + * @covers \Magento\Framework\Pricing\PriceInfo\Base::getAdjustment */ public function testGetAdjustment() { @@ -165,7 +168,7 @@ public function testGetAdjustment() } /** - * @covers \Magento\Pricing\PriceInfo\Base::getPricesIncludedInBase + * @covers \Magento\Framework\Pricing\PriceInfo\Base::getPricesIncludedInBase */ public function testGetPricesIncludedInBase() { diff --git a/dev/tests/unit/testsuite/Magento/Pricing/PriceInfo/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/FactoryTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Pricing/PriceInfo/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/FactoryTest.php index e3b271dc4585b..47c03f501aa2e 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/PriceInfo/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/FactoryTest.php @@ -18,16 +18,13 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\PriceInfo; +namespace Magento\Framework\Pricing\PriceInfo; /** - * Test class for \Magento\Pricing\PriceInfo\Factory + * Test class for \Magento\Framework\Pricing\PriceInfo\Factory */ class FactoryTest extends \PHPUnit_Framework_TestCase { @@ -81,7 +78,7 @@ public function testCreate($types, $type, $expected) protected function preparePriceInfoFactory($priceInfoInterface, $types = []) { return $this->objectManager->getObject( - 'Magento\Pricing\PriceInfo\Factory', + 'Magento\Framework\Pricing\PriceInfo\Factory', [ 'types' => $types, 'objectManager' => $this->prepareObjectManager($priceInfoInterface) @@ -91,11 +88,11 @@ protected function preparePriceInfoFactory($priceInfoInterface, $types = []) /** * @param string $priceInfoInterface - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\ObjectManager\ObjectManager + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\ObjectManager\ObjectManager */ protected function prepareObjectManager($priceInfoInterface) { - $objectManager = $this->getMock('Magento\ObjectManager\ObjectManager', ['create'], [], '', false); + $objectManager = $this->getMock('Magento\Framework\ObjectManager\ObjectManager', ['create'], [], '', false); $objectManager->expects($this->any()) ->method('create') ->will($this->returnValue($this->getMockForAbstractClass($priceInfoInterface))); @@ -109,14 +106,14 @@ public function priceInfoClassesProvider() { return [ [ - ['new_type' => 'Magento\Pricing\PriceInfo\Base'], + ['new_type' => 'Magento\Framework\Pricing\PriceInfo\Base'], 'new_type', - 'Magento\Pricing\PriceInfoInterface' + 'Magento\Framework\Pricing\PriceInfoInterface' ], [ [], 'unknown', - 'Magento\Pricing\PriceInfoInterface' + 'Magento\Framework\Pricing\PriceInfoInterface' ] ]; } @@ -126,7 +123,7 @@ public function priceInfoClassesProvider() */ public function testCreateWithException() { - $invalidPriceInfoInterface = 'Magento\Object'; + $invalidPriceInfoInterface = 'Magento\Framework\Object'; $priceInfoFactory = $this->preparePriceInfoFactory($invalidPriceInfoInterface); $priceInfoFactory->create( $this->getMock('Magento\Catalog\Model\Product', ['__wakeup'], [], '', false) diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Render/AbstractAdjustmentTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/AbstractAdjustmentTest.php similarity index 74% rename from dev/tests/unit/testsuite/Magento/Pricing/Render/AbstractAdjustmentTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/AbstractAdjustmentTest.php index ce65486e039cc..8d2319099a380 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Render/AbstractAdjustmentTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/AbstractAdjustmentTest.php @@ -18,16 +18,13 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Render; +namespace Magento\Framework\Pricing\Render; /** - * Test class for \Magento\Pricing\Render\AbstractAdjustment + * Test class for \Magento\Framework\Pricing\Render\AbstractAdjustment */ class AbstractAdjustmentTest extends \PHPUnit_Framework_TestCase { @@ -37,19 +34,20 @@ class AbstractAdjustmentTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceCurrency; public function setUp() { - $this->priceCurrency = $this->getMock('Magento\Pricing\PriceCurrencyInterface'); + $this->priceCurrency = $this->getMock('Magento\Framework\Pricing\PriceCurrencyInterface'); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $constructorArgs = $objectManager->getConstructArguments('Magento\Pricing\Render\AbstractAdjustment', array( - 'priceCurrency' => $this->priceCurrency - )); - $this->model = $this->getMockBuilder('Magento\Pricing\Render\AbstractAdjustment') + $constructorArgs = $objectManager->getConstructArguments( + 'Magento\Framework\Pricing\Render\AbstractAdjustment', + array('priceCurrency' => $this->priceCurrency) + ); + $this->model = $this->getMockBuilder('Magento\Framework\Pricing\Render\AbstractAdjustment') ->setConstructorArgs($constructorArgs) ->getMockForAbstractClass(); } @@ -58,7 +56,7 @@ public function testConvertAndFormatCurrency() { $amount = '100'; $includeContainer = true; - $precision = \Magento\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; + $precision = \Magento\Framework\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; $result = '100.0 grn'; diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Render/AmountTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/AmountTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Pricing/Render/AmountTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/AmountTest.php index 5187c10968690..949c0c05588c9 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Render/AmountTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/AmountTest.php @@ -18,19 +18,16 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Render; +namespace Magento\Framework\Pricing\Render; -use Magento\Pricing\Object\SaleableInterface; -use Magento\Pricing\Price\PriceInterface; +use Magento\Framework\Pricing\Object\SaleableInterface; +use Magento\Framework\Pricing\Price\PriceInterface; /** - * Test class for \Magento\Pricing\Render\Amount + * Test class for \Magento\Framework\Pricing\Render\Amount */ class AmountTest extends \PHPUnit_Framework_TestCase { @@ -40,7 +37,7 @@ class AmountTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\Pricing\PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\PriceCurrencyInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $priceCurrency; @@ -50,7 +47,7 @@ class AmountTest extends \PHPUnit_Framework_TestCase protected $rendererPool; /** - * @var \Magento\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $layout; @@ -66,13 +63,13 @@ class AmountTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->priceCurrency = $this->getMock('Magento\Pricing\PriceCurrencyInterface'); + $this->priceCurrency = $this->getMock('Magento\Framework\Pricing\PriceCurrencyInterface'); $data = [ 'default' => [ 'adjustments' => [ 'base_price_test' => [ 'tax' => [ - 'adjustment_render_class' => 'Magento\View\Element\Template', + 'adjustment_render_class' => 'Magento\Framework\View\Element\Template', 'adjustment_render_template' => 'template.phtml' ] ] @@ -81,7 +78,7 @@ public function setUp() ]; $this->rendererPool = $this->getMock( - 'Magento\Pricing\Render\RendererPool', + 'Magento\Framework\Pricing\Render\RendererPool', [], ['data' => $data], '', @@ -89,12 +86,12 @@ public function setUp() false ); - $this->layout = $this->getMock('Magento\View\Layout', [], [], '', false); + $this->layout = $this->getMock('Magento\Framework\View\Layout', [], [], '', false); - $eventManager = $this->getMock('Magento\Event\ManagerStub', [], [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerStub', [], [], '', false); $config = $this->getMock('Magento\Store\Model\Store\Config', [], [], '', false); $scopeConfigMock = $this->getMockForAbstractClass('Magento\Framework\App\Config\ScopeConfigInterface'); - $context = $this->getMock('Magento\View\Element\Template\Context', [], [], '', false); + $context = $this->getMock('Magento\Framework\View\Element\Template\Context', [], [], '', false); $context->expects($this->any()) ->method('getEventManager') ->will($this->returnValue($eventManager)); @@ -111,7 +108,7 @@ public function setUp() $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $objectManager->getObject( - 'Magento\Pricing\Render\Amount', + 'Magento\Framework\Pricing\Render\Amount', [ 'context' => $context, 'priceCurrency' => $this->priceCurrency, @@ -124,7 +121,7 @@ public function testConvertAndFormatCurrency() { $amount = '100'; $includeContainer = true; - $precision = \Magento\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; + $precision = \Magento\Framework\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION; $result = '100.0 grn'; diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Render/LayoutTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/LayoutTest.php similarity index 76% rename from dev/tests/unit/testsuite/Magento/Pricing/Render/LayoutTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/LayoutTest.php index 16037f666555c..f209c01f15918 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Render/LayoutTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/LayoutTest.php @@ -18,16 +18,13 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Render; +namespace Magento\Framework\Pricing\Render; /** - * Test class for \Magento\Pricing\Render\Layout + * Test class for \Magento\Framework\Pricing\Render\Layout */ class LayoutTest extends \PHPUnit_Framework_TestCase { @@ -37,30 +34,30 @@ class LayoutTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $layout; /** - * @var \Magento\View\LayoutFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $layoutFactory; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $generalLayout; public function setUp() { - $this->layout = $this->getMock('Magento\View\LayoutInterface'); - $this->generalLayout = $this->getMock('Magento\View\LayoutInterface'); + $this->layout = $this->getMock('Magento\Framework\View\LayoutInterface'); + $this->generalLayout = $this->getMock('Magento\Framework\View\LayoutInterface'); $isCacheable = false; $this->generalLayout->expects($this->once()) ->method('isCacheable') ->will($this->returnValue(false)); - $layoutFactory = $this->getMockBuilder('Magento\View\LayoutFactory') + $layoutFactory = $this->getMockBuilder('Magento\Framework\View\LayoutFactory') ->disableOriginalConstructor() ->setMethods(['create']) ->getMock(); @@ -71,7 +68,7 @@ public function setUp() $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $objectManager->getObject( - 'Magento\Pricing\Render\Layout', + 'Magento\Framework\Pricing\Render\Layout', [ 'layoutFactory' => $layoutFactory, 'generalLayout' => $this->generalLayout @@ -83,7 +80,7 @@ public function testAddHandle() { $handle = 'test_handle'; - $layoutProcessor = $this->getMock('Magento\View\Layout\ProcessorInterface'); + $layoutProcessor = $this->getMock('Magento\Framework\View\Layout\ProcessorInterface'); $layoutProcessor->expects($this->once()) ->method('addHandle') ->with($handle); @@ -96,7 +93,7 @@ public function testAddHandle() public function testLoadLayout() { - $layoutProcessor = $this->getMock('Magento\View\Layout\ProcessorInterface'); + $layoutProcessor = $this->getMock('Magento\Framework\View\Layout\ProcessorInterface'); $layoutProcessor->expects($this->once()) ->method('load'); $this->layout->expects($this->once()) @@ -116,7 +113,7 @@ public function testGetBlock() { $blockName = 'block.name'; - $block = $this->getMock('Magento\View\Element\BlockInterface'); + $block = $this->getMock('Magento\Framework\View\Element\BlockInterface'); $this->layout->expects($this->once()) ->method('getBlock') diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Render/PriceBoxTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/PriceBoxTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Pricing/Render/PriceBoxTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/PriceBoxTest.php index 4e63bf27c3235..0a5371a40a862 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Render/PriceBoxTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/PriceBoxTest.php @@ -18,16 +18,13 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Render; +namespace Magento\Framework\Pricing\Render; /** - * Test class for \Magento\Pricing\Render\PriceBox + * Test class for \Magento\Framework\Pricing\Render\PriceBox */ class PriceBoxTest extends \PHPUnit_Framework_TestCase { @@ -42,22 +39,22 @@ class PriceBoxTest extends \PHPUnit_Framework_TestCase protected $model; /** - * @var \Magento\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject */ protected $context; /** - * @var \Magento\Pricing\Render\RendererPool|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Render\RendererPool|\PHPUnit_Framework_MockObject_MockObject */ protected $rendererPool; /** - * @var \Magento\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Object\SaleableInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $saleable; /** - * @var \Magento\Pricing\Price\PriceInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Price\PriceInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $price; @@ -65,18 +62,18 @@ public function setUp() { $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->rendererPool = $this->getMockBuilder('Magento\Pricing\Render\RendererPool') + $this->rendererPool = $this->getMockBuilder('Magento\Framework\Pricing\Render\RendererPool') ->disableOriginalConstructor() ->setMethods(['createAmountRender']) ->getMock(); - $layout = $this->getMock('Magento\View\LayoutInterface'); - $eventManager = $this->getMock('Magento\Event\ManagerInterface'); + $layout = $this->getMock('Magento\Framework\View\LayoutInterface'); + $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface'); $scopeConfigMock = $this->getMockForAbstractClass('Magento\Framework\App\Config\ScopeConfigInterface'); $storeConfig = $this->getMockBuilder('Magento\Store\Model\Store\Config') ->disableOriginalConstructor() ->getMock(); - $this->context = $this->getMockBuilder('Magento\View\Element\Template\Context') + $this->context = $this->getMockBuilder('Magento\Framework\View\Element\Template\Context') ->disableOriginalConstructor() ->getMock(); $this->context->expects($this->any()) @@ -92,11 +89,11 @@ public function setUp() ->method('getScopeConfig') ->will($this->returnValue($scopeConfigMock)); - $this->saleable = $this->getMock('Magento\Pricing\Object\SaleableInterface'); + $this->saleable = $this->getMock('Magento\Framework\Pricing\Object\SaleableInterface'); - $this->price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $this->price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); - $this->model = $this->objectManager->getObject('Magento\Pricing\Render\PriceBox', array( + $this->model = $this->objectManager->getObject('Magento\Framework\Pricing\Render\PriceBox', array( 'context' => $this->context, 'saleableItem' => $this->saleable, 'price' => $this->price, @@ -116,7 +113,7 @@ public function testToHtml($data, $priceType, $cssClasses) ->method('getPriceType') ->will($this->returnValue($priceType)); - $priceBox = $this->objectManager->getObject('Magento\Pricing\Render\PriceBox', array( + $priceBox = $this->objectManager->getObject('Magento\Framework\Pricing\Render\PriceBox', array( 'context' => $this->context, 'saleableItem' => $this->saleable, 'price' => $this->price, @@ -157,9 +154,9 @@ public function testGetPriceType() $priceCode = 'test_price'; $quantity = 1.; - $price = $this->getMock('Magento\Pricing\Price\PriceInterface'); + $price = $this->getMock('Magento\Framework\Pricing\Price\PriceInterface'); - $priceInfo = $this->getMock('Magento\Pricing\PriceInfoInterface'); + $priceInfo = $this->getMock('Magento\Framework\Pricing\PriceInfoInterface'); $priceInfo->expects($this->once()) ->method('getPrice') ->with($priceCode, $quantity) @@ -174,11 +171,11 @@ public function testGetPriceType() public function testRenderAmount() { - $amount = $this->getMock('Magento\Pricing\Amount\AmountInterface'); + $amount = $this->getMock('Magento\Framework\Pricing\Amount\AmountInterface'); $arguments = []; $resultHtml = 'result_html'; - $amountRender = $this->getMockBuilder('Magento\Pricing\Render\Amount') + $amountRender = $this->getMockBuilder('Magento\Framework\Pricing\Render\Amount') ->disableOriginalConstructor() ->setMethods(['toHtml']) ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Pricing/Render/RendererPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/RendererPoolTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Pricing/Render/RendererPoolTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/RendererPoolTest.php index b3f268ef1bdb4..e066f510368a1 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/Render/RendererPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/Render/RendererPoolTest.php @@ -18,21 +18,18 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing\Render; +namespace Magento\Framework\Pricing\Render; /** - * Test class for \Magento\Pricing\Render\RendererPool + * Test class for \Magento\Framework\Pricing\Render\RendererPool */ class RendererPoolTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Pricing\Render\RendererPool | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Render\RendererPool | \PHPUnit_Framework_MockObject_MockObject */ protected $object; @@ -52,16 +49,16 @@ class RendererPoolTest extends \PHPUnit_Framework_TestCase protected $priceMock; /** - * @var \Magento\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface | \PHPUnit_Framework_MockObject_MockObject */ protected $contextMock; public function setUp() { - $this->layoutMock = $this->getMockBuilder('Magento\View\Layout') + $this->layoutMock = $this->getMockBuilder('Magento\Framework\View\Layout') ->disableOriginalConstructor() ->getMock(); - $this->contextMock = $this->getMockBuilder('\Magento\View\Element\Context') + $this->contextMock = $this->getMockBuilder('\Magento\Framework\View\Element\Context') ->disableOriginalConstructor() ->getMock(); $this->contextMock->expects($this->any()) @@ -119,7 +116,7 @@ public function testCreatePriceRenderNoPriceModel() ]; $priceModel = null; - $priceInfoMock = $this->getMockBuilder('Magento\Pricing\PriceInfo\Base') + $priceInfoMock = $this->getMockBuilder('Magento\Framework\Pricing\PriceInfo\Base') ->disableOriginalConstructor() ->getMock(); $priceInfoMock->expects($this->once()) @@ -142,15 +139,15 @@ public function testCreatePriceRenderNoPriceModel() * Test createPriceRender() if not found price model * * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Block "Magento\View\Element\Template\Context" must implement - * \Magento\Pricing\Render\PriceBoxRenderInterface + * @expectedExceptionMessage Block "Magento\Framework\View\Element\Template\Context" must implement + * \Magento\Framework\Pricing\Render\PriceBoxRenderInterface */ public function testCreatePriceRenderBlockNotPriceBox() { $methodData = []; $priceCode = 'price_test'; $type = 'simple'; - $className = 'Magento\View\Element\Template\Context'; + $className = 'Magento\Framework\View\Element\Template\Context'; $data = [ $type => [ 'prices' => [ @@ -161,7 +158,7 @@ public function testCreatePriceRenderBlockNotPriceBox() ] ]; - $priceInfoMock = $this->getMockBuilder('Magento\Pricing\PriceInfo\Base') + $priceInfoMock = $this->getMockBuilder('Magento\Framework\Pricing\PriceInfo\Base') ->disableOriginalConstructor() ->getMock(); $priceInfoMock->expects($this->once()) @@ -175,10 +172,10 @@ public function testCreatePriceRenderBlockNotPriceBox() ->method('getPriceInfo') ->will($this->returnValue($priceInfoMock)); - $contextMock = $this->getMockBuilder('Magento\View\Element\Template\Context') + $contextMock = $this->getMockBuilder('Magento\Framework\View\Element\Template\Context') ->disableOriginalConstructor() ->getMock(); - $block = new \Magento\View\Element\Template($contextMock); + $block = new \Magento\Framework\View\Element\Template($contextMock); $testedClass = $this->createTestedEntity($data); @@ -205,7 +202,7 @@ public function testCreatePriceRender() $methodData = []; $priceCode = 'price_test'; $type = 'simple'; - $className = 'Magento\View\Element\Template\Context'; + $className = 'Magento\Framework\View\Element\Template\Context'; $template = 'template.phtml'; $data = [ $type => [ @@ -218,7 +215,7 @@ public function testCreatePriceRender() ] ]; - $priceInfoMock = $this->getMockBuilder('Magento\Pricing\PriceInfo\Base') + $priceInfoMock = $this->getMockBuilder('Magento\Framework\Pricing\PriceInfo\Base') ->disableOriginalConstructor() ->getMock(); $priceInfoMock->expects($this->once()) @@ -232,7 +229,7 @@ public function testCreatePriceRender() ->method('getPriceInfo') ->will($this->returnValue($priceInfoMock)); - $renderBlock = $this->getMockBuilder('Magento\Pricing\Render\PriceBox') + $renderBlock = $this->getMockBuilder('Magento\Framework\Pricing\Render\PriceBox') ->disableOriginalConstructor() ->getMock(); $renderBlock->expects($this->once()) @@ -253,7 +250,7 @@ public function testCreatePriceRender() ->will($this->returnValue($renderBlock)); $result = $testedClass->createPriceRender($priceCode, $this->productMock, $methodData); - $this->assertInstanceOf('Magento\Pricing\Render\PriceBoxRenderInterface', $result); + $this->assertInstanceOf('Magento\Framework\Pricing\Render\PriceBoxRenderInterface', $result); } /** @@ -269,7 +266,7 @@ public function testCreateAmountRenderNoAmountClass() $methodData = []; $priceCode = 'base_price_test'; - $amountMock = $this->getMockBuilder('Magento\Pricing\Amount\Base') + $amountMock = $this->getMockBuilder('Magento\Framework\Pricing\Amount\Base') ->disableOriginalConstructor() ->getMock(); $this->productMock->expects($this->once()) @@ -288,15 +285,15 @@ public function testCreateAmountRenderNoAmountClass() * Test createAmountRender() if amount render block not implement Amount interface * * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Block "Magento\View\Element\Template\Context" - * must implement \Magento\Pricing\Render\AmountRenderInterface + * @expectedExceptionMessage Block "Magento\Framework\View\Element\Template\Context" + * must implement \Magento\Framework\Pricing\Render\AmountRenderInterface */ public function testCreateAmountRenderNotAmountInterface() { $type = 'simple'; $methodData = []; $priceCode = 'base_price_test'; - $amountRenderClass = 'Magento\View\Element\Template\Context'; + $amountRenderClass = 'Magento\Framework\View\Element\Template\Context'; $data = [ $type => [ 'prices' => [ @@ -307,7 +304,7 @@ public function testCreateAmountRenderNotAmountInterface() ] ]; - $amountMock = $this->getMockBuilder('Magento\Pricing\Amount\Base') + $amountMock = $this->getMockBuilder('Magento\Framework\Pricing\Amount\Base') ->disableOriginalConstructor() ->getMock(); $this->productMock->expects($this->once()) @@ -317,10 +314,10 @@ public function testCreateAmountRenderNotAmountInterface() ->method('getPriceType') ->will($this->returnValue($priceCode)); - $contextMock = $this->getMockBuilder('Magento\View\Element\Template\Context') + $contextMock = $this->getMockBuilder('Magento\Framework\View\Element\Template\Context') ->disableOriginalConstructor() ->getMock(); - $block = new \Magento\View\Element\Template($contextMock); + $block = new \Magento\Framework\View\Element\Template($contextMock); $testedClass = $this->createTestedEntity($data); @@ -350,7 +347,7 @@ public function testCreateAmountRender() $methodData = []; $priceCode = 'base_price_test'; $template = 'template.phtml'; - $amountRenderClass = 'Magento\Pricing\Render\Amount'; + $amountRenderClass = 'Magento\Framework\Pricing\Render\Amount'; $data = [ $type => [ 'prices' => [ @@ -362,7 +359,7 @@ public function testCreateAmountRender() ] ]; - $amountMock = $this->getMockBuilder('Magento\Pricing\Amount\Base') + $amountMock = $this->getMockBuilder('Magento\Framework\Pricing\Amount\Base') ->disableOriginalConstructor() ->getMock(); $this->productMock->expects($this->once()) @@ -372,7 +369,7 @@ public function testCreateAmountRender() ->method('getPriceType') ->will($this->returnValue($priceCode)); - $blockMock = $this->getMockBuilder('Magento\Pricing\Render\Amount') + $blockMock = $this->getMockBuilder('Magento\Framework\Pricing\Render\Amount') ->disableOriginalConstructor() ->getMock(); @@ -396,7 +393,7 @@ public function testCreateAmountRender() ->with($this->equalTo($template)); $result = $testedClass->createAmountRender($amountMock, $this->productMock, $this->priceMock, $methodData); - $this->assertInstanceOf('Magento\Pricing\Render\AmountRenderInterface', $result); + $this->assertInstanceOf('Magento\Framework\Pricing\Render\AmountRenderInterface', $result); } /** @@ -463,7 +460,7 @@ public function testGetAdjustmentRenders() { $typeId = 'simple'; $priceCode = 'base_price_test'; - $class = 'Magento\View\Element\Template'; + $class = 'Magento\Framework\View\Element\Template'; $template = 'template.phtml'; $code = 'tax'; @@ -488,7 +485,7 @@ public function testGetAdjustmentRenders() ->method('getPriceType') ->will($this->returnValue($priceCode)); - $blockMock = $this->getMockBuilder('Magento\View\Element\Template') + $blockMock = $this->getMockBuilder('Magento\Framework\View\Element\Template') ->disableOriginalConstructor() ->getMock(); $blockMock->expects($this->once()) @@ -503,7 +500,7 @@ public function testGetAdjustmentRenders() $testedClass = $this->createTestedEntity($data); $result = $testedClass->getAdjustmentRenders($this->productMock, $this->priceMock); $this->assertArrayHasKey($code, $result); - $this->assertInstanceOf('Magento\View\Element\Template', $result[$code]); + $this->assertInstanceOf('Magento\Framework\View\Element\Template', $result[$code]); } /** @@ -518,7 +515,7 @@ public function testGetAmountRenderBlockTemplateNoTemplate() $methodData = []; $priceCode = 'base_price_test'; $template = false; - $amountRenderClass = 'Magento\Pricing\Render\Amount'; + $amountRenderClass = 'Magento\Framework\Pricing\Render\Amount'; $data = [ $type => [ 'prices' => [ @@ -530,7 +527,7 @@ public function testGetAmountRenderBlockTemplateNoTemplate() ] ]; - $amountMock = $this->getMockBuilder('Magento\Pricing\Amount\Base') + $amountMock = $this->getMockBuilder('Magento\Framework\Pricing\Amount\Base') ->disableOriginalConstructor() ->getMock(); @@ -541,7 +538,7 @@ public function testGetAmountRenderBlockTemplateNoTemplate() ->method('getPriceType') ->will($this->returnValue($priceCode)); - $blockMock = $this->getMockBuilder('Magento\Pricing\Render\Amount') + $blockMock = $this->getMockBuilder('Magento\Framework\Pricing\Render\Amount') ->disableOriginalConstructor() ->getMock(); @@ -575,7 +572,7 @@ public function testGetRenderBlockTemplate() $methodData = []; $priceCode = 'price_test'; $type = 'simple'; - $className = 'Magento\View\Element\Template\Context'; + $className = 'Magento\Framework\View\Element\Template\Context'; $template = false; $data = [ $type => [ @@ -588,7 +585,7 @@ public function testGetRenderBlockTemplate() ] ]; - $priceInfoMock = $this->getMockBuilder('Magento\Pricing\PriceInfo\Base') + $priceInfoMock = $this->getMockBuilder('Magento\Framework\Pricing\PriceInfo\Base') ->disableOriginalConstructor() ->getMock(); $priceInfoMock->expects($this->once()) @@ -602,7 +599,7 @@ public function testGetRenderBlockTemplate() ->method('getPriceInfo') ->will($this->returnValue($priceInfoMock)); - $renderBlock = $this->getMockBuilder('Magento\Pricing\Render\PriceBox') + $renderBlock = $this->getMockBuilder('Magento\Framework\Pricing\Render\PriceBox') ->disableOriginalConstructor() ->getMock(); @@ -620,7 +617,7 @@ public function testGetRenderBlockTemplate() ->will($this->returnValue($renderBlock)); $result = $testedClass->createPriceRender($priceCode, $this->productMock, $methodData); - $this->assertInstanceOf('Magento\Pricing\Render\PriceBoxRenderInterface', $result); + $this->assertInstanceOf('Magento\Framework\Pricing\Render\PriceBoxRenderInterface', $result); } /** @@ -631,6 +628,6 @@ public function testGetRenderBlockTemplate() */ protected function createTestedEntity(array $data = []) { - return $this->object = new \Magento\Pricing\Render\RendererPool($this->contextMock, $data); + return $this->object = new \Magento\Framework\Pricing\Render\RendererPool($this->contextMock, $data); } } diff --git a/dev/tests/unit/testsuite/Magento/Pricing/RenderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/RenderTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Pricing/RenderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Pricing/RenderTest.php index eefba963c5e77..5bcae14ab0b03 100644 --- a/dev/tests/unit/testsuite/Magento/Pricing/RenderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/RenderTest.php @@ -18,16 +18,13 @@ * 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_Pricing - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Pricing; +namespace Magento\Framework\Pricing; /** - * Test class for \Magento\Pricing\Render + * Test class for \Magento\Framework\Pricing\Render */ class RenderTest extends \PHPUnit_Framework_TestCase { @@ -47,7 +44,7 @@ class RenderTest extends \PHPUnit_Framework_TestCase protected $price; /** - * @var \Magento\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Amount\Base|\PHPUnit_Framework_MockObject_MockObject */ protected $amount; @@ -57,13 +54,13 @@ class RenderTest extends \PHPUnit_Framework_TestCase protected $saleableItem; /** - * @var \Magento\Pricing\Render\RendererPool|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Pricing\Render\RendererPool|\PHPUnit_Framework_MockObject_MockObject */ protected $renderPool; public function setUp() { - $this->priceLayout = $this->getMockBuilder('Magento\Pricing\Render\Layout') + $this->priceLayout = $this->getMockBuilder('Magento\Framework\Pricing\Render\Layout') ->disableOriginalConstructor() ->getMock(); @@ -71,7 +68,7 @@ public function setUp() ->disableOriginalConstructor() ->getMock(); - $this->amount = $this->getMockBuilder('Magento\Pricing\Amount\Base') + $this->amount = $this->getMockBuilder('Magento\Framework\Pricing\Amount\Base') ->disableOriginalConstructor() ->getMock(); @@ -79,13 +76,13 @@ public function setUp() ->disableOriginalConstructor() ->getMock(); - $this->renderPool = $this->getMockBuilder('Magento\Pricing\Render\RendererPool') + $this->renderPool = $this->getMockBuilder('Magento\Framework\Pricing\Render\RendererPool') ->disableOriginalConstructor() ->getMock(); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); $this->model = $objectManager->getObject( - 'Magento\Pricing\Render', + 'Magento\Framework\Pricing\Render', [ 'priceLayout' => $this->priceLayout ] @@ -103,7 +100,7 @@ public function testSetLayout() $this->priceLayout->expects($this->once()) ->method('loadLayout'); - $layout = $this->getMock('Magento\View\LayoutInterface'); + $layout = $this->getMock('Magento\Framework\View\LayoutInterface'); $this->model->setPriceRenderHandle($priceRenderHandle); $this->model->setLayout($layout); } @@ -131,7 +128,7 @@ public function testRender() $arguments = ['param' => 1]; $result = 'simple.final'; - $pricingRender = $this->getMock('Magento\Pricing\Render', [], [], '', false, true, true, false); + $pricingRender = $this->getMock('Magento\Framework\Pricing\Render', [], [], '', false, true, true, false); $this->renderPool->expects($this->once()) ->method('createPriceRender') ->will($this->returnValue($pricingRender)); @@ -150,7 +147,7 @@ public function testRenderDefault() $priceType = 'special'; $arguments = ['param' => 15]; $result = 'default.special'; - $pricingRender = $this->getMock('Magento\Pricing\Render', [], [], '', false, true, true, false); + $pricingRender = $this->getMock('Magento\Framework\Pricing\Render', [], [], '', false, true, true, false); $this->renderPool->expects($this->once()) ->method('createPriceRender') ->will($this->returnValue($pricingRender)); @@ -171,7 +168,7 @@ public function testRenderDefaultDefault() $arguments = ['param' => 15]; $result = 'default.default'; - $pricingRender = $this->getMock('Magento\Pricing\Render', [], [], '', false, true, true, false); + $pricingRender = $this->getMock('Magento\Framework\Pricing\Render', [], [], '', false, true, true, false); $this->renderPool->expects($this->once()) ->method('createPriceRender') ->will($this->returnValue($pricingRender)); @@ -191,7 +188,16 @@ public function testAmountRender() $arguments = ['param' => 15]; $expectedResult = 'default.default'; - $pricingRender = $this->getMock('Magento\Pricing\Render\Amount', [], [], '', false, true, true, false); + $pricingRender = $this->getMock( + 'Magento\Framework\Pricing\Render\Amount', + [], + [], + '', + false, + true, + true, + false + ); $this->renderPool->expects($this->once()) ->method('createAmountRender') ->with( diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/FactoryTest.php similarity index 73% rename from dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/FactoryTest.php index b922df2084706..8457b2bc1f432 100644 --- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/FactoryTest.php @@ -1,6 +1,6 @@ _factory = new \Magento\Profiler\Driver\Factory($this->_defaultDriverPrefix, $this->_defaultDriverType); + $this->_factory = new \Magento\Framework\Profiler\Driver\Factory( + $this->_defaultDriverPrefix, + $this->_defaultDriverType + ); } public function testConstructor() @@ -55,7 +58,7 @@ public function testConstructor() public function testDefaultConstructor() { - $factory = new \Magento\Profiler\Driver\Factory(); + $factory = new \Magento\Framework\Profiler\Driver\Factory(); $this->assertAttributeNotEmpty('_defaultDriverPrefix', $factory); $this->assertAttributeNotEmpty('_defaultDriverType', $factory); } @@ -69,7 +72,7 @@ public function testCreate($config, $expectedClass) { $driver = $this->_factory->create($config); $this->assertInstanceOf($expectedClass, $driver); - $this->assertInstanceOf('Magento\Profiler\DriverInterface', $driver); + $this->assertInstanceOf('Magento\Framework\Profiler\DriverInterface', $driver); } /** @@ -78,16 +81,16 @@ public function testCreate($config, $expectedClass) public function createDataProvider() { $defaultDriverClass = $this->getMockClass( - 'Magento\Profiler\DriverInterface', + 'Magento\Framework\Profiler\DriverInterface', array(), array(), - 'Magento_Profiler_Driver_Test_Default' + 'Magento_Framework_Profiler_Driver_Test_Default' ); $testDriverClass = $this->getMockClass( - 'Magento\Profiler\DriverInterface', + 'Magento\Framework\Profiler\DriverInterface', array(), array(), - 'Magento_Profiler_Driver_Test_Test' + 'Magento_Framework_Profiler_Driver_Test_Test' ); return array( 'Prefix and concrete type' => array(array('type' => 'test'), $testDriverClass), @@ -96,18 +99,18 @@ public function createDataProvider() ); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Cannot create profiler driver, class "Magento_Profiler_Driver_Test_Baz" doesn't exist. - */ public function testCreateUndefinedClass() { + $this->setExpectedException( + 'InvalidArgumentException', + 'Cannot create profiler driver, class "Magento_Framework_Profiler_Driver_Test_Baz" doesn\'t exist.' + ); $this->_factory->create(array('type' => 'baz')); } /** * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Driver class "stdClass" must implement \Magento\Profiler\DriverInterface. + * @expectedExceptionMessage Driver class "stdClass" must implement \Magento\Framework\Profiler\DriverInterface. */ public function testCreateInvalidClass() { diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/CsvfileTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/CsvfileTest.php index aeef6b2eac8b7..a2844b4414617 100644 --- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/CsvfileTest.php @@ -1,6 +1,6 @@ assertAttributeEquals($expectedFilePath, '_filePath', $output); $this->assertAttributeEquals($expectedDelimiter, '_delimiter', $output); $this->assertAttributeEquals($expectedEnclosure, '_enclosure', $output); diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FactoryTest.php similarity index 74% rename from dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FactoryTest.php index b85824cd22222..b4502f4ce92d9 100644 --- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FactoryTest.php @@ -1,6 +1,6 @@ _factory = new \Magento\Profiler\Driver\Standard\Output\Factory( + $this->_factory = new \Magento\Framework\Profiler\Driver\Standard\Output\Factory( $this->_defaultOutputPrefix, $this->_defaultOutputType ); @@ -58,7 +58,7 @@ public function testConstructor() public function testDefaultConstructor() { - $factory = new \Magento\Profiler\Driver\Standard\Output\Factory(); + $factory = new \Magento\Framework\Profiler\Driver\Standard\Output\Factory(); $this->assertAttributeNotEmpty('_defaultOutputPrefix', $factory); $this->assertAttributeNotEmpty('_defaultOutputType', $factory); } @@ -72,7 +72,7 @@ public function testCreate($configData, $expectedClass) { $driver = $this->_factory->create($configData); $this->assertInstanceOf($expectedClass, $driver); - $this->assertInstanceOf('Magento\Profiler\Driver\Standard\OutputInterface', $driver); + $this->assertInstanceOf('Magento\Framework\Profiler\Driver\Standard\OutputInterface', $driver); } /** @@ -81,16 +81,16 @@ public function testCreate($configData, $expectedClass) public function createDataProvider() { $defaultOutputClass = $this->getMockClass( - 'Magento\Profiler\Driver\Standard\OutputInterface', + 'Magento\Framework\Profiler\Driver\Standard\OutputInterface', array(), array(), - 'Magento_Profiler_Driver_Standard_Output_Test_Default' + 'Magento_Framework_Profiler_Driver_Standard_Output_Test_Default' ); $testOutputClass = $this->getMockClass( - 'Magento\Profiler\Driver\Standard\OutputInterface', + 'Magento\Framework\Profiler\Driver\Standard\OutputInterface', array(), array(), - 'Magento_Profiler_Driver_Standard_Output_Test_Test' + 'Magento_Framework_Profiler_Driver_Standard_Output_Test_Test' ); return array( 'Prefix and concrete type' => array(array('type' => 'test'), $testOutputClass), @@ -105,7 +105,7 @@ public function testCreateUndefinedClass() 'InvalidArgumentException', sprintf( 'Cannot create standard driver output, class "%s" doesn\'t exist.', - 'Magento_Profiler_Driver_Standard_Output_Test_Baz' + 'Magento_Framework_Profiler_Driver_Standard_Output_Test_Baz' ) ); $this->_factory->create(array('type' => 'baz')); @@ -115,7 +115,7 @@ public function testCreateInvalidClass() { $this->setExpectedException( 'InvalidArgumentException', - 'Output class "stdClass" must implement \Magento\Profiler\Driver\Standard\OutputInterface.' + 'Output class "stdClass" must implement \Magento\Framework\Profiler\Driver\Standard\OutputInterface.' ); $this->_factory->create(array('type' => 'stdClass')); } diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FirebugTest.php similarity index 85% rename from dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FirebugTest.php index 8103d959e206e..dcb2b46b77b57 100644 --- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/Output/FirebugTest.php @@ -1,6 +1,6 @@ _output = new \Magento\Profiler\Driver\Standard\Output\Firebug(); + $this->_output = new \Magento\Framework\Profiler\Driver\Standard\Output\Firebug(); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/OutputAbstractTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/OutputAbstractTest.php index ed4eb2b256377..1e6f6d96bbfd4 100644 --- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/OutputAbstractTest.php @@ -1,6 +1,6 @@ _output = $this->getMockForAbstractClass('Magento\Profiler\Driver\Standard\AbstractOutput'); + $this->_output = $this->getMockForAbstractClass('Magento\Framework\Profiler\Driver\Standard\AbstractOutput'); } /** @@ -53,7 +53,7 @@ public function testSetFilterPattern() */ public function testSetThreshold() { - $thresholdKey = \Magento\Profiler\Driver\Standard\Stat::TIME; + $thresholdKey = \Magento\Framework\Profiler\Driver\Standard\Stat::TIME; $this->_output->setThreshold($thresholdKey, 100); $thresholds = \PHPUnit_Util_Class::getObjectAttribute($this->_output, '_thresholds'); $this->assertArrayHasKey($thresholdKey, $thresholds); @@ -69,9 +69,9 @@ public function testSetThreshold() public function testConstructor() { $configuration = array('filterPattern' => '/filter pattern/', 'thresholds' => array('fetchKey' => 100)); - /** @var \Magento\Profiler\Driver\Standard\AbstractOutput|PHPUnit_Framework_MockObject_MockObject $output */ + /** @var $output \Magento\Framework\Profiler\Driver\Standard\AbstractOutput */ $output = $this->getMockForAbstractClass( - 'Magento\Profiler\Driver\Standard\AbstractOutput', + 'Magento\Framework\Profiler\Driver\Standard\AbstractOutput', array($configuration) ); $this->assertEquals('/filter pattern/', $output->getFilterPattern()); @@ -101,11 +101,11 @@ public function testRenderColumnValue($value, $columnKey, $expectedValue) public function renderColumnValueDataProvider() { return array( - array('someTimerId', \Magento\Profiler\Driver\Standard\Stat::ID, 'someTimerId'), - array(10000.123, \Magento\Profiler\Driver\Standard\Stat::TIME, '10,000.123000'), - array(200000.123456789, \Magento\Profiler\Driver\Standard\Stat::AVG, '200,000.123457'), - array(1000000000.12345678, \Magento\Profiler\Driver\Standard\Stat::EMALLOC, '1,000,000,000'), - array(2000000000.12345678, \Magento\Profiler\Driver\Standard\Stat::REALMEM, '2,000,000,000') + array('someTimerId', \Magento\Framework\Profiler\Driver\Standard\Stat::ID, 'someTimerId'), + array(10000.123, \Magento\Framework\Profiler\Driver\Standard\Stat::TIME, '10,000.123000'), + array(200000.123456789, \Magento\Framework\Profiler\Driver\Standard\Stat::AVG, '200,000.123457'), + array(1000000000.12345678, \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC, '1,000,000,000'), + array(2000000000.12345678, \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM, '2,000,000,000') ); } @@ -129,7 +129,7 @@ public function testGetTimerIds() { $this->_output->setFilterPattern('/filter pattern/'); - $mockStat = $this->getMock('Magento\Profiler\Driver\Standard\Stat'); + $mockStat = $this->getMock('Magento\Framework\Profiler\Driver\Standard\Stat'); $expectedTimerIds = array('test'); $mockStat->expects( $this->once() diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/StatTest.php b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/StatTest.php similarity index 77% rename from dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/StatTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/StatTest.php index 7a4b16bdcd16e..625bbeadcc9a1 100644 --- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/StatTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/Standard/StatTest.php @@ -1,6 +1,6 @@ _stat = new \Magento\Profiler\Driver\Standard\Stat(); + $this->_stat = new \Magento\Framework\Profiler\Driver\Standard\Stat(); } /** - * Test start and stop methods of \Magento\Profiler\Driver\Standard\Stat + * Test start and stop methods of \Magento\Framework\Profiler\Driver\Standard\Stat * * @dataProvider actionsDataProvider * @param array $actions @@ -76,13 +76,13 @@ public function actionsDataProvider() ), 'expected' => array( 'timer1' => array( - \Magento\Profiler\Driver\Standard\Stat::START => 25, - \Magento\Profiler\Driver\Standard\Stat::TIME => 0, - \Magento\Profiler\Driver\Standard\Stat::REALMEM => 0, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC => 0, - \Magento\Profiler\Driver\Standard\Stat::REALMEM_START => 1500, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC_START => 10, - \Magento\Profiler\Driver\Standard\Stat::COUNT => 1 + \Magento\Framework\Profiler\Driver\Standard\Stat::START => 25, + \Magento\Framework\Profiler\Driver\Standard\Stat::TIME => 0, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM => 0, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC => 0, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM_START => 1500, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC_START => 10, + \Magento\Framework\Profiler\Driver\Standard\Stat::COUNT => 1 ) ) ), @@ -93,13 +93,13 @@ public function actionsDataProvider() ), 'expected' => array( 'timer1' => array( - \Magento\Profiler\Driver\Standard\Stat::START => 75, - \Magento\Profiler\Driver\Standard\Stat::TIME => 0, - \Magento\Profiler\Driver\Standard\Stat::REALMEM => 0, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC => 0, - \Magento\Profiler\Driver\Standard\Stat::REALMEM_START => 2000, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC_START => 20, - \Magento\Profiler\Driver\Standard\Stat::COUNT => 2 + \Magento\Framework\Profiler\Driver\Standard\Stat::START => 75, + \Magento\Framework\Profiler\Driver\Standard\Stat::TIME => 0, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM => 0, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC => 0, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM_START => 2000, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC_START => 20, + \Magento\Framework\Profiler\Driver\Standard\Stat::COUNT => 2 ) ) ), @@ -112,13 +112,13 @@ public function actionsDataProvider() ), 'expected' => array( 'timer1' => array( - \Magento\Profiler\Driver\Standard\Stat::START => false, - \Magento\Profiler\Driver\Standard\Stat::TIME => 100, - \Magento\Profiler\Driver\Standard\Stat::REALMEM => 1500, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC => 40, - \Magento\Profiler\Driver\Standard\Stat::REALMEM_START => 3000, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC_START => 50, - \Magento\Profiler\Driver\Standard\Stat::COUNT => 2 + \Magento\Framework\Profiler\Driver\Standard\Stat::START => false, + \Magento\Framework\Profiler\Driver\Standard\Stat::TIME => 100, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM => 1500, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC => 40, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM_START => 3000, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC_START => 50, + \Magento\Framework\Profiler\Driver\Standard\Stat::COUNT => 2 ) ) ), @@ -131,22 +131,22 @@ public function actionsDataProvider() ), 'expected' => array( 'timer1' => array( - \Magento\Profiler\Driver\Standard\Stat::START => false, - \Magento\Profiler\Driver\Standard\Stat::TIME => 75, - \Magento\Profiler\Driver\Standard\Stat::REALMEM => 2700, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC => 45, - \Magento\Profiler\Driver\Standard\Stat::REALMEM_START => 1500, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC_START => 10, - \Magento\Profiler\Driver\Standard\Stat::COUNT => 1 + \Magento\Framework\Profiler\Driver\Standard\Stat::START => false, + \Magento\Framework\Profiler\Driver\Standard\Stat::TIME => 75, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM => 2700, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC => 45, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM_START => 1500, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC_START => 10, + \Magento\Framework\Profiler\Driver\Standard\Stat::COUNT => 1 ), 'timer2' => array( - \Magento\Profiler\Driver\Standard\Stat::START => false, - \Magento\Profiler\Driver\Standard\Stat::TIME => 30, - \Magento\Profiler\Driver\Standard\Stat::REALMEM => 500, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC => 5, - \Magento\Profiler\Driver\Standard\Stat::REALMEM_START => 2000, - \Magento\Profiler\Driver\Standard\Stat::EMALLOC_START => 20, - \Magento\Profiler\Driver\Standard\Stat::COUNT => 1 + \Magento\Framework\Profiler\Driver\Standard\Stat::START => false, + \Magento\Framework\Profiler\Driver\Standard\Stat::TIME => 30, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM => 500, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC => 5, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM_START => 2000, + \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC_START => 20, + \Magento\Framework\Profiler\Driver\Standard\Stat::COUNT => 1 ) ) ) @@ -310,8 +310,8 @@ public function timersFilteringDataProvider() array('stop', 'root', 'time' => 1000, 'realMemory' => 500, 'emallocMemory' => 0) ), 'thresholds' => array( - \Magento\Profiler\Driver\Standard\Stat::TIME => 1000, - \Magento\Profiler\Driver\Standard\Stat::REALMEM => 20000 + \Magento\Framework\Profiler\Driver\Standard\Stat::TIME => 1000, + \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM => 20000 ), 'filterPattern' => null, // TIME >= 1000, REALMEM >= 20000 @@ -358,22 +358,22 @@ public function fetchDataProvider() 'expects' => array( array( 'timerId' => 'root', - 'key' => \Magento\Profiler\Driver\Standard\Stat::START, + 'key' => \Magento\Framework\Profiler\Driver\Standard\Stat::START, 'expectedValue' => false ), array( 'timerId' => 'root', - 'key' => \Magento\Profiler\Driver\Standard\Stat::TIME, + 'key' => \Magento\Framework\Profiler\Driver\Standard\Stat::TIME, 'expectedValue' => 1000 ), array( 'timerId' => 'root', - 'key' => \Magento\Profiler\Driver\Standard\Stat::REALMEM, + 'key' => \Magento\Framework\Profiler\Driver\Standard\Stat::REALMEM, 'expectedValue' => 500 ), array( 'timerId' => 'root', - 'key' => \Magento\Profiler\Driver\Standard\Stat::EMALLOC, + 'key' => \Magento\Framework\Profiler\Driver\Standard\Stat::EMALLOC, 'expectedValue' => 10 ) ) @@ -388,7 +388,7 @@ public function fetchDataProvider() 'expects' => array( array( 'timerId' => 'root', - 'key' => \Magento\Profiler\Driver\Standard\Stat::AVG, + 'key' => \Magento\Framework\Profiler\Driver\Standard\Stat::AVG, 'expectedValue' => 10 ) ) @@ -398,12 +398,12 @@ public function fetchDataProvider() 'expects' => array( array( 'timerId' => 'root', - 'key' => \Magento\Profiler\Driver\Standard\Stat::TIME, + 'key' => \Magento\Framework\Profiler\Driver\Standard\Stat::TIME, 'expectedValue' => $this->greaterThan(microtime(true)) ), array( 'timerId' => 'root', - 'key' => \Magento\Profiler\Driver\Standard\Stat::ID, + 'key' => \Magento\Framework\Profiler\Driver\Standard\Stat::ID, 'expectedValue' => 'root' ) ) diff --git a/dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/StandardTest.php similarity index 73% rename from dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/StandardTest.php index 3b47a61412abd..9a688d28a0ad2 100644 --- a/dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Profiler/Driver/StandardTest.php @@ -1,6 +1,6 @@ _stat = $this->getMock('Magento\Profiler\Driver\Standard\Stat'); - $this->_driver = new \Magento\Profiler\Driver\Standard(array('stat' => $this->_stat)); + $this->_stat = $this->getMock('Magento\Framework\Profiler\Driver\Standard\Stat'); + $this->_driver = new \Magento\Framework\Profiler\Driver\Standard(array('stat' => $this->_stat)); } protected function tearDown() { - \Magento\Profiler::reset(); + \Magento\Framework\Profiler::reset(); } /** @@ -53,8 +53,8 @@ protected function tearDown() */ public function testDefaultConstructor() { - $driver = new \Magento\Profiler\Driver\Standard(); - $this->assertAttributeInstanceOf('Magento\Profiler\Driver\Standard\Stat', '_stat', $driver); + $driver = new \Magento\Framework\Profiler\Driver\Standard(); + $this->assertAttributeInstanceOf('Magento\Framework\Profiler\Driver\Standard\Stat', '_stat', $driver); } /** @@ -107,7 +107,7 @@ public function testStop() */ public function testInitOutputs() { - $outputFactory = $this->getMock('Magento\Profiler\Driver\Standard\Output\Factory'); + $outputFactory = $this->getMock('Magento\Framework\Profiler\Driver\Standard\Output\Factory'); $config = array( 'outputs' => array( 'outputTypeOne' => array('baseDir' => '/custom/base/dir'), @@ -117,8 +117,8 @@ public function testInitOutputs() 'outputFactory' => $outputFactory ); - $outputOne = $this->getMock('Magento\Profiler\Driver\Standard\OutputInterface'); - $outputTwo = $this->getMock('Magento\Profiler\Driver\Standard\OutputInterface'); + $outputOne = $this->getMock('Magento\Framework\Profiler\Driver\Standard\OutputInterface'); + $outputTwo = $this->getMock('Magento\Framework\Profiler\Driver\Standard\OutputInterface'); $outputFactory->expects( $this->at(0) @@ -140,7 +140,7 @@ public function testInitOutputs() $this->returnValue($outputTwo) ); - $driver = new \Magento\Profiler\Driver\Standard($config); + $driver = new \Magento\Framework\Profiler\Driver\Standard($config); $this->assertAttributeCount(2, '_outputs', $driver); $this->assertAttributeEquals(array($outputOne, $outputTwo), '_outputs', $driver); } @@ -150,16 +150,16 @@ public function testInitOutputs() */ public function testDisplayAndRegisterOutput() { - $outputOne = $this->getMock('Magento\Profiler\Driver\Standard\OutputInterface'); + $outputOne = $this->getMock('Magento\Framework\Profiler\Driver\Standard\OutputInterface'); $outputOne->expects($this->once())->method('display')->with($this->_stat); - $outputTwo = $this->getMock('Magento\Profiler\Driver\Standard\OutputInterface'); + $outputTwo = $this->getMock('Magento\Framework\Profiler\Driver\Standard\OutputInterface'); $outputTwo->expects($this->once())->method('display')->with($this->_stat); $this->_driver->registerOutput($outputOne); $this->_driver->registerOutput($outputTwo); - \Magento\Profiler::enable(); + \Magento\Framework\Profiler::enable(); $this->_driver->display(); - \Magento\Profiler::disable(); + \Magento\Framework\Profiler::disable(); $this->_driver->display(); } @@ -170,6 +170,9 @@ public function testDefaultOutputFactory() { $method = new \ReflectionMethod($this->_driver, '_getOutputFactory'); $method->setAccessible(true); - $this->assertInstanceOf('Magento\Profiler\Driver\Standard\Output\Factory', $method->invoke($this->_driver)); + $this->assertInstanceOf( + 'Magento\Framework\Profiler\Driver\Standard\Output\Factory', + $method->invoke($this->_driver) + ); } } diff --git a/dev/tests/unit/testsuite/Magento/ProfilerTest.php b/dev/tests/unit/testsuite/Magento/Framework/ProfilerTest.php similarity index 71% rename from dev/tests/unit/testsuite/Magento/ProfilerTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ProfilerTest.php index 90ed1d7df3797..c3f65d50af350 100644 --- a/dev/tests/unit/testsuite/Magento/ProfilerTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ProfilerTest.php @@ -1,6 +1,6 @@ assertTrue(\Magento\Profiler::isEnabled()); + \Magento\Framework\Profiler::enable(); + $this->assertTrue(\Magento\Framework\Profiler::isEnabled()); } public function testDisable() { - \Magento\Profiler::disable(); - $this->assertFalse(\Magento\Profiler::isEnabled()); + \Magento\Framework\Profiler::disable(); + $this->assertFalse(\Magento\Framework\Profiler::isEnabled()); } public function testSetDefaultTags() { $expected = array('some_key' => 'some_value'); - \Magento\Profiler::setDefaultTags($expected); - $this->assertAttributeEquals($expected, '_defaultTags', 'Magento\Profiler'); + \Magento\Framework\Profiler::setDefaultTags($expected); + $this->assertAttributeEquals($expected, '_defaultTags', 'Magento\Framework\Profiler'); } public function testAddTagFilter() { - \Magento\Profiler::addTagFilter('tag1', 'value_1.1'); - \Magento\Profiler::addTagFilter('tag2', 'value_2.1'); - \Magento\Profiler::addTagFilter('tag1', 'value_1.2'); + \Magento\Framework\Profiler::addTagFilter('tag1', 'value_1.1'); + \Magento\Framework\Profiler::addTagFilter('tag2', 'value_2.1'); + \Magento\Framework\Profiler::addTagFilter('tag1', 'value_1.2'); $expected = array('tag1' => array('value_1.1', 'value_1.2'), 'tag2' => array('value_2.1')); - $this->assertAttributeEquals($expected, '_tagFilters', 'Magento\Profiler'); - $this->assertAttributeEquals(true, '_hasTagFilters', 'Magento\Profiler'); + $this->assertAttributeEquals($expected, '_tagFilters', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals(true, '_hasTagFilters', 'Magento\Framework\Profiler'); } public function testAdd() { $mock = $this->_getDriverMock(); - \Magento\Profiler::add($mock); + \Magento\Framework\Profiler::add($mock); - $this->assertTrue(\Magento\Profiler::isEnabled()); + $this->assertTrue(\Magento\Framework\Profiler::isEnabled()); $expected = array($mock); - $this->assertAttributeEquals($expected, '_drivers', 'Magento\Profiler'); + $this->assertAttributeEquals($expected, '_drivers', 'Magento\Framework\Profiler'); } /** @@ -79,7 +79,7 @@ public function testAdd() protected function _getDriverMock() { return $this->getMockBuilder( - 'Magento\Profiler\DriverInterface' + 'Magento\Framework\Profiler\DriverInterface' )->setMethods( array('start', 'stop', 'clear') )->getMockForAbstractClass(); @@ -91,8 +91,8 @@ protected function _getDriverMock() */ public function testStartException() { - \Magento\Profiler::enable(); - \Magento\Profiler::start('timer ' . \Magento\Profiler::NESTING_SEPARATOR . ' name'); + \Magento\Framework\Profiler::enable(); + \Magento\Framework\Profiler::start('timer ' . \Magento\Framework\Profiler::NESTING_SEPARATOR . ' name'); } public function testDisabledProfiler() @@ -101,10 +101,10 @@ public function testDisabledProfiler() $driver->expects($this->never())->method('start'); $driver->expects($this->never())->method('stop'); - \Magento\Profiler::add($driver); - \Magento\Profiler::disable(); - \Magento\Profiler::start('test'); - \Magento\Profiler::stop('test'); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::disable(); + \Magento\Framework\Profiler::start('test'); + \Magento\Framework\Profiler::stop('test'); } public function testStartStopSimple() @@ -113,9 +113,9 @@ public function testStartStopSimple() $driver->expects($this->once())->method('start')->with('root_level_timer', null); $driver->expects($this->once())->method('stop')->with('root_level_timer'); - \Magento\Profiler::add($driver); - \Magento\Profiler::start('root_level_timer'); - \Magento\Profiler::stop('root_level_timer'); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::start('root_level_timer'); + \Magento\Framework\Profiler::stop('root_level_timer'); } public function testStartNested() @@ -127,11 +127,11 @@ public function testStartNested() $driver->expects($this->at(2))->method('stop')->with('root_level_timer->some_other_timer'); $driver->expects($this->at(3))->method('stop')->with('root_level_timer'); - \Magento\Profiler::add($driver); - \Magento\Profiler::start('root_level_timer'); - \Magento\Profiler::start('some_other_timer'); - \Magento\Profiler::stop('some_other_timer'); - \Magento\Profiler::stop('root_level_timer'); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::start('root_level_timer'); + \Magento\Framework\Profiler::start('some_other_timer'); + \Magento\Framework\Profiler::stop('some_other_timer'); + \Magento\Framework\Profiler::stop('root_level_timer'); } /** @@ -140,9 +140,9 @@ public function testStartNested() */ public function testStopExceptionUnknown() { - \Magento\Profiler::enable(); - \Magento\Profiler::start('timer'); - \Magento\Profiler::stop('unknown'); + \Magento\Framework\Profiler::enable(); + \Magento\Framework\Profiler::start('timer'); + \Magento\Framework\Profiler::stop('unknown'); } public function testStopOrder() @@ -159,12 +159,12 @@ public function testStopOrder() $driver->expects($this->exactly(4))->method('start'); $driver->expects($this->exactly(2))->method('stop'); - \Magento\Profiler::add($driver); - \Magento\Profiler::start('timer1'); - \Magento\Profiler::start('timer2'); - \Magento\Profiler::start('timer1'); - \Magento\Profiler::start('timer3'); - \Magento\Profiler::stop('timer1'); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::start('timer1'); + \Magento\Framework\Profiler::start('timer2'); + \Magento\Framework\Profiler::start('timer1'); + \Magento\Framework\Profiler::start('timer3'); + \Magento\Framework\Profiler::stop('timer1'); } public function testStopSameName() @@ -176,11 +176,11 @@ public function testStopSameName() $driver->expects($this->at(2))->method('stop')->with('timer1->timer1'); $driver->expects($this->at(3))->method('stop')->with('timer1'); - \Magento\Profiler::add($driver); - \Magento\Profiler::start('timer1'); - \Magento\Profiler::start('timer1'); - \Magento\Profiler::stop('timer1'); - \Magento\Profiler::stop('timer1'); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::start('timer1'); + \Magento\Framework\Profiler::start('timer1'); + \Magento\Framework\Profiler::stop('timer1'); + \Magento\Framework\Profiler::stop('timer1'); } public function testStopLatest() @@ -190,9 +190,9 @@ public function testStopLatest() $driver->expects($this->at(1))->method('stop')->with('root_level_timer'); - \Magento\Profiler::add($driver); - \Magento\Profiler::start('root_level_timer'); - \Magento\Profiler::stop(); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::start('root_level_timer'); + \Magento\Framework\Profiler::stop(); } public function testTags() @@ -208,10 +208,10 @@ public function testTags() array('default_tag' => 'default', 'type' => 'test') ); - \Magento\Profiler::add($driver); - \Magento\Profiler::setDefaultTags(array('default_tag' => 'default')); - \Magento\Profiler::start('root_level_timer'); - \Magento\Profiler::start('some_other_timer', array('type' => 'test')); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::setDefaultTags(array('default_tag' => 'default')); + \Magento\Framework\Profiler::start('root_level_timer'); + \Magento\Framework\Profiler::start('some_other_timer', array('type' => 'test')); } public function testClearTimer() @@ -219,8 +219,8 @@ public function testClearTimer() $driver = $this->_getDriverMock(); $driver->expects($this->once())->method('clear')->with('timer'); - \Magento\Profiler::add($driver); - \Magento\Profiler::clear('timer'); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::clear('timer'); } /** @@ -229,8 +229,8 @@ public function testClearTimer() */ public function testClearException() { - \Magento\Profiler::enable(); - \Magento\Profiler::clear('timer ' . \Magento\Profiler::NESTING_SEPARATOR . ' name'); + \Magento\Framework\Profiler::enable(); + \Magento\Framework\Profiler::clear('timer ' . \Magento\Framework\Profiler::NESTING_SEPARATOR . ' name'); } public function testResetProfiler() @@ -238,16 +238,16 @@ public function testResetProfiler() $driver = $this->_getDriverMock(); $driver->expects($this->once())->method('clear')->with(null); - \Magento\Profiler::add($driver); - \Magento\Profiler::reset(); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::reset(); - $this->assertAttributeEquals(array(), '_currentPath', 'Magento\Profiler'); - $this->assertAttributeEquals(array(), '_tagFilters', 'Magento\Profiler'); - $this->assertAttributeEquals(array(), '_defaultTags', 'Magento\Profiler'); - $this->assertAttributeEquals(array(), '_drivers', 'Magento\Profiler'); - $this->assertAttributeEquals(false, '_hasTagFilters', 'Magento\Profiler'); - $this->assertAttributeEquals(0, '_pathCount', 'Magento\Profiler'); - $this->assertAttributeEquals(array(), '_pathIndex', 'Magento\Profiler'); + $this->assertAttributeEquals(array(), '_currentPath', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals(array(), '_tagFilters', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals(array(), '_defaultTags', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals(array(), '_drivers', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals(false, '_hasTagFilters', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals(0, '_pathCount', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals(array(), '_pathIndex', 'Magento\Framework\Profiler'); } /** @@ -260,9 +260,9 @@ public function testTagFilterSkip($timerName, array $tags = null) $driver = $this->_getDriverMock(); $driver->expects($this->never())->method('start'); - \Magento\Profiler::add($driver); - \Magento\Profiler::addTagFilter('type', 'test'); - \Magento\Profiler::start($timerName, $tags); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::addTagFilter('type', 'test'); + \Magento\Framework\Profiler::start($timerName, $tags); } /** @@ -287,9 +287,9 @@ public function testTagFilterPass($timerName, array $tags = null) $driver = $this->_getDriverMock(); $driver->expects($this->once())->method('start')->with($timerName, $tags); - \Magento\Profiler::add($driver); - \Magento\Profiler::addTagFilter('type', 'test'); - \Magento\Profiler::start($timerName, $tags); + \Magento\Framework\Profiler::add($driver); + \Magento\Framework\Profiler::addTagFilter('type', 'test'); + \Magento\Framework\Profiler::start($timerName, $tags); } /** @@ -305,10 +305,10 @@ public function passedFilterDataProvider() public function testApplyConfig() { - $mockDriver = $this->getMock('Magento\Profiler\DriverInterface'); + $mockDriver = $this->getMock('Magento\Framework\Profiler\DriverInterface'); $driverConfig = array('type' => 'foo'); $mockDriverFactory = $this->getMockBuilder( - 'Magento\Profiler\Driver\Factory' + 'Magento\Framework\Profiler\Driver\Factory' )->disableOriginalConstructor()->getMock(); $config = array( 'drivers' => array($driverConfig), @@ -326,10 +326,14 @@ public function testApplyConfig() $this->returnValue($mockDriver) ); - \Magento\Profiler::applyConfig($config, ''); - $this->assertAttributeEquals(array($mockDriver), '_drivers', 'Magento\Profiler'); - $this->assertAttributeEquals(array('tagName' => array('tagValue')), '_tagFilters', 'Magento\Profiler'); - $this->assertAttributeEquals(true, '_enabled', 'Magento\Profiler'); + \Magento\Framework\Profiler::applyConfig($config, ''); + $this->assertAttributeEquals(array($mockDriver), '_drivers', 'Magento\Framework\Profiler'); + $this->assertAttributeEquals( + array('tagName' => array('tagValue')), + '_tagFilters', + 'Magento\Framework\Profiler' + ); + $this->assertAttributeEquals(true, '_enabled', 'Magento\Framework\Profiler'); } /** @@ -340,7 +344,7 @@ public function testApplyConfig() */ public function testParseConfig($data, $isAjax, $expected) { - $method = new \ReflectionMethod('Magento\Profiler', '_parseConfig'); + $method = new \ReflectionMethod('Magento\Framework\Profiler', '_parseConfig'); $method->setAccessible(true); $this->assertEquals($expected, $method->invoke(null, $data, '', $isAjax)); } @@ -351,8 +355,8 @@ public function testParseConfig($data, $isAjax, $expected) */ public function parseConfigDataProvider() { - $driverFactory = new \Magento\Profiler\Driver\Factory(); - $otherDriverFactory = $this->getMock('Magento\Profiler\Driver\Factory'); + $driverFactory = new \Magento\Framework\Profiler\Driver\Factory(); + $otherDriverFactory = $this->getMock('Magento\Framework\Profiler\Driver\Factory'); return array( 'Empty configuration' => array( array(), diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/Eav/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Service/Data/Eav/AttributeValueTest.php similarity index 75% rename from dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/Eav/AttributeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Service/Data/Eav/AttributeValueTest.php index adc1d5791ee4f..4d6a55d515962 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/Data/Eav/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Service/Data/Eav/AttributeValueTest.php @@ -21,12 +21,9 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Customer\Service\V1\Data\Eav; +namespace Magento\Framework\Service\Data\Eav; -use Magento\Customer\Service\V1\Data\Eav\Attribute; -use Magento\Customer\Service\V1\Data\Eav\AttributeBuilder; - -class AttributeTest extends \PHPUnit_Framework_TestCase +class AttributeValueTest extends \PHPUnit_Framework_TestCase { const ATTRIBUTE_CODE = 'ATTRIBUTE_CODE'; @@ -34,8 +31,10 @@ class AttributeTest extends \PHPUnit_Framework_TestCase public function testConstructorAndGetters() { - $attributeBuilder = (new AttributeBuilder())->setAttributeCode(self::ATTRIBUTE_CODE)->setValue(self::VALUE); - $attribute = new Attribute($attributeBuilder); + $attributeBuilder = (new AttributeValueBuilder()) + ->setAttributeCode(self::ATTRIBUTE_CODE) + ->setValue(self::VALUE); + $attribute = new AttributeValue($attributeBuilder); $this->assertSame(self::ATTRIBUTE_CODE, $attribute->getAttributeCode()); $this->assertSame(self::VALUE, $attribute->getValue()); diff --git a/dev/tests/unit/testsuite/Magento/Service/DataObjectConverterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Service/DataObjectConverterTest.php similarity index 99% rename from dev/tests/unit/testsuite/Magento/Service/DataObjectConverterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Service/DataObjectConverterTest.php index 83ca37420e260..8297e6c91cf45 100644 --- a/dev/tests/unit/testsuite/Magento/Service/DataObjectConverterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Service/DataObjectConverterTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Service; +namespace Magento\Framework\Service; use Magento\Customer\Service\V1\Data\Customer; use Magento\Customer\Service\V1\Data\RegionBuilder; @@ -70,7 +70,7 @@ class DataObjectConverterTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->dataObjectConverter = $objectManager->getObject('Magento\Service\DataObjectConverter'); + $this->dataObjectConverter = $objectManager->getObject('Magento\Framework\Service\DataObjectConverter'); parent::setUp(); } diff --git a/dev/tests/unit/testsuite/Magento/Session/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php similarity index 94% rename from dev/tests/unit/testsuite/Magento/Session/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php index 6730747bf8d38..08ebe6346e6fb 100644 --- a/dev/tests/unit/testsuite/Magento/Session/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php @@ -23,14 +23,14 @@ */ /** - * Test class for \Magento\Session\Config + * Test class for \Magento\Framework\Session\Config */ -namespace Magento\Session; +namespace Magento\Framework\Session; class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Session\Config + * @var \Magento\Framework\Session\Config */ protected $config; @@ -40,7 +40,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase protected $_configMock; /** - * @var \Magento\Stdlib\String + * @var \Magento\Framework\Stdlib\String */ protected $_stringHelperMock; @@ -63,7 +63,7 @@ protected function setUp() { $this->_configMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'); - $this->_stringHelperMock = $this->getMock('\Magento\Stdlib\String', array(), array(), '', false, false); + $this->_stringHelperMock = $this->getMock('\Magento\Framework\Stdlib\String', array(), array(), '', false, false); $this->_requestMock = $this->getMock( '\Magento\Framework\App\Request\Http', array('getBasePath', 'isSecure', 'getHttpHost'), @@ -84,14 +84,14 @@ protected function setUp() $this->_appState->expects($this->atLeastOnce())->method('isInstalled')->will($this->returnValue(true)); $this->_filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false, false); - $this->config = new \Magento\Session\Config( + $this->config = new \Magento\Framework\Session\Config( $this->_configMock, $this->_stringHelperMock, $this->_requestMock, $this->_appState, $this->_filesystem, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - \Magento\Session\SaveHandlerInterface::DEFAULT_HANDLER, + \Magento\Framework\Session\SaveHandlerInterface::DEFAULT_HANDLER, __DIR__ ); } @@ -100,7 +100,7 @@ public function testSetOptionsWrongType() { $this->setExpectedException( '\InvalidArgumentException', - 'Parameter provided to Magento\Session\Config::setOptions must be an array or Traversable' + 'Parameter provided to Magento\Framework\Session\Config::setOptions must be an array or Traversable' ); $this->config->setOptions(''); } @@ -156,7 +156,7 @@ public function optionsProvider() public function testGetOptions() { - $appStateProperty = new \ReflectionProperty('Magento\Session\Config', 'options'); + $appStateProperty = new \ReflectionProperty('Magento\Framework\Session\Config', 'options'); $appStateProperty->setAccessible(true); $original = $appStateProperty->getValue($this->config); $valueForTest = array('test' => 'test2'); @@ -170,7 +170,7 @@ public function testGetOptions() public function testHasOption() { - $appStateProperty = new \ReflectionProperty('Magento\Session\Config', 'options'); + $appStateProperty = new \ReflectionProperty('Magento\Framework\Session\Config', 'options'); $appStateProperty->setAccessible(true); $original = $appStateProperty->getValue($this->config); $valueForTest = array('session.test' => 'test2'); @@ -249,7 +249,7 @@ public function testWrongMethodCall() { $this->setExpectedException( '\BadMethodCallException', - 'Method "methodThatNotExist" does not exist in Magento\Session\Config' + 'Method "methodThatNotExist" does not exist in Magento\Framework\Session\Config' ); $this->config->methodThatNotExist(); } diff --git a/dev/tests/unit/testsuite/Magento/Session/SaveHandler/DbTableTest.php b/dev/tests/unit/testsuite/Magento/Framework/Session/SaveHandler/DbTableTest.php similarity index 88% rename from dev/tests/unit/testsuite/Magento/Session/SaveHandler/DbTableTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Session/SaveHandler/DbTableTest.php index 22818823ccf6d..55bf88c86b4c4 100644 --- a/dev/tests/unit/testsuite/Magento/Session/SaveHandler/DbTableTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Session/SaveHandler/DbTableTest.php @@ -24,7 +24,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Session\SaveHandler; +namespace Magento\Framework\Session\SaveHandler; class DbTableTest extends \PHPUnit_Framework_TestCase { @@ -61,7 +61,7 @@ class DbTableTest extends \PHPUnit_Framework_TestCase /** * Model under test * - * @var \Magento\Session\SaveHandler\DbTable + * @var \Magento\Framework\Session\SaveHandler\DbTable */ protected $_model; @@ -85,7 +85,13 @@ public function readDataProvider() public function testCheckConnection() { - $connection = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array('isTableExists'), array(), '', false); + $connection = $this->getMock( + 'Magento\Framework\DB\Adapter\Pdo\Mysql', + array('isTableExists'), + array(), + '', + false + ); $connection->expects( $this->atLeastOnce() )->method( @@ -107,15 +113,15 @@ public function testCheckConnection() $resource->expects($this->once())->method('getTableName')->will($this->returnValue(self::SESSION_TABLE)); $resource->expects($this->once())->method('getConnection')->will($this->returnValue($connection)); - $this->_model = new \Magento\Session\SaveHandler\DbTable($resource); + $this->_model = new \Magento\Framework\Session\SaveHandler\DbTable($resource); - $method = new \ReflectionMethod('Magento\Session\SaveHandler\DbTable', 'checkConnection'); + $method = new \ReflectionMethod('Magento\Framework\Session\SaveHandler\DbTable', 'checkConnection'); $method->setAccessible(true); $this->assertNull($method->invoke($this->_model)); } /** - * @expectedException \Magento\Session\SaveHandlerException + * @expectedException \Magento\Framework\Session\SaveHandlerException * @expectedExceptionMessage Write DB connection is not available */ public function testCheckConnectionNoConnection() @@ -131,20 +137,26 @@ public function testCheckConnectionNoConnection() $resource->expects($this->once())->method('getTableName')->will($this->returnValue(self::SESSION_TABLE)); $resource->expects($this->once())->method('getConnection')->will($this->returnValue(null)); - $this->_model = new \Magento\Session\SaveHandler\DbTable($resource); + $this->_model = new \Magento\Framework\Session\SaveHandler\DbTable($resource); - $method = new \ReflectionMethod('Magento\Session\SaveHandler\DbTable', 'checkConnection'); + $method = new \ReflectionMethod('Magento\Framework\Session\SaveHandler\DbTable', 'checkConnection'); $method->setAccessible(true); $this->assertNull($method->invoke($this->_model)); } /** - * @expectedException \Magento\Session\SaveHandlerException + * @expectedException \Magento\Framework\Session\SaveHandlerException * @expectedExceptionMessage DB storage table does not exist */ public function testCheckConnectionNoTable() { - $connection = $this->getMock('Magento\DB\Adapter\Pdo\Mysql', array('isTableExists'), array(), '', false); + $connection = $this->getMock( + 'Magento\Framework\DB\Adapter\Pdo\Mysql', + array('isTableExists'), + array(), + '', + false + ); $connection->expects( $this->once() )->method( @@ -166,9 +178,9 @@ public function testCheckConnectionNoTable() $resource->expects($this->once())->method('getTableName')->will($this->returnValue(self::SESSION_TABLE)); $resource->expects($this->once())->method('getConnection')->will($this->returnValue($connection)); - $this->_model = new \Magento\Session\SaveHandler\DbTable($resource); + $this->_model = new \Magento\Framework\Session\SaveHandler\DbTable($resource); - $method = new \ReflectionMethod('Magento\Session\SaveHandler\DbTable', 'checkConnection'); + $method = new \ReflectionMethod('Magento\Framework\Session\SaveHandler\DbTable', 'checkConnection'); $method->setAccessible(true); $this->assertNull($method->invoke($this->_model)); } @@ -203,7 +215,7 @@ protected function _prepareResourceMock($connection) $resource->expects($this->once())->method('getTableName')->will($this->returnValue(self::SESSION_TABLE)); $resource->expects($this->once())->method('getConnection')->will($this->returnValue($connection)); - $this->_model = new \Magento\Session\SaveHandler\DbTable($resource); + $this->_model = new \Magento\Framework\Session\SaveHandler\DbTable($resource); } /** @@ -214,7 +226,7 @@ protected function _prepareResourceMock($connection) protected function _prepareMockForRead($isDataEncoded) { $connection = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('select', 'from', 'where', 'fetchOne', 'isTableExists'), array(), '', @@ -294,7 +306,7 @@ public function testWrite($sessionExists) protected function _prepareMockForWrite($sessionExists) { $connection = $this->getMock( - 'Magento\DB\Adapter\Pdo\Mysql', + 'Magento\Framework\DB\Adapter\Pdo\Mysql', array('select', 'from', 'where', 'fetchOne', 'update', 'insert', 'isTableExists'), array(), '', diff --git a/dev/tests/unit/testsuite/Magento/Session/SaveHandlerFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Session/SaveHandlerFactoryTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Session/SaveHandlerFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Session/SaveHandlerFactoryTest.php index c1008c4917050..7fee03770e83b 100644 --- a/dev/tests/unit/testsuite/Magento/Session/SaveHandlerFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Session/SaveHandlerFactoryTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Session; +namespace Magento\Framework\Session; class SaveHandlerFactoryTest extends \PHPUnit_Framework_TestCase { @@ -31,7 +31,13 @@ class SaveHandlerFactoryTest extends \PHPUnit_Framework_TestCase public function testCreate($handlers, $saveClass, $saveMethod) { $saveHandler = $this->getMock($saveClass, array(), array(), '', false); - $objectManager = $this->getMock('\Magento\ObjectManager\ObjectManager', array('create'), array(), '', false); + $objectManager = $this->getMock( + '\Magento\Framework\ObjectManager\ObjectManager', + array('create'), + array(), + '', + false + ); $objectManager->expects( $this->once() )->method( @@ -45,7 +51,7 @@ public function testCreate($handlers, $saveClass, $saveMethod) $model = new SaveHandlerFactory($objectManager, $handlers); $result = $model->create($saveMethod); $this->assertInstanceOf($saveClass, $result); - $this->assertInstanceOf('\Magento\Session\SaveHandler\Native', $result); + $this->assertInstanceOf('\Magento\Framework\Session\SaveHandler\Native', $result); $this->assertInstanceOf('\SessionHandler', $result); } @@ -54,6 +60,6 @@ public function testCreate($handlers, $saveClass, $saveMethod) */ public static function createDataProvider() { - return array(array(array(), 'Magento\Session\SaveHandler\Native', 'files')); + return array(array(array(), 'Magento\Framework\Session\SaveHandler\Native', 'files')); } } diff --git a/dev/tests/unit/testsuite/Magento/Shell/CommandRendererBackgroundTest.php b/dev/tests/unit/testsuite/Magento/Framework/Shell/CommandRendererBackgroundTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Shell/CommandRendererBackgroundTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Shell/CommandRendererBackgroundTest.php index 71c9cf1a4bc7c..7e98a356cd83b 100644 --- a/dev/tests/unit/testsuite/Magento/Shell/CommandRendererBackgroundTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Shell/CommandRendererBackgroundTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Shell; +namespace Magento\Framework\Shell; class CommandRendererBackgroundTest extends \PHPUnit_Framework_TestCase { @@ -33,13 +33,13 @@ class CommandRendererBackgroundTest extends \PHPUnit_Framework_TestCase protected $testCommand = 'php -r test.php'; /** - * @var \Magento\OsInfo|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\OsInfo|\PHPUnit_Framework_MockObject_MockObject */ protected $osInfo; public function setUp() { - $this->osInfo = $this->getMockBuilder('Magento\OsInfo')->getMock(); + $this->osInfo = $this->getMockBuilder('Magento\Framework\OsInfo')->getMock(); } /** diff --git a/dev/tests/unit/testsuite/Magento/Shell/CommandRendererTest.php b/dev/tests/unit/testsuite/Magento/Framework/Shell/CommandRendererTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Shell/CommandRendererTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Shell/CommandRendererTest.php index be8ff6d6d2cb4..95a3146b64c74 100644 --- a/dev/tests/unit/testsuite/Magento/Shell/CommandRendererTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Shell/CommandRendererTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Shell; +namespace Magento\Framework\Shell; class CommandRendererTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/ShellTest.php b/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/ShellTest.php rename to dev/tests/unit/testsuite/Magento/Framework/ShellTest.php index 335538e1e4c1f..3157981660eb2 100644 --- a/dev/tests/unit/testsuite/Magento/ShellTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ShellTest.php @@ -18,18 +18,15 @@ * 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_Shell - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento; +namespace Magento\Framework; class ShellTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Shell\CommandRendererInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Shell\CommandRendererInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $commandRenderer; @@ -44,18 +41,18 @@ public function setUp() ->setMethods(array('log')) ->disableOriginalConstructor() ->getMock(); - $this->commandRenderer = new \Magento\Shell\CommandRenderer(); + $this->commandRenderer = new \Magento\Framework\Shell\CommandRenderer(); } /** * Test that a command with input arguments returns an expected result * - * @param \Magento\Shell $shell + * @param \Magento\Framework\Shell $shell * @param string $command * @param array $commandArgs * @param string $expectedResult */ - protected function _testExecuteCommand(\Magento\Shell $shell, $command, $commandArgs, $expectedResult) + protected function _testExecuteCommand(\Magento\Framework\Shell $shell, $command, $commandArgs, $expectedResult) { $this->expectOutputString(''); // nothing is expected to be ever printed to the standard output @@ -72,7 +69,7 @@ protected function _testExecuteCommand(\Magento\Shell $shell, $command, $command public function testExecute($command, $commandArgs, $expectedResult) { $this->_testExecuteCommand( - new \Magento\Shell($this->commandRenderer, $this->logger), $command, $commandArgs, $expectedResult + new \Magento\Framework\Shell($this->commandRenderer, $this->logger), $command, $commandArgs, $expectedResult ); } @@ -94,7 +91,7 @@ public function testExecuteLog($command, $commandArgs, $expectedResult, $expecte ->with($expectedLogMessage, \Zend_Log::INFO); } $this->_testExecuteCommand( - new \Magento\Shell($this->commandRenderer, $this->logger), + new \Magento\Framework\Shell($this->commandRenderer, $this->logger), $command, $commandArgs, $expectedResult @@ -129,13 +126,13 @@ public function executeDataProvider() } /** - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * @expectedExceptionMessage Command `non_existing_command 2>&1` returned non-zero exit code * @expectedExceptionCode 0 */ public function testExecuteFailure() { - $shell = new \Magento\Shell($this->commandRenderer, $this->logger); + $shell = new \Magento\Framework\Shell($this->commandRenderer, $this->logger); $shell->execute('non_existing_command'); } @@ -151,7 +148,7 @@ public function testExecuteFailureDetails($command, $commandArgs, $expectedError /* Force command to return non-zero exit code */ $commandArgs[count($commandArgs) - 1] .= ' exit(42);'; $this->testExecute($command, $commandArgs, ''); // no result is expected in a case of a command failure - } catch (\Magento\Exception $e) { + } catch (\Magento\Framework\Exception $e) { $this->assertInstanceOf('Exception', $e->getPrevious()); $this->assertEquals($expectedError, $e->getPrevious()->getMessage()); $this->assertEquals(42, $e->getPrevious()->getCode()); diff --git a/dev/tests/unit/testsuite/Magento/Simplexml/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Simplexml/ConfigTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/Simplexml/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Simplexml/ConfigTest.php index 70ab874d6dc83..dce22beb0ad65 100644 --- a/dev/tests/unit/testsuite/Magento/Simplexml/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Simplexml/ConfigTest.php @@ -21,14 +21,14 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Simplexml; +namespace Magento\Framework\Simplexml; class ConfigTest extends \PHPUnit_Framework_TestCase { public function testLoadString() { $xml = '1'; - $config = new \Magento\Simplexml\Config(); + $config = new \Magento\Framework\Simplexml\Config(); $this->assertFalse($config->loadString('')); $this->assertTrue($config->loadString($xml)); $this->assertXmlStringEqualsXmlString($xml, $config->getXmlString()); diff --git a/dev/tests/unit/testsuite/Magento/Simplexml/ElementTest.php b/dev/tests/unit/testsuite/Magento/Framework/Simplexml/ElementTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Simplexml/ElementTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Simplexml/ElementTest.php index 86d1e956bee8d..81fd7b25bfd98 100644 --- a/dev/tests/unit/testsuite/Magento/Simplexml/ElementTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Simplexml/ElementTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Simplexml; +namespace Magento\Framework\Simplexml; class ElementTest extends \PHPUnit_Framework_TestCase { @@ -30,7 +30,7 @@ class ElementTest extends \PHPUnit_Framework_TestCase */ public function testUnsetSelf($xmlData) { - /** @var $xml \Magento\Simplexml\Element */ + /** @var $xml \Magento\Framework\Simplexml\Element */ $xml = simplexml_load_file($xmlData[0], $xmlData[1]); $this->assertTrue(isset($xml->node3->node4)); $xml->node3->unsetSelf(); @@ -46,7 +46,7 @@ public function testUnsetSelf($xmlData) */ public function testGetParent($xmlData) { - /** @var $xml \Magento\Simplexml\Element */ + /** @var $xml \Magento\Framework\Simplexml\Element */ $xml = simplexml_load_file($xmlData[0], $xmlData[1]); $this->assertTrue($xml->getName() == 'root'); $xml->unsetSelf(); @@ -58,15 +58,15 @@ public function testGetParent($xmlData) public static function xmlDataProvider() { return array( - array(array(__DIR__ . '/_files/data.xml', 'Magento\Simplexml\Element')) + array(array(__DIR__ . '/_files/data.xml', 'Magento\Framework\Simplexml\Element')) ); } public function testAsNiceXmlMixedData() { $dataFile = file_get_contents(__DIR__ . '/_files/mixed_data.xml'); - /** @var \Magento\Simplexml\Element $xml */ - $xml = simplexml_load_string($dataFile, 'Magento\Simplexml\Element'); + /** @var \Magento\Framework\Simplexml\Element $xml */ + $xml = simplexml_load_string($dataFile, 'Magento\Framework\Simplexml\Element'); $expected = << @@ -86,12 +86,12 @@ public function testAsNiceXmlMixedData() public function testAppendChild() { - /** @var \Magento\Simplexml\Element $baseXml */ - $baseXml = simplexml_load_string('', 'Magento\Simplexml\Element'); - /** @var \Magento\Simplexml\Element $appendXml */ + /** @var \Magento\Framework\Simplexml\Element $baseXml */ + $baseXml = simplexml_load_string('', 'Magento\Framework\Simplexml\Element'); + /** @var \Magento\Framework\Simplexml\Element $appendXml */ $appendXml = simplexml_load_string( 'text', - 'Magento\Simplexml\Element' + 'Magento\Framework\Simplexml\Element' ); $baseXml->appendChild($appendXml); @@ -103,8 +103,8 @@ public function testSetNode() { $path = '/node1/node2'; $value = 'value'; - /** @var \Magento\Simplexml\Element $xml */ - $xml = simplexml_load_string('', 'Magento\Simplexml\Element'); + /** @var \Magento\Framework\Simplexml\Element $xml */ + $xml = simplexml_load_string('', 'Magento\Framework\Simplexml\Element'); $this->assertEmpty($xml->xpath('/root/node1/node2')); $xml->setNode($path, $value); $this->assertNotEmpty($xml->xpath('/root/node1/node2')); diff --git a/dev/tests/unit/testsuite/Magento/Simplexml/_files/data.xml b/dev/tests/unit/testsuite/Magento/Framework/Simplexml/_files/data.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Simplexml/_files/data.xml rename to dev/tests/unit/testsuite/Magento/Framework/Simplexml/_files/data.xml diff --git a/dev/tests/unit/testsuite/Magento/Simplexml/_files/mixed_data.xml b/dev/tests/unit/testsuite/Magento/Framework/Simplexml/_files/mixed_data.xml similarity index 100% rename from dev/tests/unit/testsuite/Magento/Simplexml/_files/mixed_data.xml rename to dev/tests/unit/testsuite/Magento/Framework/Simplexml/_files/mixed_data.xml diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/ArrayUtilsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/ArrayUtilsTest.php similarity index 79% rename from dev/tests/unit/testsuite/Magento/Stdlib/ArrayUtilsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Stdlib/ArrayUtilsTest.php index bd42e5aacc03e..19a86a8af7bd4 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/ArrayUtilsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/ArrayUtilsTest.php @@ -21,15 +21,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Stdlib; +namespace Magento\Framework\Stdlib; /** - * Magento\Stdlib\ArrayUtilsTest test case + * Magento\Framework\Stdlib\ArrayUtilsTest test case */ class ArrayUtilsTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Stdlib\ArrayUtils + * @var \Magento\Framework\Stdlib\ArrayUtils */ protected $_arrayUtils; @@ -39,7 +39,7 @@ protected function setUp() } /** - * @covers \Magento\Stdlib\ArrayUtils::ksortMultibyte + * @covers \Magento\Framework\Stdlib\ArrayUtils::ksortMultibyte * @dataProvider ksortMultibyteDataProvider */ public function testKsortMultibyte($input, $locale) @@ -63,7 +63,7 @@ public function ksortMultibyteDataProvider() } /** - * @covers \Magento\Stdlib\ArrayUtils::decorateArray + * @covers \Magento\Framework\Stdlib\ArrayUtils::decorateArray */ public function testDecorateArray() { @@ -77,16 +77,16 @@ public function testDecorateArray() // arrays $this->assertEquals($decorated, $this->_arrayUtils->decorateArray($original, '')); - // \Magento\Object + // \Magento\Framework\Object $sample = array( - new \Magento\Object($original[0]), - new \Magento\Object($original[1]), - new \Magento\Object($original[2]) + new \Magento\Framework\Object($original[0]), + new \Magento\Framework\Object($original[1]), + new \Magento\Framework\Object($original[2]) ); $decoratedVo = array( - new \Magento\Object($decorated[0]), - new \Magento\Object($decorated[1]), - new \Magento\Object($decorated[2]) + new \Magento\Framework\Object($decorated[0]), + new \Magento\Framework\Object($decorated[1]), + new \Magento\Framework\Object($decorated[2]) ); foreach ($decoratedVo as $obj) { $obj->setDataChanges(true); // hack for assertion diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/BooleanUtilsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/BooleanUtilsTest.php similarity index 98% rename from dev/tests/unit/testsuite/Magento/Stdlib/BooleanUtilsTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Stdlib/BooleanUtilsTest.php index ec2962dd9e06e..6767e7da92fe4 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/BooleanUtilsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/BooleanUtilsTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Stdlib; +namespace Magento\Framework\Stdlib; class BooleanUtilsTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Filter/DateTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Filter/DateTest.php similarity index 74% rename from dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Filter/DateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Filter/DateTest.php index 0d0964ab33a9a..92e219b95eb24 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Filter/DateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Filter/DateTest.php @@ -3,19 +3,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Stdlib\DateTime\Filter; +namespace Magento\Framework\Stdlib\DateTime\Filter; class DateTest extends \PHPUnit_Framework_TestCase { public function testFilter() { - $localeMock = $this->getMock('\Magento\Stdlib\DateTime\TimezoneInterface'); + $localeMock = $this->getMock('\Magento\Framework\Stdlib\DateTime\TimezoneInterface'); $localeMock->expects( $this->once() )->method( 'getDateFormat' )->with( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT )->will( $this->returnValue('MM-dd-yyyy') ); diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Filter/DateTimeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Filter/DateTimeTest.php similarity index 75% rename from dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Filter/DateTimeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Filter/DateTimeTest.php index f1b386e6f626a..9f405ca3e4136 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Filter/DateTimeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Filter/DateTimeTest.php @@ -3,19 +3,19 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Stdlib\DateTime\Filter; +namespace Magento\Framework\Stdlib\DateTime\Filter; class DateTimeTest extends \PHPUnit_Framework_TestCase { public function testFilter() { - $localeMock = $this->getMock('\Magento\Stdlib\DateTime\TimezoneInterface'); + $localeMock = $this->getMock('\Magento\Framework\Stdlib\DateTime\TimezoneInterface'); $localeMock->expects( $this->once() )->method( 'getDateTimeFormat' )->with( - \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT + \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT )->will( $this->returnValue('HH:mm:ss MM-dd-yyyy') ); diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Timezone/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Timezone/ValidatorTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Timezone/ValidatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Timezone/ValidatorTest.php index 75d0cd81a2cd9..a028a6aa8e00b 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/DateTime/Timezone/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTime/Timezone/ValidatorTest.php @@ -21,33 +21,33 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Stdlib\DateTime\Timezone; +namespace Magento\Framework\Stdlib\DateTime\Timezone; class ValidatorTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Stdlib\DateTime\Timezone\Validator + * @var \Magento\Framework\Stdlib\DateTime\Timezone\Validator */ protected $_validator; /** * @dataProvider validateWithTimestampOutOfSystemRangeDataProvider - * @expectedException \Magento\Stdlib\DateTime\Timezone\ValidationException + * @expectedException \Magento\Framework\Stdlib\DateTime\Timezone\ValidationException * @expectedExceptionMessage Transition year is out of system date range. */ public function testValidateWithTimestampOutOfSystemRangeThrowsException($range, $validateArgs) { - $this->_validator = new \Magento\Stdlib\DateTime\Timezone\Validator($range['min'], $range['max']); + $this->_validator = new \Magento\Framework\Stdlib\DateTime\Timezone\Validator($range['min'], $range['max']); $this->_validator->validate($validateArgs['timestamp'], $validateArgs['to_date']); } /** - * @expectedException \Magento\Stdlib\DateTime\Timezone\ValidationException + * @expectedException \Magento\Framework\Stdlib\DateTime\Timezone\ValidationException * @expectedExceptionMessage Transition year is out of specified date range. */ public function testValidateWithTimestampOutOfSpecifiedRangeThrowsException() { - $this->_validator = new \Magento\Stdlib\DateTime\Timezone\Validator(); + $this->_validator = new \Magento\Framework\Stdlib\DateTime\Timezone\Validator(); $this->_validator->validate(mktime(1, 2, 3, 4, 5, 2007), mktime(1, 2, 3, 4, 5, 2006)); } diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/DateTimeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTimeTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Stdlib/DateTimeTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTimeTest.php index 2234111eb06ae..cee69e2d39673 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/DateTimeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/DateTimeTest.php @@ -26,26 +26,26 @@ */ /** - * \Magento\Stdlib\DateTime test case + * \Magento\Framework\Stdlib\DateTime test case */ -namespace Magento\Stdlib; +namespace Magento\Framework\Stdlib; class DateTimeTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Stdlib\DateTime + * @var \Magento\Framework\Stdlib\DateTime */ protected $_dateTime; protected function setUp() { - $this->_dateTime = new \Magento\Stdlib\DateTime(); + $this->_dateTime = new \Magento\Framework\Stdlib\DateTime(); } public function testToTimestamp() { - $date = new \Magento\Stdlib\DateTime\Date(); - $dateTime = new \Magento\Stdlib\DateTime(); + $date = new \Magento\Framework\Stdlib\DateTime\Date(); + $dateTime = new \Magento\Framework\Stdlib\DateTime(); $this->assertEquals($date->getTimestamp(), $dateTime->toTimestamp($date)); $this->assertEquals(time(), $dateTime->toTimestamp(true)); @@ -56,8 +56,11 @@ public function testToTimestamp() public function testNow() { - $this->assertEquals(date(\Magento\Stdlib\DateTime::DATE_PHP_FORMAT), $this->_dateTime->now(true)); - $this->assertEquals(date(\Magento\Stdlib\DateTime::DATETIME_PHP_FORMAT), $this->_dateTime->now(false)); + $this->assertEquals(date(\Magento\Framework\Stdlib\DateTime::DATE_PHP_FORMAT), $this->_dateTime->now(true)); + $this->assertEquals( + date(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT), + $this->_dateTime->now(false) + ); } /** @@ -68,7 +71,7 @@ public function testNow() */ public function testFormatDate($date, $includeTime, $expectedFormat, $expectedResult = null) { - $dateTime = new \Magento\Stdlib\DateTime(); + $dateTime = new \Magento\Framework\Stdlib\DateTime(); $actual = $dateTime->formatDate($date, $includeTime); if ($expectedFormat != '') { $expectedResult = date($expectedFormat); @@ -87,7 +90,7 @@ public function formatDateDataProvider() { // Take care when calling date here as it can be called much earlier than when testFormatDate // executes thus causing a discrepancy in the actual vs expected time. See MAGETWO-10296 - $date = new \Magento\Stdlib\DateTime\Date(); + $date = new \Magento\Framework\Stdlib\DateTime\Date(); return array( 'null' => array(null, false, ''), 'null including Time' => array(null, true, ''), diff --git a/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/StringTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Stdlib/StringTest.php index 862b7239c28e5..723d1514f9633 100644 --- a/dev/tests/unit/testsuite/Magento/Stdlib/StringTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/StringTest.php @@ -21,15 +21,15 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Stdlib; +namespace Magento\Framework\Stdlib; /** - * Magento\Stdlib\StringTest test case + * Magento\Framework\Stdlib\StringTest test case */ class StringTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Stdlib\String + * @var \Magento\Framework\Stdlib\String */ protected $_string; @@ -39,7 +39,7 @@ protected function setUp() } /** - * @covers \Magento\Stdlib\String::split + * @covers \Magento\Framework\Stdlib\String::split */ public function testStrSplit() { @@ -53,7 +53,7 @@ public function testStrSplit() } /** - * @covers \Magento\Stdlib\String::splitInjection + * @covers \Magento\Framework\Stdlib\String::splitInjection */ public function testSplitInjection() { @@ -62,7 +62,7 @@ public function testSplitInjection() } /** - * @covers \Magento\Stdlib\String::cleanString + * @covers \Magento\Framework\Stdlib\String::cleanString */ public function testCleanString() { @@ -71,7 +71,7 @@ public function testCleanString() } /** - * @covers \Magento\Stdlib\String::strpos + * @covers \Magento\Framework\Stdlib\String::strpos */ public function testStrpos() { diff --git a/dev/tests/unit/testsuite/Magento/Translate/AdapterAbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Translate/AdapterAbstractTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Translate/AdapterAbstractTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Translate/AdapterAbstractTest.php index d73a041981d3a..c1be9ea991f08 100644 --- a/dev/tests/unit/testsuite/Magento/Translate/AdapterAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Translate/AdapterAbstractTest.php @@ -23,18 +23,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Translate; +namespace Magento\Framework\Translate; class AdapterAbstractTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Translate\AbstractAdapter + * @var \Magento\Framework\Translate\AbstractAdapter */ protected $_model = null; protected function setUp() { - $this->_model = $this->getMockBuilder('Magento\Translate\AbstractAdapter')->getMockForAbstractClass(); + $this->_model = $this->getMockBuilder('Magento\Framework\Translate\AbstractAdapter')->getMockForAbstractClass(); } /** @@ -50,7 +50,7 @@ public function testIsTranslated() */ public function testSetLocale() { - $this->assertInstanceOf('Magento\Translate\AbstractAdapter', $this->_model->setLocale('en_US')); + $this->assertInstanceOf('Magento\Framework\Translate\AbstractAdapter', $this->_model->setLocale('en_US')); } /** @@ -58,6 +58,6 @@ public function testSetLocale() */ public function testToString() { - $this->assertEquals('Magento\Translate\Adapter', $this->_model->toString()); + $this->assertEquals('Magento\Framework\Translate\Adapter', $this->_model->toString()); } } diff --git a/dev/tests/unit/testsuite/Magento/Translate/AdapterTest.php b/dev/tests/unit/testsuite/Magento/Framework/Translate/AdapterTest.php similarity index 90% rename from dev/tests/unit/testsuite/Magento/Translate/AdapterTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Translate/AdapterTest.php index c24b7a2d2e880..a72e287cf27ed 100644 --- a/dev/tests/unit/testsuite/Magento/Translate/AdapterTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Translate/AdapterTest.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Translate; +namespace Magento\Framework\Translate; class AdapterTest extends \PHPUnit_Framework_TestCase { @@ -47,7 +47,9 @@ public function testTranslate($method, $strToTranslate, $translatedStr) )->will( $this->returnValue($translatedStr) ); - $translator = new \Magento\Translate\Adapter(array('translator' => array($translatorMock, 'translate'))); + $translator = new \Magento\Framework\Translate\Adapter( + array('translator' => array($translatorMock, 'translate')) + ); $this->assertEquals($translatedStr, $translator->{$method}($strToTranslate)); } @@ -65,7 +67,7 @@ public function translateDataProvider() */ public function testTranslateNoProxy() { - $translator = new \Magento\Translate\Adapter(); + $translator = new \Magento\Framework\Translate\Adapter(); $this->assertEquals('test string', $translator->translate('test string')); } diff --git a/dev/tests/unit/testsuite/Magento/Translate/Inline/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Framework/Translate/Inline/ProxyTest.php similarity index 83% rename from dev/tests/unit/testsuite/Magento/Translate/Inline/ProxyTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Translate/Inline/ProxyTest.php index 05446a40ec831..159a226520bc1 100644 --- a/dev/tests/unit/testsuite/Magento/Translate/Inline/ProxyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Translate/Inline/ProxyTest.php @@ -21,30 +21,30 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Translate\Inline; +namespace Magento\Framework\Translate\Inline; class ProxyTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManagerMock; /** - * @var \Magento\Translate\Inline|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Translate\Inline|\PHPUnit_Framework_MockObject_MockObject */ protected $translateMock; protected function setUp() { $this->objectManagerMock = $this->getMock( - 'Magento\ObjectManager', + 'Magento\Framework\ObjectManager', array('get', 'create', 'configure'), array(), '', false ); - $this->translateMock = $this->getMock('Magento\Translate\Inline', array(), array(), '', false); + $this->translateMock = $this->getMock('Magento\Framework\Translate\Inline', array(), array(), '', false); } public function testIsAllowed() @@ -54,7 +54,7 @@ public function testIsAllowed() )->method( 'get' )->with( - 'Magento\Translate\Inline' + 'Magento\Framework\Translate\Inline' )->will( $this->returnValue($this->translateMock) ); @@ -63,7 +63,7 @@ public function testIsAllowed() $model = new Proxy( $this->objectManagerMock, - 'Magento\Translate\Inline', + 'Magento\Framework\Translate\Inline', true ); @@ -78,7 +78,7 @@ public function testGetParser() )->method( 'create' )->with( - 'Magento\Translate\Inline' + 'Magento\Framework\Translate\Inline' )->will( $this->returnValue($this->translateMock) ); @@ -88,7 +88,7 @@ public function testGetParser() $model = new Proxy( $this->objectManagerMock, - 'Magento\Translate\Inline', + 'Magento\Framework\Translate\Inline', false ); @@ -103,7 +103,7 @@ public function testProcessResponseBody() )->method( 'get' )->with( - 'Magento\Translate\Inline' + 'Magento\Framework\Translate\Inline' )->will( $this->returnValue($this->translateMock) ); @@ -116,7 +116,7 @@ public function testProcessResponseBody() $model = new Proxy( $this->objectManagerMock, - 'Magento\Translate\Inline', + 'Magento\Framework\Translate\Inline', true ); $body = ''; @@ -131,7 +131,7 @@ public function testGetAdditionalHtmlAttribute() )->method( 'create' )->with( - 'Magento\Translate\Inline' + 'Magento\Framework\Translate\Inline' )->will( $this->returnValue($this->translateMock) ); @@ -143,7 +143,7 @@ public function testGetAdditionalHtmlAttribute() $model = new Proxy( $this->objectManagerMock, - 'Magento\Translate\Inline', + 'Magento\Framework\Translate\Inline', false ); diff --git a/dev/tests/unit/testsuite/Magento/Translate/Inline/StateTest.php b/dev/tests/unit/testsuite/Magento/Framework/Translate/Inline/StateTest.php similarity index 97% rename from dev/tests/unit/testsuite/Magento/Translate/Inline/StateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Translate/Inline/StateTest.php index 639ac538ee9f6..e556940d0d4d1 100644 --- a/dev/tests/unit/testsuite/Magento/Translate/Inline/StateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Translate/Inline/StateTest.php @@ -22,7 +22,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Translate\Inline; +namespace Magento\Framework\Translate\Inline; class StateTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Translate/InlineTest.php b/dev/tests/unit/testsuite/Magento/Framework/Translate/InlineTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Translate/InlineTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Translate/InlineTest.php index 12c54e9d56b3e..e6006fb38d4bc 100644 --- a/dev/tests/unit/testsuite/Magento/Translate/InlineTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Translate/InlineTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Translate; +namespace Magento\Framework\Translate; class InlineTest extends \PHPUnit_Framework_TestCase { @@ -31,27 +31,27 @@ class InlineTest extends \PHPUnit_Framework_TestCase protected $scopeResolverMock; /** - * @var \Magento\UrlInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\UrlInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $urlMock; /** - * @var \Magento\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\View\LayoutInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $layoutMock; /** - * @var \Magento\Translate\Inline\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Translate\Inline\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $configMock; /** - * @var \Magento\Translate\Inline\ParserFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Translate\Inline\ParserFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $parserMock; /** - * @var \Magento\Translate\Inline\StateInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Translate\Inline\StateInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $stateMock; @@ -59,11 +59,29 @@ protected function setUp() { $this->scopeResolverMock = $this->getMock('Magento\Framework\App\ScopeResolverInterface', array(), array(), '', false); - $this->urlMock = $this->getMock('Magento\UrlInterface', array(), array(), '', false); - $this->layoutMock = $this->getMock('Magento\View\LayoutInterface', array(), array(), '', false); - $this->configMock = $this->getMock('Magento\Translate\Inline\ConfigInterface', array(), array(), '', false); - $this->parserMock = $this->getMock('Magento\Translate\Inline\ParserInterface', array(), array(), '', false); - $this->stateMock = $this->getMock('Magento\Translate\Inline\StateInterface', array(), array(), '', false); + $this->urlMock = $this->getMock('Magento\Framework\UrlInterface', array(), array(), '', false); + $this->layoutMock = $this->getMock('Magento\Framework\View\LayoutInterface', array(), array(), '', false); + $this->configMock = $this->getMock( + 'Magento\Framework\Translate\Inline\ConfigInterface', + array(), + array(), + '', + false + ); + $this->parserMock = $this->getMock( + 'Magento\Framework\Translate\Inline\ParserInterface', + array(), + array(), + '', + false + ); + $this->stateMock = $this->getMock( + 'Magento\Framework\Translate\Inline\StateInterface', + array(), + array(), + '', + false + ); } /** diff --git a/dev/tests/unit/testsuite/Magento/TranslateTest.php b/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/TranslateTest.php rename to dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php index ed17fc9ff4f20..96989be488e67 100644 --- a/dev/tests/unit/testsuite/Magento/TranslateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php @@ -21,7 +21,7 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento; +namespace Magento\Framework; use Magento\TestFramework\Matcher\MethodInvokedAtIndex; @@ -34,31 +34,31 @@ class TranslateTest extends \PHPUnit_Framework_TestCase /** @var Translate */ protected $_translate; - /** @var \Magento\View\DesignInterface */ + /** @var \Magento\Framework\View\DesignInterface */ protected $_viewDesign; - /** @var \Magento\Locale\Hierarchy\Config */ + /** @var \Magento\Framework\Locale\Hierarchy\Config */ protected $_config; - /** @var \Magento\Cache\FrontendInterface */ + /** @var \Magento\Framework\Cache\FrontendInterface */ protected $_cache; - /** @var \Magento\View\FileSystem */ + /** @var \Magento\Framework\View\FileSystem */ protected $_viewFileSystem; - /** @var \Magento\Module\ModuleList */ + /** @var \Magento\Framework\Module\ModuleList */ protected $_moduleList; - /** @var \Magento\Module\Dir\Reader */ + /** @var \Magento\Framework\Module\Dir\Reader */ protected $_modulesReader; /** @var \Magento\Framework\App\ScopeResolverInterface */ protected $_scopeResolver; - /** @var \Magento\Translate\ResourceInterface */ + /** @var \Magento\Framework\Translate\ResourceInterface */ protected $_resource; - /** @var \Magento\Locale\ResolverInterface */ + /** @var \Magento\Framework\Locale\ResolverInterface */ protected $_locale; /** @var \Magento\Framework\App\State */ @@ -70,28 +70,28 @@ class TranslateTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\App\RequestInterface */ protected $_request; - /** @var \Magento\File\Csv */ + /** @var \Magento\Framework\File\Csv */ protected $_csvParser; - /** @var \Magento\Filesystem\Directory\ReadInterface */ + /** @var \Magento\Framework\Filesystem\Directory\ReadInterface */ protected $_directory; public function setUp() { - $this->_viewDesign = $this->getMock('\Magento\View\DesignInterface', [], [], '', false); - $this->_config = $this->getMock('\Magento\Locale\Hierarchy\Config', [], [], '', false); - $this->_cache = $this->getMock('\Magento\Cache\FrontendInterface', [], [], '', false); - $this->_viewFileSystem = $this->getMock('\Magento\View\FileSystem', [], [], '', false); - $this->_moduleList = $this->getMock('\Magento\Module\ModuleList', [], [], '', false); - $this->_modulesReader = $this->getMock('\Magento\Module\Dir\Reader', [], [], '', false); + $this->_viewDesign = $this->getMock('\Magento\Framework\View\DesignInterface', [], [], '', false); + $this->_config = $this->getMock('\Magento\Framework\Locale\Hierarchy\Config', [], [], '', false); + $this->_cache = $this->getMock('\Magento\Framework\Cache\FrontendInterface', [], [], '', false); + $this->_viewFileSystem = $this->getMock('\Magento\Framework\View\FileSystem', [], [], '', false); + $this->_moduleList = $this->getMock('\Magento\Framework\Module\ModuleList', [], [], '', false); + $this->_modulesReader = $this->getMock('\Magento\Framework\Module\Dir\Reader', [], [], '', false); $this->_scopeResolver = $this->getMock('\Magento\Framework\App\ScopeResolverInterface', [], [], '', false); - $this->_resource = $this->getMock('\Magento\Translate\ResourceInterface', [], [], '', false); - $this->_locale = $this->getMock('\Magento\Locale\ResolverInterface', [], [], '', false); + $this->_resource = $this->getMock('\Magento\Framework\Translate\ResourceInterface', [], [], '', false); + $this->_locale = $this->getMock('\Magento\Framework\Locale\ResolverInterface', [], [], '', false); $this->_appState = $this->getMock('\Magento\Framework\App\State', [], [], '', false); $this->_request = $this->getMock('\Magento\Framework\App\RequestInterface', [], [], '', false); - $this->_csvParser = $this->getMock('\Magento\File\Csv', [], [], '', false); + $this->_csvParser = $this->getMock('\Magento\Framework\File\Csv', [], [], '', false); - $this->_directory = $this->getMock('\Magento\Filesystem\Directory\ReadInterface', [], [], '', false); + $this->_directory = $this->getMock('\Magento\Framework\Filesystem\Directory\ReadInterface', [], [], '', false); $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', [], [], '', false); $filesystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->_directory)); @@ -227,9 +227,9 @@ public function testGetTheme() protected function _expectsSetConfig() { $this->_locale->expects($this->any())->method('getLocaleCode')->will($this->returnValue('en_US')); - $scope = new \Magento\Object(); + $scope = new \Magento\Framework\Object(); $this->_scopeResolver->expects($this->any())->method('getScope')->will($this->returnValue($scope)); - $designTheme = new \Magento\Object(['id' => 'themeId']); + $designTheme = new \Magento\Framework\Object(['id' => 'themeId']); $this->_viewDesign->expects($this->any())->method('getDesignTheme')->will($this->returnValue($designTheme)); } } diff --git a/dev/tests/unit/testsuite/Magento/Url/QueryParamsResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/Url/QueryParamsResolverTest.php similarity index 93% rename from dev/tests/unit/testsuite/Magento/Url/QueryParamsResolverTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Url/QueryParamsResolverTest.php index a2e8f51db4d39..8b9f835fc8044 100644 --- a/dev/tests/unit/testsuite/Magento/Url/QueryParamsResolverTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Url/QueryParamsResolverTest.php @@ -22,19 +22,19 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Url; +namespace Magento\Framework\Url; use Magento\TestFramework\Helper\ObjectManager; class QueryParamsResolverTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Url\QueryParamsResolver */ + /** @var \Magento\Framework\Url\QueryParamsResolver */ protected $object; protected function setUp() { $objectManager = new ObjectManager($this); - $this->object = $objectManager->getObject('Magento\Url\QueryParamsResolver'); + $this->object = $objectManager->getObject('Magento\Framework\Url\QueryParamsResolver'); } public function testGetQuery() diff --git a/dev/tests/unit/testsuite/Magento/Url/RouteParamsResolverFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Url/RouteParamsResolverFactoryTest.php similarity index 71% rename from dev/tests/unit/testsuite/Magento/Url/RouteParamsResolverFactoryTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Url/RouteParamsResolverFactoryTest.php index a2ba6024047f2..35936b5029e84 100644 --- a/dev/tests/unit/testsuite/Magento/Url/RouteParamsResolverFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Url/RouteParamsResolverFactoryTest.php @@ -21,33 +21,35 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Url; +namespace Magento\Framework\Url; use Magento\TestFramework\Helper\ObjectManager; class RouteParamsResolverFactoryTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Url\RouteParamsResolverFactory */ + /** @var \Magento\Framework\Url\RouteParamsResolverFactory */ protected $object; - /** @var \Magento\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var \Magento\Framework\ObjectManager|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManager; protected function setUp() { - $this->objectManager = $this->getMock('Magento\ObjectManager'); + $this->objectManager = $this->getMock('Magento\Framework\ObjectManager'); $objectManager = new ObjectManager($this); $this->object = $objectManager->getObject( - 'Magento\Url\RouteParamsResolverFactory', + 'Magento\Framework\Url\RouteParamsResolverFactory', ['objectManager' => $this->objectManager] ); } public function testCreate() { - $producedInstance = $this->getMock('Magento\Url\RouteParamsResolverInterface'); - $this->objectManager->expects($this->once())->method('create')->with('Magento\Url\RouteParamsResolverInterface') + $producedInstance = $this->getMock('Magento\Framework\Url\RouteParamsResolverInterface'); + $this->objectManager->expects($this->once()) + ->method('create') + ->with('Magento\Framework\Url\RouteParamsResolverInterface') ->will($this->returnValue($producedInstance)); $this->assertSame($producedInstance, $this->object->create([])); diff --git a/dev/tests/unit/testsuite/Magento/Url/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Url/ValidatorTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Url/ValidatorTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Url/ValidatorTest.php index e197b477f0a24..a6d8ddac2caac 100644 --- a/dev/tests/unit/testsuite/Magento/Url/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Url/ValidatorTest.php @@ -21,13 +21,13 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Url; +namespace Magento\Framework\Url; use Magento\TestFramework\Helper\ObjectManager; class ValidatorTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Url\Validator */ + /** @var \Magento\Framework\Url\Validator */ protected $object; /** @var string[] */ @@ -36,7 +36,7 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase protected function setUp() { $objectManager = new ObjectManager($this); - $this->object = $objectManager->getObject('Magento\Url\Validator'); + $this->object = $objectManager->getObject('Magento\Framework\Url\Validator'); } public function testConstruct() diff --git a/dev/tests/unit/testsuite/Magento/UrlTest.php b/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php similarity index 92% rename from dev/tests/unit/testsuite/Magento/UrlTest.php rename to dev/tests/unit/testsuite/Magento/Framework/UrlTest.php index e37ff72c771be..1ab464ff65303 100644 --- a/dev/tests/unit/testsuite/Magento/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/UrlTest.php @@ -22,10 +22,10 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento; +namespace Magento\Framework; /** - * Test class for Magento\Url + * Test class for Magento\Framework\Url * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class UrlTest extends \PHPUnit_Framework_TestCase @@ -36,27 +36,27 @@ class UrlTest extends \PHPUnit_Framework_TestCase protected $routeParamsResolverMock; /** - * @var \Magento\Url\ScopeResolverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Url\ScopeResolverInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $scopeResolverMock; /** - * @var \Magento\Url\ScopeInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Url\ScopeInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $scopeMock; /** - * @var \Magento\Url\QueryParamsResolverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Url\QueryParamsResolverInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $queryParamsResolverMock; /** - * @var \Magento\Session\SidResolverInterface|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Session\SidResolverInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $sidResolverMock; /** - * @var \Magento\Session\Generic|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Session\Generic|\PHPUnit_Framework_MockObject_MockObject */ protected $sessionMock; @@ -67,22 +67,39 @@ class UrlTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->routeParamsResolverMock = $this->getMock('Magento\Core\Model\Url\RouteParamsResolver', - ['getType', 'hasData', 'getData', 'getRouteParams'], [], '', false); - $this->scopeResolverMock = $this->getMock('Magento\Url\ScopeResolverInterface'); - $this->scopeMock = $this->getMock('Magento\Url\ScopeInterface'); - $this->queryParamsResolverMock = $this->getMock('Magento\Url\QueryParamsResolverInterface', [], [], '', false); - $this->sidResolverMock = $this->getMock('Magento\Session\SidResolverInterface'); - $this->sessionMock = $this->getMock('Magento\Session\Generic', [], [], '', false); + $this->routeParamsResolverMock = $this->getMock( + 'Magento\Core\Model\Url\RouteParamsResolver', + ['getType', 'hasData', 'getData', 'getRouteParams'], + [], + '', + false + ); + $this->scopeResolverMock = $this->getMock('Magento\Framework\Url\ScopeResolverInterface'); + $this->scopeMock = $this->getMock('Magento\Framework\Url\ScopeInterface'); + $this->queryParamsResolverMock = $this->getMock( + 'Magento\Framework\Url\QueryParamsResolverInterface', + [], + [], + '', + false + ); + $this->sidResolverMock = $this->getMock('Magento\Framework\Session\SidResolverInterface'); + $this->sessionMock = $this->getMock('Magento\Framework\Session\Generic', [], [], '', false); $this->scopeConfig = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface'); } /** - * @return \Magento\Url\RouteParamsResolverFactory|\PHPUnit_Framework_MockObject_MockObject + * @return \Magento\Framework\Url\RouteParamsResolverFactory|\PHPUnit_Framework_MockObject_MockObject */ protected function getRouteParamsResolver() { - $routeParamsResolverFactoryMock = $this->getMock('Magento\Url\RouteParamsResolverFactory', [], [], '', false); + $routeParamsResolverFactoryMock = $this->getMock( + 'Magento\Framework\Url\RouteParamsResolverFactory', + [], + [], + '', + false + ); $routeParamsResolverFactoryMock->expects($this->once())->method('create') ->will($this->returnValue($this->routeParamsResolverMock)); return $routeParamsResolverFactoryMock; @@ -100,13 +117,13 @@ protected function getRequestMock($mockMethods = []) /** * @param array $arguments - * @return \Magento\Url + * @return \Magento\Framework\Url */ protected function getUrlModel($arguments = []) { $arguments = array_merge($arguments, ['scopeType' => \Magento\Store\Model\ScopeInterface::SCOPE_STORE]); $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - return $objectManager->getObject('Magento\Url', $arguments); + return $objectManager->getObject('Magento\Framework\Url', $arguments); } /** @@ -187,7 +204,7 @@ public function testGetUrl($query, $queryResult, $returnUri) ); $baseUrl = 'http://localhost/index.php/'; - $urlType = \Magento\UrlInterface::URL_TYPE_LINK; + $urlType = \Magento\Framework\UrlInterface::URL_TYPE_LINK; $this->scopeMock->expects($this->once())->method('getBaseUrl')->will($this->returnValue($baseUrl)); $this->scopeResolverMock->expects($this->any())->method('getScope')->will($this->returnValue($this->scopeMock)); @@ -298,7 +315,7 @@ public function testGetUrlWithAsterisksPath() ); $baseUrl = 'http://localhost/index.php/'; - $urlType = \Magento\UrlInterface::URL_TYPE_LINK; + $urlType = \Magento\Framework\UrlInterface::URL_TYPE_LINK; $this->scopeMock->expects($this->once())->method('getBaseUrl')->will($this->returnValue($baseUrl)); $this->scopeResolverMock->expects($this->any())->method('getScope')->will($this->returnValue($this->scopeMock)); @@ -327,7 +344,7 @@ public function testGetDirectUrl() ); $baseUrl = 'http://localhost/index.php/'; - $urlType = \Magento\UrlInterface::URL_TYPE_LINK; + $urlType = \Magento\Framework\UrlInterface::URL_TYPE_LINK; $this->scopeMock->expects($this->once())->method('getBaseUrl')->will($this->returnValue($baseUrl)); $this->scopeResolverMock->expects($this->any())->method('getScope')->will($this->returnValue($this->scopeMock)); @@ -465,7 +482,7 @@ public function isOwnOriginUrlDataProvider() */ public function testGetConfigData($urlType, $configPath, $isSecure, $isSecureCallCount, $key) { - $urlSecurityInfoMock = $this->getMock('Magento\Url\SecurityInfoInterface'); + $urlSecurityInfoMock = $this->getMock('Magento\Framework\Url\SecurityInfoInterface'); $model = $this->getUrlModel([ 'urlSecurityInfo' => $urlSecurityInfoMock, 'routeParamsResolver' => $this->getRouteParamsResolver(), @@ -497,7 +514,11 @@ public function getConfigDataDataProvider() return [ 'secure url' => ['some-type', 'web/secure/base_url_secure', true, 0, 'base_url_secure'], 'unsecure url' => [ - \Magento\UrlInterface::URL_TYPE_LINK, 'web/unsecure/base_url_unsecure', false, 1, 'base_url_unsecure' + \Magento\Framework\UrlInterface::URL_TYPE_LINK, + 'web/unsecure/base_url_unsecure', + false, + 1, + 'base_url_unsecure' ], ]; } diff --git a/dev/tests/unit/testsuite/Magento/Validator/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/BuilderTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Validator/BuilderTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/BuilderTest.php index 5fa381ed27344..668d0581b116c 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/BuilderTest.php @@ -18,13 +18,10 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Validator; +namespace Magento\Framework\Validator; /** * Class BuilderTest @@ -39,7 +36,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase protected $_objectManager; /** - * @var \Magento\ObjectManager\ObjectManager + * @var \Magento\Framework\ObjectManager\ObjectManager */ protected $_realObjectManager; @@ -47,9 +44,11 @@ protected function setUp() { $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this); - $config = new \Magento\ObjectManager\Config\Config(new \Magento\ObjectManager\Relations\Runtime()); - $factory = new \Magento\ObjectManager\Factory\Factory($config); - $this->_realObjectManager = new \Magento\ObjectManager\ObjectManager($factory, $config); + $config = new \Magento\Framework\ObjectManager\Config\Config( + new \Magento\Framework\ObjectManager\Relations\Runtime() + ); + $factory = new \Magento\Framework\ObjectManager\Factory\Factory($config); + $this->_realObjectManager = new \Magento\Framework\ObjectManager\ObjectManager($factory, $config); $factory->setObjectManager($this->_realObjectManager); } @@ -59,17 +58,17 @@ protected function setUp() * @dataProvider createValidatorDataProvider * * @param array $constraints - * @param \Magento\Validator\ValidatorInterface $expectedValidator + * @param \Magento\Framework\Validator\ValidatorInterface $expectedValidator */ public function testCreateValidator(array $constraints, $expectedValidator) { - /** @var $builder \Magento\Validator\Builder */ + /** @var $builder \Magento\Framework\Validator\Builder */ $builder = $this->_objectManager->getObject( - 'Magento\Validator\Builder', + 'Magento\Framework\Validator\Builder', array( - 'constraintFactory' => new \Magento\Validator\ConstraintFactory($this->_realObjectManager), - 'validatorFactory' => new \Magento\ValidatorFactory($this->_realObjectManager), - 'oneValidatorFactory' => new \Magento\Validator\UniversalFactory($this->_realObjectManager), + 'constraintFactory' => new \Magento\Framework\Validator\ConstraintFactory($this->_realObjectManager), + 'validatorFactory' => new \Magento\Framework\ValidatorFactory($this->_realObjectManager), + 'oneValidatorFactory' => new \Magento\Framework\Validator\UniversalFactory($this->_realObjectManager), 'constraints' => $constraints ) ); @@ -86,18 +85,18 @@ public function createValidatorDataProvider() { $result = array(); - /** @var \Magento\Translate\AbstractAdapter $translator */ - $translator = $this->getMockBuilder('Magento\Translate\AbstractAdapter')->getMockForAbstractClass(); - \Magento\Validator\AbstractValidator::setDefaultTranslator($translator); + /** @var \Magento\Framework\Translate\AbstractAdapter $translator */ + $translator = $this->getMockBuilder('Magento\Framework\Translate\AbstractAdapter')->getMockForAbstractClass(); + \Magento\Framework\Validator\AbstractValidator::setDefaultTranslator($translator); // Case 1. Check constructor with arguments $actualConstraints = array( array( 'alias' => 'name_alias', - 'class' => 'Magento\Validator\Test\StringLength', + 'class' => 'Magento\Framework\Validator\Test\StringLength', 'options' => array( 'arguments' => array( - 'options' => array('min' => 1, 'max' => new \Magento\Validator\Constraint\Option(20)) + 'options' => array('min' => 1, 'max' => new \Magento\Framework\Validator\Constraint\Option(20)) ) ), 'property' => 'name', @@ -105,10 +104,10 @@ public function createValidatorDataProvider() ) ); - $expectedValidator = new \Magento\Validator(); + $expectedValidator = new \Magento\Framework\Validator(); $expectedValidator->addValidator( - new \Magento\Validator\Constraint\Property( - new \Magento\Validator\Test\StringLength(1, 20), + new \Magento\Framework\Validator\Constraint\Property( + new \Magento\Framework\Validator\Test\StringLength(1, 20), 'name', 'name_alias' ) @@ -120,7 +119,7 @@ public function createValidatorDataProvider() $actualConstraints = array( array( 'alias' => 'description_alias', - 'class' => 'Magento\Validator\Test\StringLength', + 'class' => 'Magento\Framework\Validator\Test\StringLength', 'options' => array( 'methods' => array( array('method' => 'setMin', 'arguments' => array(10)), @@ -132,10 +131,10 @@ public function createValidatorDataProvider() ) ); - $expectedValidator = new \Magento\Validator(); + $expectedValidator = new \Magento\Framework\Validator(); $expectedValidator->addValidator( - new \Magento\Validator\Constraint\Property( - new \Magento\Validator\Test\StringLength(10, 1000), + new \Magento\Framework\Validator\Constraint\Property( + new \Magento\Framework\Validator\Test\StringLength(10, 1000), 'description', 'description_alias' ) @@ -147,20 +146,20 @@ public function createValidatorDataProvider() $actualConstraints = array( array( 'alias' => 'sku_alias', - 'class' => 'Magento\Validator\Test\StringLength', + 'class' => 'Magento\Framework\Validator\Test\StringLength', 'options' => array( 'callback' => array( - new \Magento\Validator\Constraint\Option\Callback( + new \Magento\Framework\Validator\Constraint\Option\Callback( function ($validator) { $validator->setMin(20); $validator->setMax(100); } ))),'property' => 'sku', 'type' => 'property')); - $expectedValidator = new \Magento\Validator(); + $expectedValidator = new \Magento\Framework\Validator(); $expectedValidator->addValidator( - new \Magento\Validator\Constraint\Property( - new \Magento\Validator\Test\StringLength(20, 100), + new \Magento\Framework\Validator\Constraint\Property( + new \Magento\Framework\Validator\Test\StringLength(20, 100), 'sku', 'sku_alias' ) @@ -183,8 +182,11 @@ function ($validator) { */ public function testAddConfiguration($constraints, $alias, $configuration, $expected) { - /** @var $builder \Magento\Validator\Builder */ - $builder = $this->_objectManager->getObject('Magento\Validator\Builder', array('constraints' => $constraints)); + /** @var $builder \Magento\Framework\Validator\Builder */ + $builder = $this->_objectManager->getObject( + 'Magento\Framework\Validator\Builder', + array('constraints' => $constraints) + ); $builder->addConfiguration($alias, $configuration); $this->assertAttributeEquals($expected, '_constraints', $builder); } @@ -201,8 +203,11 @@ public function testAddConfiguration($constraints, $alias, $configuration, $expe */ public function testAddConfigurations($constraints, $alias, $configuration, $expected) { - /** @var $builder \Magento\Validator\Builder */ - $builder = $this->_objectManager->getObject('Magento\Validator\Builder', array('constraints' => $constraints)); + /** @var $builder \Magento\Framework\Validator\Builder */ + $builder = $this->_objectManager->getObject( + 'Magento\Framework\Validator\Builder', + array('constraints' => $constraints) + ); $configurations = array($alias => array($configuration)); $builder->addConfigurations($configurations); $this->assertAttributeEquals($expected, '_constraints', $builder); @@ -216,8 +221,8 @@ public function testAddConfigurations($constraints, $alias, $configuration, $exp */ public function configurationDataProvider() { - $callback = new \Magento\Validator\Constraint\Option\Callback( - array('Magento\Validator\Test\Callback', 'getId') + $callback = new \Magento\Framework\Validator\Constraint\Option\Callback( + array('Magento\Framework\Validator\Test\Callback', 'getId') ); $someMethod = array('method' => 'getMessages'); $methodWithArgs = array('method' => 'someMethod', 'arguments' => array('some_value_to_pass')); @@ -359,7 +364,7 @@ public function testConstructorConfigValidation(array $options, $exception, $exc $constraints = array( array('alias' => 'alias', 'class' => 'Some\Validator\Class', 'options' => $options, 'type' => 'entity') ); - $this->_objectManager->getObject('Magento\Validator\Builder', array('constraints' => $constraints)); + $this->_objectManager->getObject('Magento\Framework\Validator\Builder', array('constraints' => $constraints)); } /** @@ -378,8 +383,11 @@ public function testAddConfigurationConfigValidation(array $options, $exception, $constraints = array( array('alias' => 'alias', 'class' => 'Some\Validator\Class', 'options' => null, 'type' => 'entity') ); - /** @var $builder \Magento\Validator\Builder */ - $builder = $this->_objectManager->getObject('Magento\Validator\Builder', array('constraints' => $constraints)); + /** @var $builder \Magento\Framework\Validator\Builder */ + $builder = $this->_objectManager->getObject( + 'Magento\Framework\Validator\Builder', + array('constraints' => $constraints) + ); $builder->addConfiguration('alias', $options); } @@ -409,26 +417,27 @@ public function invalidArgumentsDataProvider() 'constructor arguments invalid callback' => array( array('callback' => array('invalid', 'callback')), 'InvalidArgumentException', - 'Callback must be instance of \Magento\Validator\Constraint\Option\Callback' + 'Callback must be instance of \Magento\Framework\Validator\Constraint\Option\Callback' ) ); } /** - * Check exception is thrown if validator is not an instance of \Magento\Validator\ValidatorInterface - * - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Constraint class "StdClass" must implement \Magento\Validator\ValidatorInterface + * Check exception is thrown if validator is not an instance of \Magento\Framework\Validator\ValidatorInterface */ public function testCreateValidatorInvalidInstance() { + $this->setExpectedException( + 'InvalidArgumentException', + 'Constraint class "StdClass" must implement \Magento\Framework\Validator\ValidatorInterface' + ); $builder = $this->_objectManager->getObject( - 'Magento\Validator\Builder', + 'Magento\Framework\Validator\Builder', array( 'constraints' => array( array('alias' => 'alias', 'class' => 'StdClass', 'options' => null, 'type' => 'entity') ), - 'validatorFactory' => new \Magento\ValidatorFactory($this->_realObjectManager) + 'validatorFactory' => new \Magento\Framework\ValidatorFactory($this->_realObjectManager) ) ); $builder->createValidator(); @@ -449,8 +458,11 @@ public function testAddConfigurationInvalidFormat($configuration) $constraints = array( array('alias' => 'alias', 'class' => 'Some\Validator\Class', 'options' => null, 'type' => 'entity') ); - /** @var $builder \Magento\Validator\Builder */ - $builder = $this->_objectManager->getObject('Magento\Validator\Builder', array('constraints' => $constraints)); + /** @var $builder \Magento\Framework\Validator\Builder */ + $builder = $this->_objectManager->getObject( + 'Magento\Framework\Validator\Builder', + array('constraints' => $constraints) + ); $builder->addConfigurations($configuration); } diff --git a/dev/tests/unit/testsuite/Magento/Validator/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/ConfigTest.php similarity index 78% rename from dev/tests/unit/testsuite/Magento/Validator/ConfigTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/ConfigTest.php index ef3718b17841d..843d653086dd6 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/ConfigTest.php @@ -1,6 +1,6 @@ setObjectManager($realObjectManager); - $universalFactory = $realObjectManager->get('\Magento\Validator\UniversalFactory'); + $universalFactory = $realObjectManager->get('\Magento\Framework\Validator\UniversalFactory'); $this->_config = $this->_objectManager->getObject( - 'Magento\Validator\Config', + 'Magento\Framework\Validator\Config', array('configFiles' => $configFiles, 'builderFactory' => $universalFactory) ); } @@ -96,12 +98,12 @@ public function testCreateValidatorInvalidGroupName() $this->_config->createValidatorBuilder('test_entity_a', 'invalid_group'); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Constraint class "stdClass" must implement \Magento\Validator\ValidatorInterface - */ public function testCreateValidatorInvalidConstraintClass() { + $this->setExpectedException( + 'InvalidArgumentException', + 'Constraint class "stdClass" must implement \Magento\Framework\Validator\ValidatorInterface' + ); $this->_initConfig(array(__DIR__ . '/_files/validation/negative/invalid_constraint.xml')); $this->_config->createValidator('test_entity', 'test_group'); } @@ -118,7 +120,7 @@ public function testGetValidatorBuilderClassNotFound() /** * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Builder "stdClass" must extend \Magento\Validator\Builder + * @expectedExceptionMessage Builder "stdClass" must extend \Magento\Framework\Validator\Builder */ public function testGetValidatorBuilderInstanceInvalid() { @@ -133,7 +135,7 @@ public function testGetValidatorBuilderInstance() { $this->_initConfig(); $builder = $this->_config->createValidatorBuilder('test_entity_a', 'check_alnum'); - $this->assertInstanceOf('Magento\Validator\Builder', $builder); + $this->assertInstanceOf('Magento\Framework\Validator\Builder', $builder); } /** @@ -166,13 +168,13 @@ public function getValidationRulesDataProvider() // Case 1. Pass check alnum and int properties are not empty and have valid value $entityName = 'test_entity_a'; $groupName = 'check_alnum_and_int_not_empty_and_have_valid_value'; - $value = new \Magento\Object(array('int' => 1, 'alnum' => 'abc123')); + $value = new \Magento\Framework\Object(array('int' => 1, 'alnum' => 'abc123')); $expectedResult = true; $expectedMessages = array(); $result[] = array($entityName, $groupName, $value, $expectedResult, $expectedMessages); // Case 2. Fail check alnum is not empty - $value = new \Magento\Object(array('int' => 'abc123', 'alnum' => null)); + $value = new \Magento\Framework\Object(array('int' => 'abc123', 'alnum' => null)); $expectedResult = false; $expectedMessages = array( 'alnum' => array( @@ -185,13 +187,13 @@ public function getValidationRulesDataProvider() // Case 3. Pass check alnum has valid value $groupName = 'check_alnum'; - $value = new \Magento\Object(array('int' => 'abc123', 'alnum' => 'abc123')); + $value = new \Magento\Framework\Object(array('int' => 'abc123', 'alnum' => 'abc123')); $expectedResult = true; $expectedMessages = array(); $result[] = array($entityName, $groupName, $value, $expectedResult, $expectedMessages); // Case 4. Fail check alnum has valid value - $value = new \Magento\Object(array('int' => 'abc123', 'alnum' => '[abc123]')); + $value = new \Magento\Framework\Object(array('int' => 'abc123', 'alnum' => '[abc123]')); $expectedResult = false; $expectedMessages = array( 'alnum' => array('notAlnum' => '\'[abc123]\' contains characters which are non alphabetic and no digits') @@ -206,16 +208,16 @@ public function getValidationRulesDataProvider() */ public function testBuilderConfiguration() { - $this->getMockBuilder('Magento\Validator\Builder')->disableOriginalConstructor()->getMock(); + $this->getMockBuilder('Magento\Framework\Validator\Builder')->disableOriginalConstructor()->getMock(); $this->_initConfig(array(__DIR__ . '/_files/validation/positive/builder/validation.xml')); $builder = $this->_config->createValidatorBuilder('test_entity_a', 'check_builder'); - $this->assertInstanceOf('Magento\Validator\Builder', $builder); + $this->assertInstanceOf('Magento\Framework\Validator\Builder', $builder); $expected = array( array( 'alias' => '', - 'class' => 'Magento\Validator\Test\NotEmpty', + 'class' => 'Magento\Framework\Validator\Test\NotEmpty', 'options' => null, 'property' => 'int', 'type' => 'property' @@ -225,17 +227,19 @@ public function testBuilderConfiguration() 'class' => 'Validator_Stub', 'options' => array( 'arguments' => array( - new \Magento\Validator\Constraint\Option('test_string_argument'), - new \Magento\Validator\Constraint\Option(array('option1' => 'value1', 'option2' => 'value2')), - new \Magento\Validator\Constraint\Option\Callback( - array('Magento\Validator\Test\Callback', 'getId'), + new \Magento\Framework\Validator\Constraint\Option('test_string_argument'), + new \Magento\Framework\Validator\Constraint\Option( + array('option1' => 'value1', 'option2' => 'value2') + ), + new \Magento\Framework\Validator\Constraint\Option\Callback( + array('Magento\Framework\Validator\Test\Callback', 'getId'), null, true ) ), 'callback' => array( - new \Magento\Validator\Constraint\Option\Callback( - array('Magento\Validator\Test\Callback', 'configureValidator'), + new \Magento\Framework\Validator\Constraint\Option\Callback( + array('Magento\Framework\Validator\Test\Callback', 'configureValidator'), null, true ) @@ -244,13 +248,15 @@ public function testBuilderConfiguration() 'setOptionThree' => array( 'method' => 'setOptionThree', 'arguments' => array( - new \Magento\Validator\Constraint\Option(array('argOption' => 'argOptionValue')), - new \Magento\Validator\Constraint\Option\Callback( - array('Magento\Validator\Test\Callback', 'getId'), + new \Magento\Framework\Validator\Constraint\Option( + array('argOption' => 'argOptionValue') + ), + new \Magento\Framework\Validator\Constraint\Option\Callback( + array('Magento\Framework\Validator\Test\Callback', 'getId'), null, true ), - new \Magento\Validator\Constraint\Option('10') + new \Magento\Framework\Validator\Constraint\Option('10') ) ), 'enableOptionFour' => array('method' => 'enableOptionFour') @@ -267,7 +273,7 @@ public function testBuilderConfiguration() * Check XSD schema validates invalid config files * * @dataProvider getInvalidXmlFiles - * @expectedException \Magento\Exception + * @expectedException \Magento\Framework\Exception * * @param array|string $configFile */ diff --git a/dev/tests/unit/testsuite/Magento/Validator/Constraint/Option/CallbackTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/Option/CallbackTest.php similarity index 87% rename from dev/tests/unit/testsuite/Magento/Validator/Constraint/Option/CallbackTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/Option/CallbackTest.php index 9132232863b5e..6b9a948fdd279 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/Constraint/Option/CallbackTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/Option/CallbackTest.php @@ -18,18 +18,15 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework\Validator\Constraint\Option; + /** - * Test case for \Magento\Validator\Constraint\Option\Callback + * Test case for \Magento\Framework\Validator\Constraint\Option\Callback */ -namespace Magento\Validator\Constraint\Option; - class CallbackTest extends \PHPUnit_Framework_TestCase { /** @@ -49,7 +46,7 @@ class CallbackTest extends \PHPUnit_Framework_TestCase */ public function testGetValue($callback, $expectedResult, $arguments = null, $createInstance = false) { - $option = new \Magento\Validator\Constraint\Option\Callback($callback, $arguments, $createInstance); + $option = new \Magento\Framework\Validator\Constraint\Option\Callback($callback, $arguments, $createInstance); $this->assertEquals($expectedResult, $option->getValue()); } @@ -81,7 +78,12 @@ public function getConfigDataProvider() array(array($this, 'getTestValue'), self::TEST_VALUE), array(array(__CLASS__, 'getTestValueStatically'), self::TEST_VALUE), array(array($mock, 'getValue'), 'Value from mock', array('arg1', 'arg2')), - array(array('Magento\Validator\Test\Callback', 'getId'), \Magento\Validator\Test\Callback::ID, null, true) + array( + array('Magento\Framework\Validator\Test\Callback', 'getId'), + \Magento\Framework\Validator\Test\Callback::ID, + null, + true + ) ); } @@ -111,7 +113,7 @@ public function getTestValue() */ public function testSetArguments($value, $expectedValue) { - $option = new \Magento\Validator\Constraint\Option\Callback( + $option = new \Magento\Framework\Validator\Constraint\Option\Callback( function () { } ); @@ -138,7 +140,7 @@ public function setArgumentsDataProvider() */ public function testGetValueException($callback, $expectedMessage, $createInstance = false) { - $option = new \Magento\Validator\Constraint\Option\Callback($callback, null, $createInstance); + $option = new \Magento\Framework\Validator\Constraint\Option\Callback($callback, null, $createInstance); $this->setExpectedException('InvalidArgumentException', $expectedMessage); $option->getValue(); } diff --git a/dev/tests/unit/testsuite/Magento/Validator/Constraint/OptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/OptionTest.php similarity index 82% rename from dev/tests/unit/testsuite/Magento/Validator/Constraint/OptionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/OptionTest.php index 565b0070f273f..4e793ed356256 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/Constraint/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/OptionTest.php @@ -18,18 +18,15 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework\Validator\Constraint; + /** - * Test case for \Magento\Validator\Constraint\Option + * Test case for \Magento\Framework\Validator\Constraint\Option */ -namespace Magento\Validator\Constraint; - class OptionTest extends \PHPUnit_Framework_TestCase { /** @@ -38,7 +35,7 @@ class OptionTest extends \PHPUnit_Framework_TestCase public function testGetValue() { $expected = 'test_value'; - $option = new \Magento\Validator\Constraint\Option($expected); + $option = new \Magento\Framework\Validator\Constraint\Option($expected); $this->assertEquals($expected, $option->getValue()); } } diff --git a/dev/tests/unit/testsuite/Magento/Validator/Constraint/PropertyTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/PropertyTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Validator/Constraint/PropertyTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/PropertyTest.php index bc605ce56264b..192981ea67dd2 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/Constraint/PropertyTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/Constraint/PropertyTest.php @@ -18,29 +18,26 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework\Validator\Constraint; + /** - * Test case for \Magento\Validator\Constraint\Property + * Test case for \Magento\Framework\Validator\Constraint\Property */ -namespace Magento\Validator\Constraint; - class PropertyTest extends \PHPUnit_Framework_TestCase { const PROPERTY_NAME = 'test'; /** - * @var \Magento\Validator\Constraint\Property + * @var \Magento\Framework\Validator\Constraint\Property */ protected $_constraint; /** - * @var \Magento\Validator\ValidatorInterface|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Validator\ValidatorInterface|PHPUnit_Framework_MockObject_MockObject */ protected $_validatorMock; @@ -49,8 +46,11 @@ class PropertyTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->_validatorMock = $this->getMock('Magento\Validator\ValidatorInterface'); - $this->_constraint = new \Magento\Validator\Constraint\Property($this->_validatorMock, self::PROPERTY_NAME); + $this->_validatorMock = $this->getMock('Magento\Framework\Validator\ValidatorInterface'); + $this->_constraint = new \Magento\Framework\Validator\Constraint\Property( + $this->_validatorMock, + self::PROPERTY_NAME + ); } /** @@ -60,7 +60,11 @@ public function testGetAlias() { $this->assertEmpty($this->_constraint->getAlias()); $alias = 'foo'; - $constraint = new \Magento\Validator\Constraint\Property($this->_validatorMock, self::PROPERTY_NAME, $alias); + $constraint = new \Magento\Framework\Validator\Constraint\Property( + $this->_validatorMock, + self::PROPERTY_NAME, + $alias + ); $this->assertEquals($alias, $constraint->getAlias()); } @@ -117,7 +121,11 @@ public function isValidDataProvider() { return array( array(array(self::PROPERTY_NAME => 'Property value', 'foo' => 'Foo value'), 'Property value', true), - array(new \Magento\Object(array(self::PROPERTY_NAME => 'Property value')), 'Property value', true), + array( + new \Magento\Framework\Object(array(self::PROPERTY_NAME => 'Property value')), + 'Property value', + true + ), array(new \ArrayObject(array(self::PROPERTY_NAME => 'Property value')), 'Property value', true), array( array(self::PROPERTY_NAME => 'Property value', 'foo' => 'Foo value'), diff --git a/dev/tests/unit/testsuite/Magento/Validator/ConstraintTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/ConstraintTest.php similarity index 81% rename from dev/tests/unit/testsuite/Magento/Validator/ConstraintTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/ConstraintTest.php index 67ac9a27df1db..2bc97550e1b9a 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/ConstraintTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/ConstraintTest.php @@ -18,27 +18,24 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Test case for \Magento\Validator\Constraint + * Test case for \Magento\Framework\Validator\Constraint */ -namespace Magento\Validator; +namespace Magento\Framework\Validator; class ConstraintTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Validator\Constraint + * @var \Magento\Framework\Validator\Constraint */ protected $_constraint; /** - * @var \Magento\Validator\ValidatorInterface|PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\Validator\ValidatorInterface|PHPUnit_Framework_MockObject_MockObject */ protected $_validatorMock; @@ -48,11 +45,11 @@ class ConstraintTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->_validatorMock = $this->getMockBuilder( - 'Magento\Validator\AbstractValidator' + 'Magento\Framework\Validator\AbstractValidator' )->setMethods( array('isValid', 'getMessages') )->getMock(); - $this->_constraint = new \Magento\Validator\Constraint($this->_validatorMock); + $this->_constraint = new \Magento\Framework\Validator\Constraint($this->_validatorMock); } /** @@ -62,7 +59,7 @@ public function testGetAlias() { $this->assertEmpty($this->_constraint->getAlias()); $alias = 'foo'; - $constraint = new \Magento\Validator\Constraint($this->_validatorMock, $alias); + $constraint = new \Magento\Framework\Validator\Constraint($this->_validatorMock, $alias); $this->assertEquals($alias, $constraint->getAlias()); } @@ -118,8 +115,8 @@ public function isValidDataProvider() */ public function testSetTranslator() { - /** @var \Magento\Translate\AbstractAdapter $translator */ - $translator = $this->getMockBuilder('Magento\Translate\AdapterInterface')->getMockForAbstractClass(); + /** @var \Magento\Framework\Translate\AbstractAdapter $translator */ + $translator = $this->getMockBuilder('Magento\Framework\Translate\AdapterInterface')->getMockForAbstractClass(); $this->_constraint->setTranslator($translator); $this->assertEquals($translator, $this->_validatorMock->getTranslator()); $this->assertEquals($translator, $this->_constraint->getTranslator()); diff --git a/dev/tests/unit/testsuite/Magento/Validator/Entity/PropertiesTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/Entity/PropertiesTest.php similarity index 70% rename from dev/tests/unit/testsuite/Magento/Validator/Entity/PropertiesTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/Entity/PropertiesTest.php index e3401c73d0fbc..8970843326fbf 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/Entity/PropertiesTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/Entity/PropertiesTest.php @@ -18,28 +18,25 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework\Validator\Entity; + /** - * Test for \Magento\Validator\Entity\Properties + * Test for \Magento\Framework\Validator\Entity\Properties */ -namespace Magento\Validator\Entity; - class PropertiesTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Object + * @var \Magento\Framework\Object */ protected $_object; protected function setUp() { - $this->_object = $this->getMock('Magento\Object', array('hasDataChanges', 'getData', 'getOrigData')); + $this->_object = $this->getMock('Magento\Framework\Object', array('hasDataChanges', 'getData', 'getOrigData')); } protected function tearDown() @@ -48,19 +45,19 @@ protected function tearDown() } /** - * Testing \Magento\Validator\Entity\Properties::isValid on invalid argument passed + * Testing \Magento\Framework\Validator\Entity\Properties::isValid on invalid argument passed * * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Instance of \Magento\Object is expected. + * @expectedExceptionMessage Instance of \Magento\Framework\Object is expected. */ public function testIsValidException() { - $validator = new \Magento\Validator\Entity\Properties(); + $validator = new \Magento\Framework\Validator\Entity\Properties(); $validator->isValid(array()); } /** - * Testing \Magento\Validator\Entity\Properties::isValid with hasDataChanges and invoked setter + * Testing \Magento\Framework\Validator\Entity\Properties::isValid with hasDataChanges and invoked setter */ public function testIsValidSuccessWithInvokedSetter() { @@ -68,33 +65,33 @@ public function testIsValidSuccessWithInvokedSetter() $this->_object->expects($this->once())->method('getData')->with('attr1')->will($this->returnValue(1)); $this->_object->expects($this->once())->method('getOrigData')->with('attr1')->will($this->returnValue(1)); - $validator = new \Magento\Validator\Entity\Properties(); + $validator = new \Magento\Framework\Validator\Entity\Properties(); $validator->setReadOnlyProperties(array('attr1')); $this->assertTrue($validator->isValid($this->_object)); } /** - * Testing \Magento\Validator\Entity\Properties::isValid without invoked setter + * Testing \Magento\Framework\Validator\Entity\Properties::isValid without invoked setter */ public function testIsValidSuccessWithoutInvokedSetter() { - $validator = new \Magento\Validator\Entity\Properties(); + $validator = new \Magento\Framework\Validator\Entity\Properties(); $this->assertTrue($validator->isValid($this->_object)); } /** - * Testing \Magento\Validator\Entity\Properties::isValid with unchanged data + * Testing \Magento\Framework\Validator\Entity\Properties::isValid with unchanged data */ public function testIsValidSuccessWithoutHasDataChanges() { $this->_object->expects($this->once())->method('hasDataChanges')->will($this->returnValue(false)); - $validator = new \Magento\Validator\Entity\Properties(); + $validator = new \Magento\Framework\Validator\Entity\Properties(); $validator->setReadOnlyProperties(array('attr1')); $this->assertTrue($validator->isValid($this->_object)); } /** - * Testing \Magento\Validator\Entity\Properties::isValid with changed data and invoked setter + * Testing \Magento\Framework\Validator\Entity\Properties::isValid with changed data and invoked setter */ public function testIsValidFailed() { @@ -102,7 +99,7 @@ public function testIsValidFailed() $this->_object->expects($this->once())->method('getData')->with('attr1')->will($this->returnValue(1)); $this->_object->expects($this->once())->method('getOrigData')->with('attr1')->will($this->returnValue(2)); - $validator = new \Magento\Validator\Entity\Properties(); + $validator = new \Magento\Framework\Validator\Entity\Properties(); $validator->setReadOnlyProperties(array('attr1')); $this->assertFalse($validator->isValid($this->_object)); } diff --git a/dev/tests/unit/testsuite/Magento/Validator/ExceptionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/ExceptionTest.php similarity index 80% rename from dev/tests/unit/testsuite/Magento/Validator/ExceptionTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/ExceptionTest.php index 3908a9b069d71..7c3fca468fe29 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/ExceptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/ExceptionTest.php @@ -18,28 +18,25 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework\Validator; + /** - * Test case for \Magento\Validator\ValidatorException + * Test case for \Magento\Framework\Validator\ValidatorException */ -namespace Magento\Validator; - class ExceptionTest extends \PHPUnit_Framework_TestCase { /** - * Testing \Magento\Validator\ValidatorException::getMessage + * Testing \Magento\Framework\Validator\ValidatorException::getMessage */ public function testGetMessage() { $expectedMessage = 'error1' . PHP_EOL . 'error2' . PHP_EOL . 'error3'; $messages = array('field1' => array('error1', 'error2'), 'field2' => array('error3')); - $exception = new \Magento\Validator\ValidatorException($messages); + $exception = new \Magento\Framework\Validator\ValidatorException($messages); $this->assertEquals($expectedMessage, $exception->getMessage()); } } diff --git a/dev/tests/unit/testsuite/Magento/Validator/ObjectTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/ObjectTest.php similarity index 91% rename from dev/tests/unit/testsuite/Magento/Validator/ObjectTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/ObjectTest.php index 0107c18192a7a..e23f51eac10e3 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/ObjectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/ObjectTest.php @@ -21,18 +21,18 @@ * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -namespace Magento\Validator; +namespace Magento\Framework\Validator; class ObjectTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Validator\Object + * @var \Magento\Framework\Validator\Object */ protected $_model; protected function setUp() { - $this->_model = new \Magento\Validator\Object(); + $this->_model = new \Magento\Framework\Validator\Object(); $fieldOneExactValue = new \Zend_Validate_Identical('field_one_value'); $fieldOneExactValue->setMessage("'field_one' does not match expected value"); @@ -70,10 +70,10 @@ protected function tearDown() /** * Entity validation routine to be used as a callback * - * @param \Magento\Object $entity + * @param \Magento\Framework\Object $entity * @return bool */ - public function isEntityValid(\Magento\Object $entity) + public function isEntityValid(\Magento\Framework\Object $entity) { return (bool)$entity->getData('is_valid'); } @@ -97,14 +97,14 @@ public function testGetMessages() */ public function testIsValid(array $inputEntityData, array $expectedErrors) { - $entity = new \Magento\Object($inputEntityData); + $entity = new \Magento\Framework\Object($inputEntityData); $isValid = $this->_model->isValid($entity); $this->assertFalse($isValid, 'Validation is expected to fail.'); $actualMessages = $this->_model->getMessages(); $this->assertCount(count($expectedErrors), $actualMessages, 'Number of messages does not meet expectations.'); foreach ($expectedErrors as $errorIndex => $expectedErrorMessage) { - /** @var $actualMessage \Magento\Message\AbstractMessage */ + /** @var $actualMessage \Magento\Framework\Message\AbstractMessage */ $actualMessage = $actualMessages[$errorIndex]; $this->assertEquals($expectedErrorMessage, $actualMessage); } diff --git a/dev/tests/unit/testsuite/Magento/Validator/StringLengthTest.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/StringLengthTest.php similarity index 86% rename from dev/tests/unit/testsuite/Magento/Validator/StringLengthTest.php rename to dev/tests/unit/testsuite/Magento/Framework/Validator/StringLengthTest.php index 0a9441d650d7b..70b483a231b5b 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/StringLengthTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/StringLengthTest.php @@ -18,28 +18,25 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Magento\Framework\Validator; + /** - * Test case for \Magento\Validator\StringLength + * Test case for \Magento\Framework\Validator\StringLength */ -namespace Magento\Validator; - class StringLengthTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Validator\StringLength + * @var \Magento\Framework\Validator\StringLength */ protected $_validator; protected function setUp() { - $this->_validator = new \Magento\Validator\StringLength(); + $this->_validator = new \Magento\Framework\Validator\StringLength(); } public function testDefaultEncoding() diff --git a/dev/tests/unit/testsuite/Magento/Framework/Validator/Test/Alnum.php b/dev/tests/unit/testsuite/Magento/Framework/Validator/Test/Alnum.php new file mode 100644 index 0000000000000..8adbefb0a2a94 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/Test/Alnum.php @@ -0,0 +1,32 @@ +_defaultTranslator = \Magento\Validator\AbstractValidator::getDefaultTranslator(); + $this->_defaultTranslator = \Magento\Framework\Validator\AbstractValidator::getDefaultTranslator(); } protected function tearDown() { - \Magento\Validator\AbstractValidator::setDefaultTranslator($this->_defaultTranslator); + \Magento\Framework\Validator\AbstractValidator::setDefaultTranslator($this->_defaultTranslator); } /** * Get translator object * - * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Translate\AbstractAdapter + * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Translate\AbstractAdapter */ protected function _getTranslator() { - return $this->getMockBuilder('Magento\Translate\AdapterInterface')->getMockForAbstractClass(); + return $this->getMockBuilder('Magento\Framework\Translate\AdapterInterface')->getMockForAbstractClass(); } /** @@ -63,8 +60,8 @@ protected function _getTranslator() public function testDefaultTranslatorGetSet() { $translator = $this->_getTranslator(); - \Magento\Validator\AbstractValidator::setDefaultTranslator($translator); - $this->assertEquals($translator, \Magento\Validator\AbstractValidator::getDefaultTranslator()); + \Magento\Framework\Validator\AbstractValidator::setDefaultTranslator($translator); + $this->assertEquals($translator, \Magento\Framework\Validator\AbstractValidator::getDefaultTranslator()); } /** @@ -72,8 +69,8 @@ public function testDefaultTranslatorGetSet() */ public function testTranslatorGetSetHas() { - /** @var \Magento\Validator\AbstractValidator $validator */ - $validator = $this->getMockBuilder('Magento\Validator\AbstractValidator')->getMockForAbstractClass(); + /** @var \Magento\Framework\Validator\AbstractValidator $validator */ + $validator = $this->getMockBuilder('Magento\Framework\Validator\AbstractValidator')->getMockForAbstractClass(); $translator = $this->_getTranslator(); $validator->setTranslator($translator); $this->assertEquals($translator, $validator->getTranslator()); @@ -85,10 +82,10 @@ public function testTranslatorGetSetHas() */ public function testGetTranslatorDefault() { - /** @var \Magento\Validator\AbstractValidator $validator */ - $validator = $this->getMockBuilder('Magento\Validator\AbstractValidator')->getMockForAbstractClass(); + /** @var \Magento\Framework\Validator\AbstractValidator $validator */ + $validator = $this->getMockBuilder('Magento\Framework\Validator\AbstractValidator')->getMockForAbstractClass(); $translator = $this->_getTranslator(); - \Magento\Validator\AbstractValidator::setDefaultTranslator($translator); + \Magento\Framework\Validator\AbstractValidator::setDefaultTranslator($translator); $this->assertEquals($translator, $validator->getTranslator()); $this->assertFalse($validator->hasTranslator()); } diff --git a/dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_builder_class.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_class.xml similarity index 88% rename from dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_builder_class.xml rename to dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_class.xml index 903514fb96c2d..778a82fcf24f1 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_builder_class.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_class.xml @@ -19,20 +19,17 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + diff --git a/dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_builder_instance.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_instance.xml similarity index 84% rename from dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_builder_instance.xml rename to dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_instance.xml index db531d8817f03..0a27ed024cd52 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_builder_instance.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_builder_instance.xml @@ -19,26 +19,23 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - + - + diff --git a/dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_child_for_option.xml b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_child_for_option.xml similarity index 89% rename from dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_child_for_option.xml rename to dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_child_for_option.xml index c699bbec1ff9b..36223049b7cf5 100644 --- a/dev/tests/unit/testsuite/Magento/Validator/_files/validation/negative/invalid_child_for_option.xml +++ b/dev/tests/unit/testsuite/Magento/Framework/Validator/_files/validation/negative/invalid_child_for_option.xml @@ -19,20 +19,17 @@ * 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_Validator - * @subpackage unit_tests * @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + - +
'; + + for (var h = o.hourMin; h <= hourMax; h += parseInt(o.hourGrid,10)) { + hourGridSize++; + var tmph = (o.ampm && h > 12) ? h-12 : h; + if (tmph < 10) { tmph = '0' + tmph; } + if (o.ampm) { + if (h === 0) { + tmph = 12 +'a'; + } else { + if (h < 12) { tmph += 'a'; } + else { tmph += 'p'; } + } + } + html += ''; + } + + html += '
' + tmph + '
'; + } + html += ''; + + // Minutes + html += '
' + o.minuteText + '
'+ + '
'; + + if (o.showMinute && o.minuteGrid > 0) { + html += '
'; + + for (var m = o.minuteMin; m <= minMax; m += parseInt(o.minuteGrid,10)) { + minuteGridSize++; + html += ''; + } + + html += '
' + ((m < 10) ? '0' : '') + m + '
'; + } + html += '
'; + + // Seconds + html += '
' + o.secondText + '
'+ + '
'; + + if (o.showSecond && o.secondGrid > 0) { + html += '
'; + + for (var s = o.secondMin; s <= secMax; s += parseInt(o.secondGrid,10)) { + secondGridSize++; + html += ''; + } + + html += '
' + ((s < 10) ? '0' : '') + s + '
'; + } + html += '
'; + + // Milliseconds + html += '
' + o.millisecText + '
'+ + '
'; + + if (o.showMillisec && o.millisecGrid > 0) { + html += '
'; + + for (var l = o.millisecMin; l <= millisecMax; l += parseInt(o.millisecGrid,10)) { + millisecGridSize++; + html += ''; + } + + html += '
' + ((l < 10) ? '0' : '') + l + '
'; + } + html += '
'; + + // Timezone + html += '
' + o.timezoneText + '
'; + html += '
'; + + html += '
'; + var $tp = $(html); + + // if we only want time picker... + if (o.timeOnly === true) { + $tp.prepend( + '
' + + '
' + o.timeOnlyTitle + '
' + + '
'); + $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); + } + + this.hour_slider = $tp.find('#ui_tpicker_hour_'+ dp_id).slider({ + orientation: "horizontal", + value: this.hour, + min: o.hourMin, + max: hourMax, + step: o.stepHour, + slide: function(event, ui) { + tp_inst.hour_slider.slider( "option", "value", ui.value); + tp_inst._onTimeChange(); + } + }); + + + // Updated by Peter Medeiros: + // - Pass in Event and UI instance into slide function + this.minute_slider = $tp.find('#ui_tpicker_minute_'+ dp_id).slider({ + orientation: "horizontal", + value: this.minute, + min: o.minuteMin, + max: minMax, + step: o.stepMinute, + slide: function(event, ui) { + tp_inst.minute_slider.slider( "option", "value", ui.value); + tp_inst._onTimeChange(); + } + }); + + this.second_slider = $tp.find('#ui_tpicker_second_'+ dp_id).slider({ + orientation: "horizontal", + value: this.second, + min: o.secondMin, + max: secMax, + step: o.stepSecond, + slide: function(event, ui) { + tp_inst.second_slider.slider( "option", "value", ui.value); + tp_inst._onTimeChange(); + } + }); + + this.millisec_slider = $tp.find('#ui_tpicker_millisec_'+ dp_id).slider({ + orientation: "horizontal", + value: this.millisec, + min: o.millisecMin, + max: millisecMax, + step: o.stepMillisec, + slide: function(event, ui) { + tp_inst.millisec_slider.slider( "option", "value", ui.value); + tp_inst._onTimeChange(); + } + }); + + this.timezone_select = $tp.find('#ui_tpicker_timezone_'+ dp_id).append('').find("select"); + $.fn.append.apply(this.timezone_select, + $.map(o.timezoneList, function(val, idx) { + return $("