From 5a3a48b829d554d6313dba8d6d2e4c9d231557ed Mon Sep 17 00:00:00 2001 From: AD7six Date: Sat, 7 Feb 2015 10:38:14 +0000 Subject: [PATCH] It's only necessary to override abstract methods So, don't just copy and paste the setup method call --- tests/TestCase/ORM/AssociationTest.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/TestCase/ORM/AssociationTest.php b/tests/TestCase/ORM/AssociationTest.php index ffc78546e66..e6247881943 100644 --- a/tests/TestCase/ORM/AssociationTest.php +++ b/tests/TestCase/ORM/AssociationTest.php @@ -187,12 +187,10 @@ public function testTargetPlugin() 'sourceTable' => $this->source, 'joinType' => 'INNER' ]; + $this->association = $this->getMock( '\Cake\ORM\Association', - [ - '_options', 'attachTo', '_joinCondition', 'cascadeDelete', 'isOwningSide', - 'saveAssociated', 'eagerLoader', 'type' - ], + ['type', 'eagerLoader', 'cascadeDelete', 'isOwningSide', 'saveAssociated'], ['ThisAssociationName', $config] ); @@ -302,10 +300,7 @@ public function testFinderInConstructor() ]; $assoc = $this->getMock( '\Cake\ORM\Association', - [ - '_options', 'attachTo', '_joinCondition', 'cascadeDelete', 'isOwningSide', - 'saveAssociated', 'eagerLoader', 'type' - ], + ['type', 'eagerLoader', 'cascadeDelete', 'isOwningSide', 'saveAssociated'], ['Foo', $config] ); $this->assertEquals('published', $assoc->finder());