The whole idea of unit testing is to have a predefined value and to define what the method should return after processing.
This makes sense:
$n = add(1, 1);
$this->assertEquals(2, $n);
This does not:
$rand = generateRandomNumber();
$this->assertIsRandom($rand); // What does this even mean?
This means that your test needs to have a .cvs-file that is the same for every test, and the data from the database is the same every time. If you have this you can calculate what the expected results should be. If there are any variables outside the test that can vary, reliable testing is impossible.
A better approach is to split the test in multiple smaller modules. Test the processing, cleaning and aggregation that the final content is manipulated by. This is easily testable. For example:
$str = removeUpperCase('abCDe');
$this->assertEquals('abe', $str);