for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* X-editable extension for Yii2
*
* @link https://github.com/hiqdev/yii2-x-editable
* @package yii2-x-editable
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/
namespace hiqdev\xeditable\tests\unit;
use hiqdev\xeditable\XEditableAction;
* Generated by PHPUnit_SkeletonGenerator on 2016-04-27 at 15:37:34.
class XEditableActionTest extends \PHPUnit_Framework_TestCase
{
* @var XEditableAction
protected $object;
protected $app;
protected function setUp()
$this->object = new XEditableAction('test', null);
null
object<yii\base\Controller>
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 testConstruct()
$this->assertInstanceOf(XEditableAction::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: