Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active Jun 27, 2021
Embed
What would you like to do?
<?
function test14SamePatternsDifferentCaseWithExtraShouldSimplifyTwo() {
$this->assertEquals(
['Yes', 'no'],
(new LikePatternSimplifier())->simplify(['Yes', 'yes', 'no']));
}
function test15TwoPairsOfPatternsDifferentCaseShouldSimplifyTwo() {
$this->assertEquals(
['Yes', 'no'],
(new LikePatternSimplifier())->simplify(['Yes', 'yes', 'no', 'No']));
}
function test16TwoPairsOfPatternsDifferentCaseExtraShouldSimplifyThree() {
$this->assertEquals(
['Yes', 'no', 'Sure'],
(new LikePatternSimplifier())->simplify(['Yes', 'yes', 'no', 'No', 'Sure']));
}
function test17TwoPairsOfPatternsDifferentCaseExtraTrickyShouldSimplifyTwo() {
$this->assertEquals(
['Yes', 'no'],
(new LikePatternSimplifier())->simplify(['Yes', 'yes', 'no', 'No', 'Not Sure']));
}
//’Not sure’ is a special case of ‘No’ which makes sense in a like pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment