title: Codeception - How can I get the $scenario property inside a cest method?
body: <p>I have a Cest class where I want to use the scenario property of $I, but it's generated as protected and no getter is defined for it. I want to see if the scenario is running or not. How can I do this?</p>
  
  <p>The code is something like this:</p>
  
  <pre><code>public function testFunction(ApiGuy $I){
  
      if ($I-&gt;scenario-&gt;running()){
      } 
  
  }
  </code></pre>
  
  <p>ApiGuy extends AbstractGuy that has a property: protected $scenario; so $I->scenario is null, as well as $I->getScenario(). I can add a public function to do this, but every time I build the ApiGuy this gets overwritten. Isn't it another way of doing this?</p>