for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* HiDev plugin for Composer.
*
* @link https://github.com/hiqdev/hidev-composer
* @package hidev-composer
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/
namespace hidev\composer\tests\unit\console;
use hidev\composer\console\ComposerController;
* Tests for ComposerController.
class ComposerControllerTest extends \PHPUnit\Framework\TestCase
{
* @var ComposerController
protected $object;
protected function setUp()
$this->object = new ComposerController('composer', null);
null
object<yii\base\Module>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
}
protected function tearDown()
public function testConstructor()
$this->assertInstanceOf(\hidev\base\Controller::class, $this->object);
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: