Please let me know how to resolve the below issue.I am new to salesforce,its still giving me an error Too many DML statements: 151.Using Test.starttest() and test.stoptest() is not working.
Test Class:-
public TestMethod static void Test_1(){
test.startTest();
id idvar;
for(integer i=0;i<160;i++){
account accobj=new account();
accobj.name='TestAccount';
accobj.CustomPhone__c='123';
accobj.date_today__c=date.today();
insert accobj;
idvar=accobj.Id;
}
test.stopTest();
SampleClass sampleClObj=new SampleClass();
}