Skip to content

Commit df93a5b

Browse files
committed
Fix 5.3 build
1 parent caed5ff commit df93a5b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Composer/Installers/Test/TestCase.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ protected function ensureDirectoryExistsAndClear($directory)
6363
mkdir($directory, 0777, true);
6464
}
6565

66+
// polyfills for old phpunit for 5.3 support
67+
6668
/**
6769
* @param string $exception
6870
* @param string|null $message
@@ -84,4 +86,17 @@ public function setExpectedException($exception, $message = null, $code = null)
8486
parent::setExpectedException($exception, $message, $code);
8587
}
8688
}
89+
90+
/**
91+
* @param string $needle
92+
* @param string $haystack
93+
* @param string $message
94+
*
95+
* @return void
96+
*/
97+
public static function assertStringContainsString($needle, $haystack, $message = '')
98+
{
99+
$constraint = new StringContains($needle, false);
100+
static::assertThat($haystack, $constraint, $message);
101+
}
87102
}

0 commit comments

Comments
 (0)