diff options
author | Olly Betts <olly@survex.com> | 2023-04-24 15:14:55 +1200 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2023-04-24 15:15:44 +1200 |
commit | d9aeb0130662bc8c4f391ed35096ddf3c78b256d (patch) | |
tree | 1de9057f6eee33ced75cb9752ed99efdcd0096f3 /Examples | |
parent | d45884bab5a881cb1420625ad27c5fccb5b4f6b1 (diff) | |
download | swig-d9aeb0130662bc8c4f391ed35096ddf3c78b256d.tar.gz |
catches_strings_runme.php: Check exact exception message
There's no need to do a substring check here.
Diffstat (limited to 'Examples')
-rw-r--r-- | Examples/test-suite/php/catches_strings_runme.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Examples/test-suite/php/catches_strings_runme.php b/Examples/test-suite/php/catches_strings_runme.php index f727ea26a..758c3f618 100644 --- a/Examples/test-suite/php/catches_strings_runme.php +++ b/Examples/test-suite/php/catches_strings_runme.php @@ -6,7 +6,7 @@ $exception_thrown = false; try { StringsThrower::charstring(); } catch (Exception $e) { - check::str_contains($e->getMessage(), "charstring message", "incorrect exception message: {$e->getMessage()}"); + check::equal($e->getMessage(), "charstring message", "incorrect exception message: {$e->getMessage()}"); $exception_thrown = true; } check::equal($exception_thrown, true, "Should have thrown an exception"); @@ -15,7 +15,7 @@ $exception_thrown = false; try { StringsThrower::stdstring(); } catch (Exception $e) { - check::str_contains($e->getMessage(), "stdstring message", "incorrect exception message: {$e->getMessage()}"); + check::equal($e->getMessage(), "stdstring message", "incorrect exception message: {$e->getMessage()}"); $exception_thrown = true; } check::equal($exception_thrown, true, "Should have thrown an exception"); |