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()
.
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'); |
#/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" |
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()
.
<?php | |
class Magento_IntegrationTest_Config extends Mage_Core_Model_Config | |
{ | |
private $modelTestDoubles = []; | |
private $resourceModelTestDoubles = []; | |
public function setModelTestDouble($modelClass, $testDouble) | |
{ |
<?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; |
#!/usr/bin/env bash | |
######################################################## | |
declare -a workers=(commandConsumer.php eventConsumer.php) | |
######################################################## | |
function main() { | |
init_vars |
<?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> |
<?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"> |
#!/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 |
#!/usr/bin/env bash | |
function assert_array_same { | |
if [ "${expected[*]}" != "${actual[*]}" ]; then | |
echo -e "\nFailed $1\nExpected: ${expected[*]}\nActual: ${actual[*]}" && exit 1 | |
else | |
echo -en "." | |
fi | |
} |