Beispiel #1
0
 public function testFnCount()
 {
     $fn = FnGen::fnCount();
     $this->assertEquals(count(0), $fn(0));
     $this->assertEquals(count(null), $fn(null));
     $this->assertEquals(count('hello'), $fn('hello'));
     $this->assertEquals(count(array()), $fn(array()));
     $this->assertEquals(count(array(1, 2, 3)), $fn(array(1, 2, 3)));
     $this->assertNotEquals(count(array(1, 2)), $fn(array(1, 2, 3)));
 }