Raise version min PHP 7.3.

This commit is contained in:
Wilmer Arambula
2024-03-20 17:27:20 -03:00
parent e2a167028b
commit ce813e5060
189 changed files with 1901 additions and 1586 deletions

View File

@ -20,14 +20,14 @@ class BaseObjectTest extends TestCase
*/
protected $object;
protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->mockApplication();
$this->object = new NewObject();
}
protected function tearDown()
protected function tearDown(): void
{
parent::tearDown();
$this->object = null;
@ -159,19 +159,6 @@ class BaseObjectTest extends TestCase
$this->expectExceptionMessage('Getting write-only property: yiiunit\framework\base\NewObject::writeOnly');
$this->object->writeOnly;
}
public function testBackwardCompatibilityWithObject()
{
if (PHP_MAJOR_VERSION > 7 || (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION >= 2)) {
$this->markTestSkipped('This test is meant to run on PHP <7.2.0 to check BC with yii\base\Object');
}
$this->assertInstanceOf('yii\base\Object', new BCObject());
$this->assertInstanceOf('yii\base\BaseObject', new BCObject());
BCObject::$initCalled = false;
new BCObject();
$this->assertTrue(BCObject::$initCalled);
}
}