Skip to content
Permalink
Browse files

Merge branch '8.2'

  • Loading branch information...
sebastianbergmann committed Jun 20, 2019
2 parents 17b6501 + 5b9b702 commit b6849e0a965390f947784e47c0848b5d7b7c3e86
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/Framework/Constraint/StringStartsWith.php
@@ -9,6 +9,8 @@
*/
namespace PHPUnit\Framework\Constraint;
use PHPUnit\Util\InvalidArgumentHelper;
/**
* Constraint that asserts that the string it is evaluated for begins with a
* given prefix.
@@ -22,6 +24,10 @@ final class StringStartsWith extends Constraint
public function __construct(string $prefix)
{
if (empty($prefix)) {
throw InvalidArgumentHelper::factory(1, 'non-empty string');
}
$this->prefix = $prefix;
}

0 comments on commit b6849e0

Please sign in to comment.
You can’t perform that action at this time.