Skip to content

Commit

Permalink
Update use of deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 22, 2020
1 parent 46e9f5d commit 5b6ddea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/TestCase/View/Helper/CrudViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CrudViewHelperTest extends TestCase
/**
* Mocked view
*
* @var \Cake\View\View|\PHPUnit_Framework_MockObject_MockObject
* @var \Cake\View\View&\PHPUnit_Framework_MockObject_MockObject
*/
public $View;

Expand All @@ -38,7 +38,7 @@ public function setUp(): void
parent::setUp();

$this->View = $this->getMockBuilder(View::class)
->setMethods()
->onlyMethods([])
->getMock();

static::setAppNamespace();
Expand All @@ -48,7 +48,7 @@ public function testIntrospect()
{
$this->CrudView = $this->getMockBuilder(CrudViewHelper::class)
->setConstructorArgs([$this->View])
->setMethods(['columnType', 'getContext'])
->onlyMethods(['columnType', 'getContext'])
->getMock();

$this->CrudView
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/View/Widget/DateTimeWidgetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function setUp(): void
*/
public function testRenderSimple($compareFileName, $data)
{
/** @var \Cake\View\Form\ContextInterface $context */
$context = $this->getMockBuilder(ContextInterface::class)->getMock();
$templates = new StringTemplate([
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}/>',
Expand Down

0 comments on commit 5b6ddea

Please sign in to comment.