コード例 #1
0
function _size($list)
{
    return Underscore::size($list);
}
コード例 #2
0
ファイル: Underscore.php プロジェクト: brombal/underscore.php
 /**
  * @dataProvider peopleDataProvider
  * @tags collections
  */
 public function testSize($people, $type, $meta)
 {
     // it should count the number of items in any list
     $this->integer(_::size($people))->isEqualTo(5);
     // it should be able to count scalar (even if it mean nothing...)
     $this->integer(_::size("hello"))->isEqualTo(1);
     // it should return 0 for null
     $this->integer(_::size(null))->isIdenticalTo(0);
 }