-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring + Documentation to prepare for Github release
- Loading branch information
Showing
14 changed files
with
224 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.settings | ||
composer.lock | ||
/vendor | ||
/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
language: php | ||
|
||
php: | ||
- 7.0 | ||
- 5.6 | ||
|
||
before_install: | ||
- pecl install xdebug | ||
- phpenv rehash | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
|
||
before_script: | ||
- composer selfupdate | ||
|
||
script: | ||
- composer install | ||
- vendor/bin/phpunit -c phpunit.xml | ||
- vendor/bin/phpcs -n --report-full --extensions=php --standard=phpcs.xml src | ||
- vendor/bin/phpcpd src | ||
- vendor/bin/phpmd src text phpmd.xml --ignore-violations-on-exit | ||
- php ocular.phar code-coverage:upload --format=php-clover $TRAVIS_BUILD_DIR/target/reports/unit/clover.xml | ||
|
||
notifications: | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Version 1.0.0-alpha1 | ||
|
||
## Bugfixes | ||
|
||
* None | ||
|
||
## Features | ||
|
||
* Refactoring + Documentation to prepare for Github release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# M2IF - EE Product Import | ||
|
||
[](https://packagist.org/packages/techdivision/import-product-ee) | ||
[](https://packagist.org/packages/techdivision/import-product-ee) | ||
[](https://packagist.org/packages/techdivision/import-product-ee) | ||
[](http://travis-ci.org/techdivision/import-product-ee) | ||
[](https://scrutinizer-ci.com/g/techdivision/import-product-ee/?branch=master) [](https://scrutinizer-ci.com/g/techdivision/import-product-ee/?branch=master) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
{ | ||
"name" : "techdivision/import-product-ee", | ||
"description" : "A library supporting generic Magento 2 import functionality", | ||
"description" : "M2IF library providing basic Magento 2 EE product import functionality", | ||
"minimum-stability" : "alpha", | ||
"license" : "OSL-3", | ||
"require" : { | ||
"techdivision/import" : "0.6.*", | ||
"techdivision/import-product" : "0.1.*" | ||
"techdivision/import-product" : "~1.0" | ||
}, | ||
"require-dev" : { | ||
"phpmd/phpmd" : "2.5.*", | ||
"phploc/phploc" : "2.0.*", | ||
"pdepend/pdepend" : "2.0.*", | ||
"phpunit/phpunit" : "4.4.*", | ||
"sebastian/phpcpd" : "2.0.*", | ||
"squizlabs/php_codesniffer" : "2.2.*", | ||
"phpdocumentor/phpdocumentor" : "2.8.*" | ||
}, | ||
"authors" : [{ | ||
"name" : "Tim Wagner", | ||
"email" : "[email protected]" | ||
"email" : "[email protected]" | ||
} | ||
], | ||
"autoload" : { | ||
"psr-4" : { | ||
"TechDivision\\Import\\Product\\Ee\\" : [ "src/", "tests/" ] | ||
"TechDivision\\Import\\Product\\Ee\\" : [ | ||
"src/", | ||
"tests/" | ||
] | ||
} | ||
}, | ||
"repositories" : [{ | ||
"type" : "git", | ||
"url" : "https://gitlab.tdintern.de/wagnert/techdivision-import.git", | ||
"name" : "techdivision/import" | ||
}, | ||
{ | ||
"type" : "git", | ||
"url" : "https://gitlab.tdintern.de/wagnert/techdivision-import-product.git", | ||
"name" : "techdivision/import-product" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="techdivision/import-product-ee"> | ||
|
||
<!-- | ||
The TechDivision GmbH coding standard is using a mix of PSR-2 | ||
coding conventions and PEAR doc-block commenting rules. | ||
--> | ||
<description>TechDivision GmbH coding standard</description> | ||
|
||
<!-- Define global exclude patterns --> | ||
<exclude-pattern>*/doc/*</exclude-pattern> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
<exclude-pattern>*/target/*</exclude-pattern> | ||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
|
||
<!-- Mainly use PSR2 coding standard --> | ||
<rule ref="PSR2"/> | ||
|
||
<!-- Include commenting sniffs from PEAR standard --> | ||
<rule ref="PEAR.Commenting.FunctionComment"/> | ||
<rule ref="PEAR.Commenting.InlineComment"/> | ||
|
||
<!-- Include generic commenting sniffs --> | ||
<rule ref="Generic.Commenting.Fixme"/> | ||
<rule ref="Generic.Commenting.Todo"/> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="techdivision/import-product-ee PHPMD rule set" | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 | ||
http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:noNamespaceSchemaLocation=" | ||
http://pmd.sf.net/ruleset_xml_schema.xsd"> | ||
<description> | ||
TechDivision GmbH default PHPMD rule set | ||
</description> | ||
|
||
<rule ref="rulesets/unusedcode.xml" /> | ||
<rule ref="rulesets/codesize.xml" /> | ||
|
||
<!-- Define global exclude patterns --> | ||
<exclude-pattern>*/doc/*</exclude-pattern> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
<exclude-pattern>*/target/*</exclude-pattern> | ||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<phpunit> | ||
<testsuites> | ||
<testsuite name="techdivision/import-product-ee PHPUnit testsuite"> | ||
<directory suffix="Test.php">tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src</directory> | ||
<exclude> | ||
<directory prefix="Mock">src</directory> | ||
<directory suffix="Test.php">src</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log type="coverage-html" target="target/reports/unit/coverage" /> | ||
<log type="coverage-clover" target="target/reports/unit/clover.xml" /> | ||
<log type="junit" target="target/reports/unit/junit.xml" logIncompleteSkipped="false" /> | ||
</logging> | ||
<php> | ||
<ini name="date.timezone" value="Europe/Berlin" /> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,4 +147,4 @@ private function __clone() | |
value | ||
) | ||
VALUES (?, ?, ?, ?)'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
/** | ||
* TechDivision\Import\Product\Ee\Actions\SequenceProductActionTest | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @author Tim Wagner <[email protected]> | ||
* @copyright 2016 TechDivision GmbH <[email protected]> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/techdivision/import-product-media | ||
* @link http://www.techdivision.com | ||
*/ | ||
|
||
namespace TechDivision\Import\Product\Ee\Actions; | ||
|
||
/** | ||
* Test class for the sequence product action implementation. | ||
* | ||
* @author Tim Wagner <[email protected]> | ||
* @copyright 2016 TechDivision GmbH <[email protected]> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/techdivision/import-product-media | ||
* @link http://www.techdivision.com | ||
*/ | ||
class SequenceProductActionTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
/** | ||
* Test's the persist() method successfull. | ||
* | ||
* @return void | ||
*/ | ||
public function testPersistWithSuccess() | ||
{ | ||
|
||
// create a persist processor mock instance | ||
$mockPersistProcessor = $this->getMockBuilder($processorInterface = 'TechDivision\Import\Actions\Processors\ProcessorInterface') | ||
->setMethods(get_class_methods($processorInterface)) | ||
->getMock(); | ||
$mockPersistProcessor->expects($this->once()) | ||
->method('execute') | ||
->with($row = array()) | ||
->willReturn(null); | ||
|
||
// create a mock for the sequence product action | ||
$mockAction = $this->getMockBuilder('TechDivision\Import\Product\Ee\Actions\SequenceProductAction') | ||
->setMethods(array('getPersistProcessor')) | ||
->getMock(); | ||
$mockAction->expects($this->once()) | ||
->method('getPersistProcessor') | ||
->willReturn($mockPersistProcessor); | ||
|
||
// test the persist() method | ||
$this->assertNull($mockAction->persist($row)); | ||
} | ||
} |