Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ script:
- php ${EXTRA_CONFIG} -r "echo phpversion() . PHP_EOL;"

- if [ ${HHVM_PHP7+x} ]; then echo "Do not test the lowest dependencies on HHVM with PHP7 support"; else travis_wait composer update --prefer-lowest --no-interaction && php -d hhvm.jit=0 -d error_reporting=$(php -r "var_export(E_ALL & ~E_DEPRECATED);") vendor/bin/phpunit; fi
- travis_wait composer update --no-interaction && php -d hhvm.jit=0 ${EXTRA_CONFIG} vendor/bin/phpunit
- travis_wait rm -f composer.lock && composer update --no-interaction && php -d hhvm.jit=0 ${EXTRA_CONFIG} vendor/bin/phpunit

after_script:
- mv ~.git .git
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.10.1

* Removed support for PHPUnit ^5.0 && ^6.0 - there are issue with HHVM and `Throwable`,
in HHVM `Exception` does not implement `Throwable`

## 0.10.0

* Removed `Awesomite\StackTrace\Arguments\Values\MultipleValues`
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
}
},
"autoload-dev": {
"files": ["tests/hhvm-polyfill/exceptions.php.polyfill"],
"psr-4": {
"Awesomite\\StackTrace\\": "tests/"
}
Expand All @@ -28,7 +27,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7.19 || ^6.1.3",
"phpunit/phpunit": "^4.8.35",
"satooshi/php-coveralls": "^1.0.1 || ^2.0.0",
"sebastian/comparator": ">=1.2.3"
},
Expand Down
2 changes: 1 addition & 1 deletion src/StackTrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class StackTrace implements StackTraceInterface
{
const VERSION = '0.10.0';
const VERSION = '0.10.1';
const CONSTRAINTS_VERSION = '>=0.1.0 <0.11.0';

private $arrayStackTrace;
Expand Down
2 changes: 1 addition & 1 deletion tests/Arguments/Declarations/DeclarationProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function providerGetType()
}

// on version 7.1.0beta1 there is wrong type - array instead of iterable
if (version_compare(PHP_VERSION, '7.1.0RC1') >= 0) {
if (version_compare(PHP_VERSION, '7.1.0RC1') >= 0 && !defined('HHVM_VERSION')) {
$class71 = new \ReflectionClass(new TestPhp71());
list($parameterIterable) = $class71->getMethod('argumentIterable')->getParameters();
$result[] = array(new Declaration($parameterIterable), true, 'iterable');
Expand Down
27 changes: 1 addition & 26 deletions tests/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,11 @@
/**
* @internal
*/
class BaseTestCase extends BridgeTestCase
class BaseTestCase extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
parent::setUp();
$this->expectOutputString('');
}

/**
* @param string $exception
* @param string|null $message
* @param int|null $code
*/
public function setExpectedException($exception, $message = '', $code = null)
{
$reflection = new \ReflectionClass('Awesomite\StackTrace\BaseTestCase');
$parentReflection = $reflection->getParentClass();
if ($parentReflection->hasMethod('setExpectedException')) {
parent::setExpectedException($exception, $message, $code);
return;
}

$this->expectException($exception);

if ($message !== null && $message !== '') {
$this->expectExceptionMessage($message);
}

if ($code !== null) {
$this->expectExceptionCode($code);
}
}
}
21 changes: 0 additions & 21 deletions tests/BridgeTestCase.php

This file was deleted.

13 changes: 0 additions & 13 deletions tests/Listeners/BridgeTestListener.php

This file was deleted.

54 changes: 0 additions & 54 deletions tests/Listeners/BridgeTestListener4x.php

This file was deleted.

65 changes: 0 additions & 65 deletions tests/Listeners/BridgeTestListener6x.php

This file was deleted.

49 changes: 0 additions & 49 deletions tests/Listeners/BridgeTestListenerBody.php

This file was deleted.

39 changes: 34 additions & 5 deletions tests/Listeners/TestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

namespace Awesomite\StackTrace\Listeners;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Output\ConsoleOutput;

/**
* @internal
*/
class TestListener extends BridgeTestListener
class TestListener implements \PHPUnit_Framework_TestListener
{
private $offset = .05;

Expand All @@ -28,15 +27,45 @@ public function __destruct()
}
}

protected function _endTest($test, $time)
public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
parent::_endTest($test, $time);
}

public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)
{
}

public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
}

public function addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
}

public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
}

public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
{
}

public function endTestSuite(\PHPUnit_Framework_TestSuite $suite)
{
}

public function startTest(\PHPUnit_Framework_Test $test)
{
}

public function endTest(\PHPUnit_Framework_Test $test, $time)
{
if ($time < $this->offset) {
return;
}

$name = ($test instanceof \PHPUnit_Framework_TestCase) || ($test instanceof TestCase)
$name = $test instanceof \PHPUnit_Framework_TestCase
? get_class($test) . '::' . $test->getName()
: get_class($test);

Expand Down
10 changes: 0 additions & 10 deletions tests/hhvm-polyfill/StackTraceException.php.polyfill

This file was deleted.

15 changes: 0 additions & 15 deletions tests/hhvm-polyfill/exceptions.php.polyfill

This file was deleted.