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