Witam napisałem funkcje addNews która dodaje wczesniej przygodowane dane do bazy danych. Pierwszy raz chciał bym dodać do projektu testy jednostkowe i tu moje pytanie czy testowanie takiej funkcji jest konieczne i w ogole mozliwe
public function addNews($title, $description, $article, $imgPath)
{
try {
$statement = $this->pdo->prepare("INSERT INTO $this->dbTableName VALUES(NULL,:title,:description,:article,:imgPath)");
$statement->bindParam(":title", $title, PDO::PARAM_STR);
$statement->bindParam(":description", $description, PDO::PARAM_STR);
$statement->bindParam(":article", $article, PDO::PARAM_STR);
$statement->bindParam(":imgPath", $imgPath, PDO::PARAM_STR);
$statement->execute();
} catch (Exeption $e) {}
}