Example #1
0
 public function testFor()
 {
     $t = new \Test\Flow();
     $this->assertSame($t->testFor1(), 10);
     $this->assertSame($t->testFor2(), 6.0);
     $this->assertSame($t->testFor3(), array(4, 3, 2, 1));
     $this->assertSame($t->testFor4(), 55);
     $this->assertSame($t->testFor5(), 55);
     $this->assertSame($t->testFor6(), 55);
     $this->assertSame($t->testFor7(), 55);
     $this->assertSame($t->testFor8(), 55);
     $this->assertSame($t->testFor9(), 55);
     $this->assertSame($t->testFor10(), 55);
     $this->assertSame($t->testFor11(), 'abcdefghijklmnopqrstuvwxyz');
     $this->assertSame($t->testFor12(), 'zyxwvutsrqponmlkjihgfedcba');
     $this->assertSame($t->testFor13(), '0123456789');
     $this->assertSame($t->testFor14(), '9876543210');
     $this->assertSame($t->testFor15(1, 10), 55);
     $this->assertSame($t->testFor16(), array(0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10));
     $this->assertSame($t->testFor17(), array(0 => 10, 1 => 9, 2 => 8, 3 => 7, 4 => 6, 5 => 5, 6 => 4, 7 => 3, 8 => 2, 9 => 1));
     $this->assertSame($t->testFor18(), array(0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => 6, 6 => 7, 7 => 8, 8 => 9, 9 => 10));
     $this->assertSame($t->testFor19(), 25);
     $this->assertSame($t->testFor20(), 25);
     $this->assertSame($t->testFor21(), 0);
     $this->assertSame($t->testFor22(), 0);
     $this->assertSame($t->testFor23(), 'zxvtrpnljhfdb');
 }