Example #1
0
 public function testSwitch()
 {
     $t = new \Test\Flow();
     $this->assertTrue($t->testSwitch1() === 10);
     $this->assertTrue($t->testSwitch2() === true);
     $this->assertTrue($t->testSwitch3() === false);
     $this->assertTrue($t->testSwitch4() === 2);
     $this->assertTrue($t->testSwitch5() === 1);
     $this->assertTrue($t->testSwitch6() === 1);
     $this->assertTrue($t->testSwitch7() === 1);
     $this->assertTrue($t->testSwitch8() === 2);
     $this->assertTrue($t->testSwitch9() === 2);
 }
Example #2
0
 public function testSwitch()
 {
     $t = new \Test\Flow();
     $this->assertSame($t->testSwitch1(), 10);
     $this->assertTrue($t->testSwitch2());
     $this->assertFalse($t->testSwitch3());
     $this->assertSame($t->testSwitch4(), 2);
     $this->assertSame($t->testSwitch5(), 1);
     $this->assertSame($t->testSwitch6(), 1);
     $this->assertSame($t->testSwitch7(), 1);
     $this->assertSame($t->testSwitch8(), 2);
     $this->assertSame($t->testSwitch9(), 2);
     $this->assertSame($t->testSwitch10(), 2);
     $this->assertSame($t->testSwitch11(), 1);
     $this->assertSame($t->testSwitch12(10, 6), 1);
     $this->assertSame($t->testSwitch12(6, 10), 0);
     $this->assertSame($t->testSwitch12(2, 3), 2);
 }
Example #3
0
 public function testSwitch()
 {
     $t = new \Test\Flow();
     $this->assertEquals($t->testSwitch1(), 10);
     $this->assertEquals($t->testSwitch2(), true);
     $this->assertEquals($t->testSwitch3(), false);
     $this->assertEquals($t->testSwitch4(), 2);
     $this->assertEquals($t->testSwitch5(), 1);
     $this->assertEquals($t->testSwitch6(), 1);
     $this->assertEquals($t->testSwitch7(), 1);
     $this->assertEquals($t->testSwitch8(), 2);
     $this->assertEquals($t->testSwitch9(), 2);
     $this->assertEquals($t->testSwitch10(), 2);
     $this->assertEquals($t->testSwitch11(), 1);
     $this->assertEquals($t->testSwitch12(10, 6), 1);
     $this->assertEquals($t->testSwitch12(6, 10), 0);
     $this->assertEquals($t->testSwitch12(2, 3), 2);
 }