mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
fix tests
This commit is contained in:
@ -1,10 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Exceptions;
|
||||
|
||||
class ExpectationException extends \Exception
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class ExpectationException extends \Exception
|
||||
{
|
||||
public static function invalidValue($expectationName, $valueRequired): ExpectationException
|
||||
public static function invalidValue(string $expectationName, string $valueRequired): ExpectationException
|
||||
{
|
||||
return new ExpectationException(sprintf('%s expectation requires a %s value.', $expectationName, $valueRequired));
|
||||
}
|
||||
|
||||
@ -45,10 +45,6 @@ final class Container
|
||||
$this->instances[$id] = $this->build($id);
|
||||
}
|
||||
|
||||
if (!is_object($this->instances[$id])) {
|
||||
throw ShouldNotHappen::fromMessage('Cannot resolve a non-object from container');
|
||||
}
|
||||
|
||||
return $this->instances[$id];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user