Skip to content

Commit 66010dd

Browse files
committed
Test coverage for nullable methods
1 parent f6181ca commit 66010dd

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TInterceptor.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ class Interceptor extends \Magento\Framework\Interception\Code\Generator\TSample
2525
}
2626
}
2727

28+
/**
29+
* {@inheritdoc}
30+
*/
31+
public function getNullableValue() : ?string
32+
{
33+
$pluginInfo = $this->pluginList->getNext($this->subjectType, 'getNullableValue');
34+
if (!$pluginInfo) {
35+
return parent::getNullableValue();
36+
} else {
37+
return $this->___callPlugins('getNullableValue', func_get_args(), $pluginInfo);
38+
}
39+
}
40+
2841
/**
2942
* {@inheritdoc}
3043
*/

lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ public function returnVoid() : void
1515
// Nothing to do here
1616
}
1717

18+
public function getNullableValue() : ?string
19+
{
20+
return null;
21+
}
22+
1823
public function getValue() : string
1924
{
2025
return $this->value;

0 commit comments

Comments
 (0)