Skip to content

Commit

Permalink
switched the CI test over to checking the new data files
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcal committed Apr 18, 2016
1 parent 631200b commit 01f808b
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions test.php
@@ -1,9 +1,20 @@
<?php
$num_files = 0;
$num_entries = 0;

$data = yaml_parse_file('providers.yml');
$dh = opendir('providers');
while (($file = readdir($dh)) !== false){
if (preg_match('!\.yml$!', $file)){
$partial = yaml_parse_file("providers/$file");
if (!$partial || !is_array($partial)){
echo "Unable to parse provider file providers/$file\n";
exit(1);
}

if (!$data) {
exit(1);
} else {
exit(0);
}
$num_files++;
$num_entries += count($partial);
}
}

echo "Loaded $num_files provider files, containing $num_entries entries\n";
exit(0);

0 comments on commit 01f808b

Please sign in to comment.