for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Box plugin for HiDev
*
* @link https://github.com/hiqdev/hidev-box
* @package hidev-box
* @license BSD-3-Clause
* @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
*/
namespace hidev\box\tests\unit\console;
use hidev\box\console\BoxJsonController;
* Tests for BoxJsonController.
class BoxJsonControllerTest extends \PHPUnit\Framework\TestCase
{
* @var BoxJsonController
protected $object;
protected function setUp()
$this->object = new BoxJsonController('box.json', 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: