Skip to content

Commit

Permalink
fixed paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ppazos committed Mar 22, 2024
1 parent bbc50cd commit 8b9cc5c
Show file tree
Hide file tree
Showing 10 changed files with 547 additions and 22 deletions.
5 changes: 2 additions & 3 deletions cli.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php

$_BASE = __DIR__ . '/';

// composer includes
require __DIR__ . '/vendor/autoload.php';

$PHP_TEST_BASE = __DIR__;

//print_r($argv);
//print_r($argc);
Expand All @@ -18,7 +17,7 @@
* argv[5] -> -output="./output/out.html" (optional), if no path is specified it will be saved in the root
* */

$output = './';
$output = '.'. DIRECTORY_SEPARATOR;
$report = 'html';
$output_index = 0;
$report_index = 0;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"homepage": "https://github.com/ppazos/PhTest",
"license": "Apache-2.0",
"version": "0.7.1",
"version": "0.7.2",
"repositories": [
{
"type": "vcs",
Expand Down
7 changes: 4 additions & 3 deletions src/PhTestRun.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public function render_reports_html($path)
'menu_items' => $menu_items
]);

if ($path == './')
if ($path == '.'. DIRECTORY_SEPARATOR)
{
$path = 'test_report.html';
}
Expand Down Expand Up @@ -763,7 +763,8 @@ public function get_badge($item, $total_cases_failed, $total_cases_successful)
}
public static function template_email()
{
global $_BASE;
return new \League\Plates\Engine($_BASE . 'views'. DIRECTORY_SEPARATOR .'html_reports');
global $PHP_TEST_BASE;
$path = $PHP_TEST_BASE . DIRECTORY_SEPARATOR .'views'. DIRECTORY_SEPARATOR .'templates';
return new \League\Plates\Engine($path);
}
}
555 changes: 540 additions & 15 deletions test_report.html

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8b9cc5c

Please sign in to comment.