title: Which kind of test should I use for a library?
body: <p>I'm developing a PHP library that I'd like to use in different projects. The library uses a REST-like service in the background. I don't want to write tests for the service API, but for the library.</p>
  
  <p>Would I need to write unit tests? Or functional tests? Since it is a library I won't write acceptance test - I hope this is correct.</p>
  
  <p>I don't know if this is important for the issue, but the library needs to login into the service API and uses an API-key for the next operations. Also, when the library gets tested, the operations before are important. It is a designer tool and I have operations like 'move rectangle', 'rotate rectangle' and so on and I would like to test several operations in a sequence that should bring a certain result.</p>
  
  <p>I think that this is a kind of functional test. Or do I need both? Can unit tests work with a service in the background?</p>