Apex StandardControllerテストクラス
@isTest
private class Test_testController {
static testmethod void test1() {
Account acc = new Account(
Name='テスト'
);
insert acc;
Test.startTest();
ApexPages.StandardController sc = new ApexPages.StandardController(acc);
testController testSC = new testController(sc);
PageReference pageRef = Page.testPage;
pageRef.getParameters().put('id', String.valueOf(acc.Id));
Test.setCurrentPage(pageRef);
testSC.testMethod();
Test.stopTest();
}
}