N98\Magento\Command\System\Setup\IncrementalCommandStub::callProtectedMethodFromObject PHP Method

callProtectedMethodFromObject() public method

public callProtectedMethodFromObject ( string $method, object | string $object, array $args = [] ) : mixed
$method string
$object object | string
$args array
return mixed
    public function callProtectedMethodFromObject($method, $object, $args = array())
    {
        return $this->_callProtectedMethodFromObject($method, $object, $args);
    }

Usage Example

 /**
  * @test
  * @link https://github.com/netz98/n98-magerun/pull/747
  */
 public function regression747()
 {
     $stub = new IncrementalCommandStub();
     $actual = $stub->callProtectedMethodFromObject('protectedMethod', $this, array("fooBar"));
     $this->assertSame('barBaz', $actual);
 }