コード例 #1
0
 /**
  * @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'));
 }
コード例 #2
0
 /**
  * @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'));
 }
コード例 #3
0
ファイル: SearchRequest.php プロジェクト: hnadler/ext-solr
 /**
  * @return array
  */
 public function getAsArray()
 {
     return $this->argumentsAccessor->getData();
 }
コード例 #4
0
 /**
  * Removes the pageSections filter setting.
  *
  * @return void
  */
 public function removeSearchQueryFilterForPageSections()
 {
     $this->configurationAccess->reset('plugin.tx_solr.search.query.filter.__pageSections');
 }