Codeception / Codeception/Verify

expect callableNotToThrow does not modify assertion count

Open
#56 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
147
Forks
26
PR merge metrics
No merged PRs in 30d

Description

When testing that an exception is not thrown, the assertion count is not raised. This is true for both variants on the latest 2.2 release:

```php
verify($callable)->callableDoesNotThrow(\Exception::class);
expect($callable)->callableNotToThrow(\Exception::class);
```

Here is a sample test:

```php
public function testCallableDoesNotThrow()
{
$testFunction = function() {};
expect($testFunction)->callableNotToThrow(\Exception::class);
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.