Skip to content

Commit e89c871

Browse files
authored
Adds ->skipTest() to hooks for easy skipping
1 parent acc2a80 commit e89c871

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Hook.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ public function __call($method, $args)
6363
});
6464
}
6565
}
66+
67+
/**
68+
* Skip the test
69+
*/
70+
public function skipTest()
71+
{
72+
Hooks::before($this->buildTransactionName(), function (&$transaction) {
73+
echo "Skipping Test: " . $this->buildTransactionName();
74+
$transaction->skip = true;
75+
});
76+
}
6677

6778
private function reCreateSelf()
6879
{
@@ -79,4 +90,4 @@ private function buildTransactionName()
7990
$this->response,
8091
]);
8192
}
82-
}
93+
}

0 commit comments

Comments
 (0)