Add pear modules, mail and net_smtp via composer (#93)
Add pear modules, mail and net_smtp via composer, remove php 5.6 build due to phpunit 6
This commit is contained in:
@@ -10,10 +10,13 @@
|
||||
|
||||
namespace SebastianBergmann\ObjectEnumerator;
|
||||
|
||||
use SebastianBergmann\ObjectEnumerator\Fixtures\ExceptionThrower;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers SebastianBergmann\ObjectEnumerator\Enumerator
|
||||
*/
|
||||
class EnumeratorTest extends \PHPUnit_Framework_TestCase
|
||||
class EnumeratorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var Enumerator
|
||||
@@ -111,16 +114,25 @@ class EnumeratorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($b, $objects[1]);
|
||||
}
|
||||
|
||||
public function testEnumeratesClassThatThrowsException()
|
||||
{
|
||||
$thrower = new ExceptionThrower();
|
||||
|
||||
$objects = $this->enumerator->enumerate($thrower);
|
||||
|
||||
$this->assertSame($thrower, $objects[0]);
|
||||
}
|
||||
|
||||
public function testExceptionIsRaisedForInvalidArgument()
|
||||
{
|
||||
$this->setExpectedException(InvalidArgumentException::class);
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
|
||||
$this->enumerator->enumerate(null);
|
||||
}
|
||||
|
||||
public function testExceptionIsRaisedForInvalidArgument2()
|
||||
{
|
||||
$this->setExpectedException(InvalidArgumentException::class);
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
|
||||
$this->enumerator->enumerate([], '');
|
||||
}
|
||||
|
||||
28
lib/composer/vendor/sebastian/object-enumerator/tests/_fixture/ExceptionThrower.php
vendored
Normal file
28
lib/composer/vendor/sebastian/object-enumerator/tests/_fixture/ExceptionThrower.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Object Enumerator.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace SebastianBergmann\ObjectEnumerator\Fixtures;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class ExceptionThrower
|
||||
{
|
||||
private $property;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
unset($this->property);
|
||||
}
|
||||
|
||||
public function __get($property)
|
||||
{
|
||||
throw new RuntimeException;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user