public function scenarioTestWithMismatchWithAndExpectExpectException() { $target = \Enhance\Core::getCodeCoverageWrapper('ScenarioExampleClass'); $scenario = \Enhance\Core::getScenario($target, 'addTwoNumbers'); $scenario->with(1, 2); // missing the expectation, this is the point of this test $scenario->with(1, 2)->expect(5); try { $scenario->VerifyExpectations(); } catch (exception $e) { \Enhance\Assert::AreIdentical('Scenario must be initialised with the same number of "with" and "expect" calls', $e->getMessage()); } }