/** * @return SearchRequest */ public function removeSorting() { $path = $this->prefixWithNamespace('sort'); $this->argumentsAccessor->reset($path, null); $this->stateChanged = true; return $this; }
/** * @test */ public function canReset() { $data = ['one' => ['two' => ['a' => 111, 'b' => 222]]]; // can set and get a simple value $arrayAccessor = new ArrayAccessor($data); $this->assertSame(111, $arrayAccessor->get('one:two:a')); $this->assertSame(222, $arrayAccessor->get('one:two:b')); $arrayAccessor->reset('one:two:a'); $this->assertSame(null, $arrayAccessor->get('one:two:a')); $this->assertSame(222, $arrayAccessor->get('one:two:b')); }
/** * @test */ public function resetIsRemovingSubNodesAndEmptyNodes() { $data = ['one' => ['two' => ['a' => 111, 'b' => 222], 'three' => 333]]; // can set and get a simple value $arrayAccessor = new ArrayAccessor($data); $this->assertSame(111, $arrayAccessor->get('one:two:a')); $this->assertSame(222, $arrayAccessor->get('one:two:b')); $arrayAccessor->reset('one:two'); $this->assertSame(null, $arrayAccessor->get('one:two:a')); $this->assertSame(null, $arrayAccessor->get('one:two:b')); $this->assertSame(null, $arrayAccessor->get('one:two')); $this->assertSame(333, $arrayAccessor->get('one:three')); }
/** * Removes the pageSections filter setting. * * @return void */ public function removeSearchQueryFilterForPageSections() { $this->configurationAccess->reset('plugin.tx_solr.search.query.filter.__pageSections'); }