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