コード例 #1
0
ファイル: MapOfStringsTest.php プロジェクト: haldayne/boost
 /**
  * We've got a map of strings, and we should be able to call keys on it
  * and get the keys out, even if the keys aren't themselves strings.
  */
 public function test_keys_with_exotic_keys()
 {
     $map = new MapOfStrings();
     $map['foo'] = 'bar';
     $map[function () {
     }] = 'baz';
     $map->keys();
 }
コード例 #2
0
 public function test_fluent_conversion()
 {
     $words = new MapOfStrings(['foo', 'bar']);
     $this->assertSame(6, $words->map('strlen($_0)')->into(new MapOfInts())->sum());
 }