diff --git a/tests/TestCase/ORM/Association/BelongsToTest.php b/tests/TestCase/ORM/Association/BelongsToTest.php index 444f09da231..46032022248 100644 --- a/tests/TestCase/ORM/Association/BelongsToTest.php +++ b/tests/TestCase/ORM/Association/BelongsToTest.php @@ -355,7 +355,7 @@ public function testAttachToBeforeFind() ->with( $this->isInstanceOf('\Cake\Event\Event'), $this->isInstanceOf('\Cake\ORM\Query'), - [], + $this->isInstanceOf('\ArrayObject'), false ); $association->attachTo($query); @@ -378,7 +378,7 @@ public function testAttachToBeforeFindExtraOptions() $listener = $this->getMock('stdClass', ['__invoke']); $this->company->eventManager()->attach($listener, 'Model.beforeFind'); $association = new BelongsTo('Companies', $config); - $options = ['something' => 'more']; + $options = new \ArrayObject(['something' => 'more']); $listener->expects($this->once())->method('__invoke') ->with( $this->isInstanceOf('\Cake\Event\Event'), diff --git a/tests/TestCase/ORM/Association/HasOneTest.php b/tests/TestCase/ORM/Association/HasOneTest.php index 2464d68e9b0..b514a8f5824 100644 --- a/tests/TestCase/ORM/Association/HasOneTest.php +++ b/tests/TestCase/ORM/Association/HasOneTest.php @@ -284,7 +284,7 @@ public function testAttachToBeforeFind() ->with( $this->isInstanceOf('\Cake\Event\Event'), $this->isInstanceOf('\Cake\ORM\Query'), - [], + $this->isInstanceOf('\ArrayObject'), false ); $association->attachTo($query); @@ -307,7 +307,7 @@ public function testAttachToBeforeFindExtraOptions() $listener = $this->getMock('stdClass', ['__invoke']); $this->profile->eventManager()->attach($listener, 'Model.beforeFind'); $association = new HasOne('Profiles', $config); - $opts = ['something' => 'more']; + $opts = new \ArrayObject(['something' => 'more']); $listener->expects($this->once())->method('__invoke') ->with( $this->isInstanceOf('\Cake\Event\Event'),