aboutsummaryrefslogtreecommitdiffstats
path: root/Praspel.php
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-11 14:56:53 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-11 14:56:53 +0200
commit3f262edf4890e6e9a438288d716d2d583fb65562 (patch)
tree85b72160b4afc2f74c9d7e924cf29a4fa6b81ee3 /Praspel.php
parent95d7bfe7ec36e52b1ec46a0d1dda5982f0958c31 (diff)
downloadPraspel-3f262edf4890e6e9a438288d716d2d583fb65562.zip
Praspel-3f262edf4890e6e9a438288d716d2d583fb65562.tar.gz
Praspel-3f262edf4890e6e9a438288d716d2d583fb65562.tar.bz2
Do not automatically generate data when missing.
Diffstat (limited to 'Praspel.php')
-rw-r--r--Praspel.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/Praspel.php b/Praspel.php
index 1643127..ea8e3b4 100644
--- a/Praspel.php
+++ b/Praspel.php
@@ -161,6 +161,7 @@ class Praspel {
*
* @access public
* @return bool
+ * @throw \Hoa\Praspel\Exception\Generic
* @throw \Hoa\Praspel\Exception\Group
*/
public function evaluate ( ) {
@@ -177,7 +178,11 @@ class Praspel {
$reflection->setAccessible(true);
// Prepare data.
- $data = $this->getData() ?: $this->generateData();
+ if(null === $data = $this->getData())
+ throw new Exception\Generic(
+ 'No data were given. The System Under Test %s needs data to ' .
+ 'be executed.', 1, $callable);
+
$arguments = array();
foreach($reflection->getParameters() as $parameter) {