You should work through some Trailhead modules if you're unsure of where to start. The idea behind what you have to test here is very simple, however. Insert your data, then construct your class.
You may want to test the ordering aspect, but I'd say that's a bit over the top, and you can just check how many
Task records are returned by the query. I'd also make that
private set. You should always do so unless you know for sure you want the page to be able to set the value.
static testMethod void testMyExtension()
final Integer RECORD_COUNT = 10;
Account record = new Account(/*required fields*/);
List<Task> tasks = new List<Task>();
for (Integer i = 0; i < RECORD_COUNT; i++)
tasks.add(new Task(/*required fields*/));
ApexPages.StandardController controller = new ApexPages.StandardController(record);
MyExtension extension = new MyExtension(controller);
system.assertEquals(RECORD_COUNT, extension.tasks.size(), 'All records should be queried');
One more note, in terms of your naming, the class you are writing is an extension, not a controller. This post is well worth the read: Difference between controller and extensions