composer-update-patch
This commit is contained in:
9
vendor/phpspec/phpspec/CHANGES.md
vendored
9
vendor/phpspec/phpspec/CHANGES.md
vendored
@@ -1,4 +1,11 @@
|
||||
2.5.2 / 2017-09-04
|
||||
2.5.3 / 2016-09-26
|
||||
==================
|
||||
|
||||
* [fixed] Accidental linebreaks in spec name are not allowed (@randompixel)
|
||||
* [fixed] Throwable can be passed as instance to shouldThrow (@jameshalsall)
|
||||
* [performance] Phar version now has an optimised autoloader
|
||||
|
||||
2.5.2 / 2016-09-04
|
||||
==================
|
||||
|
||||
* [fixed] Exceptions are properly highlighted in error messages (@ciaranmcnulty)
|
||||
|
||||
2
vendor/phpspec/phpspec/Makefile
vendored
2
vendor/phpspec/phpspec/Makefile
vendored
@@ -7,7 +7,7 @@ build-phar:
|
||||
@echo "--> Cleaning vendor directory"
|
||||
rm -Rfv vendor
|
||||
@echo "--> Installing dependencies without dev"
|
||||
composer install --no-dev
|
||||
composer install --no-dev -o
|
||||
@echo "--> Building Phar"
|
||||
box build
|
||||
@echo "--> Success"
|
||||
|
||||
2
vendor/phpspec/phpspec/bin/phpspec
vendored
2
vendor/phpspec/phpspec/bin/phpspec
vendored
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
define('PHPSPEC_VERSION', '2.5.2');
|
||||
define('PHPSPEC_VERSION', '2.5.3');
|
||||
|
||||
if (is_file($autoload = getcwd() . '/vendor/autoload.php')) {
|
||||
require $autoload;
|
||||
|
||||
@@ -501,6 +501,18 @@ class PSR0LocatorSpec extends ObjectBehavior
|
||||
$this->shouldThrow($exception)->duringCreateResource('Namespace/');
|
||||
}
|
||||
|
||||
function it_throws_an_exception_on_PSR0_resource_with_line_breaks_at_end()
|
||||
{
|
||||
$this->beConstructedWith('', 'spec', $this->srcPath, $this->specPath);
|
||||
|
||||
$exception = new \InvalidArgumentException(
|
||||
'String "Namespace\Classname'.PHP_EOL.'" is not a valid class name.'.PHP_EOL.
|
||||
'Please see reference document: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md'
|
||||
);
|
||||
|
||||
$this->shouldThrow($exception)->duringCreateResource('Namespace\Classname'.PHP_EOL);
|
||||
}
|
||||
|
||||
function it_throws_an_exception_on_PSR4_prefix_not_matching_namespace()
|
||||
{
|
||||
$exception = new \InvalidArgumentException(
|
||||
|
||||
@@ -33,7 +33,7 @@ class ThrowMatcherSpec extends ObjectBehavior
|
||||
$this->positiveMatch('throw', $arr, array('\Exception'))->during('ksort', array());
|
||||
}
|
||||
|
||||
function it_accepts_a_method_during_which_an_error_should_be_thrown(ArrayObject $arr)
|
||||
function it_accepts_a_method_during_which_an_error_specified_by_class_name_should_be_thrown(ArrayObject $arr)
|
||||
{
|
||||
if (!class_exists('\Error')) {
|
||||
throw new SkippingException('The class Error, introduced in PHP 7, does not exist');
|
||||
@@ -44,6 +44,17 @@ class ThrowMatcherSpec extends ObjectBehavior
|
||||
$this->positiveMatch('throw', $arr, array('\Error'))->during('ksort', array());
|
||||
}
|
||||
|
||||
function it_accepts_a_method_during_which_an_error_specified_by_instance_should_be_thrown(ArrayObject $arr)
|
||||
{
|
||||
if (!class_exists('\Error')) {
|
||||
throw new SkippingException('The class Error, introduced in PHP 7, does not exist');
|
||||
}
|
||||
|
||||
$arr->ksort()->will(function(){ throw new \Error(); });
|
||||
|
||||
$this->positiveMatch('throw', $arr, array(new \Error()))->during('ksort', array());
|
||||
}
|
||||
|
||||
function it_accepts_a_method_during_which_an_exception_should_not_be_thrown(ArrayObject $arr)
|
||||
{
|
||||
$this->negativeMatch('throw', $arr, array('\Exception'))->during('ksort', array());
|
||||
|
||||
@@ -358,7 +358,7 @@ class PSR0Locator implements ResourceLocatorInterface
|
||||
*/
|
||||
private function validatePsr0Classname($classname)
|
||||
{
|
||||
$pattern = '/^([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*[\/\\\\]?)*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/';
|
||||
$pattern = '/\A([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*[\/\\\\]?)*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\z/';
|
||||
|
||||
if (!preg_match($pattern, $classname)) {
|
||||
throw new InvalidArgumentException(
|
||||
|
||||
@@ -284,7 +284,7 @@ class ThrowMatcher implements MatcherInterface
|
||||
}
|
||||
|
||||
if (is_object($arguments[0])) {
|
||||
if (class_exists('\Throwable') && $arguments[0] instanceof \Throwable) {
|
||||
if ($arguments[0] instanceof \Throwable) {
|
||||
return $arguments[0];
|
||||
} elseif ($arguments[0] instanceof \Exception) {
|
||||
return $arguments[0];
|
||||
|
||||
Reference in New Issue
Block a user