Skip to content

Commit

Permalink
MSI #206 - Added blacklist and description
Browse files Browse the repository at this point in the history
  • Loading branch information
DwayneH committed Nov 18, 2017
1 parent 6bd6d29 commit 667e7d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,18 @@ public function testCopyPaste()
);
}

/**
* Tests whitelisted files for strict type declarations.
*/
public function testStrictTypes()
{
$filesMissingStrictTyping = [];
$toBeTestedFiles = array_diff(
self::getWhitelist(['php'], '', '', '/_files/whitelist/strict_type.txt'),
Files::init()->readLists(self::getBaseFilesFolder() . '/_files/blacklist/strict_type.txt')
);

foreach (self::getWhitelist(['php'], '', '', '/_files/whitelist/strict_type.txt') as $fileName) {
$filesMissingStrictTyping = [];
foreach ($toBeTestedFiles as $fileName) {
$file = file_get_contents($fileName);
if (strstr($file, 'strict_types=1') === false) {
$filesMissingStrictTyping[] = $fileName;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Format: <componentType=module|library|theme|language|*> <componentName> <globPattern> or simply <globPattern>

0 comments on commit 667e7d1

Please sign in to comment.