This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.UnitTest | |
* | |
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
namespace Joomla\UnitTest\CMS\Console; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ExceptionTest extends PHPUnit_Framework_TestCase | |
{ | |
public function foo(StdClass $class) | |
{} | |
public function testException() | |
{ | |
$this->setExpectedException('Exception'); | |
$this->foo(new ArrayObject); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works: | |
/** | |
* Tests the setDbo method with the wrong type of class. | |
*/ | |
public function testSetDboWithBadInput() | |
{ | |
if (PHP_MAJOR_VERSION >= 7) | |
{ | |
$this->markTestSkipped('A fatal error is thrown on PHP 7 due to the typehinting of the method.'); |