From 4f26eb6e21ff294418dcbec5bdfa566c954c4cc1 Mon Sep 17 00:00:00 2001 From: Francisco Facioni Date: Mon, 2 Jul 2012 10:00:40 -0300 Subject: [PATCH] Updated Test to reflect actual configuration case (this bundle is using arrays instead of Elastica_Type_Mapping) --- Tests/ResetterTest.php | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Tests/ResetterTest.php b/Tests/ResetterTest.php index 5ce7912..d59da18 100644 --- a/Tests/ResetterTest.php +++ b/Tests/ResetterTest.php @@ -15,8 +15,8 @@ class ResetterTest extends \PHPUnit_Framework_TestCase 'index' => $this->getMockElasticaIndex(), 'config' => array( 'mappings' => array( - 'a' => $this->getMockElasticaTypeMapping(), - 'b' => $this->getMockElasticaTypeMapping(), + 'a' => array('properties' => array()), + 'b' => array('properties' => array()), ), ), ), @@ -24,8 +24,8 @@ class ResetterTest extends \PHPUnit_Framework_TestCase 'index' => $this->getMockElasticaIndex(), 'config' => array( 'mappings' => array( - 'a' => $this->getMockElasticaTypeMapping(), - 'b' => $this->getMockElasticaTypeMapping(), + 'a' => array('properties' => array()), + 'b' => array('properties' => array()), ), ), ), @@ -82,7 +82,7 @@ class ResetterTest extends \PHPUnit_Framework_TestCase $type->expects($this->once()) ->method('setMapping') - ->with($this->indexConfigsByName['foo']['config']['mappings']['a']); + ->with($this->indexConfigsByName['foo']['config']['mappings']['a']['properties']); $resetter = new Resetter($this->indexConfigsByName); $resetter->resetIndexType('foo', 'a'); @@ -125,14 +125,4 @@ class ResetterTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); } - - /** - * @return Elastica_Type_Mapping - */ - private function getMockElasticaTypeMapping() - { - return $this->getMockBuilder('Elastica_Type_Mapping') - ->disableOriginalConstructor() - ->getMock(); - } }