@@ -5,62 +5,62 @@ discard block |
||
| 5 | 5 | * @copyright Aimeos (aimeos.org), 2015 |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | -$price = function( array $orders, \Aimeos\MShop\Order\Item\Iface $item, $priceFormat ) |
|
| 8 | +$price = function(array $orders, \Aimeos\MShop\Order\Item\Iface $item, $priceFormat) |
|
| 9 | 9 | { |
| 10 | - if( isset( $orders[$item->getBaseId()] ) ) |
|
| 10 | + if (isset($orders[$item->getBaseId()])) |
|
| 11 | 11 | { |
| 12 | 12 | $price = $orders[$item->getBaseId()]->getPrice(); |
| 13 | - return sprintf( $priceFormat, $price->getValue(), $price->getCurrencyId() ); |
|
| 13 | + return sprintf($priceFormat, $price->getValue(), $price->getCurrencyId()); |
|
| 14 | 14 | } |
| 15 | 15 | }; |
| 16 | 16 | |
| 17 | -$status = function( $list, $key ) |
|
| 17 | +$status = function($list, $key) |
|
| 18 | 18 | { |
| 19 | - return ( isset( $list[$key] ) ? $list[$key] : '' ); |
|
| 19 | + return (isset($list[$key]) ? $list[$key] : ''); |
|
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | 22 | |
| 23 | 23 | $enc = $this->encoder(); |
| 24 | -$orders = $this->get( 'orderlatestOrders', array() ); |
|
| 24 | +$orders = $this->get('orderlatestOrders', array()); |
|
| 25 | 25 | /// price format with value (%1$s) and currency (%2$s) |
| 26 | -$priceFormat = $this->translate( 'admin', '%1$s %2$s' ); |
|
| 26 | +$priceFormat = $this->translate('admin', '%1$s %2$s'); |
|
| 27 | 27 | |
| 28 | 28 | $statuslist = array( |
| 29 | - Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED => $this->translate( 'admin', 'pay:unfinished' ), |
|
| 30 | - Aimeos\MShop\Order\Item\Base::PAY_DELETED => $this->translate( 'admin', 'pay:deleted' ), |
|
| 31 | - Aimeos\MShop\Order\Item\Base::PAY_CANCELED => $this->translate( 'admin', 'pay:canceled' ), |
|
| 32 | - Aimeos\MShop\Order\Item\Base::PAY_REFUSED => $this->translate( 'admin', 'pay:refused' ), |
|
| 33 | - Aimeos\MShop\Order\Item\Base::PAY_REFUND => $this->translate( 'admin', 'pay:refund' ), |
|
| 34 | - Aimeos\MShop\Order\Item\Base::PAY_PENDING => $this->translate( 'admin', 'pay:pending' ), |
|
| 35 | - Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED => $this->translate( 'admin', 'pay:authorized' ), |
|
| 36 | - Aimeos\MShop\Order\Item\Base::PAY_RECEIVED => $this->translate( 'admin', 'pay:received' ), |
|
| 29 | + Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED => $this->translate('admin', 'pay:unfinished'), |
|
| 30 | + Aimeos\MShop\Order\Item\Base::PAY_DELETED => $this->translate('admin', 'pay:deleted'), |
|
| 31 | + Aimeos\MShop\Order\Item\Base::PAY_CANCELED => $this->translate('admin', 'pay:canceled'), |
|
| 32 | + Aimeos\MShop\Order\Item\Base::PAY_REFUSED => $this->translate('admin', 'pay:refused'), |
|
| 33 | + Aimeos\MShop\Order\Item\Base::PAY_REFUND => $this->translate('admin', 'pay:refund'), |
|
| 34 | + Aimeos\MShop\Order\Item\Base::PAY_PENDING => $this->translate('admin', 'pay:pending'), |
|
| 35 | + Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED => $this->translate('admin', 'pay:authorized'), |
|
| 36 | + Aimeos\MShop\Order\Item\Base::PAY_RECEIVED => $this->translate('admin', 'pay:received'), |
|
| 37 | 37 | ); |
| 38 | 38 | |
| 39 | 39 | ?> |
| 40 | 40 | <div class="order-latest card panel"> |
| 41 | 41 | <div id="order-latest-head" class="header card-header"> |
| 42 | - <?php echo $enc->html( $this->translate( 'admin', 'Latest orders' ) ); ?> |
|
| 42 | + <?php echo $enc->html($this->translate('admin', 'Latest orders')); ?> |
|
| 43 | 43 | </div> |
| 44 | 44 | <div id="order-latest-data" class="content card-block"> |
| 45 | 45 | <div class="table-responsive"> |
| 46 | 46 | <table class="list-items table table-hover"> |
| 47 | 47 | <thead class="header"> |
| 48 | 48 | <tr> |
| 49 | - <th class="order.id"><?php echo $enc->html( $this->translate( 'admin', 'ID' ) ); ?></th> |
|
| 50 | - <th class="order.type"><?php echo $enc->html( $this->translate( 'admin', 'Type' ) ); ?></th> |
|
| 51 | - <th class="order.datepayment"><?php echo $enc->html( $this->translate( 'admin', 'Payment date' ) ); ?></th> |
|
| 52 | - <th class="order.statuspayment"><?php echo $enc->html( $this->translate( 'admin', 'Payment status' ) ); ?></th> |
|
| 53 | - <th class="order.base.price"><?php echo $enc->html( $this->translate( 'admin', 'Price' ) ); ?></th> |
|
| 49 | + <th class="order.id"><?php echo $enc->html($this->translate('admin', 'ID')); ?></th> |
|
| 50 | + <th class="order.type"><?php echo $enc->html($this->translate('admin', 'Type')); ?></th> |
|
| 51 | + <th class="order.datepayment"><?php echo $enc->html($this->translate('admin', 'Payment date')); ?></th> |
|
| 52 | + <th class="order.statuspayment"><?php echo $enc->html($this->translate('admin', 'Payment status')); ?></th> |
|
| 53 | + <th class="order.base.price"><?php echo $enc->html($this->translate('admin', 'Price')); ?></th> |
|
| 54 | 54 | </tr> |
| 55 | 55 | </thead> |
| 56 | 56 | <tbody> |
| 57 | - <?php foreach( $this->get( 'orderlatestItems', array() ) as $id => $item ) : ?> |
|
| 57 | + <?php foreach ($this->get('orderlatestItems', array()) as $id => $item) : ?> |
|
| 58 | 58 | <tr> |
| 59 | - <td class="order.id"><?php echo $enc->html( $item->getId() ); ?></td> |
|
| 60 | - <td class="order.type"><?php echo $enc->html( $item->getType() ); ?></td> |
|
| 61 | - <td class="order.datepayment"><?php echo $enc->html( $item->getDatePayment() ); ?></td> |
|
| 62 | - <td class="order.statuspayment"><?php echo $enc->html( $status( $statuslist, $item->getPaymentStatus() ) ); ?></td> |
|
| 63 | - <td class="order.base.price"><?php echo $enc->html( $price( $orders, $item, $priceFormat ) ); ?></td> |
|
| 59 | + <td class="order.id"><?php echo $enc->html($item->getId()); ?></td> |
|
| 60 | + <td class="order.type"><?php echo $enc->html($item->getType()); ?></td> |
|
| 61 | + <td class="order.datepayment"><?php echo $enc->html($item->getDatePayment()); ?></td> |
|
| 62 | + <td class="order.statuspayment"><?php echo $enc->html($status($statuslist, $item->getPaymentStatus())); ?></td> |
|
| 63 | + <td class="order.base.price"><?php echo $enc->html($price($orders, $item, $priceFormat)); ?></td> |
|
| 64 | 64 | </tr> |
| 65 | 65 | <?php endforeach; ?> |
| 66 | 66 | </tbody> |
@@ -68,4 +68,4 @@ discard block |
||
| 68 | 68 | </div> |
| 69 | 69 | </div> |
| 70 | 70 | </div> |
| 71 | -<?php echo $this->get( 'orderlatestBody' ); ?> |
|
| 71 | +<?php echo $this->get('orderlatestBody'); ?> |
|
@@ -6,12 +6,12 @@ |
||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | ?> |
| 9 | -<?php $this->block()->start( 'jqadm_content' ); ?> |
|
| 9 | +<?php $this->block()->start('jqadm_content'); ?> |
|
| 10 | 10 | |
| 11 | 11 | <div class="dashboard"> |
| 12 | -<?php echo $this->get( 'listBody' ); ?> |
|
| 12 | +<?php echo $this->get('listBody'); ?> |
|
| 13 | 13 | </div> |
| 14 | 14 | |
| 15 | 15 | <?php $this->block()->stop(); ?> |
| 16 | 16 | |
| 17 | -<?php echo $this->render( $this->config( 'admin/jqadm/template/page', 'common/page-default.php' ) ); ?> |
|
| 17 | +<?php echo $this->render($this->config('admin/jqadm/template/page', 'common/page-default.php')); ?> |
|
@@ -9,5 +9,5 @@ |
||
| 9 | 9 | |
| 10 | 10 | ?> |
| 11 | 11 | <div class="dashboard-order"> |
| 12 | -<?php echo $this->get( 'orderBody' ); ?> |
|
| 12 | +<?php echo $this->get('orderBody'); ?> |
|
| 13 | 13 | </div> |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | |
| 12 | 12 | <div class="order-paymentstatus card panel panel-small"> |
| 13 | 13 | <div id="order-paymentstatus-head" class="header card-header"> |
| 14 | - <?php echo $enc->html( $this->translate( 'admin', 'Orders by payment status' ) ); ?> |
|
| 14 | + <?php echo $enc->html($this->translate('admin', 'Orders by payment status')); ?> |
|
| 15 | 15 | </div> |
| 16 | 16 | <div id="order-paymentstatus-data" class="content card-block"> |
| 17 | 17 | </div> |
| 18 | 18 | </div> |
| 19 | -<?php echo $this->get( 'orderpaymentstatusBody' ); ?> |
|
| 19 | +<?php echo $this->get('orderpaymentstatusBody'); ?> |
|
@@ -8,19 +8,19 @@ discard block |
||
| 8 | 8 | $enc = $this->encoder(); |
| 9 | 9 | |
| 10 | 10 | $target = $this->request()->getTarget(); |
| 11 | -$cntl = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' ); |
|
| 12 | -$action = $this->config( 'admin/jqadm/url/search/action', 'search' ); |
|
| 13 | -$config = $this->config( 'admin/jqadm/url/search/config', array() ); |
|
| 11 | +$cntl = $this->config('admin/jqadm/url/search/controller', 'Jqadm'); |
|
| 12 | +$action = $this->config('admin/jqadm/url/search/action', 'search'); |
|
| 13 | +$config = $this->config('admin/jqadm/url/search/config', array()); |
|
| 14 | 14 | |
| 15 | -$jsonTarget = $this->config( 'admin/jsonadm/url/options/target' ); |
|
| 16 | -$jsonCntl = $this->config( 'admin/jsonadm/url/options/controller', 'Jsonadm' ); |
|
| 17 | -$jsonAction = $this->config( 'admin/jsonadm/url/options/action', 'options' ); |
|
| 18 | -$jsonConfig = $this->config( 'admin/jsonadm/url/options/config', array() ); |
|
| 15 | +$jsonTarget = $this->config('admin/jsonadm/url/options/target'); |
|
| 16 | +$jsonCntl = $this->config('admin/jsonadm/url/options/controller', 'Jsonadm'); |
|
| 17 | +$jsonAction = $this->config('admin/jsonadm/url/options/action', 'options'); |
|
| 18 | +$jsonConfig = $this->config('admin/jsonadm/url/options/config', array()); |
|
| 19 | 19 | |
| 20 | -$extTarget = $this->config( 'admin/extjs/url/target' ); |
|
| 21 | -$extCntl = $this->config( 'admin/extjs/url/controller', 'Extadm' ); |
|
| 22 | -$extAction = $this->config( 'admin/extjs/url/action', 'index' ); |
|
| 23 | -$extConfig = $this->config( 'admin/extjs/url/config', array() ); |
|
| 20 | +$extTarget = $this->config('admin/extjs/url/target'); |
|
| 21 | +$extCntl = $this->config('admin/extjs/url/controller', 'Extadm'); |
|
| 22 | +$extAction = $this->config('admin/extjs/url/action', 'index'); |
|
| 23 | +$extConfig = $this->config('admin/extjs/url/config', array()); |
|
| 24 | 24 | |
| 25 | 25 | /** admin/jqadm/resources |
| 26 | 26 | * List of available resource clients in the JQAdm interface |
@@ -32,18 +32,18 @@ discard block |
||
| 32 | 32 | * @since 2016.07 |
| 33 | 33 | * @category Developer |
| 34 | 34 | */ |
| 35 | -$resourceList = $this->config( 'admin/jqadm/resources', array( 'dashboard', 'product' ) ); |
|
| 35 | +$resourceList = $this->config('admin/jqadm/resources', array('dashboard', 'product')); |
|
| 36 | 36 | |
| 37 | -$site = $this->param( 'site' ); |
|
| 38 | -$extParams = array( 'site' => $site, 'lang' => $this->param( 'lang' ) ); |
|
| 37 | +$site = $this->param('site'); |
|
| 38 | +$extParams = array('site' => $site, 'lang' => $this->param('lang')); |
|
| 39 | 39 | |
| 40 | -$params = $this->get( 'pageParams', array() ); |
|
| 41 | -if( ( $id = $this->param( 'id' ) ) !== null ) { |
|
| 40 | +$params = $this->get('pageParams', array()); |
|
| 41 | +if (($id = $this->param('id')) !== null) { |
|
| 42 | 42 | $params['id'] = $id; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | ?> |
| 46 | -<div class="aimeos" data-url="<?php echo $enc->attr( $this->url( $jsonTarget, $jsonCntl, $jsonAction, array( 'site' => $site, 'resource' => '', 'id' => '' ), array(), $jsonConfig ) ); ?>"> |
|
| 46 | +<div class="aimeos" data-url="<?php echo $enc->attr($this->url($jsonTarget, $jsonCntl, $jsonAction, array('site' => $site, 'resource' => '', 'id' => ''), array(), $jsonConfig)); ?>"> |
|
| 47 | 47 | |
| 48 | 48 | <nav class="navbar navbar-full"> |
| 49 | 49 | <a class="navbar-brand" href="https://aimeos.org/update/?type={type}&version={version}"> |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | <div class="collapse navbar-toggleable-xs" id="collapse-navbar"> |
| 56 | 56 | <ul class="nav navbar-nav"> |
| 57 | 57 | |
| 58 | -<?php if( $this->access( 'admin' ) ) : ?> |
|
| 58 | +<?php if ($this->access('admin')) : ?> |
|
| 59 | 59 | <li class="nav-item mode active"> |
| 60 | - <a class="nav-link" href="<?php echo $enc->attr( $this->url( $extTarget, $extCntl, $extAction, $extParams, array(), $extConfig ) ); ?>"> |
|
| 61 | - <?php echo $enc->html( $this->translate( 'admin', 'Expert mode' ) ); ?> |
|
| 60 | + <a class="nav-link" href="<?php echo $enc->attr($this->url($extTarget, $extCntl, $extAction, $extParams, array(), $extConfig)); ?>"> |
|
| 61 | + <?php echo $enc->html($this->translate('admin', 'Expert mode')); ?> |
|
| 62 | 62 | </a> |
| 63 | 63 | </li> |
| 64 | 64 | <?php endif; ?> |
@@ -66,13 +66,13 @@ discard block |
||
| 66 | 66 | <li class="nav-item resource"> |
| 67 | 67 | <div class="btn-group"> |
| 68 | 68 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 69 | - <?php echo $enc->attr( $this->translate( 'admin', $this->param( 'resource' ) ) ); ?> |
|
| 69 | + <?php echo $enc->attr($this->translate('admin', $this->param('resource'))); ?> |
|
| 70 | 70 | </button> |
| 71 | 71 | <div class="dropdown-menu"> |
| 72 | -<?php foreach( $resourceList as $code ) : ?> |
|
| 72 | +<?php foreach ($resourceList as $code) : ?> |
|
| 73 | 73 | <a class="dropdown-item" |
| 74 | - href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'resource' => $code ) + $params, array(), $config ) ); ?>"> |
|
| 75 | - <?php echo $enc->html( $this->translate( 'admin', $code ) ); ?> |
|
| 74 | + href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('resource' => $code) + $params, array(), $config)); ?>"> |
|
| 75 | + <?php echo $enc->html($this->translate('admin', $code)); ?> |
|
| 76 | 76 | </a> |
| 77 | 77 | <?php endforeach; ?> |
| 78 | 78 | </div> |
@@ -82,31 +82,31 @@ discard block |
||
| 82 | 82 | <li class="nav-item language"> |
| 83 | 83 | <div class="btn-group"> |
| 84 | 84 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 85 | - <?php echo $enc->attr( $this->param( 'lang', $this->translate( 'admin', 'Language' ) ) ); ?> |
|
| 85 | + <?php echo $enc->attr($this->param('lang', $this->translate('admin', 'Language'))); ?> |
|
| 86 | 86 | </button> |
| 87 | 87 | <div class="dropdown-menu"> |
| 88 | -<?php foreach( $this->get( 'languagesList', array() ) as $langid ) : ?> |
|
| 88 | +<?php foreach ($this->get('languagesList', array()) as $langid) : ?> |
|
| 89 | 89 | <a class="dropdown-item" |
| 90 | - href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'lang' => $langid ) + $params, array(), $config ) ); ?>"> |
|
| 91 | - <?php echo $enc->html( $langid ); ?> |
|
| 90 | + href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('lang' => $langid) + $params, array(), $config)); ?>"> |
|
| 91 | + <?php echo $enc->html($langid); ?> |
|
| 92 | 92 | </a> |
| 93 | 93 | <?php endforeach; ?> |
| 94 | 94 | </div> |
| 95 | 95 | </div> |
| 96 | 96 | </li> |
| 97 | 97 | |
| 98 | -<?php if( $this->access( 'admin' ) ) : ?> |
|
| 99 | -<?php $sites = $this->get( 'sitesList', array() ); ?> |
|
| 98 | +<?php if ($this->access('admin')) : ?> |
|
| 99 | +<?php $sites = $this->get('sitesList', array()); ?> |
|
| 100 | 100 | <li class="nav-item site"> |
| 101 | 101 | <div class="btn-group"> |
| 102 | 102 | <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 103 | - <?php echo $enc->attr( $this->value( $sites, $site, $this->translate( 'admin', 'Site' ) ) ); ?> |
|
| 103 | + <?php echo $enc->attr($this->value($sites, $site, $this->translate('admin', 'Site'))); ?> |
|
| 104 | 104 | </button> |
| 105 | 105 | <div class="dropdown-menu"> |
| 106 | -<?php foreach( $sites as $code => $label ) : ?> |
|
| 106 | +<?php foreach ($sites as $code => $label) : ?> |
|
| 107 | 107 | <a class="dropdown-item" |
| 108 | - href="<?php echo $enc->attr( $this->url( $target, $cntl, $action, array( 'site' => $code ) + $params, array(), $config ) ); ?>"> |
|
| 109 | - <?php echo $enc->html( $label ); ?> |
|
| 108 | + href="<?php echo $enc->attr($this->url($target, $cntl, $action, array('site' => $code) + $params, array(), $config)); ?>"> |
|
| 109 | + <?php echo $enc->html($label); ?> |
|
| 110 | 110 | </a> |
| 111 | 111 | <?php endforeach; ?> |
| 112 | 112 | </div> |
@@ -121,12 +121,12 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | <div class="container"> |
| 123 | 123 | |
| 124 | -<?php echo $this->partial( $this->config( 'admin/jqadm/partial/error', 'common/partials/error-default.php' ), array( 'errors' => $this->get( 'errors', array() ) ) ); ?> |
|
| 124 | +<?php echo $this->partial($this->config('admin/jqadm/partial/error', 'common/partials/error-default.php'), array('errors' => $this->get('errors', array()))); ?> |
|
| 125 | 125 | |
| 126 | -<?php echo $this->block()->get( 'jqadm_content' ); ?> |
|
| 126 | +<?php echo $this->block()->get('jqadm_content'); ?> |
|
| 127 | 127 | |
| 128 | 128 | </div> |
| 129 | 129 | |
| 130 | -<?php echo $this->partial( $this->config( 'admin/jqadm/partial/confirm', 'common/partials/confirm-default.php' ) ); ?> |
|
| 130 | +<?php echo $this->partial($this->config('admin/jqadm/partial/confirm', 'common/partials/confirm-default.php')); ?> |
|
| 131 | 131 | |
| 132 | 132 | </div> |
@@ -19,55 +19,55 @@ discard block |
||
| 19 | 19 | protected function setUp() |
| 20 | 20 | { |
| 21 | 21 | $this->view = \TestHelperJqadm::getView(); |
| 22 | - $request = $this->getMock( '\Psr\Http\Message\ServerRequestInterface' ); |
|
| 23 | - $helper = new \Aimeos\MW\View\Helper\Request\Standard( $this->view, $request, '127.0.0.1', 'test' ); |
|
| 24 | - $this->view ->addHelper( 'request', $helper ); |
|
| 22 | + $request = $this->getMock('\Psr\Http\Message\ServerRequestInterface'); |
|
| 23 | + $helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test'); |
|
| 24 | + $this->view ->addHelper('request', $helper); |
|
| 25 | 25 | |
| 26 | 26 | $this->context = \TestHelperJqadm::getContext(); |
| 27 | 27 | $templatePaths = \TestHelperJqadm::getTemplatePaths(); |
| 28 | 28 | |
| 29 | - $this->object = new \Aimeos\Admin\JQAdm\Dashboard\Standard( $this->context, $templatePaths ); |
|
| 30 | - $this->object->setView( $this->view ); |
|
| 29 | + $this->object = new \Aimeos\Admin\JQAdm\Dashboard\Standard($this->context, $templatePaths); |
|
| 30 | + $this->object->setView($this->view); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | protected function tearDown() |
| 35 | 35 | { |
| 36 | - unset( $this->object ); |
|
| 36 | + unset($this->object); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | public function testCreate() |
| 41 | 41 | { |
| 42 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 42 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 43 | 43 | $this->object->create(); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | public function testCopy() |
| 48 | 48 | { |
| 49 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 49 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 50 | 50 | $this->object->copy(); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | public function testDelete() |
| 55 | 55 | { |
| 56 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 56 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 57 | 57 | $this->object->delete(); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | public function testGet() |
| 62 | 62 | { |
| 63 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 63 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 64 | 64 | $this->object->get(); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | |
| 68 | 68 | public function testSave() |
| 69 | 69 | { |
| 70 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 70 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 71 | 71 | $this->object->save(); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -76,21 +76,21 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | $result = $this->object->search(); |
| 78 | 78 | |
| 79 | - $this->assertContains( '<div class="dashboard">', $result ); |
|
| 79 | + $this->assertContains('<div class="dashboard">', $result); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | |
| 83 | 83 | public function testSearchException() |
| 84 | 84 | { |
| 85 | - $object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Dashboard\Standard' ) |
|
| 86 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
| 87 | - ->setMethods( array( 'getSubClients' ) ) |
|
| 85 | + $object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Dashboard\Standard') |
|
| 86 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
| 87 | + ->setMethods(array('getSubClients')) |
|
| 88 | 88 | ->getMock(); |
| 89 | 89 | |
| 90 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
| 91 | - ->will( $this->throwException( new \Exception() ) ); |
|
| 90 | + $object->expects($this->once())->method('getSubClients') |
|
| 91 | + ->will($this->throwException(new \Exception())); |
|
| 92 | 92 | |
| 93 | - $object->setView( $this->getViewNoRender() ); |
|
| 93 | + $object->setView($this->getViewNoRender()); |
|
| 94 | 94 | |
| 95 | 95 | $object->search(); |
| 96 | 96 | } |
@@ -98,15 +98,15 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | public function testSearchMShopException() |
| 100 | 100 | { |
| 101 | - $object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Dashboard\Standard' ) |
|
| 102 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
| 103 | - ->setMethods( array( 'getSubClients' ) ) |
|
| 101 | + $object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Dashboard\Standard') |
|
| 102 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
| 103 | + ->setMethods(array('getSubClients')) |
|
| 104 | 104 | ->getMock(); |
| 105 | 105 | |
| 106 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
| 107 | - ->will( $this->throwException( new \Aimeos\MShop\Exception() ) ); |
|
| 106 | + $object->expects($this->once())->method('getSubClients') |
|
| 107 | + ->will($this->throwException(new \Aimeos\MShop\Exception())); |
|
| 108 | 108 | |
| 109 | - $object->setView( $this->getViewNoRender() ); |
|
| 109 | + $object->setView($this->getViewNoRender()); |
|
| 110 | 110 | |
| 111 | 111 | $object->search(); |
| 112 | 112 | } |
@@ -114,16 +114,16 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | public function testGetSubClient() |
| 116 | 116 | { |
| 117 | - $result = $this->object->getSubClient( 'order' ); |
|
| 118 | - $this->assertInstanceOf( '\Aimeos\Admin\JQAdm\Iface', $result ); |
|
| 117 | + $result = $this->object->getSubClient('order'); |
|
| 118 | + $this->assertInstanceOf('\Aimeos\Admin\JQAdm\Iface', $result); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | |
| 122 | 122 | protected function getViewNoRender() |
| 123 | 123 | { |
| 124 | - return $this->getMockBuilder( '\Aimeos\MW\View\Standard' ) |
|
| 125 | - ->setConstructorArgs( array( array() ) ) |
|
| 126 | - ->setMethods( array( 'render', 'config' ) ) |
|
| 124 | + return $this->getMockBuilder('\Aimeos\MW\View\Standard') |
|
| 125 | + ->setConstructorArgs(array(array())) |
|
| 126 | + ->setMethods(array('render', 'config')) |
|
| 127 | 127 | ->getMock(); |
| 128 | 128 | } |
| 129 | 129 | } |
@@ -19,42 +19,42 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $this->templatePaths = \TestHelperJqadm::getTemplatePaths(); |
| 21 | 21 | $this->context = \TestHelperJqadm::getContext(); |
| 22 | - $this->context->setView( \TestHelperJqadm::getView() ); |
|
| 22 | + $this->context->setView(\TestHelperJqadm::getView()); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | public function testCreateClient() |
| 27 | 27 | { |
| 28 | - $client = \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient( $this->context, $this->templatePaths ); |
|
| 29 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
| 28 | + $client = \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient($this->context, $this->templatePaths); |
|
| 29 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | public function testCreateClientName() |
| 34 | 34 | { |
| 35 | - $client = \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient( $this->context, $this->templatePaths, 'Standard' ); |
|
| 36 | - $this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client ); |
|
| 35 | + $client = \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient($this->context, $this->templatePaths, 'Standard'); |
|
| 36 | + $this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | public function testCreateClientNameEmpty() |
| 41 | 41 | { |
| 42 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
| 43 | - \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient( $this->context, $this->templatePaths, '' ); |
|
| 42 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
| 43 | + \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient($this->context, $this->templatePaths, ''); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 47 | public function testCreateClientNameInvalid() |
| 48 | 48 | { |
| 49 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
| 50 | - \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient( $this->context, $this->templatePaths, '%dash' ); |
|
| 49 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
| 50 | + \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient($this->context, $this->templatePaths, '%dash'); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | public function testCreateClientNameNotFound() |
| 55 | 55 | { |
| 56 | - $this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' ); |
|
| 57 | - \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient( $this->context, $this->templatePaths, 'test' ); |
|
| 56 | + $this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception'); |
|
| 57 | + \Aimeos\Admin\JQAdm\Dashboard\Factory::createClient($this->context, $this->templatePaths, 'test'); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | } |
@@ -22,48 +22,48 @@ discard block |
||
| 22 | 22 | $this->context = \TestHelperJqadm::getContext(); |
| 23 | 23 | $templatePaths = \TestHelperJqadm::getTemplatePaths(); |
| 24 | 24 | |
| 25 | - $this->object = new \Aimeos\Admin\JQAdm\Dashboard\Order\Standard( $this->context, $templatePaths ); |
|
| 26 | - $this->object->setView( $this->view ); |
|
| 25 | + $this->object = new \Aimeos\Admin\JQAdm\Dashboard\Order\Standard($this->context, $templatePaths); |
|
| 26 | + $this->object->setView($this->view); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | 30 | protected function tearDown() |
| 31 | 31 | { |
| 32 | - unset( $this->object ); |
|
| 32 | + unset($this->object); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | public function testCreate() |
| 37 | 37 | { |
| 38 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 38 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 39 | 39 | $this->object->create(); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | public function testCopy() |
| 44 | 44 | { |
| 45 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 45 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 46 | 46 | $this->object->copy(); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | |
| 50 | 50 | public function testDelete() |
| 51 | 51 | { |
| 52 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 52 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 53 | 53 | $this->object->delete(); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | public function testGet() |
| 58 | 58 | { |
| 59 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 59 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 60 | 60 | $this->object->get(); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | public function testSave() |
| 65 | 65 | { |
| 66 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 66 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 67 | 67 | $this->object->save(); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -72,13 +72,13 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $result = $this->object->search(); |
| 74 | 74 | |
| 75 | - $this->assertContains( '<div class="dashboard-order">', $result ); |
|
| 75 | + $this->assertContains('<div class="dashboard-order">', $result); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | public function testGetSubClient() |
| 80 | 80 | { |
| 81 | - $result = $this->object->getSubClient( 'paymentstatus' ); |
|
| 82 | - $this->assertInstanceOf( '\Aimeos\Admin\JQAdm\Iface', $result ); |
|
| 81 | + $result = $this->object->getSubClient('paymentstatus'); |
|
| 82 | + $this->assertInstanceOf('\Aimeos\Admin\JQAdm\Iface', $result); |
|
| 83 | 83 | } |
| 84 | 84 | } |
@@ -22,48 +22,48 @@ discard block |
||
| 22 | 22 | $this->context = \TestHelperJqadm::getContext(); |
| 23 | 23 | $templatePaths = \TestHelperJqadm::getTemplatePaths(); |
| 24 | 24 | |
| 25 | - $this->object = new \Aimeos\Admin\JQAdm\Dashboard\Order\Paymentstatus\Standard( $this->context, $templatePaths ); |
|
| 26 | - $this->object->setView( $this->view ); |
|
| 25 | + $this->object = new \Aimeos\Admin\JQAdm\Dashboard\Order\Paymentstatus\Standard($this->context, $templatePaths); |
|
| 26 | + $this->object->setView($this->view); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | 30 | protected function tearDown() |
| 31 | 31 | { |
| 32 | - unset( $this->object ); |
|
| 32 | + unset($this->object); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | public function testCreate() |
| 37 | 37 | { |
| 38 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 38 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 39 | 39 | $this->object->create(); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | public function testCopy() |
| 44 | 44 | { |
| 45 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 45 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 46 | 46 | $this->object->copy(); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | |
| 50 | 50 | public function testDelete() |
| 51 | 51 | { |
| 52 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 52 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 53 | 53 | $this->object->delete(); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | public function testGet() |
| 58 | 58 | { |
| 59 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 59 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 60 | 60 | $this->object->get(); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | public function testSave() |
| 65 | 65 | { |
| 66 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 66 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 67 | 67 | $this->object->save(); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -72,21 +72,21 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $result = $this->object->search(); |
| 74 | 74 | |
| 75 | - $this->assertContains( '<div class="order-paymentstatus', $result ); |
|
| 75 | + $this->assertContains('<div class="order-paymentstatus', $result); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | public function testSearchException() |
| 80 | 80 | { |
| 81 | - $object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Dashboard\Standard' ) |
|
| 82 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
| 83 | - ->setMethods( array( 'getSubClients' ) ) |
|
| 81 | + $object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Dashboard\Standard') |
|
| 82 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
| 83 | + ->setMethods(array('getSubClients')) |
|
| 84 | 84 | ->getMock(); |
| 85 | 85 | |
| 86 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
| 87 | - ->will( $this->throwException( new \Exception() ) ); |
|
| 86 | + $object->expects($this->once())->method('getSubClients') |
|
| 87 | + ->will($this->throwException(new \Exception())); |
|
| 88 | 88 | |
| 89 | - $object->setView( $this->getViewNoRender() ); |
|
| 89 | + $object->setView($this->getViewNoRender()); |
|
| 90 | 90 | |
| 91 | 91 | $object->search(); |
| 92 | 92 | } |
@@ -94,15 +94,15 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | public function testSearchMShopException() |
| 96 | 96 | { |
| 97 | - $object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Dashboard\Standard' ) |
|
| 98 | - ->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) ) |
|
| 99 | - ->setMethods( array( 'getSubClients' ) ) |
|
| 97 | + $object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Dashboard\Standard') |
|
| 98 | + ->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths())) |
|
| 99 | + ->setMethods(array('getSubClients')) |
|
| 100 | 100 | ->getMock(); |
| 101 | 101 | |
| 102 | - $object->expects( $this->once() )->method( 'getSubClients' ) |
|
| 103 | - ->will( $this->throwException( new \Aimeos\MShop\Exception() ) ); |
|
| 102 | + $object->expects($this->once())->method('getSubClients') |
|
| 103 | + ->will($this->throwException(new \Aimeos\MShop\Exception())); |
|
| 104 | 104 | |
| 105 | - $object->setView( $this->getViewNoRender() ); |
|
| 105 | + $object->setView($this->getViewNoRender()); |
|
| 106 | 106 | |
| 107 | 107 | $object->search(); |
| 108 | 108 | } |
@@ -110,16 +110,16 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | public function testGetSubClient() |
| 112 | 112 | { |
| 113 | - $this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' ); |
|
| 114 | - $this->object->getSubClient( 'invalid' ); |
|
| 113 | + $this->setExpectedException('\Aimeos\Admin\JQAdm\Exception'); |
|
| 114 | + $this->object->getSubClient('invalid'); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | |
| 118 | 118 | protected function getViewNoRender() |
| 119 | 119 | { |
| 120 | - return $this->getMockBuilder( '\Aimeos\MW\View\Standard' ) |
|
| 121 | - ->setConstructorArgs( array( array() ) ) |
|
| 122 | - ->setMethods( array( 'render', 'config' ) ) |
|
| 120 | + return $this->getMockBuilder('\Aimeos\MW\View\Standard') |
|
| 121 | + ->setConstructorArgs(array(array())) |
|
| 122 | + ->setMethods(array('render', 'config')) |
|
| 123 | 123 | ->getMock(); |
| 124 | 124 | } |
| 125 | 125 | } |