Skip to content

Commit 52763f9

Browse files
committed
SerializerMock isn't necessary
1 parent 7faafe7 commit 52763f9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

test/lib/Elastica/Test/TypeTest.php

+2-10
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ public function testAddObject()
799799
$index = $this->_createIndex();
800800

801801
$type = new Type($index, 'user');
802-
$type->setSerializer(array(new SerializerMock(), 'serialize'));
802+
$type->setSerializer('get_object_vars');
803803

804804
$userObject = new \stdClass();
805805
$userObject->username = 'hans';
@@ -822,7 +822,7 @@ public function testSetSerializer()
822822
{
823823
$index = $this->_createIndex();
824824
$type = $index->getType('user');
825-
$ret = $type->setSerializer(array(new SerializerMock(), 'serialize'));
825+
$ret = $type->setSerializer('get_object_vars');
826826
$this->assertInstanceOf('Elastica\Type', $ret);
827827
}
828828

@@ -888,11 +888,3 @@ public function testGetMappingAlias()
888888
);
889889
}
890890
}
891-
892-
class SerializerMock
893-
{
894-
public function serialize($object)
895-
{
896-
return get_object_vars($object);
897-
}
898-
}

0 commit comments

Comments
 (0)