예제 #1
0
파일: ManagerTest.php 프로젝트: phpab/phpab
 public function testCheckParticipatesVariantFail()
 {
     // Arrange
     $manager = new Manager($this->storage);
     $manager->participate('foo', 'yolo');
     // Act
     $result = $manager->participates('foo', 'bar');
     // Assert
     $this->assertFalse($result);
 }
예제 #2
0
파일: EngineTest.php 프로젝트: phpab/phpab
 public function testNoVariantAvailableForTest()
 {
     // Arrange
     $storage = new Storage(new Runtime());
     $manager = new Manager($storage);
     $test = new Test('t1');
     $engine = new Engine($manager, new Dispatcher());
     $engine->addTest($test, [], $this->alwaysParticipateFilter, new StaticChooser('v1'));
     $engine->start();
     // Act
     $result = $manager->participates('t1');
     // Assert
     $this->assertTrue($result);
 }