From b5e7d582d99002a9ea3461d8a8559b411e4dd961 Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Sat, 7 Jan 2023 16:06:55 +0900 Subject: [PATCH] test: Replace deprecated assertInternalType() Co-authored-by: Kenshin Okinaka --- lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php | 2 +- lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php index 9232508d2..331933361 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php @@ -416,7 +416,7 @@ class CakeTestCaseTest extends CakeTestCase { $Post = $this->getMockForModel('Post', array('save')); $this->assertNull($Post->save(array())); - $this->assertInternalType('array', $Post->find('all')); + $this->assertIsArray($Post->find('all')); } /** diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index 0a9bd2b14..a0a7f57e9 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -195,7 +195,7 @@ class ControllerTestCaseTest extends CakeTestCase { ) )); $this->assertNull($Posts->Post->save(array())); - $this->assertInternalType('array', $Posts->Post->find('all')); + $this->assertIsArray($Posts->Post->find('all')); $Posts = $this->Case->generate('Posts', array( 'models' => array('Post'), @@ -322,7 +322,7 @@ class ControllerTestCaseTest extends CakeTestCase { public function testTestAction() { $this->Case->generate('TestsApps'); $this->Case->testAction('/tests_apps/index'); - $this->assertInternalType('array', $this->Case->controller->viewVars); + $this->assertIsArray($this->Case->controller->viewVars); $this->Case->testAction('/tests_apps/set_action'); $results = $this->Case->controller->viewVars; @@ -352,7 +352,7 @@ class ControllerTestCaseTest extends CakeTestCase { public function testTestActionArrayUrls() { $this->Case->generate('TestsApps'); $this->Case->testAction(array('controller' => 'tests_apps', 'action' => 'index')); - $this->assertInternalType('array', $this->Case->controller->viewVars); + $this->assertIsArray($this->Case->controller->viewVars); } /**