Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Cut converter raising index out of bounds error and added CutTest.
Fixed DualConverter::convertCollection not accepting arrays. Added Coveralls support to Travis settings. Added architecture diagram to README. Reorganized tests into test type directories.
- Loading branch information
Showing
11 changed files
with
51 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
Open Dash | ||
========= | ||
|
||
![Version][Version image] | ||
[![Version][Version image]]() | ||
[![Build Status][Build image]][Build] | ||
[![Code Coverage][Coverage image]][Coverage] | ||
[![Scrutinizer Code Quality][Quality image]][Quality] | ||
|
||
Open source Web-based dashboard for Unix systems. | ||
|
||
Architecture | ||
------------ | ||
![Diagram](https://raw.githubusercontent.com/ScriptFUSION/Open-Dash/master/diagrams/Open%20Dash.png) | ||
|
||
[Version image]: http://img.shields.io/github/tag/ScriptFUSION/Open-Dash.svg "Latest version" | ||
[Build]: http://travis-ci.org/ScriptFUSION/Open-Dash | ||
[Build image]: http://img.shields.io/travis/ScriptFUSION/Open-Dash.svg | ||
[Coverage]: https://scrutinizer-ci.com/g/ScriptFUSION/Open-Dash/?branch=master | ||
[Coverage image]: https://scrutinizer-ci.com/g/ScriptFUSION/Open-Dash/badges/coverage.png?b=master "Code coverage" | ||
[Build image]: http://img.shields.io/travis/ScriptFUSION/Open-Dash.svg "Build status" | ||
[Coverage]: https://coveralls.io/r/ScriptFUSION/Open-Dash | ||
[Coverage image]: https://img.shields.io/coveralls/ScriptFUSION/Open-Dash.svg "Code coverage" | ||
[Quality]: https://scrutinizer-ci.com/g/ScriptFUSION/Open-Dash/?branch=master | ||
[Quality image]: https://scrutinizer-ci.com/g/ScriptFUSION/Open-Dash/badges/quality-score.png?b=master "Code quality" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
test/unit/FilterChainTest.php → test/unit/ConversionChainTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
use ScriptFUSION\OpenDash\Convert\Cut; | ||
|
||
class CutTest extends PHPUnit_Framework_TestCase { | ||
/** @dataProvider provideData */ | ||
public function test($data, $fields, $delimiter, $result) { | ||
$this->assertSame($result, (new Cut($fields, $delimiter))->convert($data)); | ||
} | ||
|
||
public function provideData() { | ||
return [ | ||
["foo\tbar", 0, "\t", ''], | ||
["foo\tbar", 1, "\t", 'foo'], | ||
["foo\tbar", 2, "\t", 'bar'], | ||
["foo\tbar", 3, "\t", ''], | ||
['foo bar', 1, ' ', 'foo'], | ||
['foo bar', 2, ' ', ''], | ||
['foo bar', 3, ' ', 'bar'], | ||
]; | ||
} | ||
} |