Skip to content

Commit

Permalink
MAGETWO-32870: [GITHUB] extra tests for current interception behavior #…
Browse files Browse the repository at this point in the history
…965

- Suppress warnings for test fixtures
  • Loading branch information
otoolec committed Jan 26, 2015
1 parent 6fe0138 commit 5ed5b22
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,41 @@ public function K($param1)
return '<K>' . $param1 . '</K>';
}

/**
* @SuppressWarnings(PHPMD.ShortMethodName)
*/
public function V($param1)
{
return '<V>' . $param1 . '</V>';
}

/**
* @SuppressWarnings(PHPMD.ShortMethodName)
*/
public function W($param1)
{
return '<W>' . $param1 . '</W>';
}

/**
* @SuppressWarnings(PHPMD.ShortMethodName)
*/
public function X($param1)
{
return '<X>' . $param1 . '</X>';
}

/**
* @SuppressWarnings(PHPMD.ShortMethodName)
*/
public function Y($param1)
{
return '<Y>' . $param1 . '</Y>';
}

/**
* @SuppressWarnings(PHPMD.ShortMethodName)
*/
public function Z($param1)
{
return '<Z>' . $param1 . '</Z>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,73 +14,115 @@ class FirstPlugin
*/
protected $_counter = 0;

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundC(Intercepted $subject, \Closure $next, $param1)
{
return '<F:C>' . $next($param1) . '</F:C>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundD(Intercepted $subject, \Closure $next, $param1)
{
$this->_counter++;
return '<F:D>' . $this->_counter . ': ' . $next($param1) . '</F:D>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundK(Intercepted $subject, \Closure $next, $param1)
{
$result = $subject->C($param1);
return '<F:K>' . $subject->F($result) . '</F:K>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeG(Intercepted $subject, $param1)
{
return ['<F:bG>' . $param1 . '</F:bG>'];
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundG(Intercepted $subject, \Closure $next, $param1)
{
return $next('<F:G>' . $param1 . '</F:G>');
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function afterG(Intercepted $subject, $result)
{
return '<F:aG>' . $result . '</F:aG>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeV(Intercepted $subject, $param1)
{
return ['<F:bV/>'];
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundV(Intercepted $subject, \Closure $next, $param1)
{
return '<F:V>' . $param1 . '<F:V/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeW(Intercepted $subject, $param1)
{
return ['<F:bW/>'];
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundW(Intercepted $subject, \Closure $next, $param1)
{
return '<F:W>' . $param1 . '<F:W/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function afterW(Intercepted $subject, $result)
{
return '<F:aW/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeX(Intercepted $subject, $param1)
{
return ['<F:bX/>'];
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundY(Intercepted $subject, \Closure $next, $param1)
{
return '<F:Y>' . $param1 . '<F:Y/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function afterZ(Intercepted $subject, $result)
{
return '<F:aZ/>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,41 +65,65 @@ public function afterG(Intercepted $subject, $result)
return '<P:aG>' . $result . '</P:aG>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeV(Intercepted $subject, $param1)
{
return ['<P:bV/>'];
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundV(Intercepted $subject, \Closure $next, $param1)
{
return '<P:V>' . $param1 . '<P:V/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeW(Intercepted $subject, $param1)
{
return ['<P:bW/>'];
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundW(Intercepted $subject, \Closure $next, $param1)
{
return '<P:W>' . $param1 . '<P:W/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function afterW(Intercepted $subject, $result)
{
return '<P:aW/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function beforeX(Intercepted $subject, $param1)
{
return ['<P:bX/>'];
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function aroundY(Intercepted $subject, \Closure $next, $param1)
{
return '<P:Y>' . $param1 . '<P:Y/>';
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function afterZ(Intercepted $subject, $result)
{
return '<P:aZ/>';
Expand Down

0 comments on commit 5ed5b22

Please sign in to comment.