コード例 #1
0
 /**
  * @BeforeStep
  */
 public function debugStepsBefore(BeforeStepScope $scope)
 {
     // Tests tagged with @debugBeforeEach will wait for [ENTER] before running each step.
     if ($this->scenario->hasTag('debugBeforeEach')) {
         $this->printUrl();
         $this->iPutABreakpoint();
     }
 }
コード例 #2
0
 public function testTags()
 {
     $scenario = new ScenarioNode();
     $this->assertFalse($scenario->hasTags());
     $this->assertInternalType('array', $scenario->getTags());
     $this->assertEquals(0, count($scenario->getTags()));
     $scenario->setTags($tags = array('tag1', 'tag2'));
     $this->assertEquals($tags, $scenario->getTags());
     $scenario->addTag('tag3');
     $this->assertEquals(array('tag1', 'tag2', 'tag3'), $scenario->getTags());
     $this->assertFalse($scenario->hasTag('tag4'));
     $this->assertTrue($scenario->hasTag('tag2'));
     $this->assertTrue($scenario->hasTag('tag3'));
 }