Skip to content

Commit

Permalink
Adding failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Nov 8, 2018
1 parent ea1f195 commit 222a915
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions generator/tests/GeneratedFilesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,19 @@ public function testObjects()
$xmlElem = simplexml_import_dom($doc);
$this->assertInstanceOf(SimpleXMLElement::class, $xmlElem);
}

/**
* Tests that the limit parameter is nullable.
* See https://github.com/thecodingmachine/safe/issues/56
*/
public function testPregSplit()
{
require_once __DIR__.'/../../generated/pcre.php';
require_once __DIR__.'/../../lib/Exceptions/SafeExceptionInterface.php';
require_once __DIR__.'/../../lib/Exceptions/AbstractSafeException.php';
require_once __DIR__.'/../../generated/Exceptions/PcreException.php';

$keywords = preg_split("/[\s,]+/", "hypertext language, programming", null);
$this->assertSame(['hypertext', 'language', 'programming'], $keywords);
}
}

0 comments on commit 222a915

Please # to comment.