function test_omit_error() { $str = 'On January 29, 1737, Thomas Paine was born in Thetford, England. His father, a corseter, had grand visions for his son, but by the age of 12, Thomas had failed out of school. The young Paine began apprenticing for his father, but again, he failed.'; $myobj = new Text_LanguageDetect(); $result = $myobj->detectSimple($str); $this->assertEquals('english', $result); // omit all languages and you should get an error $myobj->omitLanguages($myobj->getLanguages()); $result = $myobj->detectSimple($str); $this->assertNull($result, gettype($result)); }