Skip to content

Commit

Permalink
update: fix NS, module registration, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Afanasiev committed Oct 2, 2017
1 parent 77a1035 commit f78032a
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 41 deletions.
4 changes: 2 additions & 2 deletions Model/Currency/Import/AbstractDto.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import;

/**
* Class AbstractDto
*
* @package OxCom\CurrencyServices\Model\Currency\Import
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import
*/
abstract class AbstractDto
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Currency/Import/AbstractSource.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import;

/**
* Class AbstractSource
*
* @package OxCom\CurrencyServices\Model\Currency\Import
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import
*/
abstract class AbstractSource extends \Magento\Directory\Model\Currency\Import\AbstractImport
{
Expand Down
6 changes: 3 additions & 3 deletions Model/Currency/Import/Ecb.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import;

use OxCom\CurrencyServices\Model\Currency\Import\Ecb\Rates;
use OxCom\MagentoCurrencyServices\Model\Currency\Import\Ecb\Rates;

/**
* Class Ecb
*
* @package OxCom\CurrencyServices\Model\Currency\Import
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import
*/
class Ecb extends AbstractSource
{
Expand Down
6 changes: 3 additions & 3 deletions Model/Currency/Import/Ecb/Rates.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import\Ecb;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import\Ecb;

use OxCom\CurrencyServices\Model\Currency\Import\AbstractDto;
use OxCom\MagentoCurrencyServices\Model\Currency\Import\AbstractDto;

/**
* Class Rates
*
* @package OxCom\CurrencyServices\Model\Currency\Import\Ecb
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import\Ecb
*/
class Rates extends AbstractDto
{
Expand Down
6 changes: 3 additions & 3 deletions Model/Currency/Import/Fixer.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import;

use OxCom\CurrencyServices\Model\Currency\Import\Fixer\Rates;
use OxCom\MagentoCurrencyServices\Model\Currency\Import\Fixer\Rates;

/**
* Class Fixer
*
* @package OxCom\CurrencyServices\Model\Currency\Import
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import
*/
class Fixer extends AbstractSource
{
Expand Down
6 changes: 3 additions & 3 deletions Model/Currency/Import/Fixer/Rates.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import\Fixer;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import\Fixer;

use OxCom\CurrencyServices\Model\Currency\Import\AbstractDto;
use OxCom\MagentoCurrencyServices\Model\Currency\Import\AbstractDto;

/**
* Class Rates
*
* @package OxCom\CurrencyServices\Model\Currency\Import\Fixer
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import\Fixer
*/
class Rates extends AbstractDto
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Currency/Import/Google.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import;

/**
* Class Google
*
* @package OxCom\CurrencyServices\Model\Currency\Import
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import
*/
class Google extends AbstractSource
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Currency/Import/Yahoo.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace OxCom\CurrencyServices\Model\Currency\Import;
namespace OxCom\MagentoCurrencyServices\Model\Currency\Import;

/**
* Class Yahoo
*
* @package OxCom\CurrencyServices\Model\Currency\Import
* @package OxCom\MagentoCurrencyServices\Model\Currency\Import
*/
class Yahoo extends AbstractSource
{
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ This is a module that allows to update currency rates from addition external sou
4. [Fixer](http://fixer.io/)

## Install
N/A
```bash
$ composer require oxcom/magento-currency-services
$ bin/magento module:enable OxCom_MagentoCurrencyServices
$ bin/magento setup:upgrade
$ php bin/magento setup:di:compile
```

## Tests
Test will be performed on real sources, so internet connection is required.

```bash
$ composer install
$ vendor/bin/phpunit -c tests/phpunit.xml
$ vendor/bin/phpunit -c Test/phpunit.xml
```

## Thanks
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace OxCom\CurrencyServices\Test\Model;
namespace OxCom\MagentoCurrencyServices\Test\Model;

use PHPUnit\Framework\TestCase;

/**
* Class AbstractTestCase
*
* @package OxCom\CurrencyServices\Test\Model
* @package OxCom\MagentoCurrencyServices\Test\Model
*/
abstract class AbstractTestCase extends TestCase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace OxCom\CurrencyServices\Test\Model\Currency\Import;
namespace OxCom\MagentoCurrencyServices\Test\Model\Currency\Import;

use OxCom\CurrencyServices\Test\Model\AbstractTestCase;
use OxCom\MagentoCurrencyServices\Test\Model\AbstractTestCase;

/**
* Class GoogleTest
*
* @package OxCom\CurrencyServices\Test\Model\Currency\Import
* @package OxCom\MagentoCurrencyServices\Test\Model\Currency\Import
*/
class SourceTest extends AbstractTestCase
{
Expand All @@ -20,7 +20,7 @@ class SourceTest extends AbstractTestCase
*/
public function testSources($sourceClass)
{
/** @var \OxCom\CurrencyServices\Model\Currency\Import\Google $source */
/** @var \OxCom\MagentoCurrencyServices\Model\Currency\Import\Google $source */
$source = $this->om->getObject($sourceClass);

$method = new \ReflectionMethod($source, '_convert');
Expand All @@ -41,10 +41,10 @@ public function testSources($sourceClass)
public function generateSource()
{
return [
[\OxCom\CurrencyServices\Model\Currency\Import\Google::class],
[\OxCom\CurrencyServices\Model\Currency\Import\Yahoo::class],
[\OxCom\CurrencyServices\Model\Currency\Import\Fixer::class],
[\OxCom\CurrencyServices\Model\Currency\Import\Ecb::class],
[\OxCom\MagentoCurrencyServices\Model\Currency\Import\Google::class],
[\OxCom\MagentoCurrencyServices\Model\Currency\Import\Yahoo::class],
[\OxCom\MagentoCurrencyServices\Model\Currency\Import\Fixer::class],
[\OxCom\MagentoCurrencyServices\Model\Currency\Import\Ecb::class],
];
}
}
File renamed without changes.
File renamed without changes.
9 changes: 1 addition & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"autoload-dev": {
"classmap": [
"tests/Model"
"Test/Model"
]
},
"authors": [
Expand All @@ -45,13 +45,6 @@
"email": "[email protected]"
}
],
"scripts": {
"test": [
"composer install",
"./vendor/bin/phpcs --standard=psr2 src/ tests/ZendTwig/ tests/Fixture/",
"./vendor/bin/phpunit -c tests/"
]
},
"repositories": [
{
"type": "composer",
Expand Down
2 changes: 1 addition & 1 deletion registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'OxCOm_MagentoCurrencyServices',
'OxCom_MagentoCurrencyServices',
__DIR__
);

0 comments on commit f78032a

Please sign in to comment.