Browse Source

Fix failing tests

ndm2 11 years ago
parent
commit
8917e56b49

+ 2 - 2
tests/TestCase/ORM/Association/BelongsToTest.php

@@ -355,7 +355,7 @@ class BelongsToTest extends TestCase
             ->with(
                 $this->isInstanceOf('\Cake\Event\Event'),
                 $this->isInstanceOf('\Cake\ORM\Query'),
-                [],
+                $this->isInstanceOf('\ArrayObject'),
                 false
             );
         $association->attachTo($query);
@@ -378,7 +378,7 @@ class BelongsToTest extends TestCase
         $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'),

+ 2 - 2
tests/TestCase/ORM/Association/HasOneTest.php

@@ -284,7 +284,7 @@ class HasOneTest extends TestCase
             ->with(
                 $this->isInstanceOf('\Cake\Event\Event'),
                 $this->isInstanceOf('\Cake\ORM\Query'),
-                [],
+                $this->isInstanceOf('\ArrayObject'),
                 false
             );
         $association->attachTo($query);
@@ -307,7 +307,7 @@ class HasOneTest extends TestCase
         $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'),