Sunday, 8 September 2013

TDD with an MP3 library

TDD with an MP3 library

I'm trying to learn TDD, and my first project is a PHP-based project to
help me organise my somewhat small MP3 collection. I'm aware that there
are many other, much better solutions out there, but this is simply for
the sake of getting to grips with TDD.
I require a method that will accept a filename, and return the duration of
the MP3 using a command line call to ffmpeg. Is it possible to test this
method short of pointing it to a real MP3? Should I just test the simple
things, such as whether the file even exist? Should I bother testing it at
all?
I'd apprecate your thoughts.
Many thanks in advance.

No comments:

Post a Comment