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:
Thilina Hasantha
2018-01-08 23:13:43 +01:00
committed by GitHub
parent 359e3f8382
commit e7792e7d79
2349 changed files with 117270 additions and 83170 deletions

View File

@@ -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([], '');
}

View 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;
}
}