phpunit check exception not thrown code example Example: phpunit check exception not thrown $this->addToAssertionCount(1); // does not throw an exception