Cyrill Schumacher asked in a tweet
Ur change to add abstract protected fnc exec() conflicts with the Plugin System or am I missing smthng?
This is about the protected visiblity of the method \Magento\Framework\App\Action\Action::execute().
| #!/bin/bash | |
| FOLDER=example | |
| DB_NAME=magento2 | |
| DB_USER=m2 | |
| DB_PWD=wiener | |
| BASE_URL=http://example.dev/ | |
| composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $FOLDER |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" | |
| colors="true" | |
| bootstrap="./framework/bootstrap.php" | |
| > | |
| <!-- Test suites definition --> | |
| <testsuites> | |
| <!-- Memory tests run first to prevent influence of other tests on accuracy of memory measurements --> | |
| <testsuite name="Memory Usage Tests"> |
| <?xml version="1.0"?> | |
| <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> | |
| <acl> | |
| <resources> | |
| <resource id="Magento_Backend::admin"> | |
| </resource> | |
| </resources> | |
| </acl> | |
| </config> |
| #!/usr/bin/env bash | |
| ######################################################## | |
| declare -a workers=(commandConsumer.php eventConsumer.php) | |
| ######################################################## | |
| function main() { | |
| init_vars |
| <?php | |
| declare(strict_types = 1); | |
| namespace Training5\VendorRepository\Controller\Test; | |
| use Magento\Catalog\Api\Data\ProductInterface; | |
| use Magento\Catalog\Api\ProductRepositoryInterface; | |
| use Magento\Framework\Api\Filter; | |
| use Magento\Framework\Api\FilterBuilder; |
| <?php | |
| class Magento_IntegrationTest_Config extends Mage_Core_Model_Config | |
| { | |
| private $modelTestDoubles = []; | |
| private $resourceModelTestDoubles = []; | |
| public function setModelTestDouble($modelClass, $testDouble) | |
| { |
Cyrill Schumacher asked in a tweet
Ur change to add abstract protected fnc exec() conflicts with the Plugin System or am I missing smthng?
This is about the protected visiblity of the method \Magento\Framework\App\Action\Action::execute().
| #/bin/bash | |
| CODING_STANDARD_DIR="../Coding-Standards/Ecg" | |
| [ ! -e "$CODING_STANDARD_DIR" ] && git clone https://github.com/magento-ecg/coding-standard.git "$CODING_STANDARD_DIR" | |
| phpcs --standard="$CODING_STANDARD_DIR/ruleset.xml" "$1" |
| class MockTraitMethodTest extends \PHPUnit_Framework_TestCase | |
| { | |
| public function testTraitMock() | |
| { | |
| // Inspect getMockForTrait signature for what the other arguments do. | |
| $methodsToMock = ['getBar']; | |
| $mockTrait = $this->getMockForTrait('\Example\Foo', [], '', true, true, true, $methodsToMock); | |
| $mockTrait->expects($this->any()) | |
| ->method('getBar') | |
| ->willReturn('buz'); |
| # I want to change the configured sample data name for a given magento package. | |
| # | |
| # (Alternatively I would like to change the source URL for a sample data package.) | |
| # | |
| # The following does not work as I intend it to. | |
| # It adds a new record to the $this->commandConfig['magento-packages'] | |
| # array instead of overwriting the extra sample-data value. | |
| # | |
| # Can this be done? |