From c1a1347ce19b1b8a332c65789f6e6fc6051a5281 Mon Sep 17 00:00:00 2001 From: Johannes Ackermann Date: Fri, 9 Jul 2021 10:22:25 +0200 Subject: [PATCH] Changed the ID, renewed instructions --- LICENSE | 2 +- Model/PaymentList.php | 5 ++-- README.MD | 34 ++++++++++++++++------------ Tests/Unit/Model/PaymentListTest.php | 5 +++- composer.json | 5 ++-- metadata.php | 6 ++--- 6 files changed, 33 insertions(+), 24 deletions(-) diff --git a/LICENSE b/LICENSE index 8105048..f6953f6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 oxid-academy +Copyright (c) 2019-2021 oxid-academy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Model/PaymentList.php b/Model/PaymentList.php index f897026..1035705 100644 --- a/Model/PaymentList.php +++ b/Model/PaymentList.php @@ -9,7 +9,7 @@ * * @author OXID Academy * @link https://www.oxid-esales.com - * @copyright (C) OXID eSales AG 2003-2019 + * @copyright (C) OXID eSales AG 2003-2021 * * User: michael * Date: 23.04.19 @@ -37,6 +37,7 @@ class PaymentList extends PaymentList_parent */ public function getPaymentList($shipSetId, $price, $user = null) { - + // @Todo: Replace this. + return parent::getPaymentList(shipSetId, price, user); } } diff --git a/README.MD b/README.MD index 1607624..173b3a6 100644 --- a/README.MD +++ b/README.MD @@ -1,13 +1,13 @@ # OXID Academy: Exercise extensions (Skeleton) -This package contains a module skeleton for training purposes at OXID Academy. +This package contains an example module intended for training purposes at OXID Academy. -## Installation instructions +# Installation instructions -### Register and require the package +## Register and require the package -In the local development environment, cd into the root directory of your compilation -and run Composer as follows: +In the local development environment, cd into the root directory of your compilation (where composer.json and composer.lock +are located) and run Composer as shown below: ``` composer config repositories.oxid-academy/feefreepayments vcs https://github.com/oxid-academy/feefreepayments.git @@ -15,18 +15,18 @@ composer config repositories.oxid-academy/feefreepayments vcs https://github.com This should result in the following change to `composer.json`: ``` -... + ... "repositories": { - ..., "oxid-academy/feefreepayments": { "type": "vcs", "url": "https://github.com/oxid-academy/feefreepayments.git" - } + }, + ... }, ... ``` -And then, ... +... which results in something like: ``` composer require oxid-academy/feefreepayments ``` @@ -39,12 +39,18 @@ composer require oxid-academy/feefreepayments }, ``` -## Build compilation +# Enabling the module -Now, run Composer to build the compilation: +* When Composer is done processing your new request, you may enable the module: ``` -composer update +vendor/bin/oe-console o:m:activate oxacfeefreepayments ``` -## Running tests -`./vendor/bin/runtests /var/www/oxideshop/source/modules/oxac/feefreepayments/Tests/` +# Running tests +cd into the root dir of your compilation and run the following command whereupon `/var/www/oxideshop` represents the absolute +path to your compilation: + +``` +cd /var/www/oxideshop/ +./vendor/bin/runtests /var/www/oxideshop/source/modules/oxac/feefreepayments/Tests/ +``` diff --git a/Tests/Unit/Model/PaymentListTest.php b/Tests/Unit/Model/PaymentListTest.php index 401370d..9b1f9d5 100644 --- a/Tests/Unit/Model/PaymentListTest.php +++ b/Tests/Unit/Model/PaymentListTest.php @@ -9,7 +9,7 @@ * * @author OXID Academy * @link https://www.oxid-esales.com - * @copyright (C) OXID eSales AG 2003-2019 + * @copyright (C) OXID eSales AG 2003-2021 * * User: michael * Date: 24.04.19 @@ -50,6 +50,9 @@ protected function tearDown() } + /** + * Create payment option, assign to delivery set, then test with user. + */ public function testGetPaymentListFiltersOnlyPaymentsWithFees() { diff --git a/composer.json b/composer.json index 5cfd9cf..5214614 100644 --- a/composer.json +++ b/composer.json @@ -13,13 +13,12 @@ "target-directory": "oxac/feefreepayments" } }, - "version": "1.0.2", "require": { - "php": ">=7.1" + "oxid-esales/oxideshop-metapackage-ce": ">=6.1.0" }, "autoload": { "psr-4": { - "OxidAcademy\\FeeFreePayments\\": "../../../source/modules/oxac/feefreepayments" + "OxidAcademy\\FeeFreePayments\\": "." } } } diff --git a/metadata.php b/metadata.php index 488f31b..14d5118 100644 --- a/metadata.php +++ b/metadata.php @@ -9,7 +9,7 @@ * * @author OXID Academy * @link https://www.oxid-esales.com - * @copyright (C) OXID eSales AG 2003-2019 + * @copyright (C) OXID eSales AG 2003-2021 * */ @@ -22,7 +22,7 @@ * Module information */ $aModule = [ - 'id' => 'oxac/feefreepayments', + 'id' => 'oxacfeefreepayments', 'title' => [ 'de' => 'Kostenlose Zahlungsarten (Modulskelett)', 'en' => 'Fee Free Payments (module skeleton)' @@ -32,7 +32,7 @@ 'en' => 'Filter for displaying free payment options only.', ], 'thumbnail' => 'logo.png', - 'version' => '1.0.2', + 'version' => '2.0.0', 'author' => 'OXID Academy', 'url' => 'https://www.oxid-esales.com/oxid-welt/academy/schulungen/', 'email' => 'academy@oxid-esales.com',