@@ 93-106 (lines=14) @@ | ||
90 | $scanner->scan($this->invalidDirPath); |
|
91 | } |
|
92 | ||
93 | public function testCanProbePathAndGenerateArrayOfContent() |
|
94 | { |
|
95 | $scanner = new Scanner(new JsonResponse()); |
|
96 | $output = []; |
|
97 | ||
98 | $this->callProtectedMethod($scanner, 'probe', [ |
|
99 | $this->sampleDirPath, |
|
100 | &$output, |
|
101 | ]); |
|
102 | ||
103 | // Verifying that a valid array is returned by checking |
|
104 | // Orchestrate a better way to verify this array. |
|
105 | $this->assertTrue(isset($output['sample-path']['child-item']['grand-child']['child-file.md'])); |
|
106 | } |
|
107 | ||
108 | public static function callProtectedMethod($object, $method, array $args = []) |
|
109 | { |
|
@@ 139-149 (lines=11) @@ | ||
136 | ]); |
|
137 | } |
|
138 | ||
139 | public function testCanGetScannedContentFromJsonFile() |
|
140 | { |
|
141 | $scanner = new Scanner(new JsonResponse()); |
|
142 | $scannedArray = $this->callProtectedMethod($scanner, 'getScannedContent', [ |
|
143 | $this->sampleJson, |
|
144 | ]); |
|
145 | ||
146 | // Verifying that a valid array is returned by checking |
|
147 | // Orchestrate a better way to verify this array. |
|
148 | $this->assertTrue(isset($scannedArray['sample-path']['child-item']['grand-child']['child-file.md'])); |
|
149 | } |
|
150 | ||
151 | /** |
|
152 | * Remove unnecessary files/directories |