incUse() публичный Метод

Increment uses for gets and sets
public incUse ( )
Пример #1
0
 public function testIncUse()
 {
     $variable = new Variable('a', null, CompiledExpression::UNKNOWN);
     static::assertSame(0, $variable->getGets());
     static::assertSame(0, $variable->getSets());
     $variable->incUse();
     static::assertSame(1, $variable->getGets());
     static::assertSame(1, $variable->getSets());
     $variable->incUse();
     static::assertSame(2, $variable->getGets());
     static::assertSame(2, $variable->getSets());
     $variable->incUse();
     $variable->incUse();
     static::assertSame(4, $variable->getGets());
     static::assertSame(4, $variable->getSets());
 }