setType('type_name'); $this->assertInstanceOf('Elastica\Filter\Type', $returnValue); } public function testToArray() { $typeFilter = new Type('type_name'); $expectedArray = array( 'type' => array('value' => 'type_name') ); $this->assertEquals($expectedArray, $typeFilter->toArray()); } }