public function testExceptionConstructorWithErrorCode() { $code = 404; $e = new FacebookApiException(array('error_code' => $code)); $this->assertEquals($code, $e->getCode()); }
public function testExceptionConstructorWithInvalidErrorCode() { $e = new FacebookApiException(array('error_code' => 'not an int')); $this->assertEquals(0, $e->getCode()); }