Example #1
0
 public function testRegisterComponentType()
 {
     $components = $this->query->getComponentTypes();
     $components['mykey'] = 'mycomponent';
     $this->query->registerComponentType('mykey', 'mycomponent', 'mybuilder', 'myparser');
     $this->assertEquals($components, $this->query->getComponentTypes());
 }
 public function testWithComponentNoBuilder()
 {
     $request = $this->builder->build($this->query);
     $this->query->registerComponentType('testcomponent', __NAMESPACE__ . '\\TestDummyComponent');
     $this->query->getComponent('testcomponent', true);
     $requestWithNoBuilderComponent = $this->builder->build($this->query);
     $this->assertEquals($request, $requestWithNoBuilderComponent);
 }