Navigation Menu

Skip to content

Commit

Permalink
fix test, add test suites (phpunit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raoul authored and Raoul committed Jun 2, 2013
1 parent 47fc5cd commit a15de81
Show file tree
Hide file tree
Showing 33 changed files with 5,874 additions and 25 deletions.
16 changes: 16 additions & 0 deletions tests/phpunit.xml
Expand Up @@ -9,6 +9,21 @@
<browser name="Internet Explorer" browser="*iexplore" />
<browser name="Firefox" browser="*firefox" />
</selenium>

<testsuites>
<testsuite name="events">
<directory>./unit/events</directory>
</testsuite>
<testsuite name="nodes">
<directory>./unit/nodes</directory>
</testsuite>
<testsuite name="source">
<directory>./unit/phpworkflowsource</directory>
</testsuite>
<testsuite name="task">
<directory>./unit/task</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
Expand All @@ -19,6 +34,7 @@
<file>../extensions/simpleWorkflow/SWyEdConverter.php</file>
<file>../extensions/simpleWorkflow/SWyEdConverterDOM.php</file>
<file>../extensions/simpleWorkflow/SWException.php</file>
<file>../extensions/simpleWorkflow/SWComponent.php</file>
</exclude>
</whitelist>
</filter>
Expand Down
363 changes: 363 additions & 0 deletions tests/report/SWActiveRecord.php.html

Large diffs are not rendered by default.

1,923 changes: 1,923 additions & 0 deletions tests/report/SWActiveRecordBehavior.php.html

Large diffs are not rendered by default.

363 changes: 363 additions & 0 deletions tests/report/SWComponent.php.html

Large diffs are not rendered by default.

157 changes: 157 additions & 0 deletions tests/report/SWEvent.php.html

Large diffs are not rendered by default.

324 changes: 324 additions & 0 deletions tests/report/SWHelper.php.html

Large diffs are not rendered by default.

636 changes: 636 additions & 0 deletions tests/report/SWNode.php.html

Large diffs are not rendered by default.

585 changes: 585 additions & 0 deletions tests/report/SWPhpWorkflowSource.php.html

Large diffs are not rendered by default.

362 changes: 362 additions & 0 deletions tests/report/SWValidator.php.html

Large diffs are not rendered by default.

325 changes: 325 additions & 0 deletions tests/report/SWWorkflowSource.php.html

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions tests/report/css/bootstrap-responsive.min.css

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions tests/report/css/bootstrap.min.css

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions tests/report/css/style.css
@@ -0,0 +1,86 @@
body {
padding-top: 10px;
}

.popover {
width: 600px;
}

.table td {
padding-top: 3px;
padding-bottom: 3px;
}

.table-condensed td {
padding-top: 0;
padding-bottom: 0;
}

.table .progress {
margin-bottom: inherit;
}

.table-borderless th, .table-borderless td {
border: 0 !important;
}

.table tbody td.success, li.success, span.success {
background-color: #dff0d8;
}

.table tbody tr.danger, .table tbody td.danger, li.danger, span.danger {
background-color: #f2dede;
}

.table tbody td.warning, li.warning, span.warning {
background-color: #fcf8e3;
}

.table tbody td.info {
background-color: #d9edf7;
}

td.big {
width: 100px;
}

td.small {
}

td.codeLine {
font-family: monospace;
white-space: pre;
}

td span.comment {
color: #888a85;
}

td span.default {
color: #2e3436;
}

td span.html {
color: #888a85;
}

td span.keyword {
color: #2e3436;
font-weight: bold;
}

pre span.string {
color: #2e3436;
}

span.success, span.warning, span.danger {
margin-right: 2px;
padding-left: 10px;
padding-right: 10px;
text-align: center;
}

#classCoverageDistribution, #classComplexity {
height: 200px;
width: 475px;
}
Binary file added tests/report/img/glyphicons-halflings-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/report/img/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
133 changes: 133 additions & 0 deletions tests/report/index.dashboard.html
@@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dashboard for E:\home\project\git-simpleWorkflow\www\protected\extensions\simpleWorkflow</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<header>
<div class="container">
<div class="row">
<div class="span12">
<ul class="breadcrumb">
<li><a href="index.html">E:\home\project\git-simpleWorkflow\www\protected\extensions\simpleWorkflow</a></li>
<li class="active">(Dashboard)</li>

</ul>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="span6">
<h2>Class Coverage Distribution</h2>
<div id="classCoverageDistribution"></div>
</div>
<div class="span6">
<h2>Class Complexity</h2>
<div id="classComplexity"></div>
</div>
</div>
<div class="row">
<div class="span6">
<h2>Top Project Risks</h2>
<ul>
<li><a href="SWActiveRecordBehavior.php.html#48">SWActiveRecordBehavior</a> (173)</li>
<li><a href="SWNode.php.html#5">SWNode</a> (44)</li>
<li><a href="SWPhpWorkflowSource.php.html#15">SWPhpWorkflowSource</a> (42)</li>
<li><a href="SWHelper.php.html#5">SWHelper</a> (37)</li>

</ul>
</div>
<div class="span6">
<h2>Least Tested Methods</h2>
<ul>
<li><a href="SWComponent.php.html#43">SWComponent::leaveWorkflow</a> (0%)</li>
<li><a href="SWComponent.php.html#19">SWComponent::beforeTransition</a> (0%)</li>
<li><a href="SWComponent.php.html#22">SWComponent::onProcessTransition</a> (0%)</li>
<li><a href="SWComponent.php.html#25">SWComponent::processTransition</a> (0%)</li>
<li><a href="SWComponent.php.html#28">SWComponent::onAfterTransition</a> (0%)</li>
<li><a href="SWHelper.php.html#57">SWHelper::statusListData</a> (0%)</li>
<li><a href="SWComponent.php.html#16">SWComponent::onBeforeTransition</a> (0%)</li>
<li><a href="SWComponent.php.html#10">SWComponent::onEnterWorkflow</a> (0%)</li>
<li><a href="SWActiveRecordBehavior.php.html#950">SWActiveRecordBehavior::onLeaveWorkflow</a> (0%)</li>
<li><a href="SWActiveRecordBehavior.php.html#940">SWActiveRecordBehavior::leaveWorkflow</a> (0%)</li>

</ul>
</div>
</div>
<footer>
<p>
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.9</a> using <a href="http://www.php.net/" target="_top">PHP 5.4.14</a> and <a href="http://phpunit.de/">PHPUnit 3.7.19</a> at Sun Jun 2 12:17:10 UTC 2013.</small>
</p>
</footer>
</div>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/highcharts.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var classCoverageDistribution = new Highcharts.Chart({
chart: {
renderTo: 'classCoverageDistribution',
type: 'column'
},
title: {text: ''},
legend: {enabled: false},
credits: {enabled: false},
tooltip: {enabled: false},
xAxis: {
labels: {style: {fontSize: '8px'}},
categories: [
'0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
]
},
yAxis: {
title: '',
labels: {style: {fontSize: '8px'}},
},
series: [{
data: [1,0,0,0,0,1,0,0,1,2,1,3]
}],
});

var classComplexity = new Highcharts.Chart({
chart: {
renderTo: 'classComplexity',
type: 'scatter'
},
title: {text: ''},
legend: {enabled: false},
credits: {enabled: false},
xAxis: {
title: {text: 'Code Coverage (in percent)'},
labels: {enabled: true},
},
yAxis: {
title: {text: 'Cyclomatic Complexity'},
labels: {enabled: true},
},
tooltip: {
formatter: function() {
return this.point.config[2];
}
},
series: [{
data: [[41.666666666667,12,"<a href=\"SWActiveRecord.php.html#8\">SWActiveRecord<\/a>"],[86.819484240688,133,"<a href=\"SWActiveRecordBehavior.php.html#48\">SWActiveRecordBehavior<\/a>"],[0,12,"<a href=\"SWComponent.php.html#8\">SWComponent<\/a>"],[100,1,"<a href=\"SWEvent.php.html#6\">SWEvent<\/a>"],[75.806451612903,27,"<a href=\"SWHelper.php.html#5\">SWHelper<\/a>"],[96.116504854369,44,"<a href=\"SWNode.php.html#5\">SWNode<\/a>"],[89.89898989899,41,"<a href=\"SWPhpWorkflowSource.php.html#15\">SWPhpWorkflowSource<\/a>"],[100,22,"<a href=\"SWValidator.php.html#27\">SWValidator<\/a>"],[100,8,"<a href=\"SWWorkflowSource.php.html#7\">SWWorkflowSource<\/a>"]],
marker: {
symbol: 'diamond'
}
}],
});
});
</script>
</body>
</html>

0 comments on commit a15de81

Please sign in to comment.