I am working on a new PHP project and while I like TTD, I am finding that it seem to be more hindering than being helpful at this stage of the project.
I started off writing unit tests however now that I am deeper into prototyping of some the application features, I find myself rewriting bits and pieces of the core framework along with writing the tests. It just seems like I am spending a lot more time rewriting tests where maybe I should wait until I am in more of an alpha/beta phase of the project.
Should I be writing unit test from the beginning even though there is a high chance I am going to have to rewrite them?
Yes, it is the best way to understand your system and create a solid API.
It sounds like you need to move your tests up to a higher level. Don’t test individual methods, test units of functionality. The more recent buzzword is BDD or Context/Specification but it’s not really a different thing since I’ve yet to meet a tdd practitioner that wasn’t at least trying to move in that direction.