Skip to content

Commit

Permalink
added test method
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickschur committed Dec 27, 2016
1 parent 42cc695 commit 5bb1f2d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/TrainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@
*/
class TrainerTest extends \PHPUnit_Framework_TestCase
{
public function testLearn()
{
$t = new Trainer();

$t->setMaxNgrams(350);

$expected = '';

foreach (new \GlobIterator(__DIR__ . '/../etc/[^_]*') as $file)
{
$expected .= $file->getBasename() . PHP_EOL;
}

$this->expectOutputString($expected);

$t->learn();
}

public function testFilesAreReadable()
{
foreach (new \GlobIterator(__DIR__ . '/../etc/[^_]*') as $file)
Expand Down

0 comments on commit 5bb1f2d

Please sign in to comment.