Skip to content

Commit 207da59

Browse files
author
Ian Daszkowski
committed
MAGETWO-38383: Increase Unit Test Code Coverage
-Added comment to explain why a built-in PHP function was overwritten.
1 parent 0a6b86e commit 207da59

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

setup/src/Magento/Setup/Test/Unit/Fixtures/FixtureModelTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ public function testGetValue()
103103

104104
namespace Magento\Setup\Fixtures;
105105

106+
/**
107+
* Overriding the built-in PHP function since it cannot be mocked->
108+
*
109+
* The method is used in FixtureModel. loadConfig in an if statement. By overriding this method we are able to test
110+
* both of the possible cases based on the return value of is_readable.
111+
*
112+
* @param $filename
113+
* @return bool
114+
*/
106115
function is_readable($filename)
107116
{
108117
if (strpos($filename, 'exception') !== false) {

0 commit comments

Comments
 (0)