Since: 1.0
Author: Bernhard Schussek (bschussek@gmail.com)
Author: Titouan Galopin (galopintitouan@gmail.com)
Inheritance: extends AbstractDecorator, implements Webmozart\KeyValueStore\Api\SortableStore
コード例 #1
0
 public function testSortCaseInsensitiveStringKeys()
 {
     if (PHP_VERSION_ID < 50400) {
         $this->markTestSkipped('SORT_FLAG_CASE not available');
     }
     $store = new SortableDecorator(new ArrayStore());
     $store->set('_Ac', 'A');
     $store->set('abc', 'F');
     $store->set('_ab', 'G');
     $store->set('ABB', 'E');
     $store->set('Bce', 'C');
     $store->set('bcd', 'D');
     $store->set('bCf', 'E');
     $store->sort(SORT_STRING | SORT_FLAG_CASE);
     $this->assertSame(array('_ab' => 'G', '_Ac' => 'A', 'ABB' => 'E', 'abc' => 'F', 'bcd' => 'D', 'Bce' => 'C', 'bCf' => 'E'), $store->getMultiple($store->keys()));
 }
コード例 #2
0
 public function testKeysDelegate()
 {
     $this->innerStore->expects($this->once())->method('keys');
     $this->decorator->keys();
 }